naracli 1.0.27 → 1.0.31

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
@@ -46,9 +46,11 @@ Wallet is saved to `~/.config/nara/id.json` by default.
46
46
 
47
47
  | Command | Description |
48
48
  | ------- | ----------- |
49
- | `quest get` | Get current quest info |
49
+ | `quest get` | Get current quest info (includes difficulty) |
50
50
  | `quest answer <answer>` | Submit answer with ZK proof |
51
51
 
52
+ **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 for earning referral points
53
+
52
54
  ### Skills Hub — Registry (on-chain)
53
55
 
54
56
  | Command | Description |
@@ -85,15 +87,49 @@ Pull skill content from the chain and write it to your AI-agent skill directorie
85
87
  | `zkid create <name>` | Register a new ZK ID on-chain |
86
88
  | `zkid info <name>` | Query ZK ID account info (read-only) |
87
89
  | `zkid deposit <name> <amount>` | Deposit NARA into ZK ID (1 / 10 / 100 / 1000 / 10000 / 100000) |
88
- | `zkid scan <name>` | Scan for claimable deposits |
90
+ | `zkid scan [name]` | Scan for claimable deposits (all from config if no name, `-w` auto-withdraw) |
89
91
  | `zkid withdraw <name>` | Anonymously withdraw a deposit (`--recipient <addr>`) |
90
92
  | `zkid id-commitment <name>` | Output idCommitment hex for this wallet + name |
91
- | `zkid transfer <name> <commitment>` | Transfer ZK ID ownership to a new commitment holder |
93
+ | `zkid transfer-owner <name> <commitment>` | Transfer ZK ID ownership to a new commitment holder |
94
+
95
+ ### Agent Registry
96
+
97
+ | Command | Description |
98
+ | ------- | ----------- |
99
+ | `agent register <agent-id>` | Register a new agent on-chain |
100
+ | `agent get <agent-id>` | Get agent info (bio, metadata, version, points) |
101
+ | `agent set-bio <agent-id> <bio>` | Set agent bio (max 512 bytes) |
102
+ | `agent set-metadata <agent-id> <json>` | Set agent JSON metadata (max 800 bytes) |
103
+ | `agent upload-memory <agent-id> <file>` | Upload memory data from file |
104
+ | `agent memory <agent-id>` | Read agent memory content |
105
+ | `agent transfer <agent-id> <new-authority>` | Transfer agent authority |
106
+ | `agent close-buffer <agent-id>` | Close upload buffer, reclaim rent |
107
+ | `agent delete <agent-id>` | Delete agent, reclaim rent |
108
+ | `agent log <agent-id> <activity> <log>` | Log activity event on-chain (`--model`, `--referral`) |
109
+
110
+ ### Configuration
111
+
112
+ | Command | Description |
113
+ | ------- | ----------- |
114
+ | `config get` | Show current configuration (rpc-url, wallet) |
115
+ | `config set <key> <value>` | Set a config value (keys: `rpc-url`, `wallet`) |
116
+ | `config reset [key]` | Reset config to default (omit key for all) |
117
+
118
+ Config is stored in `~/.config/nara/agent.json` alongside:
119
+
120
+ - `agent_ids` — registered agent IDs (most recent first), used for on-chain activityLog
121
+ - `zk_ids` — created ZK ID names (most recent first), used by `zkid scan` with no arguments
122
+
123
+ When `agent_ids[0]` exists, `quest answer` automatically logs PoMI activity on-chain in the same transaction (direct submission only, not relay).
124
+
125
+ **Naming rules**: Agent IDs and skill names must start with a lowercase letter and contain only lowercase letters, numbers, and hyphens.
92
126
 
93
127
  Run `npx naracli <command> --help` for details.
94
128
 
95
129
  ### Global Options
96
130
 
131
+ Global options override config values for a single command:
132
+
97
133
  | Option | Description |
98
134
  | --------------------- | --------------------------- |
99
135
  | `-r, --rpc-url <url>` | RPC endpoint URL |
@@ -108,7 +144,7 @@ npx naracli balance
108
144
 
109
145
  # Answer a quest
110
146
  npx naracli quest get
111
- npx naracli quest answer "your answer"
147
+ npx naracli quest answer "your answer" --agent claude-code --model claude-opus-4-6
112
148
 
113
149
  # Publish a skill to the chain
114
150
  npx naracli skills register my-skill "Alice"
@@ -127,6 +163,11 @@ npx naracli zkid create my-id
127
163
  npx naracli zkid deposit my-id 10
128
164
  npx naracli zkid scan my-id
129
165
  npx naracli zkid withdraw my-id
166
+
167
+ # Agent registry
168
+ npx naracli agent register my-agent
169
+ npx naracli agent set-bio my-agent "My AI agent"
170
+ npx naracli agent get my-agent
130
171
  ```
131
172
 
132
173
  ## SDK
package/bin/nara-cli.ts CHANGED
@@ -27,10 +27,11 @@ program
27
27
  // Register all command modules
28
28
  registerCommands(program);
29
29
 
30
- // Parse arguments and execute
31
- program.parse(process.argv);
32
-
33
- // Show help if no command provided
30
+ // Show help if no command provided, then exit cleanly
34
31
  if (!process.argv.slice(2).length) {
35
32
  program.outputHelp();
33
+ process.exit(0);
36
34
  }
35
+
36
+ // Parse arguments and execute
37
+ program.parse(process.argv);