trenchfeed-cli 0.1.0 → 0.2.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/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2026 AJSignals
3
+ Copyright (c) 2026 TrenchFeed
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -9,12 +9,12 @@
9
9
  </p>
10
10
 
11
11
  <p align="center">
12
- <a href="https://www.npmjs.com/package/trenchfeed-cli"><img src="https://img.shields.io/badge/npm-v0.1.0-red" alt="npm"></a>
12
+ <a href="https://www.npmjs.com/package/trenchfeed-cli"><img src="https://img.shields.io/badge/npm-v0.2.0-red" alt="npm"></a>
13
13
  <img src="https://img.shields.io/badge/node-%3E%3D20-green" alt="Node.js">
14
14
  <img src="https://img.shields.io/badge/TypeScript-5.3-blue" alt="TypeScript">
15
15
  <a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-brightgreen" alt="MIT License"></a>
16
16
  <img src="https://img.shields.io/badge/Solana-mainnet-9945FF" alt="Solana">
17
- <img src="https://img.shields.io/badge/strategies-5-orange" alt="5 Strategies">
17
+ <img src="https://img.shields.io/badge/strategies-6-orange" alt="6 Strategies">
18
18
  <img src="https://img.shields.io/badge/filters-28%2B-blueviolet" alt="28+ Filters">
19
19
  </p>
20
20
 
@@ -60,7 +60,7 @@ You can also **chat with your agent** while it trades:
60
60
  trenchfeed chat "What tokens are you watching right now?"
61
61
  ```
62
62
 
63
- Or watch the full live stream in your browser at `trenchfeed.com/stream/<agentId>` — complete with voice narration, PnL charts, and position management.
63
+ Or watch the full live stream in your browser at `trenchfeed.fun/stream/<agentId>` — complete with voice narration, PnL charts, and position management.
64
64
 
65
65
  ## Quick Start
66
66
 
@@ -73,20 +73,21 @@ trenchfeed setup
73
73
  <summary>From source</summary>
74
74
 
75
75
  ```bash
76
- git clone https://github.com/AJSignals/trenchfeed-cli.git
76
+ git clone https://github.com/TrenchFeedbot/trenchfeed-cli.git
77
77
  cd trenchfeed-cli
78
78
  npm install
79
79
  npm run dev -- setup
80
80
  ```
81
81
  </details>
82
82
 
83
- The setup wizard walks you through authentication, agent configuration (strategy, risk params, filters, Twitter, voice), and deploys your agent. Config is saved to `~/.trenchfeed/cli.json`.
83
+ The setup wizard walks you through wallet connection, strategy selection, risk limits, token filters, Twitter, and voice config. Stores your config at `~/.trenchfeed/cli.json`.
84
84
 
85
85
  ## Commands
86
86
 
87
87
  | Command | Description |
88
88
  |---------|-------------|
89
89
  | `trenchfeed setup` | Interactive agent setup wizard — full config |
90
+ | `trenchfeed login` | Reconnect with existing API key |
90
91
  | `trenchfeed status` | Agent status, PnL, open positions |
91
92
  | `trenchfeed start` | Start trading |
92
93
  | `trenchfeed stop` | Stop trading |
@@ -107,10 +108,11 @@ The setup wizard walks you through authentication, agent configuration (strategy
107
108
 
108
109
  | Strategy | Description |
109
110
  |----------|-------------|
110
- | **Ghost Filtered** | Scans with Ghost V2 insider wallet cluster analysis before every trade. Highest safety. |
111
- | **Momentum** | Buys tokens showing strong 5m/1h price momentum. |
112
- | **Volume Spike** | Catches volume-driven moves early. |
113
- | **New Pairs** | Snipes newly created PumpFun tokens. |
111
+ | **Ghost Filtered** | Scans with Ghost V2 insider wallet cluster analysis before every trade. Highest safety. Default. |
112
+ | **Sniper** | Fastest execution (~400ms). gRPC event-driven, skips AI eval, Jito bundles. Fire-and-forget. |
113
+ | **Spread Farmer** | Targets 10-45% bonding curve range with tight exits. Scalp-style. |
114
+ | **Whale Follower** | Copies detected whale wallet moves in real-time. |
115
+ | **Full Degen** | Aggressive trading with minimal filters. High risk, high reward. |
114
116
  | **Custom** | Define your own strategy with a natural language prompt — powered by Claude AI. |
115
117
 
116
118
  ## Configuration
@@ -131,6 +133,7 @@ trenchfeed config --set requireMintRevoked=true
131
133
  | `name` | string | TrenchAgent | Agent display name |
132
134
  | `personality` | string | — | Agent personality prompt |
133
135
  | `strategy` | string | ghost-filtered | Trading strategy |
136
+ | `executionMode` | string | default | Execution mode: `default`, `sniper`, or `careful` |
134
137
  | `customStrategyPrompt` | string | — | Custom strategy prompt (for `custom` strategy) |
135
138
 
136
139
  ### Risk Management
@@ -264,7 +267,7 @@ Set any filter to control what tokens the agent will buy. Only tokens passing **
264
267
 
265
268
  Build your own integrations against the TrenchFeed API.
266
269
 
267
- **Base URL**: `https://trenchfeed-production.up.railway.app`
270
+ **Base URL**: `https://trenchfeed-api-production.up.railway.app`
268
271
 
