> For the complete documentation index, see [llms.txt](https://docs.netauthpay.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.netauthpay.com/plugins/cli.md).

# CLI

Install globally: `npm install -g @eternallabs/netauth`.\
Then run `netauth <command> [options]`.

#### Global options

* `netauth --help` — list commands and options.
* `netauth agent --help`, `netauth payment --help`, `netauth wallet --help` — command-specific help.

***

#### Agent commands

| Command                                                | Description                                          |
| ------------------------------------------------------ | ---------------------------------------------------- |
| `netauth agent register <agentId> [--key <publicKey>]` | Register a new agent (optional existing Solana key). |
| `netauth agent info <agentId>`                         | Show agent details.                                  |
| `netauth agent balance <agentId> [--sol]`              | Show balance (lamports or SOL with `--sol`).         |
| `netauth agent list`                                   | List all agents.                                     |

***

#### Payment commands

| Command                                                             | Description                                                                   |
| ------------------------------------------------------------------- | ----------------------------------------------------------------------------- |
| `netauth payment send <from> <to> <amount> [--sol] [--memo <memo>]` | Send one payment (amount in lamports unless `--sol`).                         |
| `netauth payment send-batch <from> '<json>' [--sol]`                | Send multiple payments; `json` is an array of `{ toAgentId, amount, memo? }`. |
| `netauth payment status <paymentId> [--agent <agentId>]`            | Get payment status (optional agent for privacy).                              |
| `netauth payment history <agentId> [--limit <n>]`                   | List payments for the agent.                                                  |

**Batch JSON example:**

```bash
netauth payment send-batch alice '[{"toAgentId":"bob","amount":0.1},{"toAgentId":"charlie","amount":0.05}]' --sol
```

***
