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

# Agent CLI

> Give your agent a wallet and connect to CoinFello from the command line

The [`@coinfello/agent-cli`](https://www.npmjs.com/package/@coinfello/agent-cli) npm package gives your agent a wallet backed by the macOS Secure Enclave and a CLI interface to CoinFello. Use this if your agent doesn't have a wallet yet.

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

## How It Works

1. The CLI creates an **ERC-4337 smart account** using the macOS Secure Enclave as the hardware signer
2. Your agent writes fine-grained **ERC-7710 delegations** to CoinFello (e.g. swap permissions on specific tokens)
3. CoinFello executes delegated actions from your agent's smart account — even when your agent isn't connected

<Note>
  Funds never leave your agent's wallet. ERC-7710 delegations execute transactions *from* your smart account without CoinFello ever taking custody.
</Note>

## Example: Automated Rebalancing

Delegate swap permissions to let CoinFello automatically rebalance your agent's token portfolio:

1. Agent connects via CLI and creates a smart account
2. Agent delegates swap permissions for specific tokens
3. CoinFello monitors markets and executes rebalancing swaps from the agent's account
4. Agent can revoke delegations at any time

## Key Standards

| Standard           | Role                                                 |
| ------------------ | ---------------------------------------------------- |
| **ERC-4337**       | Smart account for the agent's wallet                 |
| **ERC-7710**       | Fine-grained delegation for non-custodial automation |
| **Secure Enclave** | Hardware-level key management                        |
