fixen-cli
v0.1.8
Published
Fix your English from the command line — backend-agnostic corrector that works with claude, codex, gjc, gemini, ollama, or any OpenAI-compatible API.
Maintainers
Readme
fixen
You already talk to an LLM all day. fixen turns it into your personal proofreader: one tiny zero-dependency CLI that builds a correction prompt and pipes it into whatever is on your machine — claude, codex, gjc, gemini, ollama, any OpenAI-compatible API, or any shell command that reads a prompt and prints an answer. No accounts, no API keys (unless you want one), no vendor lock-in.
And the part that makes it stick: fixen install hooks your AI chat CLIs so every normal chat reply ends with a correction of what you typed. You learn while you work, for free, without opening a single flashcard app.
Install
npm install -g fixen-cli # installs the `fixen` commandRequires Node.js ≥ 18 and at least one backend — if you can run claude, codex, gjc, gemini, or ollama in a terminal, you're done.
Platform: macOS and Linux are fully supported. On Windows, the ollama and api backends work natively, but the AI-CLI backends and -c/--command need a POSIX shell — run fixen under WSL.
Updating
fixen update # upgrade the package, then rewrite the rule with the new version
fixen update --check # just compare versions (exit 1 if outdated) — safe for scriptsnpm install -g fixen-cli@latest only replaces the binary: RULE.md and the one-liners in your CLIs keep the wording of whatever version wrote them. fixen update does both halves — it detects your package manager from the install path (npm, pnpm, yarn, bun; override with FIXEN_UPDATE_CMD), upgrades, then re-runs install with the new binary so the rule matches the new code. A git/npm link checkout is never overwritten: it reports where the copy lives and refreshes only the rule.
Usage
fixen "your english sentence" # one-shot
echo "your sentence" | fixen # stdin / pipes
fixen # interactive mode (type lines, Ctrl+D to quit)
fixen -e "sentence" # also explain what was fixed
fixen -e -l Korean "sentence" # explanations in Korean
fixen -t Japanese "日本語の文" # correct any language, not just EnglishEnglish is just the default. -t/--target (or FIXEN_TARGET, or "target" in the config) switches the language being corrected — fixen -t French -e -l Korean "..." corrects French and explains the fixes in Korean.
Chat mode: corrections inside your AI CLI
The killer feature. fixen install writes the full rule once to ~/.config/fixen/RULE.md, detects which AI CLIs are installed, and adds exactly one marked line to each one's global instructions — a compact version of the rule plus a pointer to the rule file. From then on, your normal chats end like this:
$ fixen install
rule ~/.config/fixen/RULE.md
ok claude: ~/.claude/CLAUDE.md (one line added)
ok codex: ~/.codex/AGENTS.md (one line added)
ok gjc: ~/.gjc/agent/AGENTS.md (one line added)
$ gjc -p "hey what is capital of france? my dream is go to paris someday"
The capital of France is Paris. ...
> **fixen** · My dream is **to** go to Paris someday.
> ↳ '가다'는 to부정사로 — go → to goAsk about Kubernetes, get better English on the side. Every message you type is a free micro-lesson.
Out of the box it knows the global instruction locations of claude, codex, gjc, gemini, qwen, opencode, windsurf, goose, crush, and cline — only the ones actually present are touched. Using something else? Point at its instruction file directly (tracked in a manifest, so uninstall cleans it too):
fixen install -f ~/.someai/INSTRUCTIONS.mdDetails that keep it polite:
- Only fires when your own writing has mistakes — correct sentences, pasted code, logs, and quotes are left alone.
fixen install -t Japanesewatches Japanese instead;-e -l Koreanadds one-line reasons in Korean.- Your existing CLAUDE.md/AGENTS.md content is untouched: one marker-wrapped line in, one line out. For Claude Code the line uses the native
@~/.config/fixen/RULE.mdimport, so the full rule is inlined automatically. fixen uninstallremoves every trace (pointer lines and the rule file);fixen statusshows where it's active. Re-runninginstallis idempotent and upgrades old-style installs in place, andfixen updatedoes that for you after every version bump.installregenerates the rule from the flags and config it sees, so a barefixen installafterfixen install -t Japanese -efalls back to defaults — keep"target","lang", and"explain"inconfig.jsoninstead of retyping flags.- Applies to new chat sessions.
Backends
Auto-detected in this order: claude → codex → gjc → gemini → ollama → api (if an API key is set). Pick one explicitly with -b:
| Backend | Uses |
| -------- | ------------------------------------------- |
| claude | claude -p (Claude Code) |
| codex | codex exec (OpenAI Codex CLI) |
| gjc | gjc -p (Gajae Code) |
| gemini | gemini -p (Gemini CLI) |
| ollama | ollama run <model> — local, offline |
| api | any OpenAI-compatible /chat/completions |
Custom command
Anything that reads a prompt and prints an answer works:
fixen -c 'my-llm --quiet {prompt}' "its a beautiful day" # {prompt} → the prompt, safely quoted
fixen -c 'my-llm --stdin' "its a beautiful day" # no {prompt} → prompt piped to stdinAPI backend
export FIXEN_API_KEY=sk-...
export FIXEN_API_URL=https://api.openai.com/v1 # or any OpenAI-compatible server
export FIXEN_MODEL=gpt-4o-mini
fixen -b api "sentence"Configuration
Defaults live in ~/.config/fixen/config.json:
{ "backend": "claude", "model": null, "command": null, "lang": "Korean", "target": "English", "explain": true }Environment variables FIXEN_BACKEND, FIXEN_BACKEND_CMD, FIXEN_TARGET, FIXEN_LANG, FIXEN_EXPLAIN, FIXEN_MODEL, FIXEN_API_URL, FIXEN_API_KEY override the config; CLI flags override everything (--no-explain turns off a config-enabled explain for one run). A failed backend attempt is retried once; tune with FIXEN_RETRIES (0 disables retries).
Why fixen
- Zero dependencies. One file, ~29 KB unpacked.
npm installfinishes before you blink. - Bring your own model. Your existing CLI subscription or a local
ollamamodel — fixen doesn't care and never sees your text itself. - Any language. English by default;
-tcorrects Japanese, French, German, anything. - Reversible.
fixen uninstallputs every touched file back exactly as it was.
License
MIT
