✂️ Add or remove final newlines.
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-07-21 14:36:34 +02:00
docs Initial commit 2026-07-06 17:47:57 +02:00
.gitignore Initial commit 2026-07-06 17:47:57 +02:00
main.q Updated to latest version 2026-07-21 14:36:34 +02:00

fnl

Add or remove final newlines.

Installation

Install Q. Then clone and build from source.

git clone https://git.urbach.dev/cli/fnl
cd fnl
q build

Usage

Single file

Show status:

fnl file.txt

Add final newline:

fnl -add file.txt

Remove final newline:

fnl -remove file.txt

Multiple files

Show status:

find . -type f -name "*.txt" | xargs fnl

Add final newlines:

find . -type f -name "*.txt" | xargs fnl -add

Remove final newlines:

find . -type f -name "*.txt" | xargs fnl -remove

Streams

Add final newline:

fnl -add < file.txt

Remove final newline:

fnl -remove < file.txt

Editors

VS Code:

"filewatcher.commands": [{"match": "\\.go*","isAsync": true,"cmd": "fnl -remove ${file}","event": "onFileChange"}],

Zed:

"languages": {
	"Go": {
		"formatter": [
			{
				"language_server": {
					"name": "gopls",
				},
			},
			{
				"external": {
					"command": "fnl",
					"arguments": ["-remove"],
				},
			},
		],
	},
},

License

Please see the license documentation.

© 2026 Eduard Urbach