SkillAgentSearch skills...

Codebook

An unholy spell checker for code

Install / Use

/learn @blopker/Codebook
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

<br /> <div align="center"> <a href="https://github.com/blopker/codebook"> <img src="https://raw.githubusercontent.com/blopker/codebook/main/assets/codebook-nt.webp" alt="Logo" width="200" > </a> <h3 align="center">CODEBOOK</h3> <p align="center"> An unholy spell checker for code. <br /> <br /> <!-- <a href="https://github.com/blopker/codebook/releases/latest/">Download</a> --> <br /> <br /> <a href="https://github.com/blopker/codebook/issues">Report Bug</a> · <a href="https://github.com/blopker/codebook/issues">Request Feature</a> </p> </div>

Usage

<img src="https://raw.githubusercontent.com/blopker/codebook/main/assets/example.png" alt="Example" width="400" >

No configuration needed. Codebook will automatically detect the language you are editing and mark issues for you. Codebook will try to only mark issues for words that you create, where they are initially defined.

Please give a ⭐ if you find Codebook useful!

Supported platforms: Prebuilt archives are published for macOS (x86_64, aarch64), Linux (x86_64, aarch64), and Windows (x86_64, arm64).

Integrations

Zed

Codebook is the most popular spell checker for Zed! To install, go to the Extension tab in Zed and look for "Codebook". Done!

Note: The version that Zed displays in the extension menus is for the Zed Extension, and not the LSP version (this repo). The extension will automatically update the LSP. If that updater is broken for some reason, try uninstalling the extension and reinstalling.

If quickfix code actions are not showing up for specific languages, ensure your settings.json file includes the special "...", or "codebook", value in any language_servers values defined:

"languages": {
  "Python": {
    "language_servers": ["pyright", "ruff", "..."],
    // OR
    "language_servers": ["pyright", "ruff", "codebook"],
    "format_on_save": "on"
  }
},

Helix

Codebook can also be enabled for the Helix editor by adding the LSP to the languages.toml configuration file.

First, install Codebook, and ensure that codebook-lsp is installed into your $PATH.

Then, add into the Helix languages.toml configuration file:

[language-server.codebook]
command = "codebook-lsp"
args = ["serve"]

# Example use in markdown:
[[language]]
name = "markdown"
language-servers = ["codebook"]

This can be verified with:

hx --health markdown

Suggestions will appear in files opened, and space-mode a key binding can be used to accept suggestions.

Neovim

nvim-lspconfig includes a configuration for Codebook.

First, install Codebook, and ensure that codebook-lsp is installed into your $PATH.

Install nvim-lspconfig if you have not already. Then, add the following to your Neovim configuration:

vim.lsp.enable('codebook')

VS Code (Unreleased)

A VS Code extension lives in editors/vscode. The extension manages the codebook-lsp binary for you, starts it with the right flags, and exposes a few configuration toggles (codebook.binaryPath, codebook.enablePrerelease, and codebook.logLevel).

To try it locally:

cd editors/vscode
bun install       # or npm install
bun run build
bun run package   # or npm run package
code --install-extension codebook-vscode-*.vsix

Once the extension is installed it will activate automatically for every supported language.

Note: This extension is a work in progress and is not in the Marketplace yet. If you try it out, we'd love feedback!

Other Editors

Any editor that implements the Language Server Protocol should be compatible with Codebook. To get started, follow the installation instructions, then consult your editor's documentation to learn how to configure and enable a new language server. For your reference, the following command starts the server such that it listens on STDIN and emits on STDOUT:

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!

# 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. 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.

However, if you are looking for a traditional spell checker for prose, Codebook may not be what you are looking for. For example, capitalization issues are handled loosely and grammar checking is out of scope.

To see the motivations behind Codebook, read this blog post.

Status

Codebook is in active development. As better dictionaries are added, words that were previously marked as misspelled (or spelled correctly), might change over time to improve correctness.

Supported Programming Languages

