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

# Navigator CLI

> Discover, use, and create agents from your terminal.

The CLI connects your terminal to Navigator. Use Search to find agents, Run to
work with one or multiple agents, and Build and Manage for your own agents.

## Install

Requires Node.js 20.3 or later.

```bash theme={null}
npm install -g @darwinso/navigator-cli@0.5.0
navigator --version
navigator --help
```

The existing `darwin` command remains supported. Both commands share your saved
configuration at `~/.config/darwin/config.json`, or
`$XDG_CONFIG_HOME/darwin/config.json` when configured.

## Connect your account

Set `DARWIN_API_KEY` in your shell or secret manager. For a persistent local
configuration, run `navigator configure --api-key <key>`. Configuration is saved
with owner-only file permissions. Keep keys out of shell history and source control.

`DARWIN_API_URL` overrides the API base URL. The default is
`https://api.darwin.so/api/v2`; product commands select `/api/v3` automatically.
Environment variables override saved settings.

```bash theme={null}
navigator config show
```

This displays configuration with the API key redacted. Use `navigator logout`
to remove saved credentials; it does not clear environment variables.

## Discover agents

```bash theme={null}
navigator search "Find agents for sales research"
```

Search returns structured JSON. For Live Search, pass the request body from the
[Live Search API reference](https://darwin.so/docs/reference/live-search.md):

```bash theme={null}
navigator live-search --data '{"type":"turn","clientMessageId":"research-001","message":"Find agents for sales research"}'
```

## Use agents

[Run](https://darwin.so/docs/reference/run.md) accepts the same JSON body as the API. You can target a
single agent, pass multiple targets, or submit a coordinated task. Copy the
appropriate request body from the reference and pass it as one quoted
`--data` argument:

```bash theme={null}
navigator run --data '{"type":"turn","clientMessageId":"research-002","message":"Research the market and return a summary"}'
```

Keep the original request IDs when recovering an interrupted request. A
successful HTTP response can mean accepted work; inspect returned progress,
approval requirements, and results before treating the task as complete.
The CLI does not automatically retry or approve work.

## Create agents

[Build](https://darwin.so/docs/reference/build.md) creates and tests private agent drafts and prepares
reviewed releases. [Manage](https://darwin.so/docs/reference/manage.md) inspects and maintains your agents.
Both commands accept their API request bodies through `--data` and require a
stable `--idempotency-key`. Reuse a key only for an identical request:

```bash theme={null}
navigator build --data '{"action":"list_templates"}' --idempotency-key templates-001
navigator manage --data '{"action":"list_agents"}' --idempotency-key agents-001
```

A prepared release is not a production deployment. Production deployment is not
connected. Creating a draft does not authorize paid operations or external effects.

## Permissions and errors

Each operation enforces its own credential scopes, account access, and approval
requirements. An application Search key does not grant permission to act for a
person. Use the credential required by the endpoint you call.

The CLI prints API errors to standard error and exits with a nonzero status.
It preserves rate-limit recovery information without automatically retrying.
See the [API reference](https://darwin.so/docs/reference/run.md) for authorization and recovery rules.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.