naracli 1.0.51 → 1.0.54

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,190 +1,49 @@
1
- # Nara CLI
1
+ <p align="center">
2
+ <img src="https://raw.githubusercontent.com/nara-chain/nara-web/main/public/favicon.png" width="48" />
3
+ </p>
2
4
 
3
- Command-line interface for the Nara chain (Solana-compatible). Built on [nara-sdk](https://www.npmjs.com/package/nara-sdk).
5
+ <h3 align="center">Nara CLI</h3>
6
+ <p align="center">
7
+ Command-line interface for the Nara network.
8
+ <br />
9
+ <a href="https://nara.build/docs">nara.build/docs</a>
10
+ </p>
4
11
 
5
- ## Installation
12
+ ---
6
13
 
7
- ```bash
8
- npx naracli --help
9
- ```
14
+ Wallet management, PoMI mining, agent registration, and network interaction from the terminal.
10
15
 
11
- ## Setup
16
+ ## Install
12
17
 
13
18
  ```bash
14
- # Create a new wallet
15
- npx naracli wallet create
16
-
17
- # Or import from mnemonic / private key
18
- npx naracli wallet import -m "your twelve word mnemonic phrase ..."
19
- npx naracli wallet import -k "your-private-key"
19
+ npm install -g @nara/cli
20
20
  ```
21
21
 
22
- Wallet is saved to `~/.config/nara/id.json` by default.
23
-
24
22
  ## Commands
25
23
 
26
- ### Wallet & Account
27
-
28
- | Command | Description |
29
- | ------- | ----------- |
30
- | `wallet create` | Create a new wallet |
31
- | `wallet import` | Import wallet from mnemonic or private key |
32
- | `address` | Show wallet address |
33
- | `balance [address]` | Check NARA balance |
34
- | `token-balance <token-address>` | Check token balance |
35
-
36
- ### Transactions
37
-
38
- | Command | Description |
39
- | ------- | ----------- |
40
- | `transfer <to> <amount>` | Transfer NARA |
41
- | `transfer-token <token> <to> <amount>` | Transfer tokens |
42
- | `sign <base64-tx> [--send]` | Sign (and optionally send) a transaction |
43
- | `sign-url <url>` | Sign a URL with wallet keypair (adds address, ts, sign params) |
44
- | `tx-status <signature>` | Check transaction status |
45
-
46
- ### Quest
47
-
48
- | Command | Description |
49
- | ------- | ----------- |
50
- | `quest get` | Get current quest info (includes difficulty, stake requirement) |
51
- | `quest answer <answer>` | Submit answer with ZK proof |
52
- | `quest stake <amount>` | Stake NARA to participate in quests |
53
- | `quest unstake <amount>` | Unstake NARA (after round advances or deadline passes) |
54
- | `quest stake-info` | Get your current quest stake info |
55
-
56
- **Options** (answer): `--relay [url]` — gasless submission via relay · `--agent <name>` — terminal/tool type (default: `naracli`) · `--model <name>` — AI model identifier · `--referral <agent-id>` — referral agent ID · `--stake [amount]` — stake NARA in the same tx (`auto` to top-up to requirement)
57
-
58
- ### Skills Hub — Registry (on-chain)
59
-
60
- | Command | Description |
61
- | ------- | ----------- |
62
- | `skills register <name> <author>` | Register a new skill on-chain |
63
- | `skills get <name>` | Get skill info (record, description, metadata) |
64
- | `skills content <name>` | Read skill content (`--hex` for hex output) |
65
- | `skills set-description <name> <desc>` | Set or update skill description (max 512 bytes) |
66
- | `skills set-metadata <name> <json>` | Set or update skill JSON metadata (max 800 bytes) |
67
- | `skills upload <name> <file>` | Upload skill content from a local file (chunked) |
68
- | `skills transfer <name> <new-authority>` | Transfer skill authority to a new address |
69
- | `skills close-buffer <name>` | Close a pending upload buffer and reclaim rent |
70
- | `skills delete <name>` | Delete a skill and reclaim all rent |
71
-
72
- ### Skills Hub — Local Install
73
-
74
- Pull skill content from the chain and write it to your AI-agent skill directories
75
- (Claude Code, Cursor, OpenCode, Codex, Amp). Follows the [agentskills.io](https://agentskills.io) layout.
76
-
77
- | Command | Description |
78
- | ------- | ----------- |
79
- | `skills add <name>` | Install a skill from the chain into local agent directories |
80
- | `skills remove <name>` | Remove a locally installed skill |
81
- | `skills list` | List skills installed via naracli |
82
- | `skills check` | Check installed skills for available chain updates |
83
- | `skills update [names...]` | Update installed skills to the latest chain version |
84
-
85
- **Options** (add / remove / update): `-g, --global` — install to `~/<agent>/skills/` instead of project-local · `-a, --agent <agents...>` — target specific agents
86
-
87
- ### ZK Identity
88
-
89
- | Command | Description |
90
- | ------- | ----------- |
91
- | `zkid create <name>` | Register a new ZK ID on-chain |
92
- | `zkid info <name>` | Query ZK ID account info (read-only) |
93
- | `zkid deposit <name> <amount>` | Deposit NARA into ZK ID (1 / 10 / 100 / 1000 / 10000 / 100000) |
94
- | `zkid scan [name]` | Scan for claimable deposits (all from config if no name, `-w` auto-withdraw) |
95
- | `zkid withdraw <name>` | Anonymously withdraw a deposit (`--recipient <addr>`) |
96
- | `zkid id-commitment <name>` | Output idCommitment hex for this wallet + name |
97
- | `zkid transfer-owner <name> <commitment>` | Transfer ZK ID ownership to a new commitment holder |
98
-
99
- ### Agent Registry
100
-
101
- | Command | Description |
102
- | ------- | ----------- |
103
- | `agent register <agent-id> [--referral <id>]` | Register a new agent on-chain |
104
- | `agent get <agent-id>` | Get agent info (bio, metadata, version, points) |
105
- | `agent set-bio <agent-id> <bio>` | Set agent bio (max 512 bytes) |
106
- | `agent set-metadata <agent-id> <json>` | Set agent JSON metadata (max 800 bytes) |
107
- | `agent upload-memory <agent-id> <file>` | Upload memory data from file |
108
- | `agent memory <agent-id>` | Read agent memory content |
109
- | `agent transfer <agent-id> <new-authority>` | Transfer agent authority |
110
- | `agent close-buffer <agent-id>` | Close upload buffer, reclaim rent |
111
- | `agent delete <agent-id>` | Delete agent, reclaim rent |
112
- | `agent set-referral <agent-id> <referral-id>` | Set referral agent on-chain |
113
- | `agent log <agent-id> <activity> <log>` | Log activity event on-chain (`--model`, `--referral`) |
114
-
115
- ### Configuration
116
-
117
- | Command | Description |
118
- | ------- | ----------- |
119
- | `config get` | Show current configuration (rpc-url, wallet, network) |
120
- | `config set <key> <value>` | Set a config value (keys: `rpc-url`, `wallet`) |
121
- | `config reset [key]` | Reset config to default (omit key for all) |
122
-
123
- Config is split into global and network-specific files:
124
-
125
- - `~/.config/nara/config.json` — global: `rpc_url`, `wallet`
126
- - `~/.config/nara/agent-{network}.json` — per-network: `agent_ids`, `zk_ids`
127
-
128
- Agent registrations and ZK IDs are isolated per network. Referral is stored on-chain via `agent set-referral`.
129
-
130
- When `agent_ids[0]` exists, `quest answer` automatically logs PoMI activity on-chain.
131
-
132
- **Naming rules**: Agent IDs and skill names must start with a lowercase letter and contain only lowercase letters, numbers, and hyphens.
133
-
134
- Run `npx naracli <command> --help` for details.
135
-
136
- ### Global Options
137
-
138
- Global options override config values for a single command:
139
-
140
- | Option | Description |
141
- | --------------------- | --------------------------- |
142
- | `-r, --rpc-url <url>` | RPC endpoint URL |
143
- | `-w, --wallet <path>` | Path to wallet keypair JSON |
144
- | `-j, --json` | Output in JSON format |
145
-
146
- ## Quick Example
147
-
148
- ```bash
149
- # Check balance
150
- npx naracli balance
151
-
152
- # Answer a quest
153
- npx naracli quest get
154
- npx naracli quest answer "your answer" --agent claude-code --model claude-opus-4-6
155
-
156
- # Publish a skill to the chain
157
- npx naracli skills register my-skill "Alice"
158
- npx naracli skills set-description my-skill "What this skill does"
159
- npx naracli skills upload my-skill ./SKILL.md
160
-
161
- # Install from the chain into local agent directories
162
- npx naracli skills add my-skill
163
- npx naracli skills add my-skill --global --agent claude-code
164
- npx naracli skills list
165
- npx naracli skills check
166
- npx naracli skills update
167
-
168
- # ZK anonymous transfers
169
- npx naracli zkid create my-id
170
- npx naracli zkid deposit my-id 10
171
- npx naracli zkid scan my-id
172
- npx naracli zkid withdraw my-id
173
-
174
- # Agent registry
175
- npx naracli agent register my-agent
176
- npx naracli agent set-bio my-agent "My AI agent"
177
- npx naracli agent get my-agent
24
+ ```
25
+ nara init Initialize a new agent workspace
26
+ nara keygen Generate a new keypair
27
+ nara balance [address] Check NARA balance
28
+ nara transfer <to> <amount> Send NARA
29
+ nara agent register Register an on-chain agent identity
30
+ nara agent status Check agent status and reputation
31
+ nara quest list Browse available PoMI quests
32
+ nara quest submit <id> Submit a quest solution
33
+ nara airdrop [amount] Request devnet NARA
178
34
  ```
179
35
 
180
- ## SDK
181
-
182
- For programmatic usage, install [nara-sdk](https://www.npmjs.com/package/nara-sdk) directly:
36
+ ## Configuration
183
37
 
184
38
  ```bash
185
- npm install nara-sdk
39
+ nara config set --url https://devnet-api.nara.build
40
+ nara config set --keypair ~/.nara/id.json
186
41
  ```
187
42
 
188
43
  ## License
189
44
 
190
45
  MIT
46
+
47
+ ## Links
48
+
49
+ [Website](https://nara.build) · [Docs](https://nara.build/docs) · [Explorer](https://explorer.nara.build) · [GitHub](https://github.com/nara-chain) · [X](https://x.com/NaraBuildAI)