Skip to content
Atuin

atuin history

Manipulate shell history

Terminal window
atuin history <COMMAND>

Begins a new command in the history

Terminal window
atuin history start [OPTIONS] [COMMAND]...
  • <COMMAND>...
  • --author <AUTHOR>: Author of this command, eg ellie, claude, or copilot

  • --author-kind <AUTHOR_KIND>: Whether a human or an AI agent ran this command

    Without it, Atuin makes a best guess.

    • user: A human ran this command
    • agent: An AI agent ran this command
  • --intent <INTENT>: Optional intent/rationale for running this command

Finishes a new command in the history (adds time, exit code)

Terminal window
atuin history end [OPTIONS] --exit <EXIT> <ID>
  • <ID>
  • -e <EXIT>, --exit <EXIT>: Required.
  • -d <DURATION>, --duration <DURATION>

Stream history events from the daemon as they are received

Terminal window
atuin history tail

List all items in history

Terminal window
atuin history list [OPTIONS]
  • -c, --cwd

  • -s, --session

  • --human

  • --cmd-only: Show only the text of the command

  • --print0: Terminate the output with a null, for better multiline support

  • -r <REVERSE>, --reverse <REVERSE>: Default: true.

  • --timezone <TIMEZONE>: Display the command time in another timezone other than the configured default.

    This option takes one of the following kinds of values:

    • the special value “local” (or “l”) which refers to the system time zone
    • a time zone name (e.g. “Europe/Berlin”)
    • an offset from UTC (e.g. “+9”, “-2:30”)
  • -f <FORMAT>, --format <FORMAT>: Available variables: {command}, {directory}, {duration}, {user}, {host}, {author}, {intent}, {exit}, {time}, {session}, and {uuid}

    Example: —format “{time} - [{duration}] - {directory}$\t{command}”

Get the last command that was run

Terminal window
atuin history last [OPTIONS]
  • --human

  • --cmd-only: Show only the text of the command

  • --timezone <TIMEZONE>: Display the command time in another timezone other than the configured default.

    This option takes one of the following kinds of values:

    • the special value “local” (or “l”) which refers to the system time zone
    • a time zone name (e.g. “Europe/Berlin”)
    • an offset from UTC (e.g. “+9”, “-2:30”)
  • -f <FORMAT>, --format <FORMAT>: Available variables: {command}, {directory}, {duration}, {user}, {host}, {author}, {intent}, {time}, {session}, {uuid} and {relativetime}.

    Example: —format “{time} - [{duration}] - {directory}$\t{command}”

Terminal window
atuin history init-store

Delete history entries matching the configured exclusion filters

Terminal window
atuin history prune [OPTIONS]
  • -n, --dry-run: List matching history lines without performing the actual deletion

Delete duplicate history entries (that have the same command, cwd and hostname)

Terminal window
atuin history dedup [OPTIONS] --before <BEFORE> --dupkeep <DUPKEEP>
  • -n, --dry-run: List matching history lines without performing the actual deletion
  • -b <BEFORE>, --before <BEFORE>: Only delete results added before this date, read in the configured timezone unless it carries an explicit offset. Required.
  • --dupkeep <DUPKEEP>: How many recent duplicates to keep. Required.