Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .claude/settings.local.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
"Bash(gh issue view:*)",
"Bash(gh repo view:*)",
"Bash(cargo build:*)",
"Bash(cargo search:*)"
"Bash(cargo search:*)",
"WebFetch(domain:docs.rs)"
]
}
}
60 changes: 60 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ env_logger = "0.11.6"
fs2 = "0.4"
git2 = "0.20.0"
glob = "0.3"
globset = "0.4"
ignore = "0.4"
httpmock = "<0.9.0"
lazy_static = "1.5.0"
log = "0.4.22"
Expand Down
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,28 @@ Any editor that implements the Language Server Protocol should be compatible wit
codebook-lsp serve
```

### CLI (Lint) (Unstable)

Codebook can also be used as a standalone command-line spell checker, which is useful for CI pipelines, pre-commit hooks, or one-off checks.

Note: this command is currently experimental, unstable, and subject to breaking changes in future releases. Please submit feedback!

```sh
# Check specific files
codebook-lsp lint src/main.rs src/lib.rs

# Check all files in a directory (recursive)
codebook-lsp lint src/

# Show spelling suggestions
codebook-lsp lint --suggest src/

# Only report each misspelled word once across all files
codebook-lsp lint --unique src/
```

The exit code is **0** if all files are clean, **1** if any spelling errors are found, and **2** if there were unreadable files, invalid UTF-8, etc.

## About

Codebook is a spell checker for code. It binds together the venerable Tree Sitter and the fast spell checker [Spellbook](https://github.com/helix-editor/spellbook). Included is a Language Server for use in (theoretically) any editor. Everything is done in Rust to keep response times snappy and memory usage _low_.
Expand Down
2 changes: 2 additions & 0 deletions crates/codebook-lsp/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ env_logger.workspace = true
fs2.workspace = true
log.workspace = true
lru.workspace = true
globset.workspace = true
ignore.workspace = true
serde.workspace = true
serde_json.workspace = true
string-offsets.workspace = true
Expand Down
Loading
Loading