> ## Documentation Index
> Fetch the complete documentation index at: https://docs.entire.com/llms.txt
> Use this file to discover all available pages before exploring further.

# search

> Search checkpoints, commits, and sessions with hybrid semantic and keyword matching, or search code content with --code.

Search indexed Entire history from the CLI. Add `--code` to search code content instead.

```bash theme={null}
entire search [QUERY] [flags]
```

`entire checkpoint search` is an equivalent alias. In CLI versions 0.9.0 and earlier, `entire search` was hidden from `entire --help` but remained runnable.

By default, search is scoped to the current repository. Use `--repo`, `--all-repos`, or `repo:*` to change the scope.

Run without arguments to open interactive search. Use `--json` for machine-readable output.

> [!NOTE]
>
> **Requires a published repository.** Entire answers this from its own servers rather than from your local clone, so the repository must be published somewhere Entire can reach and its checkpoints pushed.
>
> Publish by [creating an Entire repository](/guides/repositories/entire-native-repositories.md) or by [mirroring a GitHub repository](/guides/repositories/mirrors.md), then `git push`. `entire enable` does not create or push to a remote for you.
>
> Your work becomes available shortly after it reaches Entire, so give a recent push a couple of minutes before treating a missing result as a problem.

Search queries Entire's index, so indexing has to finish before new work appears. See [What Is Indexed and When](/guides/search/what-is-indexed.md).

## Examples

```bash theme={null}
entire search "auth token refresh"
entire search "auth token refresh" --repo entireio/cli
entire search "repo:* auth token refresh"
entire search "retry logic" author:alex branch:main date:month
entire search "auth token refresh" --json
entire search "auth token refresh" --compact --limit 5
```

## Flags

| Flag | Description |
| - | - |
| `--all-repos` | Search all accessible repositories instead of only the current repository. |
| `--author NAME` | Filter by author name. |
| `--branch NAME` | Filter by branch name. |
| `--case-sensitive` | Reserved for future case-sensitive code search. Only valid with `--code`; currently does not change backend matching. |
| `--code` | Search code content across repositories instead of checkpoints, commits, and sessions. |
| `--compact` | Return trimmed JSON for agents. Implies `--json` and cannot be combined with `--code`. |
| `--date PERIOD` | Filter by time period. Use `week` or `month`. |
| `--json` | Output as JSON. |
| `--limit N` | Maximum number of results per page, or total results with `--code`. Default is `10`. |
| `--page N` | Page number, 1-based. Default is `1`. |
| `--repo REPOSITORY` | Filter by repository. Accepts `gh/owner/repo`, `et/project/repo`, `owner/repo`, a repository ULID, or `*`; repeatable and comma-separated. |

## Inline Filters

CLI queries also support inline filters:

```bash theme={null}
entire search "retry logic author:alex date:month branch:main repo:entireio/cli"
```

Supported inline filters are:

* `author:NAME`
* `date:week|month`
* `branch:NAME`
* `repo:OWNER/NAME`
* `repo:*`

## Compact Output for Agents

Use `--compact` to omit full prompts and return a smaller semantic-search response:

```bash theme={null}
entire search "auth token refresh" --compact --limit 5
```

Each result includes its identifiers, type, ranking metadata, and a truncated title. Repository, branch, author, date, files touched, and match snippets appear when available. `--compact` implies `--json`. It cannot be combined with `--code`.

For semantic search, `--limit` sets the maximum results per page. For Code Search, it sets the maximum total results.

## Code Search

Use `--code` to search code content instead of checkpoints, commits, and sessions. Results are grouped under a `repo:path` heading with line-numbered matches beneath it.

```bash theme={null}
entire search --code "refreshAccessToken"
entire search --code "refreshAccessToken" --repo entireio/cli
entire search --code "repo:* refreshAccessToken"
entire search --code "refreshAccessToken" --json
```

Code search matches exact text and is currently case-insensitive. The CLI accepts `--case-sensitive`, but the search backend does not yet apply it. In `--code` mode, `repo:` is the only supported inline filter. The `author:`, `branch:`, and `date:` tokens are treated as literal query text, and the `--author`, `--branch`, `--date`, and `--page` flags do not apply.

In interactive search, press `3` to switch to the **Code** tab. The other tabs are **Commits** (`1`) and **Sessions** (`2`). Checkpoint matches fold into their owning sessions. Use `entire checkpoint explain CHECKPOINT_ID` to open a checkpoint directly.

## Continue With

> **[Search](/guides/search/overview.md)**
>
> Compare semantic and keyword search with literal code search.

> **[Search in the CLI](/guides/search/search-in-cli.md)**
>
> Use both search modes from your terminal.

> **[Search Past Work and Code](/learn/search-past-agent-work.md)**
>
> Practice search with a guided tutorial.

> **[What Is Indexed and When](/guides/search/what-is-indexed.md)**
>
> Check availability, timing, and repository scope.