| Language | Status | | ---------- | ------ | | C | ✅ | | C# | ⚠️ | | C++ | ⚠️ | | CSS | ⚠️ | | Elixir | ⚠️ | | Erlang | ⚠️ | | Go | ✅ | | Haskell | ⚠️ | | HTML | ⚠️ | | Java | ✅ | | JavaScript | ✅ | | LaTeX | ⚠️ | | Lua | ✅ | | Markdown | ✅ | | Odin | ✅ | | PHP | ⚠️ | | Plain Text | ✅ | | Python | ✅ | | Ruby | ✅ | | Rust | ✅ | | Swift | ⚠️ | | TOML | ✅ | | TypeScript | ✅ | | Typst | ⚠️ | | VHDL | ⚠️ | | YAML | ⚠️ | | Zig | ✅ |

✅ = Good to go. ⚠️ = Supported, but needs more testing. Help us improve! ❌ = Work has started, but there are issues.

If Codebook is not marking issues you think it should, please file a GitHub issue!

Installation

If you are a Zed user, you may skip this step and consult the Zed section of this document. Otherwise, you will need to install the codebook-lsp binary and make it available on your $PATH. You have a number of options to do this.

Manual

  1. Download the latest release for your architecture from the releases page.
    • Prebuilt archives are published for macOS (x86_64, aarch64), Linux (x86_64, aarch64), and Windows (x86_64, arm64).
    • Windows artifacts are provided as .zip files; macOS and Linux artifacts are .tar.gz.
  2. Extract the binary from the archive, and move it somewhere on your system $PATH.
  • ~/.local/bin/codebook-lsp
  • /usr/bin/codebook-lsp
  • Etc...

Eget Installation

You can install the latest release using eget:

eget blopker/codebook

Arch Linux

You can install the Codebook LSP using pacman:

pacman -S codebook-lsp

Cargo Install

You can also install the Codebook LSP using Cargo:

cargo install codebook-lsp

To install directly from the GitHub repository:

cargo install --git https://github.com/blopker/codebook codebook-lsp

From Source

You may also build codebook from source by cloning the repository and running make build.

Configuration

Codebook supports both global and project-specific configuration. Configuration files use the TOML format, with project settings overriding global ones.

Global Configuration

The global configuration applies to all projects by default. Location depends on your operating system:

  • Linux/macOS: $XDG_CONFIG_HOME/codebook/codebook.toml or ~/.config/codebook/codebook.toml
  • Windows: %APPDATA%\codebook\codebook.toml or %APPDATA%\Roaming\codebook\codebook.toml

You can override this location if you sync your config elsewhere by providing initializationOptions.globalConfigPath from your LSP client. When no override is provided, the OS-specific default above is used.

Project Configuration

Project-specific configuration is loaded from either codebook.toml or .codebook.toml in the project root. Codebook searches for this file starting from the current directory and moving up to parent directories.

Note: Codebook picks which config to use on startup. If a config file is manually created or renamed (like switching between codebook.toml and .codebook.toml), restart your editor (or the LSP server) for the new file to be recognized.

Configuration Options

# List of dictionaries to use for spell checking
# Default: ["en_us"]
# Available dictionaries:
#  - English: "en_us", "en_gb"
#  - German: "de", "de_at", "de_ch"
#  - Dutch: "nl_nl"
#  - Spanish: "es"
#  - French: "fr"
#  - Italian: "it"
#  - Portuguese (Brazil): "pt_br"
#  - Russian: "ru"
#  - Swedish: "sv"
#  - Danish: "da"
#  - Latvian: "lv"
#  - Vietnamese: "vi_vn"
#  - Polish: "pl"
#  - Ukrainian: "uk"
dictionaries = ["en_us", "en_gb"]

# Custom allowlist of words to ignore (case-insensitive)
# Codebook will add words

Related Skills

View on GitHub
GitHub Stars665
CategoryDevelopment
Updated1h ago
Forks46

Languages

Rust

Security Score

95/100

Audited on Mar 28, 2026

No findings