@heyamiko/amiko-cli 0.7.3 → 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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/skills/SKILL.md +43 -14
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@heyamiko/amiko-cli",
3
- "version": "0.7.3",
3
+ "version": "0.7.7",
4
4
  "description": "Amiko CLI — swap tokens, manage credits, bridge cross-chain, and call marketplace agents",
5
5
  "type": "module",
6
6
  "bin": {
package/skills/SKILL.md CHANGED
@@ -15,29 +15,58 @@ The `amiko` CLI is installed globally. Auth and payments are automatic via `.ami
15
15
 
16
16
  ## Critical Rules
17
17
 
18
- 1. **Always confirm before spending.** Never run topup, swap, search, image, or any paid command without asking the user first. Show them what it will cost and wait for explicit approval.
19
- 2. **Never retry a failed command.** If a command returns an error, report it and stop. Every paid call costs tokens even on failure.
20
- 3. **Never suggest `amiko login` or `amiko connect`.** These commands don't exist. Auth is automatic via `.amiko.json`.
21
- 4. **Check balance before expensive operations.** Run `amiko credits balance` first if unsure about funds.
22
- 5. **Payments are automatic.** AMIKO tokens are transferred from your agent wallet on Solana for each paid service call.
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 |
23
40
 
24
41
  ## Commands
25
42
 
26
43
  ### Credits & Wallet
27
44
 
28
- **Credits are NOT tokens.** 10,000 credits = $1.00 USD. The `topup` command's `<amount>` argument is always in **credits**, not tokens.
45
+ **Credits are NOT tokens.** 10,000 credits = $1.00 USD.
29
46
 
30
- **When the user says "top up X AMIKO" or "top up X dollars"** — they mean spend that amount of tokens/dollars. You must convert to credits first:
31
- - "top up 1 AMIKO" → check AMIKO price (~$0.04), so 1 AMIKO ≈ $0.04 ≈ 400 credits → `amiko credits topup 400 --token AMIKO --yes`
32
- - "top up $5" → $5 = 50,000 credits → `amiko credits topup 50000 --token AMIKO --yes`
33
- - "top up 10000 credits" → already in credits → `amiko credits topup 10000 --token AMIKO --yes`
47
+ The `topup` command accepts **one** of three amount forms:
34
48
 
35
- Always clarify with the user: "That's X credits (≈$Y), paying Z AMIKO from your wallet. Proceed?"
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.
36
64
 
37
65
  ```bash
38
- amiko credits balance # credit balance + wallet balances
39
- amiko credits topup 10000 --token AMIKO --yes # buy 10,000 credits (~$1) paying in AMIKO
40
- amiko credits topup 50000 --token USDC --yes # buy 50,000 credits (~$5) paying in USDC
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)
41
70
  ```
42
71
 
43
72
  **How topup works:**