269
272
  ### Authentication
270
273
 
@@ -375,7 +378,7 @@ Get your API key via `trenchfeed setup` or `POST /api/cli/register`.
375
378
  Connect to real-time agent event streams.
376
379
 
377
380
  ```
378
- wss://trenchfeed-production.up.railway.app/ws/agents/:agentId
381
+ wss://trenchfeed-api-production.up.railway.app/ws/agents/:agentId
379
382
  ```
380
383
 
381
384
  ### Events
@@ -398,7 +401,7 @@ wss://trenchfeed-production.up.railway.app/ws/agents/:agentId
398
401
  ### Terminal Feed
399
402
 
400
403
  ```
401
- wss://trenchfeed-production.up.railway.app/ws/terminal
404
+ wss://trenchfeed-api-production.up.railway.app/ws/terminal
402
405
  ```
403
406
 
404
407
  Live PumpFun token feed — new pairs, migrations, graduations, candle data.
@@ -412,7 +415,7 @@ Live PumpFun token feed — new pairs, migrations, graduations, candle data.
412
415
  │ TrenchFeed Platform │
413
416
  ├─────────────┬──────────────┬──────────────┬────────────────────────┤
414
417
  │ CLI Tool │ Web Dashboard │ REST API │ WebSocket │
415
- │ (this pkg) │ (trenchfeed.com) │ │ /ws/agents/:id │
418
+ │ (this pkg) │ (trenchfeed.fun) │ │ /ws/agents/:id │
416
419
  └──────┬──────┴──────┬───────┴──────┬───────┴────────┬───────────────┘
417
420
  │ │ │ │
418
421
  └─────────────┴──────┬───────┴────────────────┘
@@ -428,34 +431,23 @@ Live PumpFun token feed — new pairs, migrations, graduations, candle data.
428
431
  ┌────────▼────────┐ ┌──────▼──────┐ ┌────────▼────────┐
429
432
  │ Trading Engine │ │ Ghost V2 │ │ Token Scanner │
430
433
  │ tick loop (5s) │ │ insider │ │ PumpFun WS + │
431
- │ buy/sell/manage │ │ detection │ │ Jupiter API
434
+ │ buy/sell/manage │ │ detection │ │ DexScreener
432
435
  └────────┬────────┘ └─────────────┘ └─────────────────┘
433
436
 
434
437
  ┌────┴─────┐
435
- JupiterPumpFun SDK │ Raydium │ Meteora
436
- Ultra │ (bonding │ (graduated│ (DLMM)
437
- Swap curve) │ tokens) │
438
+ PumpFunSniper Engine │ Raydium │ Meteora
439
+ SDK │ (gRPC+Jito, │ (graduated│ (DLMM)
440
+ (bonding <50ms) │ tokens) │
441
+ │ curve) │ │ │
438
442
  └──────────┘
