Command History
View, search, and manage your whisp command history.
Command History
Whisp maintains a history of all AI-generated commands and queries, stored in ~/.whisp/history.jsonl.
Viewing History
Show recent history entries:
whisp historyOutput:
Recent History (last 20 entries):
1. find /var/log -size +10M -mtime -7
Type: query | 2024-01-15 14:32 | ~/projects
Query: "find large log files from the last week"
2. docker compose up -d
Type: cmd | 2024-01-15 14:28 | ~/projects/app
3. git log --oneline --since="2024-01-01" --author="alice"
Type: query | 2024-01-15 13:45 | ~/projects/app
Query: "show alice's commits this year"
4. chmod +x ./deploy.sh
Type: error | 2024-01-15 13:40 | ~/projects/app
Query: "permission denied when running deploy.sh"Each entry shows:
- Command: The generated or executed command
- Type: How it was created (query, cmd, error, explain, etc.)
- Timestamp: When it happened
- Directory: Working directory at the time
- Query: Original natural language query (if applicable)
Searching History
Find specific commands in your history:
whisp history search <query>Examples:
# Find all docker commands
whisp history search docker
# Find commands run in a specific directory
whisp history search /var/log
# Find by original query
whisp history search "large files"Search looks in:
- Command text
- Original query text
- Working directory
Results are sorted by most recent first, limited to 20 matches.
Clearing History
Remove all history entries:
whisp history clearYou'll be prompted for confirmation:
Are you sure you want to clear all history? [y/N] y
History cleared.This deletes ~/.whisp/history.jsonl.
Entry Types
History entries are categorized by type:
| Type | Description |
|---|---|
query | Command generated from natural language query |
cmd | Direct command execution |
error | Error recovery suggestion |
explain | Command explanation request |
pipe | Piped input processing |
chat | Chat mode message |
dryrun | Dry-run analysis |
search | History search |
Using History with Shortcuts
The ,/ shortcut provides interactive history search:
,/ git
# Output:
# 1. git push origin main (~/projects/app, 1h ago)
# 2. git commit -m "Fix bug" (~/projects/app, 2h ago)
# 3. git log --oneline -10 (~/projects/lib, yesterday)
#
# Select [1-3] or press Enter to cancel:Select a number to run that command again in your current directory.
History Storage
File Format
History is stored as line-delimited JSON (JSONL):
{"timestamp":"2024-01-15T14:32:00Z","command":"find /var/log -size +10M","cwd":"/home/user/projects","entry_type":"query","query":"find large log files"}
{"timestamp":"2024-01-15T14:28:00Z","command":"docker compose up -d","cwd":"/home/user/projects/app","entry_type":"cmd"}Location
~/.whisp/history.jsonlSession Context
History includes session IDs that group related commands:
- Commands in the same terminal session share a session ID
- The daemon tracks recent commands per session for context
Privacy Considerations
History is stored locally and never sent anywhere except:
- Commands are sent to your configured AI provider when generating responses
- Your query and context help the AI understand what you need
Whisp automatically redacts sensitive patterns before sending to AI:
- API keys
- Passwords in URLs
- AWS credentials
- Common secret formats
To review what's stored:
cat ~/.whisp/history.jsonl | jq .To exclude history for sensitive operations, clear after:
whisp history clearTips
Finding Forgotten Commands
Can't remember that complex awk command you used last week?
whisp history search awkRe-running Commands
From search results, use the number to re-run:
,/ "backup"
# Select the command you wantOr copy from whisp history output manually.
Auditing Activity
History provides an audit trail of AI-generated commands:
# See everything from today
whisp history | grep "$(date +%Y-%m-%d)"
# Export for review
cat ~/.whisp/history.jsonl > whisp-audit-$(date +%Y%m%d).jsonl