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

# cli

> The @invoke/cli tool lets you initialize agent projects, deploy to the Invoke runtime, and call tools from your terminal. Covers all commands and flags.

The Invoke CLI gives you a terminal interface to the full Invoke execution runtime. Use it to authenticate, scaffold new agent projects, deploy to the runtime, call tools interactively, and inspect registered agents.

## Installation

```bash theme={null}
npm install -g @invoke/cli
```

Or run without installing:

```bash theme={null}
npx @invoke/cli
```

## Authentication

```bash theme={null}
invoke login
```

Stores your credentials locally for subsequent commands. Your API key is read from `INVOKE_API_KEY` if set, otherwise the login flow prompts for it.

## Commands

### `invoke init`

Scaffold a new agent project with a template.

```bash theme={null}
invoke init <project-name> --template <template-name>
```

| Flag         | Description                                                   |
| ------------ | ------------------------------------------------------------- |
| `--template` | Starting template (`crm-guardrail`, `billing-agent`, `blank`) |

```bash theme={null}
invoke init billing-agent --template crm-guardrail
```

### `invoke deploy`

Deploy the current project to the Invoke runtime. Run from inside a project directory.

```bash theme={null}
invoke deploy
```

### `invoke agents list`

List all registered agents in your account.

```bash theme={null}
invoke agents list
```

### `invoke call`

Call a tool directly from the terminal. Useful for testing without writing SDK code.

```bash theme={null}
invoke call <tool-name> '<params-json>'
```

```bash theme={null}
invoke call stripe.charge_customer \
  '{"customer_id":"cust_123","amount":2400}'
```

### `invoke demo`

Run the full execution loop — reconciliation, state verification, policy gates, and trace output — against a live demo scenario. No real Stripe account needed.

```bash theme={null}
invoke demo
```

## Next steps

* [TypeScript SDK](/sdk/typescript) — use Invoke from application code
* [Quick Start](/quickstart) — end-to-end walkthrough using the CLI
* [Authentication](/configuration/authentication) — API key configuration
