# atuin search

<!-- Generated by web/apps/docs/scripts/gen-reference.ts from the Atuin source. Do not edit. -->

Interactive history search

```sh
atuin search [OPTIONS] [QUERY]...
```

## Arguments

- `<QUERY>...`

## Options

- `-c <CWD>`, `--cwd <CWD>`: Filter search result by directory
- `--exclude-cwd <EXCLUDE_CWD>`: Exclude directory from results
- `-e <EXIT>`, `--exit <EXIT>`: Filter by exit code; repeat to include any of the given codes. Can be repeated.
- `--exclude-exit <EXCLUDE_EXIT>`: Exclude results with this exit code; repeat to exclude multiple codes. Can be repeated.
- `-b <BEFORE>`, `--before <BEFORE>`: Only include results added before this date.
  
  Read in the timezone from `--timezone` (or the configured one) unless it carries an explicit offset; relative phrases like "yesterday 3pm" are anchored there too.
- `--after <AFTER>`: Only include results after this date; see `--before` for how it is interpreted
- `--limit <LIMIT>`: How many entries to return at most
- `--offset <OFFSET>`: Offset from the start of the results
- `-i`, `--interactive`: Open interactive search UI
- `--filter-mode <FILTER_MODE>`: Allow overriding filter mode over config
  - `global`
  - `host`
  - `session`
  - `directory`
  - `workspace`
  - `session-preload`
- `--search-mode <SEARCH_MODE>`: Allow overriding search mode over config
  
  Note: for non-interactive searches, "daemon-fuzzy" behaves like "fuzzy". "skim" used to behave like "fuzzy" in non-interactive searches too; it has since been removed but is still accepted here as an alias of "fuzzy".
  - `prefix`
  - `fulltext`
  - `fuzzy`
  - `daemon-fuzzy`
- `--keymap-mode <KEYMAP_MODE>`: Notify the keymap at the shell's side. Default: `auto`.
  - `emacs`
  - `vim-normal`
  - `vim-insert`
  - `auto`
- `--human`: Use human-readable formatting for time
- `--cmd-only`: Show only the text of the command
- `--print0`: Terminate the output with a null, for better multiline support
- `--delete`: Delete anything matching this query. Will not print out the match
- `--delete-it-all`: Delete EVERYTHING!
- `-r`, `--reverse`: Reverse the order of results, oldest first
- `--timezone <TIMEZONE>`: Timezone to display command times in and to interpret `--before`/`--after` in, instead
  of 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}, {time}, {exit} and {relativetime}.
  
  Example: --format "{time} - [{duration}] - {directory}$\t{command}"
- `--inline-height <INLINE_HEIGHT>`: Set the maximum number of lines Atuin's interface should take up
- `--author <AUTHOR>`: Filter by author. Supports $all-user (non-agents), $all-agent, or literal names.
  
  Can be specified multiple times. Can be repeated.
- `--include-duplicates`: Include duplicate commands in the output (non-interactive only)
- `--shell <SHELL>`: Filter by the shell that was used to run the command
  
  If passed multiple times, commands from any of the shells will be shown.
  
  `--shell ""` will include commands for which the shell is unknown. Can be repeated.