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

# Skills + CLI

> Use DumplingAI's CLI and packaged skills for /api/v2 capability discovery, execution, and agent setup.

# Skills + CLI

Use the official CLI to work with DumplingAI's Unified API directly from your terminal.

The CLI is built around the `/api/v2` workflow:

1. search the catalog
2. inspect the capability or endpoint you want
3. run it with JSON input

* npm package: [dumplingai-cli](https://www.npmjs.com/package/dumplingai-cli)
* source code: [github.com/DumplingAI/cli](https://github.com/DumplingAI/cli)

## Install

```bash theme={null}
npm install -g dumplingai-cli
dumplingai init
```

`dumplingai init` walks through authentication and can install bundled agent skills in the same flow.

## Authenticate

<CodeGroup>
  ```bash API key login theme={null}
  dumplingai login --api-key sk_yourkey
  ```

  ```bash Environment variable theme={null}
  export DUMPLINGAI_API_KEY=sk_yourkey
  ```
</CodeGroup>

Get your API key from [app.dumplingai.com/settings/api-keys](https://app.dumplingai.com/settings/api-keys).

Then confirm setup:

```bash theme={null}
dumplingai status
```

## Common commands

| Command                                       | Description                                              |
| --------------------------------------------- | -------------------------------------------------------- |
| `dumplingai init`                             | Authenticate and optionally install bundled agent skills |
| `dumplingai login --api-key <key>`            | Save API credentials                                     |
| `dumplingai logout`                           | Remove stored credentials                                |
| `dumplingai status`                           | Show CLI version, auth status, and `/v2` balance context |
| `dumplingai env pull`                         | Write API key into `.env`                                |
| `dumplingai catalog search <prompt>`          | Search `/api/v2` capabilities, providers, and endpoints  |
| `dumplingai catalog details <type> <id>`      | Inspect a specific catalog object                        |
| `dumplingai run <type> <id> --input '<json>'` | Execute a capability or endpoint                         |
| `dumplingai balance`                          | Show balance and budget information                      |
| `dumplingai usage`                            | Show request usage logs                                  |
| `dumplingai transactions`                     | Show credit transaction history                          |
| `dumplingai view-config`                      | Print resolved configuration                             |
| `dumplingai version`                          | Print CLI version                                        |

## Examples

```bash theme={null}
# Discover available capabilities
dumplingai catalog search "google search"

# Inspect a capability before running it
dumplingai catalog details capability google_search

# Execute a capability with inline JSON input
dumplingai run capability google_search --input '{"query":"latest TypeScript release"}'

# Execute an endpoint with JSON from disk
dumplingai run endpoint firecrawl.scrape --input-file payload.json

# Inspect account data
dumplingai balance
dumplingai usage --object-type capability --limit 20
```

## Output and automation tips

* Use `--input-file` when your request body is easier to manage as JSON on disk.
* Redirect large JSON responses into `.dumplingai/` or another local file when you want to inspect them incrementally.
* Use `dumplingai env pull` when you want the CLI key written into a local `.env` file for adjacent tooling.

```bash theme={null}
dumplingai run capability scrape_page --input '{"url":"https://example.com"}' > .dumplingai/page.json
head -40 .dumplingai/page.json
```

## Agent skills

The CLI repo also ships packaged skills for supported coding agents. These help agents discover DumplingAI APIs, choose the right CLI commands, and reuse workflow templates.

### Install

For Codex, Claude Code, and Cursor, `dumplingai init` is the recommended path because it can install bundled skills during setup.

Use manual installation only if:

* you skipped skills during `dumplingai init`
* you want to selectively install skills
* you are using another compatible agent environment

```bash theme={null}
npx skills add dumplingai/cli
```

You can list and selectively install packaged skills:

```bash theme={null}
npx skills add dumplingai/cli --list
npx skills add dumplingai/cli --skill discovering-dumplingai-apis --skill dumplingai-cli
```

You can also run `dumplingai init` and install skills during setup.

### Supported environments

Local agent/runtime folders such as these are intentionally supported:

* `./.claude/skills/dumplingai-cli` (Claude Code)
* `./.agents/skills/dumplingai-cli` (Agents)
* `./.cursor/skills/dumplingai-cli` (Cursor)
* `./.codex/skills/dumplingai-cli` (Codex)

### What gets installed

Depending on the package you install, these skills can include API discovery guidance, CLI usage patterns, and reusable workflow templates such as YouTube-to-blog-post or social media generation.

### Validate installation

Inspect one of the installed directories for your agent environment:

```bash theme={null}
ls -la ./.codex/skills/dumplingai-cli
```

## Next steps

* Use DumplingAI with AI clients: [MCP Server](/mcp-server)
* Learn the `/v2` model: [Unified API](/unified-api-platform)
* Browse `/v2` capabilities and endpoints: [API Reference](/api-reference/v2/introduction)
