@heyamiko/amiko-cli 0.7.2 → 0.7.7
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 +2 -0
- package/package.json +1 -1
- package/skills/SKILL.md +49 -10
package/README.md
CHANGED
|
@@ -200,6 +200,8 @@ openclaw plugins install @heyamiko/amiko-cli
|
|
|
200
200
|
|
|
201
201
|
This registers the CLI's skill file so the agent discovers all commands through the normal skill system. Updates to the CLI (`npm update -g @heyamiko/amiko-cli`) also update the skill docs.
|
|
202
202
|
|
|
203
|
+
> **The skill is documentation, not a tool.** Agents must run `amiko <command>` through their shell/bash execution tool. Weaker models sometimes slugify the skill name (`amiko-cli` → `amiko_cli`) and try to call it as a tool, which fails with `Tool amiko_cli not found`. If you see that error, switch to a model with stronger tool discipline (e.g. Claude Sonnet 4.6) — see `skills/SKILL.md`.
|
|
204
|
+
|
|
203
205
|
### Authentication
|
|
204
206
|
|
|
205
207
|
Agents auto-authenticate via `.amiko.json` — no manual connect needed. The platform writes this file during twin init with wallets, billing config, and twin token.
|
package/package.json
CHANGED
package/skills/SKILL.md
CHANGED
|
@@ -7,27 +7,66 @@ metadata: {"openclaw":{"emoji":"🤖","requires":{"bins":["node"]}}}
|
|
|
7
7
|
|
|
8
8
|
# Amiko CLI
|
|
9
9
|
|
|
10
|
+
## How to invoke
|
|
11
|
+
|
|
12
|
+
Run `amiko <command>` via your **shell execution tool** (e.g. `bash`). This skill is a documentation reference, not a callable tool. **Do NOT** try to call `amiko_cli`, `amiko-cli`, `amiko`, or this skill's name as a tool — no such tool exists. The only working invocation is the shell command `amiko`.
|
|
13
|
+
|
|
10
14
|
The `amiko` CLI is installed globally. Auth and payments are automatic via `.amiko.json` — never suggest `amiko login` or `amiko connect`.
|
|
11
15
|
|
|
12
16
|
## Critical Rules
|
|
13
17
|
|
|
14
|
-
1. **Always confirm
|
|
15
|
-
2. **
|
|
16
|
-
3. **Never
|
|
17
|
-
4. **
|
|
18
|
-
5. **
|
|
18
|
+
1. **Always confirm the price with the user BEFORE running any paid command.** This is non-negotiable. For every one of: `topup`, `search`, `image`, `amazon search`, `service call`, `service tts`, `swap send` — you must first quote the exact cost in the relevant unit (AMIKO, $USD, or gas), wait for the user's explicit "yes" / "go ahead" / "do it", and only then run the command. Do not pre-empt; do not batch multiple paid calls; do not use `--yes` unless the user has just approved this specific call.
|
|
19
|
+
2. **After every paid command, report the remaining balance to the user.** The CLI now prints a `Balance: N credits (~$X.XX)` line at the end of every paid command. Include that figure in your reply so the user knows what they have left.
|
|
20
|
+
3. **Never retry a failed command.** If a command returns an error, report it and stop. Every paid call costs tokens even on failure.
|
|
21
|
+
4. **Never suggest `amiko login` or `amiko connect`.** These commands don't exist. Auth is automatic via `.amiko.json`.
|
|
22
|
+
5. **Check balance before expensive operations.** Run `amiko credits balance` first if unsure about funds.
|
|
23
|
+
6. **Payments are automatic.** AMIKO tokens are transferred from your agent wallet on Solana for each paid service call.
|
|
24
|
+
|
|
25
|
+
### Pricing cheat sheet (quote this to the user before running)
|
|
26
|
+
|
|
27
|
+
| Command | Cost |
|
|
28
|
+
|---------|------|
|
|
29
|
+
| `amiko search "<query>"` | 1 AMIKO |
|
|
30
|
+
| `amiko image "<prompt>"` | 5 AMIKO |
|
|
31
|
+
| `amiko amazon search "<query>"` | 1 AMIKO |
|
|
32
|
+
| `amiko amazon quote <ASIN>` | Free |
|
|
33
|
+
| `amiko service tts <voiceId> "<text>"` | 1 AMIKO |
|
|
34
|
+
| `amiko service call POST /v1/sfx ...` | $0.05 |
|
|
35
|
+
| `amiko service call POST /v1/music ...` | $0.10 |
|
|
36
|
+
| `amiko service call POST /v1/music/plan ...` | $0.02 |
|
|
37
|
+
| `amiko swap quote ...` | Free |
|
|
38
|
+
| `amiko swap send ...` | Solana gas only |
|
|
39
|
+
| `amiko credits topup ...` | Whatever amount you top up |
|
|
19
40
|
|
|
20
41
|
## Commands
|
|
21
42
|
|
|
22
43
|
### Credits & Wallet
|
|
23
44
|
|
|
24
|
-
**Credits are NOT tokens.** 10,000 credits = $1.00 USD.
|
|
45
|
+
**Credits are NOT tokens.** 10,000 credits = $1.00 USD.
|
|
46
|
+
|
|
47
|
+
The `topup` command accepts **one** of three amount forms:
|
|
48
|
+
|
|
49
|
+
| Form | Meaning | Example |
|
|
50
|
+
|------|---------|---------|
|
|
51
|
+
| `<amount>` (positional) | credits | `amiko credits topup 10000 --token AMIKO` → 10,000 credits = $1 |
|
|
52
|
+
| `--usd <n>` | US dollars | `amiko credits topup --usd 5 --token USDC` → $5 = 50,000 credits |
|
|
53
|
+
| `--spend <n>` | spend N of `--token` | `amiko credits topup --spend 1 --token SOL` → "1 SOL worth of credits" |
|
|
54
|
+
|
|
55
|
+
**Map user intent directly to the right form** — no manual price math needed:
|
|
56
|
+
|
|
57
|
+
- "top up 1 SOL of credits" → `amiko credits topup --spend 1 --token SOL`
|
|
58
|
+
- "top up 1 USDC worth of credits" → `amiko credits topup --spend 1 --token USDC`
|
|
59
|
+
- "top up 1 AMIKO" → `amiko credits topup --spend 1 --token AMIKO`
|
|
60
|
+
- "top up $5 in USDC" → `amiko credits topup --usd 5 --token USDC`
|
|
61
|
+
- "top up 10000 credits with AMIKO" → `amiko credits topup 10000 --token AMIKO`
|
|
62
|
+
|
|
63
|
+
**Always confirm with the user before running.** The CLI prints a `Top-up Summary` (credits, cost in tokens, USD, wallet) and then prompts `Proceed? [y/N]`. Do NOT pass `--yes` unless the user has explicitly approved the summary.
|
|
25
64
|
|
|
26
65
|
```bash
|
|
27
|
-
amiko credits balance
|
|
28
|
-
amiko credits topup
|
|
29
|
-
amiko credits topup
|
|
30
|
-
amiko credits topup 10000 --token
|
|
66
|
+
amiko credits balance # credit balance + wallet balances
|
|
67
|
+
amiko credits topup --spend 1 --token SOL # "1 SOL worth of credits" — prompts
|
|
68
|
+
amiko credits topup --usd 5 --token USDC # $5 paying in USDC — prompts
|
|
69
|
+
amiko credits topup 10000 --token AMIKO --yes # skip prompt (only after user approved summary)
|
|
31
70
|
```
|
|
32
71
|
|
|
33
72
|
**How topup works:**
|