@ottocode/openclaw-setu 0.1.3 → 0.1.5

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.
@@ -0,0 +1,2 @@
1
+ import*as J from"node:crypto";var V=J&&typeof J==="object"&&"webcrypto"in J?J.webcrypto:J&&typeof J==="object"&&("randomBytes"in J)?J:void 0;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */function X(q){return q instanceof Uint8Array||ArrayBuffer.isView(q)&&q.constructor.name==="Uint8Array"}function Z(q){if(!Number.isSafeInteger(q)||q<0)throw Error("positive integer expected, got "+q)}function Y(q,...v){if(!X(q))throw Error("Uint8Array expected");if(v.length>0&&!v.includes(q.length))throw Error("Uint8Array expected of length "+v+", got length="+q.length)}function U(q){if(typeof q!=="function"||typeof q.create!=="function")throw Error("Hash should be wrapped by utils.createHasher");Z(q.outputLen),Z(q.blockLen)}function D(q,v=!0){if(q.destroyed)throw Error("Hash instance has been destroyed");if(v&&q.finished)throw Error("Hash#digest() has already been called")}function _(q,v){Y(q);let z=v.outputLen;if(q.length<z)throw Error("digestInto() expects output buffer of length at least "+z)}function S(q){return new Uint32Array(q.buffer,q.byteOffset,Math.floor(q.byteLength/4))}function f(...q){for(let v=0;v<q.length;v++)q[v].fill(0)}function u(q){return new DataView(q.buffer,q.byteOffset,q.byteLength)}function x(q,v){return q<<32-v|q>>>v}var O=(()=>new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68)();function j(q){return q<<24&4278190080|q<<8&16711680|q>>>8&65280|q>>>24&255}function F(q){for(let v=0;v<q.length;v++)q[v]=j(q[v]);return q}var H=O?(q)=>q:F;function R(q){if(typeof q!=="string")throw Error("string expected");return new Uint8Array(new TextEncoder().encode(q))}function K(q){if(typeof q==="string")q=R(q);return Y(q),q}function g(...q){let v=0;for(let G=0;G<q.length;G++){let P=q[G];Y(P),v+=P.length}let z=new Uint8Array(v);for(let G=0,P=0;G<q.length;G++){let Q=q[G];z.set(Q,P),P+=Q.length}return z}class k{}function m(q){let v=(G)=>q().update(K(G)).digest(),z=q();return v.outputLen=z.outputLen,v.blockLen=z.blockLen,v.create=()=>q(),v}function A(q=32){if(V&&typeof V.getRandomValues==="function")return V.getRandomValues(new Uint8Array(q));if(V&&typeof V.randomBytes==="function")return Uint8Array.from(V.randomBytes(q));throw Error("crypto.getRandomValues must be defined")}var W=BigInt(4294967295),$=BigInt(32);function T(q,v=!1){if(v)return{h:Number(q&W),l:Number(q>>$&W)};return{h:Number(q>>$&W)|0,l:Number(q&W)|0}}function L(q,v=!1){let z=q.length,G=new Uint32Array(z),P=new Uint32Array(z);for(let Q=0;Q<z;Q++){let{h:I,l:N}=T(q[Q],v);[G[Q],P[Q]]=[I,N]}return[G,P]}var b=(q,v,z)=>q<<z|v>>>32-z,B=(q,v,z)=>v<<z|q>>>32-z,C=(q,v,z)=>v<<z-32|q>>>64-z,p=(q,v,z)=>q<<z-32|v>>>64-z;
2
+ export{L as Tc,b as Uc,B as Vc,C as Wc,p as Xc,Z as Yc,Y as Zc,U as _c,D as $c,_ as ad,S as bd,f as cd,u as dd,x as ed,H as fd,K as gd,g as hd,k as id,m as jd,A as kd};
package/dist/cli.mjs ADDED
@@ -0,0 +1,46 @@
1
+ #!/usr/bin/env bun
2
+ import{a as S}from"./chunk-r76z42nm.mjs";import{c as u,e as b,f as v,g as a}from"./chunk-vvb3cx45.mjs";import{l as s,m as i,n as p,o as c,p as r,q as y,r as m}from"./chunk-vw7de3g2.mjs";import"./chunk-k1btvkaq.mjs";import"./chunk-2pmp70f4.mjs";import"./chunk-w1g9nypz.mjs";import"./chunk-gr14hnnm.mjs";import"./chunk-enz73nmb.mjs";import*as x from"node:readline";function n(o){let e=x.createInterface({input:process.stdin,output:process.stdout});return new Promise((t)=>{e.question(o,(l)=>{e.close(),t(l.trim())})})}function g(){console.log(`
3
+ openclaw-setu — Pay for AI with Solana USDC
4
+
5
+ Usage:
6
+ openclaw-setu setup Interactive setup (wallet + config)
7
+ openclaw-setu start Start the local proxy server
8
+ openclaw-setu stop Stop (placeholder — use Ctrl+C)
9
+
10
+ openclaw-setu wallet generate Generate a new Solana wallet
11
+ openclaw-setu wallet import Import an existing private key
12
+ openclaw-setu wallet export Export your private key
13
+ openclaw-setu wallet info Show wallet address and balances
14
+
15
+ openclaw-setu config inject Inject Setu provider into openclaw.json
16
+ openclaw-setu config remove Remove Setu provider from openclaw.json
17
+ openclaw-setu config status Check if Setu is configured
18
+
19
+ openclaw-setu help Show this help
20
+ `)}async function h(){console.log(`
21
+ Setu — Pay for AI with Solana USDC
22
+ `);let o=p(),e=o;if(o){if(console.log(` Existing wallet found: ${o.publicKey}`),(await n(" Use existing wallet? (Y/n): ")).toLowerCase()==="n")if((await n(" (g)enerate new or (i)mport existing? ")).toLowerCase()==="i"){let w=await n(" Enter Solana private key (base58): ");if(!s(w))console.error(" Invalid private key."),process.exit(1);e=c(w),console.log(` Wallet imported: ${e.publicKey}`)}else e=r(),console.log(` New wallet generated: ${e.publicKey}`)}else if((await n(" No wallet found. (g)enerate new or (i)mport existing? ")).toLowerCase()==="i"){let l=await n(" Enter Solana private key (base58): ");if(!s(l))console.error(" Invalid private key."),process.exit(1);e=c(l),console.log(` Wallet imported: ${e.publicKey}`)}else e=r(),console.log(` New wallet generated: ${e.publicKey}`);if(!e)console.error(" Failed to set up wallet."),process.exit(1);console.log(`
23
+ Wallet: ${e.publicKey}`),console.log(` Key stored at: ${i()}`),await u(),console.log(` OpenClaw config updated: ${a()}`),console.log(`
24
+ Setup complete!
25
+
26
+ Next steps:
27
+ 1. Fund your wallet with USDC on Solana:
28
+ ${e.publicKey}
29
+
30
+ 2. Start the proxy:
31
+ openclaw-setu start
32
+
33
+ 3. Restart OpenClaw:
34
+ openclaw gateway restart
35
+
36
+ Your wallet address is your identity — no API keys needed.
37
+ `)}async function k(){let o=p();if(o){if((await n(`Wallet exists (${o.publicKey}). Overwrite? (y/N): `)).toLowerCase()!=="y"){console.log("Cancelled.");return}}let e=r();console.log(`Wallet generated: ${e.publicKey}`),console.log(`Key stored at: ${i()}`),console.log(`
38
+ Fund with USDC on Solana: ${e.publicKey}`)}async function $(){let o=await n("Enter Solana private key (base58): ");if(!s(o))console.error("Invalid private key."),process.exit(1);let e=c(o);console.log(`Wallet imported: ${e.publicKey}`)}function C(){let o=y();if(!o)console.error("No wallet found. Run `openclaw-setu setup` first."),process.exit(1);console.log(o)}async function K(){let o=p();if(!o)console.error("No wallet found. Run `openclaw-setu setup` first."),process.exit(1);console.log(`
39
+ Wallet: ${o.publicKey}`),console.log(`Key path: ${i()}`),console.log(`
40
+ Fetching balances...`);let e=await m(o.privateKey);if(e.setu)console.log(`
41
+ Setu Balance: $${e.setu.balance.toFixed(4)}`),console.log(`Total Spent: $${e.setu.totalSpent.toFixed(4)}`),console.log(`Requests: ${e.setu.requestCount}`);else console.log(`
42
+ Setu Balance: (not available — wallet may not be registered yet)`);if(e.wallet)console.log(`
43
+ On-chain USDC: $${e.wallet.usdcBalance.toFixed(4)} (${e.wallet.network})`)}async function W(){await u(),console.log(`Setu provider injected into ${a()}`)}function I(){b(),console.log(`Setu provider removed from ${a()}`)}function U(){if(v())console.log(`Setu is configured in ${a()}`);else console.log("Setu is not configured. Run `openclaw-setu setup`.")}function P(){let o=parseInt(process.env.SETU_PROXY_PORT??"8403",10),e=process.argv.includes("--verbose")||process.argv.includes("-v");try{let{wallet:t}=S({port:o,verbose:e});console.log(`
44
+ Setu proxy running on http://localhost:${o}`),console.log(`Wallet: ${t.publicKey}`),console.log(`
45
+ Press Ctrl+C to stop.
46
+ `)}catch(t){console.error(t.message),process.exit(1)}}var[d,f]=process.argv.slice(2);switch(d){case"setup":h();break;case"start":P();break;case"wallet":switch(f){case"generate":k();break;case"import":$();break;case"export":C();break;case"info":K();break;default:console.error("Unknown wallet command. Use: generate, import, export, info"),process.exit(1)}break;case"config":switch(f){case"inject":W();break;case"remove":I();break;case"status":U();break;default:console.error("Unknown config command. Use: inject, remove, status"),process.exit(1)}break;case"help":case"--help":case"-h":case void 0:g();break;default:console.error(`Unknown command: ${d}`),g(),process.exit(1)}
package/dist/index.mjs ADDED
@@ -0,0 +1,3 @@
1
+ import{b as s,c as g,d as C,f as P}from"./chunk-vvb3cx45.mjs";import{l as f,m as y,n as l,p as h,r as S}from"./chunk-vw7de3g2.mjs";import"./chunk-k1btvkaq.mjs";import"./chunk-2pmp70f4.mjs";import"./chunk-w1g9nypz.mjs";import"./chunk-gr14hnnm.mjs";import{qd as m}from"./chunk-enz73nmb.mjs";var $=8403;function x(e){return e.pluginConfig?.port??$}var K={id:"setu",name:"Setu",description:"Pay for AI with Solana USDC — no API keys, just a wallet.",version:"0.1.0",async register(e){let n=x(e);await g(n).catch(()=>{});try{C()}catch{}if(!e.config.models)e.config.models={providers:{}};if(!e.config.models.providers)e.config.models.providers={};let r=s(n);if(e.config.models.providers.setu={baseUrl:r.baseUrl,api:r.api,apiKey:r.apiKey,models:r.models},!e.config.agents)e.config.agents={};let u=e.config.agents;if(!u.defaults)u.defaults={};let d=u.defaults;if(!d.model)d.model={};let w=d.model;if(!w.primary)w.primary="setu/claude-sonnet-4-6";e.registerProvider({id:"setu",label:"Setu (Solana USDC)",aliases:["setu-solana"],envVars:["SETU_PRIVATE_KEY"],models:s(n),auth:[{id:"setu-wallet",label:"Solana Wallet",hint:"Generate or import a Solana wallet — pay per token with USDC",kind:"custom",async run(o){let t=l();if(t)return o.prompter.note(`Existing Setu wallet found: ${t.publicKey}`),{profiles:[{profileId:"setu-wallet",credential:{apiKey:"setu-proxy-handles-auth",type:"wallet",walletAddress:t.publicKey}}],configPatch:{models:{providers:{setu:s(n)}}},defaultModel:"setu/claude-sonnet-4-6",notes:[`Wallet: ${t.publicKey}`,"Fund with USDC on Solana to start using.","Run `openclaw-setu start` to start the proxy."]};let a=await o.prompter.text({message:"Enter Solana private key (base58) or press Enter to generate a new one:",validate:(i)=>{if(i&&!f(i))return"Invalid Solana private key";return}}),c=typeof a==="string"?a.trim():"";if(c&&f(c)){let{saveWallet:i}=await import("./chunk-nj01dc2r.mjs");i(c)}else h();let p=l();return await g(n),{profiles:[{profileId:"setu-wallet",credential:{apiKey:"setu-proxy-handles-auth",type:"wallet",walletAddress:p.publicKey}}],configPatch:{models:{providers:{setu:s(n)}}},defaultModel:"setu/claude-sonnet-4-6",notes:[`Wallet generated: ${p.publicKey}`,`Key stored at: ${y()}`,`Fund with USDC on Solana: ${p.publicKey}`,"Run `openclaw-setu start` to start the proxy."]}}}]});let b={name:"wallet",description:"Show your Setu wallet address and balances",requireAuth:!0,async handler(){let o=l();if(!o)return{text:"No Setu wallet found. Run `openclaw-setu setup`."};let t=await S(o.privateKey),a=[`Wallet: ${o.publicKey}`];if(t.setu)a.push(`Setu Balance: $${t.setu.balance.toFixed(4)}`),a.push(`Total Spent: $${t.setu.totalSpent.toFixed(4)}`),a.push(`Requests: ${t.setu.requestCount}`);if(t.wallet)a.push(`On-chain USDC: $${t.wallet.usdcBalance.toFixed(4)} (${t.wallet.network})`);return{text:a.join(`
2
+ `)}}};e.registerCommand(b);let v={name:"setu-status",description:"Check Setu plugin configuration status",async handler(){let o=l(),t=P();return{text:[`Wallet: ${o?o.publicKey:"not set up"}`,`OpenClaw config: ${t?"injected":"not configured"}`,`Proxy port: ${n}`].join(`
3
+ `)}}};e.registerCommand(v),e.registerService({id:"setu-proxy",async start(){if(!l()){e.logger.warn("Setu: No wallet found. Run `openclaw-setu setup` first.");return}try{let{createProxy:t}=await import("./chunk-kvpwet74.mjs");t({port:n,verbose:!1}),e.logger.info(`Setu proxy running on http://localhost:${n}`)}catch(t){e.logger.error(`Setu proxy failed: ${t.message}`)}}})}},R=K;export{R as default};
package/package.json CHANGED
@@ -1,24 +1,28 @@
1
1
  {
2
2
  "name": "@ottocode/openclaw-setu",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
4
4
  "description": "Setu provider for OpenClaw — pay for AI with Solana USDC. No API keys, just a wallet.",
5
5
  "type": "module",
6
- "main": "./src/index.ts",
6
+ "main": "./dist/index.mjs",
7
7
  "exports": {
8
- ".": "./src/index.ts"
8
+ ".": "./dist/index.mjs"
9
9
  },
10
10
  "bin": {
11
- "openclaw-setu": "./src/cli.ts"
11
+ "openclaw-setu": "./dist/cli.mjs"
12
12
  },
13
13
  "openclaw": {
14
14
  "extensions": [
15
- "./src/index.ts"
15
+ "./dist/index.mjs"
16
16
  ]
17
17
  },
18
18
  "files": [
19
- "src",
19
+ "dist",
20
20
  "openclaw.plugin.json"
21
21
  ],
22
+ "scripts": {
23
+ "build": "bun run build.ts",
24
+ "prepublishOnly": "bun run build"
25
+ },
22
26
  "keywords": [
23
27
  "openclaw",
24
28
  "setu",
@@ -36,9 +40,6 @@
36
40
  "url": "git+https://github.com/nitishxyz/otto.git",
37
41
  "directory": "packages/openclaw-setu"
38
42
  },
39
- "dependencies": {
40
- "@ottocode/ai-sdk": "^0.1.4"
41
- },
42
43
  "peerDependencies": {
43
44
  "openclaw": ">=2025.1.0"
44
45
  },
package/src/cli.ts DELETED
@@ -1,272 +0,0 @@
1
- #!/usr/bin/env bun
2
-
3
- import {
4
- loadWallet,
5
- saveWallet,
6
- ensureWallet,
7
- exportWalletKey,
8
- getWalletKeyPath,
9
- getSetuBalance,
10
- } from "./wallet.ts";
11
- import { injectConfig, removeConfig, isConfigured, getConfigPath } from "./config.ts";
12
- import { createProxy } from "./proxy.ts";
13
- import { isValidPrivateKey } from "@ottocode/ai-sdk";
14
- import * as readline from "node:readline";
15
-
16
- function prompt(question: string): Promise<string> {
17
- const rl = readline.createInterface({
18
- input: process.stdin,
19
- output: process.stdout,
20
- });
21
- return new Promise((resolve) => {
22
- rl.question(question, (answer) => {
23
- rl.close();
24
- resolve(answer.trim());
25
- });
26
- });
27
- }
28
-
29
- function printHelp() {
30
- console.log(`
31
- openclaw-setu — Pay for AI with Solana USDC
32
-
33
- Usage:
34
- openclaw-setu setup Interactive setup (wallet + config)
35
- openclaw-setu start Start the local proxy server
36
- openclaw-setu stop Stop (placeholder — use Ctrl+C)
37
-
38
- openclaw-setu wallet generate Generate a new Solana wallet
39
- openclaw-setu wallet import Import an existing private key
40
- openclaw-setu wallet export Export your private key
41
- openclaw-setu wallet info Show wallet address and balances
42
-
43
- openclaw-setu config inject Inject Setu provider into openclaw.json
44
- openclaw-setu config remove Remove Setu provider from openclaw.json
45
- openclaw-setu config status Check if Setu is configured
46
-
47
- openclaw-setu help Show this help
48
- `);
49
- }
50
-
51
- async function cmdSetup() {
52
- console.log("\n Setu — Pay for AI with Solana USDC\n");
53
-
54
- const existing = loadWallet();
55
- let wallet = existing;
56
-
57
- if (existing) {
58
- console.log(` Existing wallet found: ${existing.publicKey}`);
59
- const choice = await prompt(" Use existing wallet? (Y/n): ");
60
- if (choice.toLowerCase() === "n") {
61
- const action = await prompt(" (g)enerate new or (i)mport existing? ");
62
- if (action.toLowerCase() === "i") {
63
- const key = await prompt(" Enter Solana private key (base58): ");
64
- if (!isValidPrivateKey(key)) {
65
- console.error(" Invalid private key.");
66
- process.exit(1);
67
- }
68
- wallet = saveWallet(key);
69
- console.log(` Wallet imported: ${wallet.publicKey}`);
70
- } else {
71
- wallet = ensureWallet();
72
- console.log(` New wallet generated: ${wallet.publicKey}`);
73
- }
74
- }
75
- } else {
76
- const action = await prompt(
77
- " No wallet found. (g)enerate new or (i)mport existing? ",
78
- );
79
- if (action.toLowerCase() === "i") {
80
- const key = await prompt(" Enter Solana private key (base58): ");
81
- if (!isValidPrivateKey(key)) {
82
- console.error(" Invalid private key.");
83
- process.exit(1);
84
- }
85
- wallet = saveWallet(key);
86
- console.log(` Wallet imported: ${wallet.publicKey}`);
87
- } else {
88
- wallet = ensureWallet();
89
- console.log(` New wallet generated: ${wallet.publicKey}`);
90
- }
91
- }
92
-
93
- if (!wallet) {
94
- console.error(" Failed to set up wallet.");
95
- process.exit(1);
96
- }
97
-
98
- console.log(`\n Wallet: ${wallet.publicKey}`);
99
- console.log(` Key stored at: ${getWalletKeyPath()}`);
100
-
101
- await injectConfig();
102
- console.log(` OpenClaw config updated: ${getConfigPath()}`);
103
-
104
- console.log(`
105
- Setup complete!
106
-
107
- Next steps:
108
- 1. Fund your wallet with USDC on Solana:
109
- ${wallet.publicKey}
110
-
111
- 2. Start the proxy:
112
- openclaw-setu start
113
-
114
- 3. Restart OpenClaw:
115
- openclaw gateway restart
116
-
117
- Your wallet address is your identity — no API keys needed.
118
- `);
119
- }
120
-
121
- async function cmdWalletGenerate() {
122
- const existing = loadWallet();
123
- if (existing) {
124
- const choice = await prompt(
125
- `Wallet exists (${existing.publicKey}). Overwrite? (y/N): `,
126
- );
127
- if (choice.toLowerCase() !== "y") {
128
- console.log("Cancelled.");
129
- return;
130
- }
131
- }
132
- const wallet = ensureWallet();
133
- console.log(`Wallet generated: ${wallet.publicKey}`);
134
- console.log(`Key stored at: ${getWalletKeyPath()}`);
135
- console.log(`\nFund with USDC on Solana: ${wallet.publicKey}`);
136
- }
137
-
138
- async function cmdWalletImport() {
139
- const key = await prompt("Enter Solana private key (base58): ");
140
- if (!isValidPrivateKey(key)) {
141
- console.error("Invalid private key.");
142
- process.exit(1);
143
- }
144
- const wallet = saveWallet(key);
145
- console.log(`Wallet imported: ${wallet.publicKey}`);
146
- }
147
-
148
- function cmdWalletExport() {
149
- const key = exportWalletKey();
150
- if (!key) {
151
- console.error("No wallet found. Run `openclaw-setu setup` first.");
152
- process.exit(1);
153
- }
154
- console.log(key);
155
- }
156
-
157
- async function cmdWalletInfo() {
158
- const wallet = loadWallet();
159
- if (!wallet) {
160
- console.error("No wallet found. Run `openclaw-setu setup` first.");
161
- process.exit(1);
162
- }
163
-
164
- console.log(`\nWallet: ${wallet.publicKey}`);
165
- console.log(`Key path: ${getWalletKeyPath()}`);
166
-
167
- console.log("\nFetching balances...");
168
- const balances = await getSetuBalance(wallet.privateKey);
169
-
170
- if (balances.setu) {
171
- console.log(`\nSetu Balance: $${balances.setu.balance.toFixed(4)}`);
172
- console.log(`Total Spent: $${balances.setu.totalSpent.toFixed(4)}`);
173
- console.log(`Requests: ${balances.setu.requestCount}`);
174
- } else {
175
- console.log("\nSetu Balance: (not available — wallet may not be registered yet)");
176
- }
177
-
178
- if (balances.wallet) {
179
- console.log(
180
- `\nOn-chain USDC: $${balances.wallet.usdcBalance.toFixed(4)} (${balances.wallet.network})`,
181
- );
182
- }
183
- }
184
-
185
- async function cmdConfigInject() {
186
- await injectConfig();
187
- console.log(`Setu provider injected into ${getConfigPath()}`);
188
- }
189
-
190
- function cmdConfigRemove() {
191
- removeConfig();
192
- console.log(`Setu provider removed from ${getConfigPath()}`);
193
- }
194
-
195
- function cmdConfigStatus() {
196
- if (isConfigured()) {
197
- console.log(`Setu is configured in ${getConfigPath()}`);
198
- } else {
199
- console.log("Setu is not configured. Run `openclaw-setu setup`.");
200
- }
201
- }
202
-
203
- function cmdStart() {
204
- const port = parseInt(process.env.SETU_PROXY_PORT ?? "8403", 10);
205
- const verbose = process.argv.includes("--verbose") || process.argv.includes("-v");
206
-
207
- try {
208
- const { wallet } = createProxy({ port, verbose });
209
- console.log(`\nSetu proxy running on http://localhost:${port}`);
210
- console.log(`Wallet: ${wallet.publicKey}`);
211
- console.log(`\nPress Ctrl+C to stop.\n`);
212
- } catch (err) {
213
- console.error((err as Error).message);
214
- process.exit(1);
215
- }
216
- }
217
-
218
- const [cmd, sub] = process.argv.slice(2);
219
-
220
- switch (cmd) {
221
- case "setup":
222
- cmdSetup();
223
- break;
224
- case "start":
225
- cmdStart();
226
- break;
227
- case "wallet":
228
- switch (sub) {
229
- case "generate":
230
- cmdWalletGenerate();
231
- break;
232
- case "import":
233
- cmdWalletImport();
234
- break;
235
- case "export":
236
- cmdWalletExport();
237
- break;
238
- case "info":
239
- cmdWalletInfo();
240
- break;
241
- default:
242
- console.error('Unknown wallet command. Use: generate, import, export, info');
243
- process.exit(1);
244
- }
245
- break;
246
- case "config":
247
- switch (sub) {
248
- case "inject":
249
- cmdConfigInject();
250
- break;
251
- case "remove":
252
- cmdConfigRemove();
253
- break;
254
- case "status":
255
- cmdConfigStatus();
256
- break;
257
- default:
258
- console.error("Unknown config command. Use: inject, remove, status");
259
- process.exit(1);
260
- }
261
- break;
262
- case "help":
263
- case "--help":
264
- case "-h":
265
- case undefined:
266
- printHelp();
267
- break;
268
- default:
269
- console.error(`Unknown command: ${cmd}`);
270
- printHelp();
271
- process.exit(1);
272
- }