@trading-boy/cli 1.12.0 → 2.0.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 +50 -22
- package/dist/api-client.d.ts +4 -7
- package/dist/api-client.js +8 -13
- package/dist/cli.bundle.js +1896 -33657
- package/dist/credentials.js +1 -1
- package/dist/index.d.ts +0 -28
- package/dist/index.js +0 -24
- package/dist/logger.d.ts +8 -0
- package/dist/logger.js +12 -0
- package/dist/utils.js +3 -3
- package/package.json +20 -5
- package/dist/cli.d.ts +0 -5
- package/dist/cli.js +0 -157
- package/dist/commands/agent-cmd.d.ts +0 -9
- package/dist/commands/agent-cmd.js +0 -567
- package/dist/commands/audit.d.ts +0 -18
- package/dist/commands/audit.js +0 -73
- package/dist/commands/behavioral.d.ts +0 -73
- package/dist/commands/behavioral.js +0 -349
- package/dist/commands/benchmark-cmd.d.ts +0 -3
- package/dist/commands/benchmark-cmd.js +0 -191
- package/dist/commands/billing.d.ts +0 -12
- package/dist/commands/billing.js +0 -142
- package/dist/commands/catalysts.d.ts +0 -17
- package/dist/commands/catalysts.js +0 -151
- package/dist/commands/coaching-cmd.d.ts +0 -16
- package/dist/commands/coaching-cmd.js +0 -222
- package/dist/commands/config-cmd.d.ts +0 -30
- package/dist/commands/config-cmd.js +0 -515
- package/dist/commands/connect-chatgpt.d.ts +0 -5
- package/dist/commands/connect-chatgpt.js +0 -293
- package/dist/commands/connect-claude.d.ts +0 -5
- package/dist/commands/connect-claude.js +0 -280
- package/dist/commands/context.d.ts +0 -41
- package/dist/commands/context.js +0 -405
- package/dist/commands/cron-cmd.d.ts +0 -3
- package/dist/commands/cron-cmd.js +0 -305
- package/dist/commands/decisions.d.ts +0 -57
- package/dist/commands/decisions.js +0 -364
- package/dist/commands/edge-cmd.d.ts +0 -78
- package/dist/commands/edge-cmd.js +0 -183
- package/dist/commands/edge-guard-cmd.d.ts +0 -36
- package/dist/commands/edge-guard-cmd.js +0 -169
- package/dist/commands/events.d.ts +0 -3
- package/dist/commands/events.js +0 -117
- package/dist/commands/infra.d.ts +0 -24
- package/dist/commands/infra.js +0 -137
- package/dist/commands/journal.d.ts +0 -3
- package/dist/commands/journal.js +0 -302
- package/dist/commands/login.d.ts +0 -18
- package/dist/commands/login.js +0 -127
- package/dist/commands/logout.d.ts +0 -8
- package/dist/commands/logout.js +0 -108
- package/dist/commands/narratives.d.ts +0 -3
- package/dist/commands/narratives.js +0 -259
- package/dist/commands/onboarding.d.ts +0 -7
- package/dist/commands/onboarding.js +0 -281
- package/dist/commands/query.d.ts +0 -32
- package/dist/commands/query.js +0 -135
- package/dist/commands/replay-cmd.d.ts +0 -43
- package/dist/commands/replay-cmd.js +0 -184
- package/dist/commands/review.d.ts +0 -3
- package/dist/commands/review.js +0 -443
- package/dist/commands/risk.d.ts +0 -47
- package/dist/commands/risk.js +0 -158
- package/dist/commands/social.d.ts +0 -43
- package/dist/commands/social.js +0 -318
- package/dist/commands/soul-wizard.d.ts +0 -29
- package/dist/commands/soul-wizard.js +0 -155
- package/dist/commands/strategy-cmd.d.ts +0 -44
- package/dist/commands/strategy-cmd.js +0 -335
- package/dist/commands/subscribe.d.ts +0 -78
- package/dist/commands/subscribe.js +0 -552
- package/dist/commands/suggestions-cmd.d.ts +0 -24
- package/dist/commands/suggestions-cmd.js +0 -148
- package/dist/commands/thesis-cmd.d.ts +0 -3
- package/dist/commands/thesis-cmd.js +0 -129
- package/dist/commands/trader.d.ts +0 -30
- package/dist/commands/trader.js +0 -971
- package/dist/commands/watch.d.ts +0 -16
- package/dist/commands/watch.js +0 -104
- package/dist/commands/whoami.d.ts +0 -14
- package/dist/commands/whoami.js +0 -105
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @trading-boy/cli
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Remote trading intelligence for traders and AI agents. Real-time market data, on-chain analytics, DeFi risk scoring, and adaptive learning outcomes — all from the command line.
|
|
4
4
|
|
|
5
5
|
**Website:** [cabal.ventures](https://cabal.ventures) | **Docs:** [cabal.ventures/docs](https://cabal.ventures/docs)
|
|
6
6
|
|
|
@@ -28,7 +28,7 @@ trading-boy context SOL
|
|
|
28
28
|
trading-boy trader register --name MyTrader
|
|
29
29
|
|
|
30
30
|
# 5. Log a trade
|
|
31
|
-
trading-boy journal entry SOL --direction LONG --price 148.50 --size 500
|
|
31
|
+
trading-boy journal log entry SOL --direction LONG --price 148.50 --size 500
|
|
32
32
|
```
|
|
33
33
|
|
|
34
34
|
## What You Get
|
|
@@ -46,27 +46,57 @@ trading-boy journal entry SOL --direction LONG --price 148.50 --size 500
|
|
|
46
46
|
## Commands
|
|
47
47
|
|
|
48
48
|
```
|
|
49
|
-
|
|
50
|
-
trading-boy
|
|
51
|
-
trading-boy
|
|
52
|
-
trading-boy
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
trading-boy
|
|
57
|
-
trading-boy
|
|
58
|
-
trading-boy
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
trading-boy
|
|
63
|
-
trading-boy
|
|
64
|
-
trading-boy
|
|
65
|
-
|
|
49
|
+
Core
|
|
50
|
+
trading-boy context <token> # Full 6-layer context package
|
|
51
|
+
trading-boy query <token> # Quick price + funding summary
|
|
52
|
+
trading-boy watch <token> # Live watch mode
|
|
53
|
+
|
|
54
|
+
Data & Analysis
|
|
55
|
+
trading-boy catalysts # Upcoming events
|
|
56
|
+
trading-boy risk <protocol> # DeFi risk assessment
|
|
57
|
+
trading-boy narrative list # Active market narratives
|
|
58
|
+
trading-boy events list # Event management
|
|
59
|
+
|
|
60
|
+
Trading Journal
|
|
61
|
+
trading-boy journal log entry <token> # Log a trade entry
|
|
62
|
+
trading-boy journal log exit <token> # Log a trade exit
|
|
63
|
+
trading-boy decisions # View decision history
|
|
64
|
+
trading-boy stats # Aggregate trading statistics
|
|
65
|
+
|
|
66
|
+
Edge & Safety
|
|
67
|
+
trading-boy edge <traderId> # Edge profile analytics
|
|
68
|
+
trading-boy edge-guard check <id> # Negative edge detection
|
|
69
|
+
trading-boy behavioral # Behavioral pattern analysis
|
|
70
|
+
trading-boy coaching pre-trade # AI-powered trade coaching
|
|
71
|
+
trading-boy thesis <id> # Thesis extraction (LLM)
|
|
72
|
+
|
|
73
|
+
Strategy & Benchmarking
|
|
74
|
+
trading-boy strategy list # Manage agent strategies
|
|
75
|
+
trading-boy replay # Backtest strategies
|
|
76
|
+
trading-boy benchmark # Performance leaderboard
|
|
77
|
+
trading-boy suggestions list # Optimization suggestions
|
|
78
|
+
|
|
79
|
+
Account
|
|
80
|
+
trading-boy subscribe # Subscribe via Stripe
|
|
81
|
+
trading-boy login # Store API key
|
|
82
|
+
trading-boy whoami # Check auth status + key expiration
|
|
83
|
+
trading-boy rotate-key # Rotate your API key
|
|
84
|
+
trading-boy forgot-key # Recover key via email
|
|
85
|
+
trading-boy billing manage # Manage subscription
|
|
86
|
+
|
|
87
|
+
System
|
|
88
|
+
trading-boy trader register # Create trader profile
|
|
89
|
+
trading-boy config show # View API + LLM configuration
|
|
90
|
+
trading-boy cron list # Manage scheduled jobs
|
|
91
|
+
trading-boy agent list # Manage agents
|
|
66
92
|
```
|
|
67
93
|
|
|
68
94
|
Run `trading-boy --help` for the full command list.
|
|
69
95
|
|
|
96
|
+
## Public Package Scope
|
|
97
|
+
|
|
98
|
+
The published npm package is a public, remote-only CLI. End users can manage API/LLM settings and runtime model selection, but internal infrastructure management and server environment editing are intentionally not part of the npm release surface.
|
|
99
|
+
|
|
70
100
|
## Pricing
|
|
71
101
|
|
|
72
102
|
| Plan | Price | Tokens | Trades/mo |
|
|
@@ -82,10 +112,8 @@ All plans include every feature. Limits apply to traded tokens and logged trades
|
|
|
82
112
|
Trading Boy exposes an MCP server for AI agent integration and a REST API for programmatic access.
|
|
83
113
|
|
|
84
114
|
```bash
|
|
85
|
-
# Start the MCP server (for Claude, GPT, etc.)
|
|
86
|
-
trading-boy mcp
|
|
87
|
-
|
|
88
115
|
# REST API is hosted at https://api.cabal.ventures
|
|
116
|
+
# MCP server: npx @trading-boy/mcp-server (see docs/getting-started.md)
|
|
89
117
|
```
|
|
90
118
|
|
|
91
119
|
## License
|
package/dist/api-client.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ export declare class ApiError extends Error {
|
|
|
10
10
|
}
|
|
11
11
|
/**
|
|
12
12
|
* Dev mode: TRADING_BOY_API_URL points to localhost AND NODE_ENV=development.
|
|
13
|
-
* In dev mode, auth is
|
|
13
|
+
* In dev mode, auth is optional for a local API server.
|
|
14
14
|
*/
|
|
15
15
|
export declare function isDevMode(): boolean;
|
|
16
16
|
export declare function resolveApiKey(flagKey?: string): Promise<string>;
|
|
@@ -22,13 +22,10 @@ export declare function apiRequest<T>(path: string, options?: {
|
|
|
22
22
|
headers?: Record<string, string>;
|
|
23
23
|
}): Promise<T>;
|
|
24
24
|
/**
|
|
25
|
-
* Check
|
|
25
|
+
* Check whether the CLI has enough configuration to use the API successfully.
|
|
26
26
|
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
* Local/dev mode: direct DB connections (requires NEO4J_URI, TIMESCALE_HOST, etc.)
|
|
31
|
-
* Remote mode: HTTP requests to TRADING_BOY_API_URL (defaults to https://api.cabal.ventures)
|
|
27
|
+
* The public CLI always talks to the Trading Boy API, either at the default hosted
|
|
28
|
+
* endpoint or at a user-specified TRADING_BOY_API_URL.
|
|
32
29
|
*/
|
|
33
30
|
export declare function isRemoteMode(): Promise<boolean>;
|
|
34
31
|
export { redactApiKey };
|
package/dist/api-client.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createLogger } from '
|
|
1
|
+
import { createLogger } from './logger.js';
|
|
2
2
|
import { loadCredentials, redactApiKey } from './credentials.js';
|
|
3
3
|
const logger = createLogger('cli-api-client');
|
|
4
4
|
// ─── Constants ───
|
|
@@ -16,7 +16,7 @@ export class ApiError extends Error {
|
|
|
16
16
|
// ─── Dev Mode Detection ───
|
|
17
17
|
/**
|
|
18
18
|
* Dev mode: TRADING_BOY_API_URL points to localhost AND NODE_ENV=development.
|
|
19
|
-
* In dev mode, auth is
|
|
19
|
+
* In dev mode, auth is optional for a local API server.
|
|
20
20
|
*/
|
|
21
21
|
export function isDevMode() {
|
|
22
22
|
if (process.env.NODE_ENV !== 'development')
|
|
@@ -84,6 +84,7 @@ export async function apiRequest(path, options = {}) {
|
|
|
84
84
|
...(apiKey ? { 'X-API-Key': apiKey } : {}),
|
|
85
85
|
...(options.body ? { 'Content-Type': 'application/json' } : {}),
|
|
86
86
|
...options.headers,
|
|
87
|
+
'X-TB-Channel': 'cli',
|
|
87
88
|
};
|
|
88
89
|
const fetchOptions = {
|
|
89
90
|
method: options.method ?? 'GET',
|
|
@@ -145,21 +146,15 @@ export async function apiRequest(path, options = {}) {
|
|
|
145
146
|
}
|
|
146
147
|
return (await response.json());
|
|
147
148
|
}
|
|
148
|
-
// ───
|
|
149
|
+
// ─── API Access Detection ───
|
|
149
150
|
/**
|
|
150
|
-
* Check
|
|
151
|
+
* Check whether the CLI has enough configuration to use the API successfully.
|
|
151
152
|
*
|
|
152
|
-
*
|
|
153
|
-
*
|
|
154
|
-
*
|
|
155
|
-
* Local/dev mode: direct DB connections (requires NEO4J_URI, TIMESCALE_HOST, etc.)
|
|
156
|
-
* Remote mode: HTTP requests to TRADING_BOY_API_URL (defaults to https://api.cabal.ventures)
|
|
153
|
+
* The public CLI always talks to the Trading Boy API, either at the default hosted
|
|
154
|
+
* endpoint or at a user-specified TRADING_BOY_API_URL.
|
|
157
155
|
*/
|
|
158
156
|
export async function isRemoteMode() {
|
|
159
|
-
//
|
|
160
|
-
if (process.env.TRADING_BOY_LOCAL === 'true')
|
|
161
|
-
return false;
|
|
162
|
-
// Tests always run in local mode
|
|
157
|
+
// Tests often stub auth and do not need stored credentials.
|
|
163
158
|
if (process.env.NODE_ENV === 'test')
|
|
164
159
|
return false;
|
|
165
160
|
// If API URL is explicitly set, use remote mode
|