@naraya/cli 0.4.0 → 0.4.2
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 +28 -238
- package/dist/assets.pack.gz +0 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,13 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
> One sign-in, every model. A coding agent that delegates specialist work to focused subagents and brings evidence to every claim.
|
|
4
4
|
|
|
5
|
-
[](https://nodejs.org) [](https://nodejs.org) [](LICENSE) [](package.json)
|
|
6
6
|
|
|
7
|
-
Naraya CLI is
|
|
7
|
+
Naraya CLI is an AI coding agent that:
|
|
8
8
|
|
|
9
|
-
- Routes all model traffic through [router.naraya.ai](https://router.naraya.ai) with one API key.
|
|
10
|
-
- Ships
|
|
11
|
-
- Injects a `APPEND-SYSTEM.md` so the model reaches for the bundled agents and skills on every turn.
|
|
9
|
+
- Routes all model traffic through [router.naraya.ai](https://router.naraya.ai) with one API key — Claude, GPT, Gemini, DeepSeek, GLM, Kimi, MiniMax, Mistral, and more.
|
|
10
|
+
- Ships a roster of focused subagents (`nara-build`, `nara-architect`, `nara-release`, `nara-review`, `nara-debug`, `nara-plan`, `nara-explore`, `nara-search`, `nara-fe`, `nara-droid`) — each with its own skills and references.
|
|
12
11
|
- Provides a `delegate` tool that fans work out to subagents in parallel, sequential chains, or single focus — each in an isolated context window.
|
|
13
12
|
|
|
14
13
|
---
|
|
@@ -20,10 +19,7 @@ Naraya CLI is a thin wrapper around [pi](https://github.com/earendil-works/pi-mo
|
|
|
20
19
|
- [Usage](#usage)
|
|
21
20
|
- [Subagents](#subagents)
|
|
22
21
|
- [Skills](#skills)
|
|
23
|
-
- [
|
|
24
|
-
- [Extending](#extending)
|
|
25
|
-
- [Development](#development)
|
|
26
|
-
- [Architecture](#architecture)
|
|
22
|
+
- [Support](#support)
|
|
27
23
|
- [License](#license)
|
|
28
24
|
|
|
29
25
|
---
|
|
@@ -35,15 +31,15 @@ Naraya CLI is a thin wrapper around [pi](https://github.com/earendil-works/pi-mo
|
|
|
35
31
|
npm install -g @naraya/cli
|
|
36
32
|
```
|
|
37
33
|
|
|
38
|
-
|
|
34
|
+
Then sign in with your Naraya account:
|
|
39
35
|
|
|
40
36
|
```bash
|
|
41
|
-
|
|
42
|
-
cd naracli
|
|
43
|
-
npm install
|
|
44
|
-
npm link # expose `naraya` on PATH
|
|
37
|
+
naraya login
|
|
45
38
|
```
|
|
46
39
|
|
|
40
|
+
> Naraya CLI is proprietary software. Access requires a valid Naraya account and
|
|
41
|
+
> API key — sign up at [router.naraya.ai](https://router.naraya.ai).
|
|
42
|
+
|
|
47
43
|
---
|
|
48
44
|
|
|
49
45
|
## Quickstart
|
|
@@ -63,7 +59,7 @@ Inside the agent, press `/` for the command palette, `/agents` to list subagents
|
|
|
63
59
|
|
|
64
60
|
```bash
|
|
65
61
|
# Quick subcommands without launching the TUI
|
|
66
|
-
naraya login #
|
|
62
|
+
naraya login # sign in to router.naraya.ai
|
|
67
63
|
naraya logout # wipe local credentials
|
|
68
64
|
naraya status # show auth + quota + current model
|
|
69
65
|
naraya status --usd # same, with USD cost equivalent
|
|
@@ -98,17 +94,15 @@ naraya -p "audit the auth module for OWASP top 10" # single prompt, prints res
|
|
|
98
94
|
naraya -p --json <task> # machine-readable output
|
|
99
95
|
```
|
|
100
96
|
|
|
101
|
-
### Delegation patterns
|
|
97
|
+
### Delegation patterns
|
|
102
98
|
|
|
103
99
|
The agent delegates to specialists via the `delegate` tool. You do not invoke it directly — you phrase the request and the model decides.
|
|
104
100
|
|
|
105
|
-
Patterns the model uses:
|
|
106
|
-
|
|
107
101
|
```ts
|
|
108
102
|
// One focused specialist
|
|
109
103
|
delegate { agent: "nara-droid", task: "..." }
|
|
110
104
|
|
|
111
|
-
// Independent units in parallel
|
|
105
|
+
// Independent units in parallel
|
|
112
106
|
delegate { tasks: [
|
|
113
107
|
{ agent: "nara-search", task: "research X" },
|
|
114
108
|
{ agent: "nara-explore", task: "find usages of Y" },
|
|
@@ -127,268 +121,64 @@ delegate { chain: [
|
|
|
127
121
|
|
|
128
122
|
## Subagents
|
|
129
123
|
|
|
130
|
-
Naraya ships
|
|
124
|
+
Naraya ships a roster of focused subagents. The model picks based on the **unit of work**, not the surface form.
|
|
131
125
|
|
|
132
126
|
### Coordination
|
|
133
127
|
|
|
134
128
|
| Agent | Purpose | When to use |
|
|
135
129
|
|---|---|---|
|
|
136
130
|
| `nara-build` | Implements features, bugfixes, refactors, releases | Top-level orchestrator. Default for "implement X", "fix Y", "refactor Z" |
|
|
137
|
-
| `nara-architect` | System design, ADRs, component decomposition | Greenfield design, scaling decisions, API
|
|
138
|
-
| `nara-release` | Version sync, verification, deploy safety | Before any production push,
|
|
139
|
-
| `nara-review` | Multi-aspect code review (security, perf, a11y, API, tests) | Pre-merge review, audit, self-review
|
|
140
|
-
| `nara-debug` | 4-phase root-cause debugging | "X is broken", flaky tests, intermittent failures
|
|
131
|
+
| `nara-architect` | System design, ADRs, component decomposition | Greenfield design, scaling decisions, API contracts, trade-offs. Read-only |
|
|
132
|
+
| `nara-release` | Version sync, verification, deploy safety | Before any production push, store release, or schema migration |
|
|
133
|
+
| `nara-review` | Multi-aspect code review (security, perf, a11y, API, tests) | Pre-merge review, audit, self-review. Does not fix |
|
|
134
|
+
| `nara-debug` | 4-phase root-cause debugging | "X is broken", flaky tests, intermittent failures |
|
|
141
135
|
|
|
142
136
|
### Investigation (read-only)
|
|
143
137
|
|
|
144
138
|
| Agent | Purpose | When to use |
|
|
145
139
|
|---|---|---|
|
|
146
140
|
| `nara-plan` | Implementation plans, never edits code | Pair with `nara-build` for hand-off |
|
|
147
|
-
| `nara-explore` | Fast codebase navigation
|
|
148
|
-
| `nara-search` | Evidence-first research with citations | Library comparison, version migration,
|
|
141
|
+
| `nara-explore` | Fast codebase navigation | "Where is X defined?", "who calls Y?", quick map |
|
|
142
|
+
| `nara-search` | Evidence-first research with citations | Library comparison, version migration, doc lookup |
|
|
149
143
|
|
|
150
144
|
### Specialist (writes code in their domain)
|
|
151
145
|
|
|
152
146
|
| Agent | Purpose | When to use |
|
|
153
147
|
|---|---|---|
|
|
154
148
|
| `nara-fe` | Frontend UI/UX (React, Vue, Svelte, Angular, CSS, Tailwind, a11y) | UI changes, component design, responsive, accessibility |
|
|
155
|
-
| `nara-droid` | Native Android (Kotlin, Gradle, Compose, Room, Hilt, adb, APK/AAB) | Android
|
|
156
|
-
| `nara-vision` | Image analysis using mistral-medium-3-5 vision model | Screenshots, diagrams, UI layouts, code snippets, visual content |
|
|
157
|
-
|
|
158
|
-
### Picking the right agent
|
|
149
|
+
| `nara-droid` | Native Android (Kotlin, Gradle, Compose, Room, Hilt, adb, APK/AAB) | Android tasks, build failures, release |
|
|
159
150
|
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
- The user said "implement", "fix", "build", "add", "refactor" → `nara-build`
|
|
163
|
-
- The user said "plan", "design", "architect", "decompose" → `nara-architect` (design) or `nara-plan` (task breakdown)
|
|
164
|
-
- The user said "review", "audit", "check this" → `nara-review`
|
|
165
|
-
- The user said "release", "deploy", "ship" → `nara-release`
|
|
166
|
-
- The user said "debug", "broken", "crash", "flaky" → `nara-debug`
|
|
167
|
-
- The user said "find", "where", "who calls" → `nara-explore`
|
|
168
|
-
- The user said "research", "compare", "what is the best", "how does X work in library Y" → `nara-search`
|
|
169
|
-
- The user said something Android-specific → `nara-droid`
|
|
170
|
-
- The user said something UI/frontend-specific → `nara-fe`
|
|
171
|
-
- The user shared an image, screenshot, or needs visual analysis → `nara-vision`
|
|
172
|
-
|
|
173
|
-
If multiple of these apply, the model fans out to parallel subagents.
|
|
151
|
+
If multiple roles apply, the model fans out to parallel subagents.
|
|
174
152
|
|
|
175
153
|
---
|
|
176
154
|
|
|
177
155
|
## Skills
|
|
178
156
|
|
|
179
|
-
Naraya bundles a
|
|
180
|
-
|
|
181
|
-
Highlights:
|
|
157
|
+
Naraya bundles a large pool of skills that any agent can load on demand via `/skill:<name>`. Highlights:
|
|
182
158
|
|
|
183
159
|
| Skill | What it covers |
|
|
184
160
|
|---|---|
|
|
185
161
|
| `systematic-debugging` | 4-phase root-cause debugging |
|
|
186
162
|
| `test-driven-development` | RED-GREEN-REFACTOR discipline |
|
|
187
163
|
| `writing-plans` | Implementation plans with bite-sized tasks |
|
|
188
|
-
| `web-app-release-workflow` | Ship Dockerized web apps |
|
|
189
164
|
| `security`, `auth-identity`, `compliance-governance` | Security review and compliance |
|
|
190
165
|
| `architecture`, `api-design-patterns`, `distributed-systems` | System design |
|
|
191
|
-
| `mlops/*` | ML/LLM training, serving, fine-tuning, evaluation |
|
|
192
|
-
| `creative/{humanizer, p5js, claude-design}` | Content / UI generation |
|
|
193
166
|
| `android-kotlin`, `compose-patterns`, `gradle-troubleshoot` | Android development |
|
|
194
167
|
| `react-patterns`, `css-patterns` | Frontend |
|
|
195
168
|
|
|
196
169
|
**Skills vs subagents:** a skill is a workflow / lens the agent applies inline. A subagent is a separate context that runs in parallel. Use skills for "do X the right way", subagents for "do X in isolation".
|
|
197
170
|
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
## Agent structure
|
|
201
|
-
|
|
202
|
-
Each agent is a folder under `assets/agents/`. Folder name MUST equal the frontmatter `name:` field.
|
|
203
|
-
|
|
204
|
-
```
|
|
205
|
-
assets/agents/
|
|
206
|
-
├── nara-build/ # Generalist implementer (top-level)
|
|
207
|
-
│ ├── AGENTS.md # Frontmatter (name/description/tools/model) + system prompt
|
|
208
|
-
│ ├── skills/ # Agent-specific skills, NOT published to global pool
|
|
209
|
-
│ │ └── engineering-patterns/SKILL.md
|
|
210
|
-
│ ├── scripts/ # Helper shell scripts (chmod +x)
|
|
211
|
-
│ │ ├── impact-scan.sh
|
|
212
|
-
│ │ └── scan.sh
|
|
213
|
-
│ ├── references/ # On-demand docs the agent may read into context
|
|
214
|
-
│ │ └── adr-template.md
|
|
215
|
-
│ ├── assets/ # Static resources (templates, data)
|
|
216
|
-
│ └── README.md # per-agent docs
|
|
217
|
-
├── nara-plan/ # Read-only planner
|
|
218
|
-
├── nara-explore/ # Fast read-only code navigation (haiku)
|
|
219
|
-
├── nara-search/ # Evidence-first research
|
|
220
|
-
├── nara-droid/ # Native Android specialist
|
|
221
|
-
├── nara-fe/ # Frontend UI/UX specialist
|
|
222
|
-
├── nara-vision/ # Image analysis (mistral-medium-3-5 vision)
|
|
223
|
-
├── nara-architect/ # System design & ADRs (read-only)
|
|
224
|
-
├── nara-release/ # Release safety
|
|
225
|
-
├── nara-review/ # Multi-aspect code review
|
|
226
|
-
└── nara-debug/ # 4-phase root-cause debugging
|
|
227
|
-
```
|
|
228
|
-
|
|
229
|
-
### Conventions
|
|
230
|
-
|
|
231
|
-
- **Folder name = frontmatter `name:`.** The orchestrator warns but does not fail if they diverge.
|
|
232
|
-
- **`AGENTS.md` is the only file the loader reads.** Everything else is opt-in for the agent to `read` into context.
|
|
233
|
-
- **Per-agent `skills/` are NOT published to the global skill pool.** They are scoped to that agent.
|
|
234
|
-
- **Scripts are executable** (`chmod +x`). They can be invoked from the agent's `bash` tool.
|
|
235
|
-
- **References are docs the agent may read.** Large checklists, protocol walkthroughs, template snippets.
|
|
236
|
-
|
|
237
|
-
### Adding a new agent
|
|
238
|
-
|
|
239
|
-
1. Create `assets/agents/<your-role>/AGENTS.md` with frontmatter (`name`, `description`, `tools`, `model`) + body.
|
|
240
|
-
2. Add the four subdirs: `skills/`, `scripts/`, `references/`, `assets/`.
|
|
241
|
-
3. (Optional) Add a `README.md` documenting the agent.
|
|
242
|
-
4. Run `npm test` to confirm the seed manifest picks it up.
|
|
243
|
-
5. (Optional) Add the agent to the roster in `assets/APPEND-SYSTEM.md` so the model knows to delegate to it.
|
|
244
|
-
|
|
245
|
-
### Editing an existing agent
|
|
246
|
-
|
|
247
|
-
Edit `assets/agents/<role>/AGENTS.md`. The orchestrator hot-reads this on each `delegate` call, so changes take effect on the next invocation. No restart needed.
|
|
248
|
-
|
|
249
|
-
---
|
|
250
|
-
|
|
251
|
-
## Extending
|
|
252
|
-
|
|
253
|
-
### Adding a skill to a specific agent
|
|
254
|
-
|
|
255
|
-
Drop a directory under `assets/agents/<role>/skills/<skill-name>/` with a `SKILL.md` inside:
|
|
256
|
-
|
|
257
|
-
```
|
|
258
|
-
assets/agents/nara-fe/
|
|
259
|
-
└── skills/
|
|
260
|
-
└── vue-patterns/
|
|
261
|
-
└── SKILL.md
|
|
262
|
-
```
|
|
263
|
-
|
|
264
|
-
### Adding a skill to the global pool
|
|
265
|
-
|
|
266
|
-
Drop it under `skills/<skill-name>/SKILL.md` at the repo root. The global pool is auto-discovered by pi.
|
|
267
|
-
|
|
268
|
-
### Overriding model per-agent
|
|
269
|
-
|
|
270
|
-
Edit the frontmatter `model:` field in `AGENTS.md`. Or set a per-agent override at runtime with `/agent-model <agent> <model>`.
|
|
271
|
-
|
|
272
|
-
### Customizing the system prompt
|
|
273
|
-
|
|
274
|
-
Edit `assets/APPEND-SYSTEM.md`. This file is appended to the model's system prompt on every launch.
|
|
275
|
-
|
|
276
|
-
---
|
|
277
|
-
|
|
278
|
-
## Development
|
|
279
|
-
|
|
280
|
-
```bash
|
|
281
|
-
git clone https://gitlab.naraya.ai/adearman/naracli
|
|
282
|
-
cd naracli
|
|
283
|
-
npm install
|
|
284
|
-
npm test # run node:test suite (8 tests)
|
|
285
|
-
```
|
|
286
|
-
|
|
287
|
-
### Project layout
|
|
288
|
-
|
|
289
|
-
```
|
|
290
|
-
naraya-cli/
|
|
291
|
-
├── bin/
|
|
292
|
-
│ └── naraya.mjs # CLI entry: subcommand dispatch + pi launch
|
|
293
|
-
├── src/
|
|
294
|
-
│ ├── banner.mjs # login/launch banner
|
|
295
|
-
│ ├── clipboard.mjs # copy auth URL to clipboard
|
|
296
|
-
│ ├── config.mjs # models.json read/write
|
|
297
|
-
│ ├── goodbye.mjs # farewell on quit
|
|
298
|
-
│ ├── login.mjs # naraya login (OAuth-style)
|
|
299
|
-
│ ├── seed.mjs # asset sync to ~/.naraya/agent
|
|
300
|
-
│ ├── splash.mjs # startup animation
|
|
301
|
-
│ └── status.mjs # naraya status (quota, cost)
|
|
302
|
-
├── assets/
|
|
303
|
-
│ ├── APPEND-SYSTEM.md # injected into system prompt
|
|
304
|
-
│ ├── agents/ # 10 subagent folders (see above)
|
|
305
|
-
│ ├── extensions/ # .ts extensions loaded by pi
|
|
306
|
-
│ ├── skills/ # empty (skills live at repo root for global pool)
|
|
307
|
-
│ └── themes/naraya.json # default theme
|
|
308
|
-
├── skills/ # global skill pool (~100 skills)
|
|
309
|
-
├── test/
|
|
310
|
-
│ ├── config.test.mjs
|
|
311
|
-
│ ├── seed.test.mjs # covers agent folder + nested resources
|
|
312
|
-
│ └── status.test.mjs
|
|
313
|
-
├── package.json
|
|
314
|
-
└── README.md
|
|
315
|
-
```
|
|
316
|
-
|
|
317
|
-
### Testing
|
|
318
|
-
|
|
319
|
-
```bash
|
|
320
|
-
npm test # all 8 tests
|
|
321
|
-
node --test test/seed.test.mjs # just seed (asset sync)
|
|
322
|
-
node --test test/status.test.mjs # just status rendering
|
|
323
|
-
```
|
|
324
|
-
|
|
325
|
-
The seed test covers both the legacy flat layout and the new folder-based agent layout (AGENTS.md + nested skills/scripts).
|
|
171
|
+
For project-specific guidance, add an `AGENTS.md` to your repository — the agent reads it automatically.
|
|
326
172
|
|
|
327
173
|
---
|
|
328
174
|
|
|
329
|
-
##
|
|
330
|
-
|
|
331
|
-
### Request flow
|
|
332
|
-
|
|
333
|
-
```
|
|
334
|
-
User input
|
|
335
|
-
│
|
|
336
|
-
▼
|
|
337
|
-
┌─────────────────────────┐
|
|
338
|
-
│ bin/naraya.mjs │ CLI entry, subcommand dispatch
|
|
339
|
-
│ - login/logout/status │
|
|
340
|
-
│ - else: launch pi │
|
|
341
|
-
└──────────┬──────────────┘
|
|
342
|
-
│
|
|
343
|
-
▼
|
|
344
|
-
┌─────────────────────────┐
|
|
345
|
-
│ src/seed.mjs │ Sync assets/ to ~/.naraya/agent
|
|
346
|
-
│ - assets/agents/* │ (only managed files; user files preserved)
|
|
347
|
-
│ - assets/extensions/* │
|
|
348
|
-
│ - assets/APPEND-SYSTEM │
|
|
349
|
-
└──────────┬──────────────┘
|
|
350
|
-
│
|
|
351
|
-
▼
|
|
352
|
-
┌─────────────────────────┐
|
|
353
|
-
│ pi-coding-agent │ pi runtime
|
|
354
|
-
│ - system prompt: │ ← APPEND-SYSTEM.md appended
|
|
355
|
-
│ - skill discovery │ ← global pool + per-agent
|
|
356
|
-
│ - extension loading │ ← naraya-orchestrator, naraya-debug, etc.
|
|
357
|
-
│ - delegate tool │ ← fans out to subagents
|
|
358
|
-
└──────────┬──────────────┘
|
|
359
|
-
│
|
|
360
|
-
▼
|
|
361
|
-
┌─────────────────────────┐
|
|
362
|
-
│ Subagent (isolated ctx) │ one per `delegate` call
|
|
363
|
-
│ - reads AGENTS.md │
|
|
364
|
-
│ - reads per-agent │
|
|
365
|
-
│ skills/scripts/refs │
|
|
366
|
-
│ - reads global skills │
|
|
367
|
-
│ - returns result │
|
|
368
|
-
└─────────────────────────┘
|
|
369
|
-
│
|
|
370
|
-
▼
|
|
371
|
-
Output to user
|
|
372
|
-
```
|
|
373
|
-
|
|
374
|
-
### Why folder-based agents?
|
|
375
|
-
|
|
376
|
-
- **Colocation.** Each agent is one self-contained directory: definition + skills + scripts + references + assets. Move it, version it, delete it as one unit.
|
|
377
|
-
- **No global namespace pollution.** Per-agent `skills/` are scoped; only `AGENTS.md` is published.
|
|
378
|
-
- **Easier to share.** A folder is a package. An `.md` file in a flat dir is a file in a list.
|
|
379
|
-
- **Scales.** Adding an agent = adding a folder. Adding an agent to the old flat layout = adding a file that could collide.
|
|
380
|
-
- **Backward compatible.** The orchestrator loader supports both folder layout (`<role>/AGENTS.md`) and legacy flat (`<role>.md`).
|
|
381
|
-
|
|
382
|
-
### Why split coordination / specialist / investigation?
|
|
383
|
-
|
|
384
|
-
- **Coordination agents** (`nara-build`, `nara-architect`, `nara-release`, `nara-review`, `nara-debug`) need broad context. They route, sequence, verify.
|
|
385
|
-
- **Specialist agents** (`nara-fe`, `nara-droid`) need deep domain knowledge. Their system prompt is shaped by their domain.
|
|
386
|
-
- **Investigation agents** (`nara-plan`, `nara-explore`, `nara-search`) are read-only. They never modify state. They produce artifacts (plans, maps, evidence) that the orchestrator consumes.
|
|
175
|
+
## Support
|
|
387
176
|
|
|
388
|
-
|
|
177
|
+
- **Account, billing, API keys:** [router.naraya.ai](https://router.naraya.ai)
|
|
178
|
+
- **Sign-in issues:** run `naraya logout` then `naraya login` to refresh your session.
|
|
389
179
|
|
|
390
180
|
---
|
|
391
181
|
|
|
392
182
|
## License
|
|
393
183
|
|
|
394
|
-
|
|
184
|
+
Proprietary. Copyright © 2026 PT. Naraya Teknologi Indonesia. All rights reserved. See [LICENSE](LICENSE).
|
package/dist/assets.pack.gz
CHANGED
|
Binary file
|