Shell Integration
Shell integration connects Suvadu to your terminal so that every command you run is automatically recorded with full metadata: working directory, duration, exit code, git branch, and executor.
Zsh Setup
Add the Suvadu hook to your ~/.zshrc and reload:
echo 'eval "$(suv init zsh)"' >> ~/.zshrc && source ~/.zshrc This appends a single line to your Zsh configuration. The suv init zsh command outputs the shell functions that Suvadu needs; eval loads them into your current session.
Bash Setup
Add the Suvadu hook to your ~/.bashrc and reload:
echo 'eval "$(suv init bash)"' >> ~/.bashrc && source ~/.bashrc For login shells that only source ~/.bash_profile, add the same line to ~/.bash_profile instead, or make sure your ~/.bash_profile sources ~/.bashrc.
What the Hooks Do
The shell hooks set up two functions that run transparently around every command you execute:
- Pre-exec hook: Fires just before a command starts. It captures the command text, working directory, git branch (if in a repo), timestamp, and which executor is running the command (you, or an AI agent like Claude Code or Cursor).
- Post-exec hook: Fires after the command finishes. It records the exit code and how long the command took (duration in milliseconds).
Both hooks are lightweight and add sub-millisecond overhead. They do not modify your command, its output, or its exit code.
Verify Shell Integration
After setting up the hooks, run:
suv status You should see output similar to:
Suvadu v0.2.0
Database: ~/.local/share/suvadu/history.db
Recording: enabled
Shell: zsh
Session: a1b2c3d4 Key things to check:
- Recording: enabled — confirms that commands are being captured
- Shell: zsh (or bash) — confirms which shell was detected
- Session — a unique ID for your current terminal session
Try running a few commands, then verify they were recorded:
suv search Your recent commands should appear in the search TUI.
Terminal Multiplexers
Suvadu works with tmux, screen, Zellij, and any other terminal multiplexer. Each pane or window gets its own unique session ID, so commands are tracked separately per pane. No extra configuration is needed.
Pausing and Disabling Recording
Sometimes you want to stop recording temporarily — for example, when entering sensitive commands.
Pause (Current Session Only)
Pause recording for just the current shell session. Other terminal windows and panes continue recording normally:
suv pause Recording resumes automatically when you open a new terminal session, or you can re-source your shell config:
source ~/.zshrc # Zsh
source ~/.bashrc # Bash Disable / Enable (Global)
Globally disable recording across all sessions:
suv disable To re-enable recording globally:
suv enable When disabled, suv status will show "Recording: disabled". No commands are captured in any terminal until you run suv enable.
suv pause only affects the current shell session and is not persistent — a new terminal will record normally. suv disable is a global, persistent setting that stops all recording until you explicitly run suv enable.
Fish Shell
Fish shell is not yet supported. It is on the Suvadu roadmap. If you use Fish, you can track progress on GitHub Issues.
Troubleshooting
- "command not found: suv" — The
suvbinary is not in yourPATH. Check your installation and make sure/usr/local/binor~/.cargo/binis in yourPATH. - Recording shows "disabled" after setup — You may have previously run
suv disable. Runsuv enableto re-enable recording globally. - Commands not appearing in search — Make sure you sourced your shell config after adding the
evalline. Open a new terminal tab and try again. Runsuv statusto confirm hooks are active. - Duplicate eval lines — If you ran the setup command more than once, you may have multiple
eval "$(suv init zsh)"lines in your config. This is harmless but you can remove duplicates. Only one line is needed.