@clawcard/cli 3.0.1 → 3.0.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clawcard/cli",
3
- "version": "3.0.1",
3
+ "version": "3.0.2",
4
4
  "description": "The ClawCard CLI — manage your agent keys, billing, and setup from the terminal",
5
5
  "bin": {
6
6
  "clawcard": "./bin/clawcard.mjs"
@@ -126,7 +126,32 @@ export async function setupCommand() {
126
126
  const envPath = writeApiKey(apiKey);
127
127
  p.log.info(`API key saved to ${chalk.dim(envPath)}`);
128
128
 
129
- // Step 6: Summary
129
+ // Step 6: Create wallet (if doesn't exist)
130
+ const s3 = p.spinner();
131
+ s3.start("Setting up crypto wallet...");
132
+
133
+ try {
134
+ const { getWallet, createWallet } = await import("../agent-api.js");
135
+ let walletAddress = null;
136
+ try {
137
+ const existing = await getWallet(selectedKey.id);
138
+ walletAddress = existing.address;
139
+ s3.stop(`Wallet ready: ${chalk.dim(walletAddress)}`);
140
+ } catch {
141
+ // No wallet — create one
142
+ try {
143
+ const created = await createWallet(selectedKey.id);
144
+ walletAddress = created.address;
145
+ s3.stop(`Wallet created: ${orange(walletAddress)}`);
146
+ } catch (err) {
147
+ s3.stop("Wallet setup skipped (can create later with: clawcard agent wallet)");
148
+ }
149
+ }
150
+ } catch {
151
+ s3.stop("Wallet setup skipped");
152
+ }
153
+
154
+ // Step 7: Summary
130
155
  p.log.success("Your agent is ready to use ClawCard!");
131
156
  p.log.info(
132
157
  [