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

# Install the CLI

> Install Deepline in your agent’s execution environment, finish authorization, and verify the org before running a task.

Use the CLI with a shell-capable agent such as Codex, Claude Code, Cursor, or
Gemini CLI. Install it where the agent runs and keep the same working folder for
setup and later requests. Installation in your laptop terminal does not install
or authorize it in a remote agent environment.

## 1. Install and start setup

Choose one option in the environment where your agent runs.

> [tab] Ask your agent
>
> Paste this instruction into your agent:
>
> ```text theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
> Install and set up the official Deepline CLI globally from npm (package: deepline) by following https://code.deepline.com/INSTALL.md. After setup, continue my existing task if I gave one. Otherwise, present the guide's four starter choices verbatim, with each of the first three requests starting with /deepline-gtm.
> ```
>
> The [installation guide](https://code.deepline.com/INSTALL.md) checks the
> environment, installs the CLI, and runs setup. A Deepline skill is not required
> for this installation request. Continue with browser authorization below when
> setup requests it.

> [tab] Install in a terminal
>
> Check the npm version before choosing a command:
>
> ```bash theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
> npm --version
> ```
>
> For npm 11.16 or newer, allow the required esbuild install script:
>
> ```bash theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
> npm install -g --allow-scripts=esbuild deepline@latest && npm exec --yes --allow-scripts=esbuild --package=deepline@latest -- deepline setup --json
> ```
>
> For older npm, omit `--allow-scripts`; those versions do not support it:
>
> ```bash theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
> npm install -g deepline@latest && npm exec --yes --package=deepline@latest -- deepline setup --json
> ```
>
> `npm exec` runs setup even when the current shell has not picked up the newly
> installed global command. Setup installs the supported skill bundle,
> authenticates, and verifies the connection.
>
> > [!TIP]
> >
> > If a sandbox has no writable global npm prefix, use a persistent installation
> > in the working folder instead of forcing a global install:
> >
> > ```bash theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
> > npm install --prefix .deepline/runtime --global --no-audit --no-fund --include=optional deepline@latest && ./.deepline/runtime/bin/deepline setup --scope local --json
> > ```
> >
> > Use `./.deepline/runtime/bin/deepline` for later commands in that folder.
> > If the environment blocks installation by policy, follow its approval path
> > before retrying; changing the install location does not grant permission.

## 2. Finish authorization in the same setup session

Complete the requested browser approval. Run setup once and wait for that
session to finish. It can wait up to five minutes for approval; progress goes
to stderr, so missing JSON while it waits is not a failure. Read the full JSON
result and keep it intact.

If the browser cannot open or approval times out, use the returned
`authorizationUrl` and exact retry command. Setup reuses the pending claim and
resumes the first incomplete phase. Do not start several setup flows while
approval is pending.

> [!TIP]
>
> For a failed result, read `failedPhase` and `retry.command`. Run a returned
> diagnostic command when one is provided. If failed verification needs more
> detail, use `deepline doctor --json`, or `./.deepline/runtime/bin/deepline
>     doctor --scope local --json` for the local installation. Diagnose the failed
> phase before repeating installation.

## 3. Verify the effective org

Run these from the folder the agent will keep using:

```bash theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
deepline --version
deepline auth status --json
deepline org status --json
```

For the project-local installation, use its full command path from the terminal installation tab.
Confirm that setup completed and these checks identify the intended org.
A signed-in browser or installed skill alone does not prove that this runtime
has org access. Resolve a mismatch with the operator before running
provider work; [folder bindings](https://deepline.com/docs/sdk-v2/multi-org.md) keep projects on the right
org.

## Skills, plugins, and MCP

Skills give an agent instructions for using Deepline; authorization determines
what it can access. Setup installs the hosted bundle for supported clients such
as Codex, Claude Code, Cursor, Gemini CLI, and Antigravity. Hermes uses the CLI
without a hosted Hermes skill target. OpenClaw can use the CLI or an MCP
connection and has no hosted Deepline skill target.

A plugin packages a client integration; MCP connects a client to Deepline tools.
Neither is required for the shell-based installation above. Use the
[Claude Code plugin](https://deepline.com/docs/claude-plugins.md), [Claude Cowork setup](https://deepline.com/docs/claude-plugins.md), or
[MCP setup](https://deepline.com/docs/mcp/setup.md) when that is the interface you want.

For versioned prompts, reusable workflows, or a custom agent interface, use the
[Deepline GTM agent reference project](https://github.com/getaero-io/deepline-gtm-agent).
The [Hermes compatibility pack](https://github.com/getaero-io/deepline-gtm-agent/tree/master/hermes-agent-pack)
provides its client-specific starting point.

## After setup: try a task

Continue your existing task after setup. If you want an example, this starter
runs provider work and can incur usage:

```text theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
/deepline-gtm Find 3 AI companies funded in the last 30 days, with founder contacts and verified work emails.
```

Review identity, source evidence, unresolved rows, and recorded Deepline usage.
Save the run ID before expanding the request. Follow the [Quickstart](https://deepline.com/docs/quickstart.md)
for the full first-run lesson, [Email waterfall](https://deepline.com/docs/plays/email-waterfall.md) for a
work-email task, or [Batch CSV enrichment](https://deepline.com/docs/sdk-v2/batch-csv.md) for file work.

For custom code, use [Build a Play](https://deepline.com/docs/sdk-v2/plays.md) and check the source before a run.
Use `deepline plays run <file> --dry-run` to inspect its execution plan without starting work.
This plan does not simulate provider responses or validate business accuracy.
Put external-write controls in the Play's logic.
Inspect `--help` and the selected tool or Play's contract for supported inputs and options.


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