A cross-platform CLI tool that silently logs every terminal command you run into a local SQLite database — searchable and persistent across shells and sessions.
Everything stays on your machine. No cloud, no sync, no tracking.
Every time you run a command in your terminal, recall saves it to a tiny local database file (~/.recall/history.db). Later you can search it, filter by folder or shell session, see error rates, export it, and more.
Think of it as your terminal's long-term memory — unlike the built-in shell history (which has a size limit and gets wiped), recall keeps everything forever until you explicitly delete it.
cargo install recallOr grab a pre-built binary from the Releases page.
recall init # 1. create ~/.recall/ and the database file
recall hook # 2. install the background hook into your shell config
source ~/.bashrc # 3. reload your shell (or ~/.zshrc for zsh)That's it. Every command you run is now logged automatically in the background — you won't notice any slowdown.
Creates the ~/.recall/ directory and the SQLite database that stores your history.
Run this once before anything else.
$ recall init
✓ Recall is already initialised at C:\Users\you\.recall
If you run it again, it just confirms everything is already in place. Safe to run multiple times.
Adds a small snippet to your shell config (e.g. ~/.bashrc) that runs silently after every command and saves it to the database.
$ recall hook
✓ Hook installed for bash in C:\Users\you\.bashrc
Backup saved to C:\Users\you\.bashrc.recall.bak
Restart your shell or run: source ~/.bashrc
A
.recall.bakbackup of your shell config is saved automatically before any changes are made. You can always restore it.
Removes the recall snippet from your shell config. Stops automatic logging.
$ recall unhook
✓ Hook removed from C:\Users\you\.bashrc
Backup saved to C:\Users\you\.bashrc.recall.bak
Restart your shell or run: source ~/.bashrc
Shows your last 100 commands in a table: timestamp, exit status (✓ = success, number = error code), shell, directory, and command.
$ recall history
+----+---------------------+------+-------+--------------------------------+--------------------------------+
| # | Time | Exit | Shell | Directory | Command |
+===========================================================================================================+
| 1 | 2026-03-10 20:10:42 | ✓ | bash | C:/Users/you/projects | git push origin main |
|----+---------------------+------+-------+--------------------------------+--------------------------------|
| 2 | 2026-03-10 20:10:42 | ✓ | bash | C:/Users/you/projects | cargo build --release |
|----+---------------------+------+-------+--------------------------------+--------------------------------|
| 3 | 2026-03-10 20:04:43 | 1 | bash | C:/Users/you/projects/recall | cargo test |
+----+---------------------+------+-------+--------------------------------+--------------------------------+
Row 3 shows exit code
1— that command failed.
Filters:
recall history --limit 50 # show only the last 50 (default: 100)
recall history --errors # only show commands that failed (exit code != 0)
recall history --cwd ~/projects # only commands run inside ~/projects
recall history --session 1234 # only commands from a specific shell session--errors example — useful for finding what broke:
$ recall history --errors
+---+---------------------+------+-------+--------------------------------+------------+
| # | Time | Exit | Shell | Directory | Command |
+======================================================================================+
| 1 | 2026-03-10 20:04:43 | 1 | bash | C:/Users/you/projects/recall | cargo test |
+---+---------------------+------+-------+--------------------------------+------------+
--cwd example — only commands run in a specific folder:
$ recall history --cwd C:/Users/you/projects
+---+---------------------+------+-------+-------------------------+----------------------+
| # | Time | Exit | Shell | Directory | Command |
+=========================================================================================+
| 1 | 2026-03-10 20:10:42 | ✓ | bash | C:/Users/you/projects | git status |
|---+---------------------+------+-------+-------------------------+----------------------|
| 2 | 2026-03-10 20:10:42 | ✓ | bash | C:/Users/you/projects | git push origin main |
+---+---------------------+------+-------+-------------------------+----------------------+
Machine-readable output:
recall history --json # output as JSON (great for scripting)
recall history --csv # output as CSV (great for spreadsheets)JSON output looks like this (each command is one object):
[
{
"id": 79,
"command": "git push origin main",
"timestamp": "2026-03-10T20:10:42.801862500Z",
"session_id": "1001",
"cwd": "C:/Users/you/projects",
"exit_code": 0,
"shell": "bash",
"hostname": "your-machine",
"metadata": null
}
]CSV output (one row per command, with a header line):
id,command,timestamp,session_id,cwd,exit_code,shell,hostname
79,git push origin main,2026-03-10T20:10:42+00:00,1001,C:/Users/you/projects,0,bash,your-machine
Searches the full text of every command you've ever run.
recall search "git commit" # find all commands containing "git commit"
recall search "docker*" --limit 5 # wildcard: anything starting with "docker"
recall search "git NOT merge" # boolean: git commands that don't include "merge"Example — phrase search:
$ recall search "git commit"
Found 2 results for "git commit"
+---+---------------------+------+-------+-------------------------+--------------------------------+
| # | Time | Exit | Shell | Directory | Command |
+===================================================================================================+
| 1 | 2026-03-10 20:10:42 | ✓ | ? | — | git commit -m 'initial commit' |
|---+---------------------+------+-------+-------------------------+--------------------------------|
| 2 | 2026-03-10 20:04:43 | ✓ | bash | C:/Users/you/projects | git commit -m fix |
+---+---------------------+------+-------+-------------------------+--------------------------------+
Example — wildcard prefix search:
$ recall search "docker*" --limit 5
Found 3 results for "docker*"
+---+---------------------+------+-------+---------------------+----------------------------+
| # | Time | Exit | Shell | Directory | Command |
+===========================================================================================+
| 1 | 2026-03-10 20:10:42 | ✓ | ? | — | docker ps |
|---+---------------------+------+-------+---------------------+----------------------------|
| 2 | 2026-03-10 20:10:42 | ✓ | ? | — | docker run -it ubuntu bash |
|---+---------------------+------+-------+---------------------+----------------------------|
| 3 | 2026-03-10 20:04:44 | ✓ | zsh | C:/Users/you/work | docker run nginx |
+---+---------------------+------+-------+---------------------+----------------------------+
Example — boolean NOT (exclude a word):
$ recall search "git NOT merge"
Found 7 results for "git NOT merge"
(shows all git commands except those containing "merge")
The search engine is SQLite FTS5 (full-text search). Supported operators:
AND,OR,NOT, and*for prefix matching.
Adds a command to the database without actually running it. Useful for logging things you did outside of recall's reach (e.g. in a GUI, or on a remote machine).
recall log "make deploy"No output on success — the command is silently inserted.
Deletes the most recently logged command. Use this if you accidentally logged a password or sensitive command.
$ recall undo
✓ Removed: make deploy (logged 0 seconds ago)
Run this immediately after accidentally running something like
curl -u user:password ....
Shows a summary of your command history: total count, unique commands, date range, error rate, most-used commands, most-used directories, and busiest hours.
$ recall stats
Recall Statistics
=================
Total commands: 19
Unique commands: 13
Date range: 2026-03-10 to 2026-03-10
Error rate: 5.3%
Top Commands
------------
1. git status 3 #################### 15.8%
2. npm install 2 ############# 10.5%
3. make deploy 2 ############# 10.5%
4. git push origin main 2 ############# 10.5%
5. cargo test 2 ############# 10.5%
6. git merge feature-branch 1 ####### 5.3%
7. git commit -m fix 1 ####### 5.3%
8. docker run -it ubuntu bash 1 ####### 5.3%
9. docker run nginx 1 ####### 5.3%
10. cargo build 1 ####### 5.3%
Top Directories
---------------
1. C:/Users/you/projects 4
2. C:/Users/you/work 2
3. C:/Users/you/projects/recall 2
4. C:/Users/you/projects/web 1
Busiest Hours
-------------
20:00 ################ 19
recall stats --top 20 # show top 20 commands instead of top 10recall clean --from 2025-01-01 --to 2025-06-30 # delete a specific date range
recall clean --all # delete everything
recall clean --all --dry-run # preview without actually deletingDry-run — always do this first to confirm what will be deleted:
$ recall clean --all --dry-run
Would delete 19 commands. Run without --dry-run to confirm.
Date range — if nothing matches the range, you get a safe message:
$ recall clean --from 2025-01-01 --to 2025-06-30
No commands matched. Nothing was deleted.
Exports your full history to stdout or a file.
recall export --format json # print JSON to terminal
recall export --format csv --output history.csv # save CSV to a fileJSON export (prints to terminal, pipe it anywhere):
$ recall export --format json
[
{
"id": 60,
"command": "git status",
"timestamp": "2026-03-10T20:04:43.178355300Z",
"session_id": "1001",
"cwd": "C:/Users/you/projects",
"exit_code": 0,
"shell": "bash",
"hostname": "your-machine",
"metadata": null
},
...
]
CSV export to file:
$ recall export --format csv --output history.csv
✓ Exported 19 commands to C:/Users/you/history.csv (csv)
The CSV file looks like:
id,command,timestamp,session_id,cwd,exit_code,shell,hostname
60,git status,2026-03-10T20:04:43+00:00,1001,C:/Users/you/projects,0,bash,your-machine
61,git commit -m fix,2026-03-10T20:04:43+00:00,1001,C:/Users/you/projects,0,bash,your-machine
Prints a shell completion script so you can press Tab to auto-complete recall commands and flags.
recall completions bash # bash
recall completions zsh # zsh
recall completions fish # fish
recall completions powershell # PowerShellHow to enable it (bash example):
recall completions bash >> ~/.bashrc
source ~/.bashrcAfter that, typing recall hi and pressing Tab will complete to recall history, and recall history -- Tab will list all available flags.
The script is auto-generated from the CLI definition — it always matches the actual flags exactly.
recall init Set up the database and config directory
recall hook Install the hook into your shell config
recall unhook Remove the hook from your shell config
recall history Show last 100 commands
recall history --limit 50 Show last 50 commands
recall history --errors Only show failed commands (exit code != 0)
recall history --cwd ~/projects Filter by working directory
recall history --session 1234 Filter by shell session
recall history --json Output as JSON
recall history --csv Output as CSV
recall search "git commit" Full-text search across all history
recall search "docker*" --limit 5 Prefix search, limit results
recall search "git NOT merge" Boolean search (exclude a word)
recall log "make deploy" Manually log a command
recall undo Remove the last logged entry
recall stats Usage dashboard
recall stats --top 20 Show top 20 commands
recall clean --from 2025-01-01 --to 2025-06-30 Delete a date range
recall clean --all Delete everything
recall clean --all --dry-run Preview without deleting
recall export --format json Export to stdout
recall export --format csv --output history.csv Export to file
recall completions bash Print completions for bash/zsh/fish/pwsh
| Shell | Config modified |
|---|---|
| bash | ~/.bashrc |
| zsh | ~/.zshrc |
| fish | ~/.config/fish/conf.d/recall.fish |
| PowerShell | ~/Documents/PowerShell/Microsoft.PowerShell_profile.ps1 |
A .recall.bak backup is saved before any shell config is modified.
All history is stored locally in ~/.recall/history.db. Nothing leaves your machine.
Each entry records: the command text, timestamp, exit code, working directory, shell name, session ID, and hostname.
If you accidentally log a password, run recall undo immediately.
Requires Rust 1.75+. No C compiler needed — SQLite is bundled.
git clone https://github.com/Clifftech123/recall
cd recall
cargo build --release
cargo testrecall unhook
rm -rf ~/.recall
rm $(which recall)Based on Consolidate by Khelchy. Rust rewrite by Clifftech Solutions.
MIT License.