439
443
  ```
440
444
 
441
445
  ## Requirements
442
446
 
443
447
  - **Node.js** 20+
444
- - **$TRENCH token burn** required to deploy an agent
445
448
  - **Solana wallet** for authentication
446
449
  - **SOL** in agent wallet for live trading (paper trading requires no funds)
447
450
 
448
- ## Development
449
-
450
- ```bash
451
- git clone https://github.com/AJSignals/trenchfeed-cli.git
452
- cd trenchfeed-cli
453
- npm install
454
- npm run dev -- setup # Run CLI in dev mode
455
- npm run build # Compile TypeScript
456
- npm start -- status # Run compiled CLI
457
- ```
458
-
459
451
  ## License
460
452
 
461
453
  [MIT](LICENSE)
@@ -463,5 +455,5 @@ npm start -- status # Run compiled CLI
463
455
  ---
464
456
 
465
457
  <p align="center">
466
- <sub>Built by <a href="https://github.com/AJSignals">AJSignals</a> &middot; Powered by Claude AI &middot; Trading on Solana</sub>
458
+ <sub>Built by <a href="https://github.com/TrenchFeedbot">TrenchFeed</a> &middot; Powered by Claude AI &middot; Trading on Solana</sub>
467
459
  </p>
package/dist/api.d.ts CHANGED
@@ -1,77 +1,18 @@
1
1
  /**
2
2
  * CLI API Client — REST client for TrenchFeed backend
3
3
  */
4
- export interface PlatformConfig {
5
- burnRequired: boolean;
6
- burnMint: string | null;
7
- burnAmount: number;
8
- burnTokenSymbol: string;
9
- }
10
- export interface AgentSummary {
11
- id: string;
12
- userId: string;
13
- status: string;
14
- strategy: string;
15
- name: string;
16
- dryRun?: boolean;
17
- positions: number;
18
- openPnlSol: number;
19
- closedPnlSol: number;
20
- totalTrades: number;
21
- wallet: {
22
- publicKey: string;
23
- };
24
- createdAt: number;
25
- startedAt: number | null;
26
- }
27
- export interface AgentDetail {
28
- id: string;
29
- userId: string;
30
- status: string;
31
- config: Record<string, unknown>;
32
- openPnlSol: number;
33
- closedPnlSol: number;
34
- totalTrades: number;
35
- wallet: {
36
- publicKey: string;
37
- };
38
- positions: Array<{
39
- mint: string;
40
- symbol?: string;
41
- amountSol: number;
42
- entryPrice: number;
43
- currentPrice?: number;
44
- unrealizedPnl?: number;
45
- unrealizedPnlPct?: number;
46
- }>;
47
- createdAt: number;
48
- startedAt: number | null;
49
- stoppedAt: number | null;
50
- }
51
- export interface TradeRecord {
52
- id: number;
53
- action: string;
54
- mint: string;
55
- symbol: string | null;
56
- amountSol: number | null;
57
- price: number | null;
58
- pnlSol: number | null;
59
- pnlPct: number | null;
60
- reason: string | null;
61
- createdAt: number;
62
- }
63
- export interface WalletInfo {
64
- publicKey: string;
65
- balance: number;
66
- lamports: number;
67
- }
68
4
  export declare const api: {
69
5
  health: () => Promise<{
70
6
  status: string;
71
7
  agents: number;
72
8
  running: number;
73
9
  }>;
74
- getCliConfig: () => Promise<PlatformConfig>;
10
+ getCliConfig: () => Promise<{
11
+ burnRequired: boolean;
12
+ burnMint: string | null;
13
+ burnAmount: number;
14
+ burnTokenSymbol: string;
15
+ }>;
75
16
  register: (walletToken: string, body: {
76
17
  config?: Record<string, unknown>;
77
18
  burnTxSignature?: string;
@@ -82,8 +23,47 @@ export declare const api: {
82
23
  status: string;
83
24
  message: string;
84
25
  }>;
85
- getMyAgent: () => Promise<AgentSummary[]>;
86
- getAgent: (id: string) => Promise<AgentDetail>;
26
+ getMyAgent: () => Promise<{
27
+ id: string;
28
+ userId: string;
29
+ status: string;
30
+ strategy: string;
31
+ name: string;
32
+ positions: number;
33
+ openPnlSol: number;
34
+ closedPnlSol: number;
35
+ totalTrades: number;
36
+ wallet: {
37
+ publicKey: string;
38
+ };
39
+ createdAt: number;
40
+ startedAt: number | null;
41
+ dryRun?: boolean;
42
+ }[]>;
43
+ getAgent: (id: string) => Promise<{
44
+ id: string;
45
+ userId: string;
46
+ status: string;
47
+ config: Record<string, unknown>;
48
+ openPnlSol: number;
49
+ closedPnlSol: number;
50
+ totalTrades: number;
51
+ wallet: {
52
+ publicKey: string;
53
+ };
54
+ positions: Array<{
55
+ mint: string;
56
+ symbol?: string;
57
+ amountSol: number;
58
+ entryPrice: number;
59
+ currentPrice?: number;
60
+ unrealizedPnl?: number;
61
+ unrealizedPnlPct?: number;
62
+ }>;
63
+ createdAt: number;
64
+ startedAt: number | null;
65
+ stoppedAt: number | null;
66
+ }>;
87
67
  startAgent: (id: string) => Promise<{
88
68
  status: string;
89
69
  }>;
@@ -102,8 +82,23 @@ export declare const api: {
102
82
  updateConfig: (id: string, config: Record<string, unknown>) => Promise<{
103
83
  config: Record<string, unknown>;
104
84
  }>;
105
- getWallet: (id: string) => Promise<WalletInfo>;
106
- getTrades: (id: string, limit?: number) => Promise<TradeRecord[]>;
85
+ getWallet: (id: string) => Promise<{
86
+ publicKey: string;
87
+ balance: number;
88
+ lamports: number;
89
+ }>;
90
+ getTrades: (id: string, limit?: number) => Promise<{
91
+ id: number;
92
+ action: string;
93
+ mint: string;
94
+ symbol: string | null;
95
+ amountSol: number | null;
96
+ price: number | null;
97
+ pnlSol: number | null;
98
+ pnlPct: number | null;
99
+ reason: string | null;
100
+ createdAt: number;
101
+ }[]>;
107
102
  withdraw: (id: string, toAddress: string, amountSol: number) => Promise<{
108
103
  signature: string;
109
104
  }>;
package/dist/api.js CHANGED
@@ -26,11 +26,9 @@ async function request(path, opts = {}) {
26
26
  }
27
27
  return res.json();
28
28
  }
29
- // ─── API Methods ──────────────────────────────────────────────────────────────
30
29
  exports.api = {
31
- // Health
32
30
  health: () => request('/health'),
33
- // Platform config (burn gate info)
31
+ // Platform config
34
32
  getCliConfig: () => request('/api/cli/config'),
35
33
  // CLI auth
36
34
  register: (walletToken, body) => request('/api/cli/register', { method: 'POST', body, token: walletToken }),
package/dist/index.d.ts CHANGED
@@ -15,6 +15,7 @@
15
15
  * trenchfeed trades — Show recent trade history
16
16
  * trenchfeed stream — Live stream agent events
17
17
  * trenchfeed chat <msg> — Send a message to your agent
18
+ * trenchfeed login — Reconnect with existing API key
18
19
  * trenchfeed logout — Clear stored credentials
19
20
  */
20
21
  export {};
package/dist/index.js CHANGED
@@ -16,6 +16,7 @@
16
16
  * trenchfeed trades — Show recent trade history
17
17
  * trenchfeed stream — Live stream agent events
18
18
  * trenchfeed chat <msg> — Send a message to your agent
19
+ * trenchfeed login — Reconnect with existing API key
19
20
  * trenchfeed logout — Clear stored credentials
20
21
  */
21
22
  var __importDefault = (this && this.__importDefault) || function (mod) {
@@ -93,27 +94,19 @@ program
93
94
  return;
94
95
  }
95
96
  }
96
- // Step 1: API URL
97
- const { apiUrl } = await inquirer_1.default.prompt([{
98
- type: 'input',
99
- name: 'apiUrl',
100
- message: 'Backend API URL:',
101
- default: config.apiUrl,
102
- }]);
103
- (0, config_1.saveConfig)({ apiUrl });
104
- // Step 2: Check server health
105
- process.stdout.write(chalk_1.default.gray(' Checking server... '));
97
+ // Step 1: Check server
98
+ process.stdout.write(chalk_1.default.gray(' Connecting to TrenchFeed... '));
106
99
  try {
107
100
  const health = await api_1.api.health();
108
- console.log(chalk_1.default.green(`OK`) + chalk_1.default.gray(` (${health.agents} agents, ${health.running} running)`));
101
+ console.log(chalk_1.default.green('OK') + chalk_1.default.gray(` (${health.agents ?? 0} agents online)`));
109
102
  }
110
103
  catch {
111
104
  console.log(chalk_1.default.red('FAILED'));
112
- console.log(chalk_1.default.red(` Could not reach ${apiUrl}`));
113
- console.log(chalk_1.default.gray(' Make sure the TrenchFeed server is running.'));
105
+ console.log(chalk_1.default.red(' Could not reach TrenchFeed servers.'));
106
+ console.log(chalk_1.default.gray(' Check your internet connection and try again.'));
114
107
  return;
115
108
  }
116
- // Step 3: Check burn gate
109
+ // Step 2: Check burn gate
117
110
  let burnRequired = false;
118
111
  let burnMint = '';
119
112
  let burnAmount = 0;
@@ -123,53 +116,19 @@ program
123
116
  burnRequired = platformConfig.burnRequired;
124
117
  burnMint = platformConfig.burnMint ?? '';
125
118
  burnAmount = platformConfig.burnAmount;
126
- burnSymbol = platformConfig.burnTokenSymbol;
119
+ burnSymbol = platformConfig.burnTokenSymbol ?? '$TRENCH';
127
120
  }
128
121
  catch {
129
122
  // If config endpoint unavailable, continue without burn gate info
130
123
  }
131
124
  if (burnRequired) {
132
125
  console.log();
133
- console.log(chalk_1.default.yellow(` Token burn required: ${burnAmount} ${burnSymbol}`));
126
+ console.log(chalk_1.default.yellow(` Token burn required: ${burnAmount.toLocaleString()} ${burnSymbol}`));
134
127
  console.log(chalk_1.default.gray(` Burn mint: ${burnMint}`));
135
- console.log(chalk_1.default.gray(` Burn your tokens, then paste the transaction signature below.`));
136
- console.log();
137
- }
138
- // Step 4: Auth
139
- const { authMethod } = await inquirer_1.default.prompt([{
140
- type: 'list',
141
- name: 'authMethod',
142
- message: 'How do you want to authenticate?',
143
- choices: [
144
- { name: 'Solana wallet address (paste your pubkey)', value: 'wallet' },
145
- { name: 'Existing API key', value: 'apikey' },
146
- ],
147
- }]);
148
- if (authMethod === 'apikey') {
149
- const { key } = await inquirer_1.default.prompt([{
150
- type: 'password',
151
- name: 'key',
152
- message: 'API key:',
153
- mask: '*',
154
- }]);
155
- (0, config_1.saveConfig)({ apiKey: key });
156
- try {
157
- const agents = await api_1.api.getMyAgent();
158
- if (agents.length > 0) {
159
- (0, config_1.saveConfig)({ agentId: agents[0].id, wallet: agents[0].wallet.publicKey });
160
- console.log(chalk_1.default.green(`\nConnected to agent ${chalk_1.default.cyan(agents[0].name)} (${agents[0].id})`));
161
- console.log(chalk_1.default.gray(` Wallet: ${agents[0].wallet.publicKey}`));
162
- console.log(chalk_1.default.gray(` Status: ${statusColor(agents[0].status)}`));
163
- return;
164
- }
165
- }
166
- catch {
167
- console.log(chalk_1.default.red('Invalid API key.'));
168
- return;
169
- }
170
- return;
128
+ console.log(chalk_1.default.gray(` Burn your tokens first, then paste the TX signature when prompted.`));
171
129
  }
172
- // Wallet-based auth
130
+ // Step 3: Wallet address
131
+ console.log();
173
132
  const { walletAddress } = await inquirer_1.default.prompt([{
174
133
  type: 'input',
175
134
  name: 'walletAddress',
@@ -182,12 +141,12 @@ program
182
141
  const { burnTx } = await inquirer_1.default.prompt([{
183
142
  type: 'input',
184
143
  name: 'burnTx',
185
- message: `Burn TX signature (${burnAmount} ${burnSymbol}):`,
144
+ message: `Burn TX signature (${burnAmount.toLocaleString()} ${burnSymbol}):`,
186
145
  validate: (v) => v.length >= 64 || 'Invalid transaction signature',
187
146
  }]);
188
147
  burnTxSignature = burnTx;
189
148
  }
190
- // Step 5: Agent configuration
149
+ // Step 4: Agent configuration
191
150
  console.log(chalk_1.default.white('\n─── Agent Identity ───\n'));
192
151
  const { name } = await inquirer_1.default.prompt([{
193
152
  type: 'input',
@@ -206,11 +165,12 @@ program
206
165
  name: 'strategy',
207
166
  message: 'Trading strategy:',
208
167
  choices: [
209
- { name: 'Ghost Filtered — Uses Ghost V2 insider detection to filter tokens', value: 'ghost-filtered' },
210
- { name: 'MomentumBuys tokens showing price momentum', value: 'momentum' },
211
- { name: 'Volume SpikeCatches volume-driven moves', value: 'volume-spike' },
212
- { name: 'New PairsSnipes newly created tokens', value: 'new-pairs' },
213
- { name: 'CustomDefine your own strategy prompt', value: 'custom' },
168
+ { name: 'Ghost Filtered — Ghost V2 insider detection, highest safety (recommended)', value: 'ghost-filtered' },
169
+ { name: 'SniperFastest execution (~400ms), skips AI eval', value: 'sniper' },
170
+ { name: 'Spread Farmer10-45% bonding curve, tight exits', value: 'spread-farmer' },
171
+ { name: 'Whale FollowerCopy detected whale wallets', value: 'whale-follower' },
172
+ { name: 'Full Degen Aggressive, minimal filters', value: 'full-degen' },
173
+ { name: 'Custom — Define your own strategy with natural language', value: 'custom' },
214
174
  ],
215
175
  }]);
216
176
  let customStrategyPrompt;
@@ -248,35 +208,25 @@ program
248
208
  }
249
209
  }
250
210
  // ─── Execution Mode ────────────────────────────────────────────
251
- console.log(chalk_1.default.white('\n─── Execution Speed ───\n'));
252
- const { executionMode } = await inquirer_1.default.prompt([{
253
- type: 'list',
254
- name: 'executionMode',
255
- message: 'Execution mode:',
256
- choices: [
257
- { name: chalk_1.default.cyan('Sniper') + chalk_1.default.gray(' Fastest execution (~400ms). Skips AI eval, auto-executes, fire-and-forget'), value: 'sniper' },
258
- { name: chalk_1.default.white('Default') + chalk_1.default.gray(' — Balanced. Ghost scoring + heuristic filters, visual pauses for streaming'), value: 'default' },
259
- { name: chalk_1.default.yellow('Careful') + chalk_1.default.gray(' — Full pipeline. Claude AI eval on every trade, all safety checks'), value: 'careful' },
260
- ],
261
- }]);
262
- // ─── RPC Endpoint ────────────────────────────────────────────
263
- const { rpcUrl } = await inquirer_1.default.prompt([{
264
- type: 'input',
265
- name: 'rpcUrl',
266
- message: `Your Solana RPC URL ${chalk_1.default.gray('(Helius, QuickNode, etc. — used for tx sending)')}:`,
267
- default: '',
268
- validate: (val) => {
269
- if (!val)
270
- return true; // optional
271
- try {
272
- new URL(val);
273
- return true;
274
- }
275
- catch {
276
- return 'Must be a valid URL';
277
- }
278
- },
279
- }]);
211
+ let executionMode = 'default';
212
+ if (strategy === 'sniper') {
213
+ executionMode = 'sniper';
214
+ console.log(chalk_1.default.gray('\n Execution: Sniper mode (auto-set for sniper strategy)'));
215
+ }
216
+ else {
217
+ console.log(chalk_1.default.white('\n─── Execution Speed ───\n'));
218
+ const { execChoice } = await inquirer_1.default.prompt([{
219
+ type: 'list',
220
+ name: 'execChoice',
221
+ message: 'Execution mode:',
222
+ choices: [
223
+ { name: chalk_1.default.white('Default') + chalk_1.default.gray(' — Balanced. Ghost scoring + heuristic filters'), value: 'default' },
224
+ { name: chalk_1.default.cyan('Sniper') + chalk_1.default.gray(' — Fastest (~400ms). Skips AI eval, fire-and-forget'), value: 'sniper' },
225
+ { name: chalk_1.default.yellow('Careful') + chalk_1.default.gray(' — Full pipeline. Claude AI eval on every trade'), value: 'careful' },
226
+ ],
227
+ }]);
228
+ executionMode = execChoice;
229
+ }
280
230
  // ─── Risk Management ───────────────────────────────────────────
281
231
  console.log(chalk_1.default.white('\n─── Risk Management ───\n'));
282
232
  const riskAnswers = await inquirer_1.default.prompt([
@@ -565,7 +515,6 @@ program
565
515
  personality,
566
516
  strategy,
567
517
  executionMode,
568
- ...(rpcUrl ? { rpcUrl } : {}),
569
518
  dryRun,
570
519
  ...riskAnswers,
571
520
  ...ghostAnswers,
@@ -597,8 +546,6 @@ program
597
546
  console.log(chalk_1.default.white(` Mode: ${dryRun ? chalk_1.default.green('PAPER') : chalk_1.default.red('LIVE')}`));
598
547
  console.log(chalk_1.default.white(` Execution: ${executionMode === 'sniper' ? chalk_1.default.cyan('SNIPER') : executionMode === 'careful' ? chalk_1.default.yellow('CAREFUL') : chalk_1.default.white('DEFAULT')}`));
599
548
  console.log(chalk_1.default.white(` Strategy: ${chalk_1.default.cyan(strategy)}`));
600
- if (rpcUrl)
601
- console.log(chalk_1.default.white(` RPC: ${chalk_1.default.gray(rpcUrl.replace(/api[-_]?key=[^&]+/i, 'api-key=***'))}`));
602
549
  console.log(chalk_1.default.gray(`\n Config saved to ${(0, config_1.getConfigPath)()}`));
603
550
  console.log(chalk_1.default.gray(' API key stored securely.\n'));
604
551
  console.log(chalk_1.default.white('Next steps:'));
@@ -911,6 +858,37 @@ program
911
858
  process.exit(1);
912
859
  });
913
860
  });
861
+ // ─── Login Command (reconnect with existing API key) ─────────────────────────
862
+ program
863
+ .command('login')
864
+ .description('Reconnect to an existing agent with your API key')
865
+ .action(async () => {
866
+ banner();
867
+ const { key } = await inquirer_1.default.prompt([{
868
+ type: 'password',
869
+ name: 'key',
870
+ message: 'API key:',
871
+ mask: '*',
872
+ }]);
873
+ (0, config_1.saveConfig)({ apiKey: key });
874
+ try {
875
+ const agents = await api_1.api.getMyAgent();
876
+ if (agents.length > 0) {
877
+ (0, config_1.saveConfig)({ agentId: agents[0].id, wallet: agents[0].wallet.publicKey });
878
+ console.log(chalk_1.default.green(`\nConnected to agent ${chalk_1.default.cyan(agents[0].name)} (${agents[0].id})`));
879
+ console.log(chalk_1.default.gray(` Wallet: ${agents[0].wallet.publicKey}`));
880
+ console.log(chalk_1.default.gray(` Status: ${statusColor(agents[0].status)}`));
881
+ }
882
+ else {
883
+ console.log(chalk_1.default.yellow('No agents found for this API key.'));
884
+ console.log(chalk_1.default.gray('Run `trenchfeed setup` to create a new agent.'));
885
+ }
886
+ }
887
+ catch {
888
+ console.log(chalk_1.default.red('Invalid API key.'));
889
+ (0, config_1.clearConfig)();
890
+ }
891
+ });
914
892
  // ─── Logout Command ──────────────────────────────────────────────────────────
915
893
  program
916
894
  .command('logout')
package/package.json CHANGED
@@ -1,42 +1,19 @@
1
1
  {
2
2
  "name": "trenchfeed-cli",
3
- "version": "0.1.0",
3
+ "version": "0.2.1",
4
4
  "description": "CLI for TrenchFeed — deploy and manage AI trading agents on Solana from your terminal.",
5
5
  "main": "dist/index.js",
6
- "bin": {
7
- "trenchfeed": "dist/index.js"
6
+ "bin": { "trenchfeed": "dist/index.js" },
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "https://github.com/TrenchFeedbot/trenchfeed-cli.git"
8
10
  },
9
- "scripts": {
10
- "build": "tsc",
11
- "start": "node dist/index.js",
12
- "dev": "tsx src/index.ts"
13
- },
14
- "keywords": [
15
- "trenchfeed",
16
- "solana",
17
- "memecoin",
18
- "trading",
19
- "ai-agent",
20
- "cli"
21
- ],
22
- "author": "AJSignals",
11
+ "homepage": "https://github.com/TrenchFeedbot/trenchfeed-cli",
12
+ "bugs": "https://github.com/TrenchFeedbot/trenchfeed-cli/issues",
13
+ "scripts": { "build": "tsc", "start": "node dist/index.js", "dev": "tsx src/index.ts" },
14
+ "keywords": ["trenchfeed","solana","memecoin","trading","ai-agent","cli"],
15
+ "author": "TrenchFeed",
23
16
  "license": "MIT",
24
- "engines": {
25
- "node": ">=20.0.0"
26
- },
27
- "dependencies": {
28
- "chalk": "^5.3.0",
29
- "commander": "^14.0.3",
30
- "figlet": "^1.10.0",
31
- "inquirer": "^13.2.5",
32
- "ws": "^8.16.0"
33
- },
34
- "devDependencies": {
35
- "@types/figlet": "^1.7.0",
36
- "@types/inquirer": "^9.0.9",
37
- "@types/node": "^20.19.32",
38
- "@types/ws": "^8.5.10",
39
- "tsx": "^4.7.0",
40
- "typescript": "^5.3.3"
41
- }
17
+ "engines": { "node": ">=20.0.0" },
18
+ "dependencies": { "chalk": "^5.3.0", "commander": "^14.0.3", "figlet": "^1.10.0", "inquirer": "^13.2.5", "ws": "^8.16.0" }
42
19
  }
@@ -1,15 +0,0 @@
1
- version: 2
2
- updates:
3
- - package-ecosystem: npm
4
- directory: /
5
- schedule:
6
- interval: weekly
7
- open-pull-requests-limit: 10
8
- ignore:
9
- - dependency-name: "*"
10
- update-types: ["version-update:semver-major"]
11
-
12
- - package-ecosystem: github-actions
13
- directory: /
14
- schedule:
15
- interval: weekly