# 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
```

***


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.netauthpay.com/plugins/cli.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
