fixvault
v0.1.2
Published
CLI that saves error logs + what fixed them, so you can find the fix instantly next time.
Maintainers
Readme
FixVault
FixVault is a tiny CLI that saves error logs + what fixed them, so you can find the solution instantly next time.
- Save an error from
stdin→ write a short “what fixed it” note - Fuzzy-search past errors
- Dedupes repeated errors automatically (fingerprint)
- Repo-scoped search by default (with
--all)
Why
You hit an error, you fix it… and two weeks later you hit the same thing again and waste time re-learning.
FixVault is meant to be the quickest possible loop:
<thing that fails> 2>&1 | fix add
fix find "that error"
fix show 12Install
From npm (recommended)
npm i -g fixvaultVerify:
fix --helpFrom GitHub (alternative)
npm i -g github:teddypihl/fixvaultLocal development
npm install
npm run build
npm linkEditor setup (recommended)
FixVault opens an editor so you can write the “what fixed it” note.
VS Code (recommended)
Install the code CLI:
- VS Code → Command Palette → Shell Command: Install 'code' command in PATH
Then set:
export EDITOR="code --wait"Add it permanently (zsh):
echo 'export EDITOR="code --wait"' >> ~/.zshrc
source ~/.zshrcCursor
If you have Cursor CLI installed:
export EDITOR="cursor --wait"If you don’t set EDITOR/VISUAL
FixVault tries to auto-detect code. If not found, it falls back to:
- macOS/Linux:
nano - Windows:
notepad
Nano basics:
- Save:
Ctrl+O, then Enter - Exit:
Ctrl+X
Quickstart
Save an error (interactive note in editor)
Pipe output from a failing command:
pnpm test 2>&1 | fix addOr with Node:
node -e "throw new Error('demo boom')" 2>&1 | fix addSave without opening an editor
node -e "throw new Error('no editor needed')" 2>&1 | fix add --note "Fixed by upgrading dependency X"Save quickly and fill in later
node -e "throw new Error('capture now, write later')" 2>&1 | fix add --no-editor
fix edit 1Find a previous fix
fix find "dependency X"
fix find "demo boom"Repo-scoped vs global search
Inside a git repo, fix find searches only that repo’s entries by default:
fix find "TypeError"Search across all repos / global entries:
fix find "TypeError" --allShow an entry
fix show 3Edit the note
fix edit 3Attach a link (PR / issue / docs)
fix link 3 https://github.com/you/repo/pull/123Commands
fix add
Reads error text from stdin and creates a new fix entry (or dedupes to an existing one).
Examples:
<cmd> 2>&1 | fix addOptions:
--note "<text>"save a structured note without opening an editor--no-editorsave with a placeholder note (edit later withfix edit <id>)--showif duplicate, auto-show the existing fix; for new entries, show after saving
Examples:
node -e "throw new Error('boom')" 2>&1 | fix add
node -e "throw new Error('boom')" 2>&1 | fix add --show
node -e "throw new Error('boom')" 2>&1 | fix add --note "Upgraded dependency X"
node -e "throw new Error('boom')" 2>&1 | fix add --no-editorfix find <query>
Fuzzy-searches entries (repo-scoped by default inside a git repo).
Options:
--allsearch across all repos
Examples:
fix find "SQLITE_ERROR"
fix find "SQLITE_ERROR" --allfix list
Lists recent fixes.
Examples:
fix list
fix list --num 20fix show <id>
Prints the full stored error + note + metadata.
Example:
fix show 12fix edit <id>
Opens the existing note and updates it.
Example:
fix edit 12fix link <id> <url>
Attaches URLs (PRs, issues, docs) to a fix entry.
Example:
fix link 12 https://example.comStorage
FixVault stores data in a local SQLite DB:
- macOS/Linux:
~/.fixvault/fixvault.db - Windows:
%USERPROFILE%\.fixvault\fixvault.db
Stored per entry:
- raw error text
- normalized error text
- fingerprint (for dedupe)
- note markdown
- links
- git context (repo path, branch, commit hash) when available
Dedupe behavior
When you run fix add, FixVault:
- normalizes the error
- hashes it into a fingerprint (repo-scoped when a repo is detected)
- if a row with that fingerprint already exists → it prints the existing id and does not create a duplicate
Troubleshooting
fix command not found
If installed globally:
npm root -g
which fixIf using local dev linking:
npm linkNative build issues (better-sqlite3)
better-sqlite3 builds native code. On macOS:
xcode-select --installThen reinstall:
rm -rf node_modules package-lock.json
npm i“Why does it show Repo: (none)?”
That happens when you run it outside a git repo. Run inside a repo to capture branch/commit metadata.
Development
Build:
npm run buildRun locally (without build):
npm run dev -- --helpLink the CLI:
npm linkRoadmap ideas
- Interactive picker (TUI) for
findresults - Import/export (sync between machines)
fix prune(remove old duplicates / cleanup)- Optional cloud sync (GitHub Gist / S3) for teams
License
MIT
