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

# Use the CLI

> Work with hosted Almanac from a terminal or coding agent.

Use the CLI when Almanac needs local files, a person is working interactively,
or a coding agent can run terminal commands.

```bash theme={"theme":{"light":"github-light","dark":"vesper"}}
curl -fsSL https://usealmanac.com/install.sh | sh
almanac setup
```

## The everyday loop

```bash theme={"theme":{"light":"github-light","dark":"vesper"}}
almanac link acme/company-handbook
almanac upload docs/
almanac jobs wait last
almanac search "customer onboarding"
almanac show onboarding/getting-started --sources
```

The link gives the directory durable context. Upload adds original evidence;
the job updates pages; search and show verify the result.

## Make the target explicit

```bash theme={"theme":{"light":"github-light","dark":"vesper"}}
almanac search "customer onboarding" --wiki acme/handbook
```

An explicit `--wiki` overrides the environment and directory link. See
[Create and link a wiki](/guides/create-select-wiki) for the visual selection model.

## Authenticate a program

```bash theme={"theme":{"light":"github-light","dark":"vesper"}}
export ALMANAC_TOKEN="waka_..."
almanac search "customer onboarding" --wiki acme/handbook
```

Use browser login for people and [workspace API keys](/api/authentication) for
programs. A token supplied with `--token` or `ALMANAC_TOKEN` does not replace the
saved browser login.

<CardGroup cols={2}>
  <Card title="Automate the CLI" icon="workflow" href="/cli/automation">
    Use serialized writes, JSON output, and exit codes.
  </Card>

  <Card title="Open the CLI reference" icon="list" href="/reference/cli">
    Scan commands by task and discover help.
  </Card>
</CardGroup>
