Add these to - commands - outputs - tools Integrate history filters and credential redacting to captured tool calls, ensuring we do not leak private data by capturing ai activity. We can periodically review and improve this. Patterns are also user configurable ## Checks - [ ] I am happy for maintainers to push small adjustments to this PR, to speed up the review cycle - [ ] I have checked that there are no existing pull requests for the same thing
5.8 KiB
Capturing Command Output
Atuin can store what each command printed next to its history entry. You can
then read it back in the inspector UI, search across it with atuin output search, and let Atuin AI or other AI tools read
what a command actually did.
Output capture is off by default. It needs pty-proxy, which sees what your terminal displays, and the daemon, which stores it.
Setting it up
atuin config enable output-capture
This turns on the daemon (with autostart) if it isn't on already, enables
pty-proxy and [output], and restarts the daemon. Open a new shell afterward.
To do the same by hand, add to your config file:
[daemon]
enabled = true
autostart = true
[pty_proxy]
enabled = true
[output]
enabled = true
If you manage the daemon yourself (systemd, launchd), restart it after
changing [output]. See
[pty_proxy] for other ways to
start pty-proxy.
Reading captured output
In the search UI
Press ++ctrl+o++ in search to open the inspector, pick a run, and press ++enter++ (or ++o++) to open its output. Colours and formatting are kept.
From the command line
atuin output search searches the output of every
captured command:
atuin output search connection refused
From AI tools
- Atuin AI reads a command's output when you ask it why something failed.
- Claude Code, Cursor, and other agents can read and search it through Atuin's MCP server.
What gets captured
Atuin stores the output as your terminal displayed it at the end of the command. If you had progress bars on similar animated effects, only the "last frame" is recorded.
Some output is never stored:
- Full-screen programs such as
vim,less, andhtop. Anything drawn on the terminal's alternate screen is skipped. - Commands Atuin doesn't record. Output belongs to a history entry, so a
command typed with a leading space, one excluded by
history_filterorcwd_filter, or a failing command withstore_failed = falsehas none. - Commands in
command_filter. These stay in your history; only their output is dropped. - Commands whose output can hold a credential: Atuin's own
atuin key,atuin login,atuin registerandatuin account change-password, and other tools' commands that print a token, a password or the environment, such asgh auth token,aws configure get,kubectl get secret,vault kv get,op readandprintenv. Seecommand_filterfor the list. - Commands that name a file holding credentials, such as
cat .envorcat ~/.aws/credentials. Seesensitive_files.
When a command prints more than
max_output_size (1MB by
default), Atuin keeps the start and the end, half each, and drops the middle,
recording that it's missing.
Privacy
- Recognised credentials in the output (API keys, tokens, private keys,
passwords in URLs and connection strings, values assigned to names like
DB_PASSWORD) are replaced with****before storage, whilesecrets_filteris on (the default). Add patterns of your own withredact_patterns. This is best-effort: it only knows common formats, and misses a credential that colour codes split apart. Output that can't be redacted quickly isn't stored. - For a command that prints secrets, don't rely on redaction: add it to
command_filterto keep it in your history but never store its output. See Keeping secrets out. - Captured output stays on your machine. It isn't synced, even with sync set up. We're actively working on supporting this.
- Atuin AI only sends output to the LLM when it asks for a specific command's output, and asks your permission first by default. See Reading Command Output.
Storage and retention
Output is stored on disk in the output-capture directory of Atuin's data
directory (~/.local/share/atuin/output-capture by default), so it survives
daemon restarts. Don't edit that directory by hand.
- Disk budget. Output may use up to
max_disk_usage, 10% of the disk by default. The daemon checks about once a minute; past 95% of the budget, it deletes the oldest output until usage is back to 90%. - Deleting history deletes output. Deleting an entry from the search UI,
with
atuin search --delete,atuin history prune, oratuin history dedupalso deletes its output. - Turning it off. Set
[output] enabled = false. The daemon stops storing output right away; open a new shell so pty-proxy stops capturing it too. Output already stored stays on disk; to remove it, stop the daemon and delete theoutput-capturedirectory.
When changes take effect
| Setting | Takes effect |
|---|---|
command_filter |
On the next command; the daemon reloads its config by itself |
enabled = false |
At once for storage; in a new shell for capturing |
enabled = true, max_disk_usage |
After atuin daemon restart and a new shell |
max_output_size |
In a new shell, when pty-proxy starts |
All settings are listed in the configuration reference.