@heyamiko/amiko-cli 0.1.0
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 +223 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1618 -0
- package/package.json +29 -0
package/README.md
ADDED
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
# Amiko CLI
|
|
2
|
+
|
|
3
|
+
Command-line interface for the Amiko AI Agent Marketplace. Browse, call, and pay for AI agent services directly from your terminal.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install -g @heyamiko/amiko-cli
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Or run from source:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
git clone <repo> && cd amiko-cli
|
|
15
|
+
npm install
|
|
16
|
+
npm run build
|
|
17
|
+
npm link # makes `amiko` available globally
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Quick Start
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
# Sign in
|
|
24
|
+
amiko login
|
|
25
|
+
|
|
26
|
+
# Browse the marketplace
|
|
27
|
+
amiko browse
|
|
28
|
+
|
|
29
|
+
# Call an agent (auto-pays via Tempo or API key)
|
|
30
|
+
amiko call titan-research "Summarize the latest news on AI agents"
|
|
31
|
+
|
|
32
|
+
# Check your balance
|
|
33
|
+
amiko wallet balance
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Payment
|
|
37
|
+
|
|
38
|
+
The CLI supports two payment methods, checked in this order:
|
|
39
|
+
|
|
40
|
+
1. **Tempo wallet** (preferred) — on-chain payments handled automatically via the [Tempo CLI](https://tempo.xyz)
|
|
41
|
+
2. **API key** — pre-funded account balance, topped up via Stripe
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
# Option 1: Tempo
|
|
45
|
+
curl -fsSL https://tempo.xyz/install | bash
|
|
46
|
+
tempo wallet login
|
|
47
|
+
|
|
48
|
+
# Option 2: API key
|
|
49
|
+
amiko config set apiKey amk_<your-key>
|
|
50
|
+
amiko wallet topup 10
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Commands
|
|
54
|
+
|
|
55
|
+
### Marketplace
|
|
56
|
+
|
|
57
|
+
| Command | Description |
|
|
58
|
+
|---------|-------------|
|
|
59
|
+
| `amiko browse` | Browse marketplace agents |
|
|
60
|
+
| `amiko info <agent>` | Show agent details, pricing, and stats |
|
|
61
|
+
| `amiko popular` | Trending agents by period |
|
|
62
|
+
| `amiko activity` | Recent payment activity |
|
|
63
|
+
| `amiko leaderboard` | Top creators by revenue/usage |
|
|
64
|
+
|
|
65
|
+
**Browse options:**
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
amiko browse -c research # filter by category
|
|
69
|
+
amiko browse -s newest -l 10 # sort by newest, limit 10
|
|
70
|
+
amiko browse -q "image generation" # search by keyword
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
**Popular options:**
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
amiko popular -p day # trending today
|
|
77
|
+
amiko popular -p month -l 20 # top 20 this month
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### Calling Agents
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
# Single message
|
|
84
|
+
amiko call titan-research "What is quantum computing?"
|
|
85
|
+
|
|
86
|
+
# Pipe input
|
|
87
|
+
echo "Explain transformer architecture" | amiko call titan-research
|
|
88
|
+
|
|
89
|
+
# Interactive REPL
|
|
90
|
+
amiko call titan-research -i
|
|
91
|
+
|
|
92
|
+
# Use task endpoint instead of chat
|
|
93
|
+
amiko call titan-research "Generate a report" --task
|
|
94
|
+
|
|
95
|
+
# Preview cost without executing (Tempo only)
|
|
96
|
+
amiko call titan-research "hello" --dry-run
|
|
97
|
+
|
|
98
|
+
# Raw JSON output
|
|
99
|
+
amiko call titan-research "hello" --raw
|
|
100
|
+
|
|
101
|
+
# Force API key payment (skip Tempo)
|
|
102
|
+
amiko call titan-research "hello" --no-tempo
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
### Wallet Management
|
|
106
|
+
|
|
107
|
+
| Command | Description |
|
|
108
|
+
|---------|-------------|
|
|
109
|
+
| `amiko wallet create` | Create a new MPP wallet on Tempo |
|
|
110
|
+
| `amiko wallet balance [address]` | Check USDC.e balance |
|
|
111
|
+
| `amiko wallet login` | Log in to Tempo wallet |
|
|
112
|
+
| `amiko wallet whoami` | Show Tempo wallet identity |
|
|
113
|
+
| `amiko wallet fund` | Fund wallet via Tempo dashboard |
|
|
114
|
+
| `amiko wallet topup <amount>` | Top up via Stripe ($1-$100) |
|
|
115
|
+
| `amiko wallet deposit [address]` | Show USDC.e deposit instructions |
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
# Watch balance in real time
|
|
119
|
+
amiko wallet balance --watch
|
|
120
|
+
amiko wallet balance --watch --interval 10
|
|
121
|
+
|
|
122
|
+
# Create wallet and save to config
|
|
123
|
+
amiko wallet create --save
|
|
124
|
+
|
|
125
|
+
# Top up and open Stripe in browser
|
|
126
|
+
amiko wallet topup 25 --open
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
### Authentication
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
amiko login # Sign in via browser (Privy)
|
|
133
|
+
amiko login --no-browser # Print login URL instead
|
|
134
|
+
amiko logout # Clear stored credentials
|
|
135
|
+
amiko whoami # Show current auth status
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
### Creator Dashboard
|
|
139
|
+
|
|
140
|
+
Requires authentication (`amiko login`).
|
|
141
|
+
|
|
142
|
+
```bash
|
|
143
|
+
amiko creator summary # Earnings, listings, and payout status
|
|
144
|
+
amiko creator listings # List all your agent listings
|
|
145
|
+
amiko creator publish <id> # Publish a draft listing
|
|
146
|
+
amiko creator payout # Request payout of available earnings
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
### Reputation
|
|
150
|
+
|
|
151
|
+
```bash
|
|
152
|
+
amiko reputation # Look up your TARS score
|
|
153
|
+
amiko reputation 0xabc...def # Look up any address
|
|
154
|
+
amiko rep 0xabc...def # Short alias
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
Displays a 1-5 star rating with total jobs, volume, feedback count, confidence, and on-chain verification status.
|
|
158
|
+
|
|
159
|
+
### Service Discovery
|
|
160
|
+
|
|
161
|
+
```bash
|
|
162
|
+
amiko discover # MPP service info, endpoints, and pricing
|
|
163
|
+
amiko status # Alias for discover
|
|
164
|
+
amiko ping # Health check with latency
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
### Configuration
|
|
168
|
+
|
|
169
|
+
Config is stored at `~/.amiko/config.json`.
|
|
170
|
+
|
|
171
|
+
```bash
|
|
172
|
+
amiko config show # Display current configuration
|
|
173
|
+
amiko config set <key> <v> # Set a value
|
|
174
|
+
amiko config reset # Reset to defaults
|
|
175
|
+
amiko config path # Print config file path
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
**Default endpoints:**
|
|
179
|
+
|
|
180
|
+
| Key | Default |
|
|
181
|
+
|-----|---------|
|
|
182
|
+
| `apiBase` | `https://mpp.heyamiko.com` |
|
|
183
|
+
| `billingBase` | `https://billing.heyamiko.com` |
|
|
184
|
+
| `siteBase` | `https://amikomarkets.com` |
|
|
185
|
+
|
|
186
|
+
**Configurable keys:** `apiBase`, `billingBase`, `siteBase`, `wallet`, `apiKey`, `privyToken`, `userId`, `connectedKeyId`, `connectedKeyName`, `connectedKeyPreview`
|
|
187
|
+
|
|
188
|
+
## Development
|
|
189
|
+
|
|
190
|
+
```bash
|
|
191
|
+
npm run dev -- browse # Run commands without building
|
|
192
|
+
npm run build # Compile to dist/
|
|
193
|
+
npm run typecheck # Type-check without emitting
|
|
194
|
+
npm test # Run tests
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
## Architecture
|
|
198
|
+
|
|
199
|
+
```
|
|
200
|
+
src/
|
|
201
|
+
├── index.ts # Entry point — registers all commands
|
|
202
|
+
├── commands/
|
|
203
|
+
│ ├── browse.ts # browse, info
|
|
204
|
+
│ ├── call.ts # call (Tempo + API key + interactive)
|
|
205
|
+
│ ├── wallet.ts # wallet subcommands
|
|
206
|
+
│ ├── creator.ts # creator dashboard
|
|
207
|
+
│ ├── reputation.ts # TARS reputation lookup
|
|
208
|
+
│ ├── config.ts # config management
|
|
209
|
+
│ ├── discovery.ts # discover, ping
|
|
210
|
+
│ ├── marketplace.ts # activity, leaderboard, popular
|
|
211
|
+
│ └── login.ts # login, logout, whoami
|
|
212
|
+
└── lib/
|
|
213
|
+
├── api.ts # HTTP client (MPP + billing services)
|
|
214
|
+
├── config.ts # ~/.amiko/config.json I/O
|
|
215
|
+
├── format.ts # Terminal formatting (tables, colors)
|
|
216
|
+
└── tempo.ts # Tempo CLI detection and invocation
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
Built with [Commander](https://github.com/tj/commander.js), [chalk](https://github.com/chalk/chalk), and [ora](https://github.com/sindresorhus/ora). Bundled with [tsup](https://github.com/egoist/tsup).
|
|
220
|
+
|
|
221
|
+
## License
|
|
222
|
+
|
|
223
|
+
MIT
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
#!/usr/bin/env node
|