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

# ATXP CLI

> Command-line tool for creating ATXP projects and running demos

# ATXP CLI

The [ATXP CLI](https://www.npmjs.com/package/atxp) is a command-line tool that helps you create ATXP projects, run demos, and manage your ATXP development workflow. It provides a streamlined way to bootstrap new projects and explore ATXP functionality.

## Installation

The recommended way to use the ATXP CLI is to run it directly using `npx atxp`.

As an alternative, you can install the ATXP CLI globally using npm:

```bash theme={null}
npm install -g atxp
```

<Check>
  Verify installation by running `atxp help` to confirm the CLI is properly installed.
</Check>

## Quickstart

### Run a demo

Run a demo ATXP project in seconds.

<Tabs>
  <Tab title="npx">
    ```bash theme={null}
    npx atxp demo
    ```
  </Tab>

  <Tab title="npm">
    ```bash theme={null}
    atxp demo
    ```
  </Tab>
</Tabs>

### Create a new project

The ATXP CLI offers several project templates to get you started quickly:

<Tabs>
  <Tab title="Agent template">
    Perfect for building AI agents that use paid MCP tools.

    **Features:**

    * Pre-configured ATXP client
    * Example agent implementation
    * Wallet integration setup
    * MCP server connection examples

    **Usage:**

    <Tabs>
      <Tab title="npx">
        ```bash theme={null}
        npx atxp create my-agent --template agent
        ```
      </Tab>

      <Tab title="npm">
        ```bash theme={null}
        atxp create my-agent --template agent
        ```
      </Tab>
    </Tabs>
  </Tab>

  <Tab title="Server template">
    Ideal for creating monetized MCP servers.

    **Features:**

    * Express.js server setup
    * ATXP middleware integration
    * Payment requirement examples
    * OAuth configuration

    **Usage:**

    <Tabs>
      <Tab title="npx">
        ```bash theme={null}
        npx atxp create my-server --template server
        ```
      </Tab>

      <Tab title="npm">
        ```bash theme={null}
        atxp create my-server --template server
        ```
      </Tab>
    </Tabs>
  </Tab>

  <Tab title="Full-stack template">
    Complete solution with both agent and server components.

    **Features:**

    * Client and server implementations
    * End-to-end payment flow
    * Development and production configs
    * Testing setup

    **Usage:**

    <Tabs>
      <Tab title="npx">
        ```bash theme={null}
        npx atxp create my-app --template fullstack
        ```
      </Tab>

      <Tab title="npm">
        ```bash theme={null}
        atxp create my-app --template fullstack
        ```
      </Tab>
    </Tabs>
  </Tab>
</Tabs>

## Available commands

### `atxp create <project-name>`

Creates a new ATXP project with a complete development setup.

<ParamField path="project-name" type="string" required>
  The name of your new ATXP project. This will be used as the directory name and package name.
</ParamField>

**Example:**

<Tabs>
  <Tab title="npx">
    ```bash theme={null}
    npx atxp create my-agent --template agent
    ```
  </Tab>

  <Tab title="npm">
    ```bash theme={null}
    atxp create my-agent --template agent
    ```
  </Tab>
</Tabs>

**What it creates:**

* Project directory with your specified name
* `package.json` with ATXP dependencies
* Basic project structure for agents or servers
* Configuration files for development
* Example code to get you started

### `atxp demo`

Runs interactive demos to showcase ATXP functionality.

**Available demos:**

* **Agent demo**: Shows how to connect an agent to paid MCP servers
* **Server demo**: Demonstrates creating a monetized MCP server
* **Payment flow**: Interactive walkthrough of ATXP payment processing

**Example:**

<Tabs>
  <Tab title="npx">
    ```bash theme={null}
    npx atxp demo
    ```
  </Tab>

  <Tab title="npm">
    ```bash theme={null}
    atxp demo
    ```
  </Tab>
</Tabs>

<Steps>
  <Step title="Select demo type">
    Choose from available demo options when prompted.
  </Step>

  <Step title="Follow interactive prompts">
    The CLI will guide you through each step of the demo.
  </Step>

  <Step title="View results">
    See ATXP in action with real examples and outputs.
  </Step>
</Steps>

### `atxp help`

Display help information and available commands.

<Tabs>
  <Tab title="npx">
    ```bash theme={null}
    npx atxp help
    ```
  </Tab>

  <Tab title="npm">
    ```bash theme={null}
    atxp help
    ```
  </Tab>
</Tabs>

### `atxp agent create`

Create a new agent account under your developer account. Requires login (`npx atxp login`).

Each agent receives:

* A unique email address (`{agentId}@atxp.email`)
* An Ethereum wallet
* \$5 in credits to start
* A connection token for SDK/CLI access

```bash theme={null}
npx atxp agent create
```

After creation, authenticate as the agent using its connection token:

```bash theme={null}
CONNECTION_TOKEN=<agent_token> npx atxp email inbox
```

### `atxp agent list`

List all agents you've created, with their email, account ID, connection token, wallet address, balance, and creation date.

```bash theme={null}
npx atxp agent list
```

### `atxp agent register`

Self-register as an agent without requiring a human developer's login. A single command creates a fully funded account instantly.

```bash theme={null}
npx atxp agent register
```

On success, the CLI prints your agent's connection token, email, wallet address, and connection string. Authenticate as the agent:

```bash theme={null}
npx atxp login --token "<connection_string>"
```

**Options:**

| Flag             | Description                                               |
| ---------------- | --------------------------------------------------------- |
| `--server <url>` | Accounts server URL (default: `https://accounts.atxp.ai`) |

### `atxp fund`

Show all available funding options for your account. Returns crypto deposit addresses (USDC on supported chains) and, for agent accounts, a Stripe payment link that can be shared with anyone.

```bash theme={null}
npx atxp fund
```

**Options:**

| Flag           | Description                                       |
| -------------- | ------------------------------------------------- |
| `--amount <n>` | Suggested amount in USD ($1–$1000, default: \$10) |
| `--open`       | Open the payment link in your browser             |

**Example output:**

```
Fund via USDC:
  Base: 0x59e6...4a62
  World: 0x59e6...4a62
  Polygon: 0x59e6...4a62

Fund via payment link:
  Suggested:  $10.00
  Range:      $1 - $1000
  URL:        https://buy.stripe.com/...
```

<Tip>
  Agents can choose which funding method to use based on context — share the payment link with a human owner via email, or use crypto addresses for agent-to-agent transfers.
</Tip>

### `atxp balance`

Check your ATXP account balance across all chains.

```bash theme={null}
npx atxp balance
```

### `atxp whoami`

Show your account info including account ID, email, and wallet address.

```bash theme={null}
npx atxp whoami
```

### `atxp transactions`

View recent transaction history for your account.

```bash theme={null}
npx atxp transactions
```

**Options:**

| Flag          | Description                                  |
| ------------- | -------------------------------------------- |
| `--limit <n>` | Number of transactions to show (default: 10) |

### `atxp email`

Send and receive emails using your ATXP email address (`{agentId}@atxp.email`).

```bash theme={null}
npx atxp email inbox                    # Check your inbox
npx atxp email read <messageId>         # Read a specific message
npx atxp email send --to user@example.com --subject "Hi" --body "Hello!"
npx atxp email reply <messageId> --body "Thanks!"
npx atxp email search "invoice"         # Search emails
```

### `atxp memory`

Manage, search, and back up agent memory files with local vector search.

```bash theme={null}
npx atxp memory push --path ~/.openclaw/workspace-abc/
npx atxp memory pull --path ~/.openclaw/workspace-abc/
npx atxp memory index --path ~/.openclaw/workspace-abc/
npx atxp memory search "auth flow" --path ~/.openclaw/workspace-abc/
npx atxp memory status --path ~/.openclaw/workspace-abc/
```

## Development workflow

<Steps>
  <Step title="Create your project">
    <Tabs>
      <Tab title="npx">
        ```bash theme={null}
        npx atxp create my-project
        cd my-project
        ```
      </Tab>

      <Tab title="npm">
        ```bash theme={null}
        atxp create my-project
        cd my-project
        ```
      </Tab>
    </Tabs>
  </Step>

  <Step title="Configure environment">
    Copy `.env.example` to `.env` and fill in your credentials.

    <Warning>
      Never commit your `.env` file to version control. Add it to your `.gitignore`.
    </Warning>
  </Step>

  <Step title="Install dependencies">
    ```bash theme={null}
    npm install
    ```
  </Step>

  <Step title="Start development server">
    ```bash theme={null}
    npm run dev
    ```
  </Step>

  <Step title="Test your implementation">
    ```bash theme={null}
    npm test
    ```
  </Step>
</Steps>

## Next steps

<CardGroup cols={2}>
  <Card title="Build an agent" icon="robot" href="/developers/build-agents">
    Learn how to create AI agents that use paid MCP tools with ATXP.
  </Card>

  <Card title="Monetize your server" icon="messages-dollar" href="/developers/monetize">
    Add payment requirements to your MCP servers and start earning.
  </Card>
</CardGroup>

## Support

<Info>
  Need help with the ATXP CLI? [Contact support](mailto:devrel@circuitandchisel.com).
</Info>
