memeputer 1.0.0 → 1.0.1
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 +22 -33
- package/dist/index.js +9 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@ Pay and interact with AI agents from your terminal using x402 micropayments.
|
|
|
7
7
|
## Installation
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
|
-
npm install -g memeputer
|
|
10
|
+
npm install -g memeputer
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
## Quick Start
|
|
@@ -19,8 +19,8 @@ memeputer agents
|
|
|
19
19
|
# Ask an agent (auto-pays via x402)
|
|
20
20
|
memeputer ask memeputer "What can you do?"
|
|
21
21
|
|
|
22
|
-
#
|
|
23
|
-
memeputer
|
|
22
|
+
# Execute custom commands
|
|
23
|
+
memeputer ask rawgroundbeefbot "/ping"
|
|
24
24
|
|
|
25
25
|
# Check your wallet balance
|
|
26
26
|
memeputer balance --wallet ~/.config/solana/id.json
|
|
@@ -65,27 +65,18 @@ memeputer ask veoputer "Create an upbeat podcast intro"
|
|
|
65
65
|
- `--json` - Output in JSON format
|
|
66
66
|
- `-q, --quiet` - Suppress progress output
|
|
67
67
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
Generate a profile picture using PFPputer.
|
|
68
|
+
**Custom Commands:**
|
|
71
69
|
|
|
72
|
-
|
|
70
|
+
Agents can have custom commands that you can execute by starting your message with `/command`:
|
|
73
71
|
|
|
74
72
|
```bash
|
|
75
|
-
#
|
|
76
|
-
memeputer
|
|
73
|
+
# Execute the /ping command
|
|
74
|
+
memeputer ask rawgroundbeefbot "/ping"
|
|
77
75
|
|
|
78
|
-
#
|
|
79
|
-
memeputer
|
|
76
|
+
# Custom commands can have parameters
|
|
77
|
+
memeputer ask someagent "/weather san francisco"
|
|
80
78
|
```
|
|
81
79
|
|
|
82
|
-
**Options:**
|
|
83
|
-
|
|
84
|
-
- `-w, --wallet <path>` - Path to Solana wallet keypair file
|
|
85
|
-
- `-o, --output <path>` - Save image to file path
|
|
86
|
-
- `--json` - Output in JSON format
|
|
87
|
-
- `-q, --quiet` - Suppress progress output
|
|
88
|
-
|
|
89
80
|
### `memeputer balance`
|
|
90
81
|
|
|
91
82
|
Check your wallet's USDC balance.
|
|
@@ -166,18 +157,16 @@ solana address
|
|
|
166
157
|
|
|
167
158
|
## Example Workflows
|
|
168
159
|
|
|
169
|
-
###
|
|
160
|
+
### Execute a custom command
|
|
170
161
|
|
|
171
162
|
```bash
|
|
172
|
-
memeputer
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
#
|
|
177
|
-
# -
|
|
178
|
-
# -
|
|
179
|
-
# - Transaction signature
|
|
180
|
-
# - Local file path
|
|
163
|
+
memeputer ask rawgroundbeefbot "/ping" -w ~/.config/solana/id.json
|
|
164
|
+
|
|
165
|
+
# Custom commands can do anything:
|
|
166
|
+
# - Generate images
|
|
167
|
+
# - Call external APIs
|
|
168
|
+
# - Return formatted data
|
|
169
|
+
# - Trigger webhooks
|
|
181
170
|
```
|
|
182
171
|
|
|
183
172
|
### Get trading analysis
|
|
@@ -205,13 +194,13 @@ memeputer ask memeputer "What's the weather?" -w ~/.config/solana/id.json
|
|
|
205
194
|
|
|
206
195
|
```bash
|
|
207
196
|
# Get response as JSON
|
|
208
|
-
result=$(memeputer
|
|
197
|
+
result=$(memeputer ask rawgroundbeefbot "/ping" --json)
|
|
209
198
|
|
|
210
|
-
# Extract
|
|
211
|
-
echo $result | jq -r '.
|
|
199
|
+
# Extract response
|
|
200
|
+
echo $result | jq -r '.response'
|
|
212
201
|
|
|
213
|
-
#
|
|
214
|
-
|
|
202
|
+
# Parse custom command output
|
|
203
|
+
echo $result | jq -r '.format' # text, image, video, etc.
|
|
215
204
|
```
|
|
216
205
|
|
|
217
206
|
## Pricing
|
package/dist/index.js
CHANGED
|
@@ -1,18 +1,22 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { Command } from "commander";
|
|
3
3
|
import chalk from "chalk";
|
|
4
|
-
import { createPfpCommand } from "./commands/pfp.js";
|
|
5
4
|
import { createAskCommand } from "./commands/ask.js";
|
|
6
5
|
import { createAgentsCommand } from "./commands/agents.js";
|
|
7
6
|
import { createBalanceCommand } from "./commands/balance.js";
|
|
7
|
+
import { readFileSync } from "fs";
|
|
8
|
+
import { join, dirname } from "path";
|
|
9
|
+
import { fileURLToPath } from "url";
|
|
10
|
+
// Read version from package.json
|
|
11
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
12
|
+
const packageJson = JSON.parse(readFileSync(join(__dirname, "../package.json"), "utf-8"));
|
|
8
13
|
const program = new Command();
|
|
9
14
|
program
|
|
10
15
|
.name("memeputer")
|
|
11
16
|
.description(chalk.bold("🤖 Memeputer CLI") +
|
|
12
17
|
"\n Pay and interact with AI agents via x402 micropayments")
|
|
13
|
-
.version(
|
|
18
|
+
.version(packageJson.version);
|
|
14
19
|
// Add commands
|
|
15
|
-
program.addCommand(createPfpCommand());
|
|
16
20
|
program.addCommand(createAskCommand());
|
|
17
21
|
program.addCommand(createAgentsCommand());
|
|
18
22
|
program.addCommand(createBalanceCommand());
|
|
@@ -20,8 +24,8 @@ program.addCommand(createBalanceCommand());
|
|
|
20
24
|
program.on("--help", () => {
|
|
21
25
|
console.log();
|
|
22
26
|
console.log("Examples:");
|
|
23
|
-
console.log(' $ memeputer
|
|
24
|
-
console.log(' $ memeputer ask
|
|
27
|
+
console.log(' $ memeputer ask FINNPUTER "whats up"');
|
|
28
|
+
console.log(' $ memeputer ask rawgroundbeefbot "/ping"');
|
|
25
29
|
console.log(" $ memeputer agents");
|
|
26
30
|
console.log(" $ memeputer balance");
|
|
27
31
|
console.log();
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA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