@vizzor/cli 0.13.0 → 0.14.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.
Files changed (53) hide show
  1. package/README.md +250 -191
  2. package/chronovisor-engine/pyproject.toml +31 -0
  3. package/chronovisor-engine/src/__init__.py +0 -0
  4. package/chronovisor-engine/src/inference/__init__.py +0 -0
  5. package/chronovisor-engine/src/inference/predict.py +44 -0
  6. package/chronovisor-engine/src/model_catalog.py +219 -0
  7. package/chronovisor-engine/src/models/__init__.py +0 -0
  8. package/chronovisor-engine/src/models/anomaly_detector.py +104 -0
  9. package/chronovisor-engine/src/models/blockchain_cycle_analyzer.py +217 -0
  10. package/chronovisor-engine/src/models/catalyst_event_model.py +70 -0
  11. package/chronovisor-engine/src/models/conformal_interval.py +50 -0
  12. package/chronovisor-engine/src/models/divergence_detector.py +247 -0
  13. package/chronovisor-engine/src/models/drift_monitor.py +51 -0
  14. package/chronovisor-engine/src/models/intent_classifier.py +189 -0
  15. package/chronovisor-engine/src/models/lstm_predictor.py +143 -0
  16. package/chronovisor-engine/src/models/microstructure_specialist.py +65 -0
  17. package/chronovisor-engine/src/models/narrative_detector.py +418 -0
  18. package/chronovisor-engine/src/models/portfolio_optimizer.py +162 -0
  19. package/chronovisor-engine/src/models/project_risk_scorer.py +184 -0
  20. package/chronovisor-engine/src/models/pump_detector.py +344 -0
  21. package/chronovisor-engine/src/models/regime_detector.py +127 -0
  22. package/chronovisor-engine/src/models/rug_detector.py +197 -0
  23. package/chronovisor-engine/src/models/sentiment_analyzer.py +257 -0
  24. package/chronovisor-engine/src/models/signal_classifier.py +191 -0
  25. package/chronovisor-engine/src/models/stacking_meta.py +56 -0
  26. package/chronovisor-engine/src/models/strategy_bandit.py +191 -0
  27. package/chronovisor-engine/src/models/ta_interpreter.py +341 -0
  28. package/chronovisor-engine/src/models/target_quantile.py +96 -0
  29. package/chronovisor-engine/src/models/trend_scorer.py +107 -0
  30. package/chronovisor-engine/src/models/wallet_classifier.py +261 -0
  31. package/chronovisor-engine/src/server.py +1686 -0
  32. package/chronovisor-engine/src/training/__init__.py +0 -0
  33. package/chronovisor-engine/src/training/data_loader.py +635 -0
  34. package/chronovisor-engine/src/training/pipeline.py +130 -0
  35. package/chronovisor-engine/src/training/train_catalyst.py +169 -0
  36. package/chronovisor-engine/src/training/train_classifier.py +159 -0
  37. package/chronovisor-engine/src/training/train_conformal.py +106 -0
  38. package/chronovisor-engine/src/training/train_direction.py +215 -0
  39. package/chronovisor-engine/src/training/train_drift.py +57 -0
  40. package/chronovisor-engine/src/training/train_isotonic.py +58 -0
  41. package/chronovisor-engine/src/training/train_lstm.py +217 -0
  42. package/chronovisor-engine/src/training/train_microstructure.py +102 -0
  43. package/chronovisor-engine/src/training/train_narrative.py +168 -0
  44. package/chronovisor-engine/src/training/train_pump.py +109 -0
  45. package/chronovisor-engine/src/training/train_regime.py +116 -0
  46. package/chronovisor-engine/src/training/train_rug.py +58 -0
  47. package/chronovisor-engine/src/training/train_sentiment.py +63 -0
  48. package/chronovisor-engine/src/training/train_stacking_meta.py +74 -0
  49. package/chronovisor-engine/src/training/train_target_quantile.py +115 -0
  50. package/chronovisor-engine/src/training/train_trend.py +101 -0
  51. package/dist/index.js +23803 -14468
  52. package/dist/index.js.map +1 -1
  53. package/package.json +6 -4
package/README.md CHANGED
@@ -10,7 +10,7 @@
10
10
 
11
11
  <p align="center">
12
12
  <strong>See the future of crypto before it happens.</strong><br>
13
- <em>AI-powered price predictions for coins, tokens, and currencies across every chain and DEX.</em>
13
+ <em>AI-powered price predictions with real dollar targets across every chain, token, and timeframe.</em>
14
14
  </p>
15
15
 
16
16
  <p align="center">
@@ -20,21 +20,21 @@
20
20
  </p>
21
21
 
22
22
  <p align="center">
23
- <a href="#requirements">Requirements</a> &bull;
24
- <a href="#installation">Install</a> &bull;
25
- <a href="#quick-start">Quick Start</a> &bull;
26
- <a href="#usage">Usage</a> &bull;
27
- <a href="#agents">Agents</a> &bull;
23
+ <a href="#get-started-in-60-seconds">Get Started</a> &bull;
24
+ <a href="#features">Features</a> &bull;
25
+ <a href="#autonomous-agents">Agents</a> &bull;
28
26
  <a href="#web-dashboard">Dashboard</a> &bull;
29
- <a href="#api-server">API</a> &bull;
27
+ <a href="#api">API</a> &bull;
28
+ <a href="#supported-chains">Chains</a> &bull;
29
+ <a href="#chronovisor-engine">ChronoVisor</a> &bull;
30
30
  <a href="#configuration">Config</a>
31
31
  </p>
32
32
 
33
33
  ---
34
34
 
35
- Vizzor is a crypto market prediction engine. It pulls live data from 7+ APIs, runs technical analysis on raw candles, reads derivatives positioning and market sentiment, then synthesizes price predictions with actual dollar targets across multiple timeframes — from 5 minutes to 3 months.
35
+ Vizzor turns raw market data into actionable crypto predictions. It pulls live feeds from 15+ exchanges, runs technical analysis on real candles, reads derivatives positioning, tracks on-chain activity, and synthesizes everything into price predictions with actual dollar targets — from 5-minute scalps to 3-month outlooks.
36
36
 
37
- Ask about any coin, token, or currency. Vizzor fetches real-time data, computes signals, and gives you a prediction with numbers, not opinions.
37
+ Ask about any coin, any token, any chain. Vizzor fetches the data, computes the signals, and gives you numbers not opinions.
38
38
 
39
39
  ```
40
40
  vizzor
@@ -50,118 +50,54 @@ ETH at $2,112 | Bullish | Confidence: Medium-High
50
50
 
51
51
  ---
52
52
 
53
- ## What It Does
54
-
55
- **Any tradable crypto asset.** BTC, ETH, SOL, meme coins, new DEX launches, tokens by contract address — if it has a price, Vizzor can analyze it.
56
-
57
- - **Price predictions** — bull/bear/likely targets across 9 timeframes (5m to 3 months)
58
- - **ChronoVisor engine** — mathematical prediction system using Bayesian inference, certainty-factor algebra, first-order logic rules, and meta-reasoning with 6 independent signal sources
59
- - **Microstructure analysis** — market structure, FVGs, VWAP, volume delta, liquidation map, order book depth, S/R zones, squeeze detection
60
- - **Token security audits** — honeypot detection, tax analysis, mint/blacklist flags, rug pull indicators
61
- - **On-chain forensics** — wallet analysis, whale tracking, holder concentration, token flow patterns
62
- - **Blockchain fundamentals** — TVL, protocol revenue, developer activity, governance metrics, staking yields
63
- - **Derivatives positioning** — funding rates, open interest, long/short ratios from Binance Futures
64
- - **Prediction markets** — integrates Gamma and Polymarket data for market-implied probabilities
65
- - **Polymarket edge scanning** — compare ChronoVisor predictions against Polymarket odds, detect mispricings, execute trades via CLOB API
66
- - **Multi-exchange pricing** — aggregated prices from 15 exchanges (Binance, Coinbase, Kraken, OKX, Bybit, Gate.io, KuCoin, HTX, MEXC, Bitget, CoinGecko, CryptoCompare, DexScreener, GeckoTerminal, Jupiter) with VWAP/median aggregation and outlier detection
67
- - **Sentiment analysis** — Fear & Greed Index, news sentiment, buy/sell transaction ratios
68
- - **Trending discovery** — what tokens are moving right now across DexScreener and CoinGecko
69
- - **ICO tracking** — upcoming launches, fundraising rounds, investor data
70
- - **Notifications & alerts** — price alerts, prediction tracking, interactive alerts panel with detail views
71
- - **Autonomous agents** — set-and-forget trading agents with paper/live execution
72
- - **DeFi protocols** — Aave V3, Lido integrations with health monitoring and yield orchestration
53
+ ## Why Vizzor?
73
54
 
74
- ---
75
-
76
- ## Requirements
77
-
78
- ### Hardware
79
-
80
- | Component | Minimum | Recommended |
81
- |-----------|---------|-------------|
82
- | **CPU** | 2 cores | 4+ cores |
83
- | **RAM** | 2 GB | 4+ GB (8 GB if running ML sidecar) |
84
- | **Disk** | 500 MB | 2 GB (includes SQLite cache + ML models) |
85
- | **Network** | Stable internet | Low latency to Binance/CoinGecko APIs |
86
- | **GPU** | Not required | Not required (ML models are CPU-based) |
55
+ Most crypto tools show you what already happened. Vizzor shows you what's likely to happen next.
87
56
 
88
- ### Software
89
-
90
- | Dependency | Version | Notes |
91
- |------------|---------|-------|
92
- | **Node.js** | >= 20.0.0 | ES2022 target, ESM modules |
93
- | **pnpm** | >= 8.0 | Recommended package manager (npm/yarn also work) |
94
- | **Python** | 3.x | Required by `better-sqlite3` native build |
95
- | **C++ compiler** | GCC / Clang / MSVC | Required by `better-sqlite3` native build |
96
- | **Docker** | >= 24 | Optional — for ML sidecar, PostgreSQL, web dashboard |
97
-
98
- Works on **macOS**, **Linux**, and **Windows**.
99
-
100
- ### API Keys
101
-
102
- | Key | Required | Free Tier | Purpose |
103
- |-----|----------|-----------|---------|
104
- | `ANTHROPIC_API_KEY` | Yes (or use Ollama) | Pay-per-use | Claude AI — best prediction quality |
105
- | `ETHERSCAN_API_KEY` | Recommended | Yes | Transaction history, contract source |
106
- | `OPENAI_API_KEY` | No | Pay-per-use | GPT-4 as alternative provider |
107
- | `GOOGLE_API_KEY` | No | Free tier | Gemini as alternative provider |
108
- | `ALCHEMY_API_KEY` | No | Free tier | Premium RPC endpoints |
109
- | `COINGECKO_API_KEY` | No | Free tier | Extended market data |
110
- | `CRYPTOPANIC_API_KEY` | No | Free tier | News with sentiment |
111
- | `DISCORD_TOKEN` | No | Free | Discord bot |
112
- | `TELEGRAM_BOT_TOKEN` | No | Free | Telegram bot |
113
- | `POLYMARKET_PRIVATE_KEY` | No | N/A | Polymarket CLOB trading (edge execution) |
114
-
115
- **No API key at all?** Use Ollama with a local model — fully offline predictions (lower quality but free).
57
+ - **Not a chart tool** — it's a prediction engine that synthesizes 6 independent signal types into one composite forecast
58
+ - **Not a news aggregator** — it processes sentiment, derivatives, on-chain data, and technical indicators simultaneously
59
+ - **Not a chatbot wrapper** every prediction is backed by real market data from 15 exchanges, with traceable reasoning and confidence scores
60
+ - **Works with everything** — BTC, ETH, SOL, meme coins, new DEX launches, tokens by contract address — if it has a price, Vizzor can predict it
116
61
 
117
62
  ---
118
63
 
119
- ## Installation
120
-
121
- ### npm (recommended)
64
+ ## Get Started in 60 Seconds
122
65
 
123
66
  ```bash
124
67
  npm install -g @vizzor/cli
68
+ vizzor
125
69
  ```
126
70
 
127
- ```bash
128
- # Or run directly without installing
129
- npx @vizzor/cli
130
- ```
71
+ That's it. Vizzor launches a guided setup wizard that walks you through:
72
+ - Choosing your AI provider (Claude, GPT-4, Gemini, or local Ollama)
73
+ - Setting up API keys
74
+ - Picking your default chain
75
+ - Learning the first commands
131
76
 
132
- ### From Source
77
+ ### Start predicting
133
78
 
134
- ```bash
135
- git clone https://github.com/7ayLabs/vizzor.git
136
- cd vizzor
137
- pnpm install
138
- pnpm build
139
- pnpm link --global
140
79
  ```
141
-
142
- ### Docker (Full Stack)
143
-
144
- ```bash
145
- cp .env.example .env # Configure API keys
146
- docker compose up -d # Starts CLI + ML sidecar + PostgreSQL + Web Dashboard
80
+ > predict BTC price next week
81
+ > analyze $PEPE security and price outlook
82
+ > what's trending in crypto right now
83
+ > full microstructure analysis for ETH
84
+ > track wallet 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045
85
+ > audit contract 0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984
147
86
  ```
148
87
 
149
- ---
150
-
151
- ## Quick Start
88
+ ### Better prediction accuracy
152
89
 
153
- ### Option A: With Claude (best quality)
90
+ After setup, follow these tips for the best results:
91
+ - Run `/cosmos on` to enable full data pipeline
92
+ - For intraday: focus on `BTC`, `ETH`, and `SOL` with `2h`, `3h`, `4h`, `6h` horizons
93
+ - For scalping: focus on `BTC` and `ETH` with exact short horizons like `10m`, `20m`, `45m`
94
+ - For long-range: ask for `7d`, `30d`, `90d`, or `1y` scenario ranges
95
+ - Use `/precisions` to check tracked accuracy and `/playbook` for the full operating workflow
154
96
 
155
- ```bash
156
- # 1. Set your Anthropic API key
157
- vizzor config set anthropicApiKey sk-ant-...
158
- # or: export ANTHROPIC_API_KEY=sk-ant-...
97
+ ### Alternative setups
159
98
 
160
- # 2. Launch
161
- vizzor
162
- ```
163
-
164
- ### Option B: With Ollama (free, local, offline)
99
+ <details>
100
+ <summary><b>Ollama (free, offline, no API key needed)</b></summary>
165
101
 
166
102
  ```bash
167
103
  # 1. Install Ollama: https://ollama.ai
@@ -174,8 +110,10 @@ vizzor config set ai.model llama3.2
174
110
  # 3. Launch
175
111
  vizzor
176
112
  ```
113
+ </details>
177
114
 
178
- ### Option C: With OpenAI or Gemini
115
+ <details>
116
+ <summary><b>OpenAI or Gemini</b></summary>
179
117
 
180
118
  ```bash
181
119
  vizzor config set ai.provider openai
@@ -184,27 +122,90 @@ vizzor config set openaiApiKey sk-...
184
122
  vizzor config set ai.provider gemini
185
123
  vizzor config set googleApiKey AI...
186
124
  ```
125
+ </details>
187
126
 
188
- ### Start asking
127
+ <details>
128
+ <summary><b>From source</b></summary>
189
129
 
130
+ ```bash
131
+ git clone https://github.com/7ayLabs/vizzor.git
132
+ cd vizzor
133
+ pnpm install
134
+ pnpm build
135
+ pnpm link --global
190
136
  ```
191
- > predict BTC price next week
192
- > analyze $PEPE security and price outlook
193
- > what's trending in crypto right now
194
- > full microstructure analysis for ETH
195
- > track wallet 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045
196
- > audit contract 0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984
137
+ </details>
138
+
139
+ <details>
140
+ <summary><b>Docker (full stack)</b></summary>
141
+
142
+ ```bash
143
+ cp .env.example .env # Configure API keys
144
+ docker compose up -d # Starts CLI + ChronoVisor Engine + PostgreSQL + Web Dashboard
197
145
  ```
146
+ </details>
198
147
 
199
148
  ---
200
149
 
201
- ## Usage
150
+ ## Features
151
+
152
+ ### Predictions & Forecasting
153
+
154
+ | Feature | What it does |
155
+ |---------|-------------|
156
+ | **Price predictions** | Bull/bear/likely targets across 9 timeframes (5m to 3 months), batch multi-horizon in a single call |
157
+ | **ChronoVisor engine** | Mathematical prediction system: Bayesian inference, certainty-factor algebra with weak signal dampening, first-order logic rules (17 base + 7 scalping), meta-reasoning, and continuous weight learning with feedback loops |
158
+ | **Alert-hit notifications** | Toast banners when price targets hit, with training feedback (accuracy, streak, weight updates), ESC-to-dismiss, auto-dismiss |
159
+ | **Prediction markets** | Integrates Gamma and Polymarket data for market-implied probabilities |
160
+ | **Polymarket edge scanning** | Compare ChronoVisor predictions vs Polymarket odds, detect mispricings, execute trades via CLOB API |
161
+
162
+ ### Market Intelligence
163
+
164
+ | Feature | What it does |
165
+ |---------|-------------|
166
+ | **Multi-exchange pricing** | Aggregated prices from 15 exchanges (Binance, Coinbase, Kraken, OKX, Bybit, Gate.io, KuCoin, HTX, MEXC, Bitget, CoinGecko, CryptoCompare, DexScreener, GeckoTerminal, Jupiter) with VWAP/median aggregation and outlier detection |
167
+ | **Microstructure analysis** | Market structure, FVGs, VWAP, volume delta, liquidation map, order book depth, S/R zones, squeeze detection |
168
+ | **Derivatives positioning** | Funding rates, open interest, long/short ratios from Binance Futures |
169
+ | **Sentiment analysis** | Fear & Greed Index + news sentiment + buy/sell transaction ratios |
170
+ | **Trending discovery** | What's moving right now across DexScreener and CoinGecko |
171
+ | **ICO tracking** | Upcoming launches, fundraising rounds, investor data |
172
+
173
+ ### Security & Forensics
174
+
175
+ | Feature | What it does |
176
+ |---------|-------------|
177
+ | **Token security audits** | Honeypot detection, tax analysis, mint/blacklist flags, rug pull indicators |
178
+ | **On-chain forensics** | Wallet analysis, whale tracking, holder concentration, token flow patterns |
179
+ | **Smart contract audits** | Source code analysis, vulnerability detection, risk scoring |
180
+ | **Blockchain fundamentals** | TVL, protocol revenue, developer activity, governance metrics, staking yields |
181
+
182
+ ### Trading & Automation
183
+
184
+ | Feature | What it does |
185
+ |---------|-------------|
186
+ | **Autonomous agents** | Set-and-forget trading agents with paper/live execution and 5 built-in strategies |
187
+ | **DeFi integrations** | Aave V3, Lido with health monitoring and yield orchestration |
188
+ | **Backtesting** | Test strategies against historical data with full metrics (return, win rate, Sharpe, drawdown) |
189
+ | **Wallet management** | AES-256-GCM encrypted wallets with scrypt key derivation |
190
+ | **Notifications & alerts** | Price alerts for all prediction types (directional + sideways breakout), interactive alerts panel with dismiss-on-review |
191
+
192
+ ### Platforms
193
+
194
+ | Platform | Description |
195
+ |----------|-------------|
196
+ | **Terminal (TUI)** | Interactive chat with live price ticker, streaming responses, and slash commands |
197
+ | **Web Dashboard** | Next.js 15 — AI chat, markets, agents, portfolio, Polymarket, notifications |
198
+ | **REST API** | Fastify + Swagger — 40+ endpoints with API key auth and rate limiting |
199
+ | **Discord Bot** | Full command suite with AI-powered chat via @mention |
200
+ | **Telegram Bot** | Full command suite with AI chat on any message |
201
+
202
+ ---
202
203
 
203
- ### TUI (Terminal UI)
204
+ ## Terminal UI
204
205
 
205
- Launch with `vizzor`. Interactive chat with live price ticker, streaming responses, and slash commands.
206
+ Launch with `vizzor`. Interactive chat with a live price ticker, streaming AI responses, and slash commands.
206
207
 
207
- **Price Ticker:** Arrow keys to navigate, **Enter** to trigger AI prediction, **Tab** to toggle focus.
208
+ **Price Ticker:** Arrow keys to navigate, **Enter** to trigger prediction, **Tab** to toggle focus.
208
209
 
209
210
  | Command | Description |
210
211
  |---------|-------------|
@@ -222,6 +223,7 @@ Launch with `vizzor`. Interactive chat with live price ticker, streaming respons
222
223
  | `/chain [<id>]` | Show/switch chain |
223
224
  | `/provider` | Show current AI provider |
224
225
  | `/provider <name>` | Switch to `anthropic`, `openai`, `gemini`, `ollama` |
226
+ | `/playbook` | Exact steps for better tracked prediction win rate |
225
227
  | `/agent create <name> [options]` | Create autonomous agent |
226
228
  | `/agent list` | List agents |
227
229
  | `/agent start <name>` | Start agent |
@@ -230,67 +232,48 @@ Launch with `vizzor`. Interactive chat with live price ticker, streaming respons
230
232
  | `/agent wallet <name>` | Show agent wallet balance |
231
233
  | `/agent trades <name>` | Show agent trade history |
232
234
  | `/backtest` | Historical strategy backtest |
235
+ | `/chronovisor` | ChronoVisor engine status |
233
236
  | `/config` | Show config |
234
237
  | `/help` | Command reference |
235
238
 
236
- **Alerts Panel:** Type `/alerts` to open the interactive panel. Use **Up/Down** to navigate predictions and alerts, **Enter** to view full details (entry price, confidence, outcome, signal snapshot), **Escape** to close.
239
+ **Alerts Panel:** Type `/alerts` to open the interactive panel. Use **Up/Down** to navigate predictions and alerts, **Enter** to view full details (entry price, confidence, outcome, signal snapshot), **Escape** to close. Resolved predictions remain available after review and become visually muted as seen history. Pending predictions appear first; resolved predictions sort below them.
237
240
 
238
241
  ### CLI Commands
239
242
 
240
243
  ```bash
241
244
  vizzor # Launch interactive TUI
242
- vizzor scan <token> [options] # Token risk analysis
243
- vizzor trends [options] # Market trends + top movers
244
- vizzor track <wallet> [options] # Wallet forensics
245
- vizzor audit <contract> [options] # Contract security audit
246
- vizzor ico list [options] # ICO/IDO tracker
245
+ vizzor setup # Reopen guided setup
247
246
  vizzor config init # Initialize config
248
247
  vizzor config set <key> <value> # Set config value
249
248
  vizzor config show # Show config
250
249
  vizzor wallet create|import|list|delete # Wallet management
251
- vizzor backtest [options] # Historical strategy backtest
252
- vizzor bot start [options] # Start Discord/Telegram bots
253
- vizzor api start [--port 3100] # Start REST API server
250
+ vizzor serve [--port 7100] # Start REST API server
254
251
  vizzor api key create "my-app" # Create API key
252
+ vizzor bot start [options] # Start Discord/Telegram bots
253
+ vizzor collect start [options] # Start OHLCV data collection
254
+ vizzor chronovisor setup # Install ChronoVisor engine
255
+ vizzor chronovisor start # Start engine
256
+ vizzor chronovisor stop # Stop engine
257
+ vizzor chronovisor status # Engine health check
258
+ vizzor predictions reset # Reset prediction history
259
+ vizzor health # Check config, API keys, and service connectivity
255
260
  ```
256
261
 
257
- ### Discord Bot
258
-
259
- Requires `DISCORD_TOKEN`. Enable the `MESSAGE_CONTENT` privileged intent in the [Discord Developer Portal](https://discord.com/developers/applications).
260
-
261
- | Command | Description |
262
- |---------|-------------|
263
- | `/predict <symbol>` | AI prediction with signals |
264
- | `/scan <address>` | Token security scan |
265
- | `/trends` | Trending tokens |
266
- | `/track <wallet>` | Wallet forensics |
267
- | `/price <symbol>` | Live price |
268
- | `/audit <contract>` | Contract audit |
269
- | `/ico` | Upcoming launches |
270
- | `/agent_create` | Create agent |
271
- | *@mention* | AI-powered chat |
272
-
273
- ### Telegram Bot
274
-
275
- Requires `TELEGRAM_BOT_TOKEN`.
276
-
277
- Same commands as Discord (`/predict`, `/scan`, `/trends`, `/track`, `/price`, `/audit`, `/ico`, `/agent_create`). Any text message triggers AI chat.
278
-
279
262
  ---
280
263
 
281
- ## Agents
264
+ ## Autonomous Agents
282
265
 
283
- Autonomous prediction agents that run a continuous **think analyze decide act** cycle.
266
+ Set-and-forget trading agents that run a continuous **think > analyze > decide > act** cycle.
284
267
 
285
268
  ### Agent Requirements
286
269
 
287
270
  | Requirement | Details |
288
271
  |-------------|---------|
289
- | **AI Provider** | Any (Claude recommended for best decisions) |
272
+ | **AI Provider** | Any supported provider (Claude recommended for best decisions) |
290
273
  | **Wallet** | Required for live trading; not needed for paper trading or alert-only |
291
274
  | **RPC Endpoint** | Required for live trading (default public RPCs or Alchemy) |
292
275
  | **Minimum Balance** | Agent-specific; configurable spending limits |
293
- | **Always-on Process** | Agent runs in a loop — needs a persistent process (terminal, tmux, Docker, etc.) |
276
+ | **Always-on Process** | Agent runs in a loop — needs a persistent process (terminal, tmux, Docker) |
294
277
 
295
278
  ### Create and Run
296
279
 
@@ -310,15 +293,15 @@ Autonomous prediction agents that run a continuous **think → analyze → decid
310
293
 
311
294
  ### Execution Modes
312
295
 
313
- | Mode | Description | Wallet Required |
314
- |------|-------------|-----------------|
296
+ | Mode | What happens | Wallet needed? |
297
+ |------|-------------|----------------|
315
298
  | **Alert-only** | Generates signals, no trades | No |
316
299
  | **Paper trading** | Simulated trades with realistic slippage model | No |
317
300
  | **Live trading** | On-chain execution via DEX router | Yes |
318
301
 
319
302
  ### Strategies
320
303
 
321
- | Strategy | Signals | Best For |
304
+ | Strategy | Signals | Best for |
322
305
  |----------|---------|----------|
323
306
  | **Momentum** | RSI + MACD + Bollinger + Funding | Short-term reversals |
324
307
  | **Trend-Following** | EMA Crossover + OBV + Fear & Greed | Swing trades |
@@ -355,21 +338,11 @@ vizzor wallet list # List managed wallets
355
338
 
356
339
  Wallets are encrypted with AES-256-GCM (scrypt N=2^18) and stored at `~/.vizzor/wallets/`.
357
340
 
358
- ### Backtesting
359
-
360
- Test strategies against historical data before going live:
361
-
362
- ```bash
363
- vizzor backtest --strategy momentum --pair BTCUSDT --from 2024-01-01 --to 2024-12-31
364
- ```
365
-
366
- Metrics: total return, win rate, profit factor, Sharpe ratio, max drawdown, equity curve.
367
-
368
341
  ---
369
342
 
370
343
  ## Web Dashboard
371
344
 
372
- Next.js 15 dashboard at `http://localhost:3001`.
345
+ Next.js 15 dashboard with real-time market data, AI chat, and full portfolio tracking.
373
346
 
374
347
  ### Setup
375
348
 
@@ -383,24 +356,26 @@ pnpm install
383
356
  pnpm dev
384
357
  ```
385
358
 
386
- Requires the API server running (`vizzor api start`).
359
+ Requires the API server running (`vizzor api start`). Available at `http://localhost:3001`.
387
360
 
388
361
  ### Pages
389
362
 
390
- - **AI Chat** conversational interface with streaming, tool call progress, trade action cards, conversation persistence
391
- - **Dashboard** — market overview, Fear & Greed, sentiment, regime, trending tokens, news, prediction accuracy tracker
392
- - **Markets** token analysis, wallet analyzer, on-chain intelligence
393
- - **Agents** create, monitor, start/stop agents with paper/live mode, portfolio chart, trade history
394
- - **Portfolio** positions, trade history, P&L metrics
395
- - **Notifications** real-time notification panel with prediction detail modals, price alert management, desktop push notifications
396
- - **Polymarket** edge scanner comparing ChronoVisor vs market odds, opportunity cards, position tracking, trade execution
397
- - **Settings** API keys and provider configuration
363
+ | Page | What you get |
364
+ |------|-------------|
365
+ | **AI Chat** | Conversational interface with streaming, tool call progress, trade action cards, conversation persistence |
366
+ | **Dashboard** | Market overview, Fear & Greed, sentiment, regime, trending tokens, news, prediction accuracy tracker |
367
+ | **Markets** | Token analysis, wallet analyzer, on-chain intelligence |
368
+ | **Agents** | Create, monitor, start/stop agents with paper/live mode, portfolio chart, trade history |
369
+ | **Portfolio** | Positions, trade history, P&L metrics |
370
+ | **Notifications** | Real-time notification panel with prediction detail modals, price alert management, desktop push notifications |
371
+ | **Polymarket** | Edge scanner comparing ChronoVisor vs market odds, opportunity cards, position tracking, trade execution |
372
+ | **Settings** | API keys and provider configuration |
398
373
 
399
374
  ---
400
375
 
401
- ## API Server
376
+ ## API
402
377
 
403
- REST API exposing all Vizzor capabilities programmatically.
378
+ REST API exposing all Vizzor capabilities programmatically. Full Swagger documentation at `/docs`.
404
379
 
405
380
  ### Setup
406
381
 
@@ -424,7 +399,7 @@ GET /v1/market/price/:symbol # Price
424
399
  GET /v1/market/prices?symbols= # Batch prices
425
400
  GET /v1/market/trending # Trending tokens
426
401
  GET /v1/market/fear-greed # Fear & Greed Index
427
- GET /v1/market/ml-health # ML sidecar status
402
+ GET /v1/market/ml-health # ChronoVisor engine status
428
403
  GET /v1/market/trenches # Trenches scanner
429
404
  GET /v1/chronovisor/:symbol # ChronoVisor prediction
430
405
  GET /v1/chronovisor/predictions # List all predictions
@@ -477,6 +452,41 @@ WS /ws # WebSocket real-time push
477
452
 
478
453
  ---
479
454
 
455
+ ## ChronoVisor Engine
456
+
457
+ The ChronoVisor engine is an optional Python-based prediction accelerator with 16 trained models that enhances Vizzor's predictions with ML. When unavailable, Vizzor falls back to its rule-based heuristics automatically — no setup required to start using Vizzor.
458
+
459
+ ### Quick setup
460
+
461
+ ```bash
462
+ # Interactive wizard — detects Docker or Python, installs deps
463
+ vizzor chronovisor setup
464
+
465
+ # Start the engine
466
+ vizzor chronovisor start
467
+
468
+ # Check health
469
+ vizzor chronovisor status
470
+ ```
471
+
472
+ Or via Docker:
473
+
474
+ ```bash
475
+ docker compose up chronovisor-engine
476
+ curl http://localhost:7200/health
477
+ ```
478
+
479
+ ### Requirements
480
+
481
+ | Component | Minimum |
482
+ |-----------|---------|
483
+ | **RAM** | 4 GB (8 GB recommended) |
484
+ | **Disk** | 1 GB for models |
485
+ | **Runtime** | Docker (recommended) or Python 3.11+ |
486
+ | **GPU** | Not required — CPU-based by default |
487
+
488
+ ---
489
+
480
490
  ## Configuration
481
491
 
482
492
  Config at `~/.vizzor/config.yaml`. Environment variables override file values.
@@ -524,25 +534,72 @@ polymarket:
524
534
 
525
535
  ---
526
536
 
527
- ## ML Sidecar (Optional)
537
+ ## Requirements
528
538
 
529
- Python FastAPI sidecar with 16 trained models for enhanced predictions. Falls back to heuristics when unavailable.
539
+ ### Hardware
530
540
 
531
- ### Setup
541
+ | Component | Minimum | Recommended |
542
+ |-----------|---------|-------------|
543
+ | **CPU** | 2 cores | 4+ cores |
544
+ | **RAM** | 2 GB | 4+ GB (8 GB if running ChronoVisor engine) |
545
+ | **Disk** | 500 MB | 2 GB (includes SQLite cache + ML models) |
546
+ | **Network** | Stable internet | Low latency to Binance/CoinGecko APIs |
547
+ | **GPU** | Not required | Not required (ML models are CPU-based) |
532
548
 
533
- ```bash
534
- docker compose up ml-sidecar
535
- curl http://localhost:8000/health
536
- ```
549
+ ### Software
537
550
 
538
- ### Requirements
551
+ | Dependency | Version | Notes |
552
+ |------------|---------|-------|
553
+ | **Node.js** | >= 20.0.0 | ES2022 target, ESM modules |
554
+ | **pnpm** | >= 8.0 | Recommended package manager (npm/yarn also work) |
555
+ | **Python** | 3.x | Required by `better-sqlite3` native build |
556
+ | **C++ compiler** | GCC / Clang / MSVC | Required by `better-sqlite3` native build |
557
+ | **Docker** | >= 24 | Optional — for ChronoVisor engine, PostgreSQL, web dashboard |
539
558
 
540
- | Component | Minimum |
541
- |-----------|---------|
542
- | **RAM** | 4 GB (8 GB recommended) |
543
- | **Disk** | 1 GB for models |
544
- | **Python** | 3.10+ |
545
- | **GPU** | Not required |
559
+ Works on **macOS**, **Linux**, and **Windows**.
560
+
561
+ ### API Keys
562
+
563
+ | Key | Required | Free Tier | Purpose |
564
+ |-----|----------|-----------|---------|
565
+ | `ANTHROPIC_API_KEY` | Yes (or use Ollama) | Pay-per-use | Claude AI — best prediction quality |
566
+ | `ETHERSCAN_API_KEY` | Recommended | Yes | Transaction history, contract source |
567
+ | `OPENAI_API_KEY` | No | Pay-per-use | GPT-4 as alternative provider |
568
+ | `GOOGLE_API_KEY` | No | Free tier | Gemini as alternative provider |
569
+ | `ALCHEMY_API_KEY` | No | Free tier | Premium RPC endpoints |
570
+ | `COINGECKO_API_KEY` | No | Free tier | Extended market data |
571
+ | `CRYPTOPANIC_API_KEY` | No | Free tier | News with sentiment |
572
+ | `DISCORD_TOKEN` | No | Free | Discord bot |
573
+ | `TELEGRAM_BOT_TOKEN` | No | Free | Telegram bot |
574
+ | `POLYMARKET_PRIVATE_KEY` | No | N/A | Polymarket CLOB trading (edge execution) |
575
+
576
+ **No API key at all?** Use Ollama with a local model — fully offline predictions (lower quality but free).
577
+
578
+ ---
579
+
580
+ ## Discord & Telegram
581
+
582
+ ### Discord Bot
583
+
584
+ Requires `DISCORD_TOKEN`. Enable the `MESSAGE_CONTENT` privileged intent in the [Discord Developer Portal](https://discord.com/developers/applications).
585
+
586
+ | Command | Description |
587
+ |---------|-------------|
588
+ | `/predict <symbol>` | AI prediction with signals |
589
+ | `/scan <address>` | Token security scan |
590
+ | `/trends` | Trending tokens |
591
+ | `/track <wallet>` | Wallet forensics |
592
+ | `/price <symbol>` | Live price |
593
+ | `/audit <contract>` | Contract audit |
594
+ | `/ico` | Upcoming launches |
595
+ | `/agent_create` | Create agent |
596
+ | *@mention* | AI-powered chat |
597
+
598
+ ### Telegram Bot
599
+
600
+ Requires `TELEGRAM_BOT_TOKEN`.
601
+
602
+ Same commands as Discord (`/predict`, `/scan`, `/trends`, `/track`, `/price`, `/audit`, `/ico`, `/agent_create`). Any text message triggers AI chat.
546
603
 
547
604
  ---
548
605
 
@@ -556,9 +613,11 @@ pnpm install
556
613
  pnpm dev # Dev mode (tsx)
557
614
  pnpm build # Build (tsup)
558
615
  pnpm lint # ESLint
616
+ pnpm format:check # Prettier check
559
617
  pnpm typecheck # TypeScript strict
560
618
  pnpm test # Vitest
561
619
  pnpm test:coverage # With coverage
620
+ pnpm test:integration # Integration tests (needs API keys)
562
621
  ```
563
622
 
564
623
  ### Tech Stack
@@ -572,7 +631,7 @@ pnpm test:coverage # With coverage
572
631
  | Blockchain | viem (EVM), Solana, Sui, Aptos, TON adapters |
573
632
  | Dashboard | Next.js 15, React 19, Tailwind CSS 4 |
574
633
  | Database | better-sqlite3 + PostgreSQL (pg) |
575
- | ML Sidecar | Python FastAPI, scikit-learn, PyTorch |
634
+ | ChronoVisor Engine | Python FastAPI, scikit-learn, PyTorch |
576
635
  | API | Fastify + Swagger/OpenAPI |
577
636
  | Bots | discord.js, grammY |
578
637
  | Build | tsup |
@@ -0,0 +1,31 @@
1
+ [project]
2
+ name = "vizzor-ml-sidecar"
3
+ version = "0.14.5"
4
+ description = "ML sidecar for Vizzor — LSTM, RF, Isolation Forest, Rug Detection, Wallet Classification, Sentiment NLP, Trend Scoring, TA Interpretation, Regime Detection, Strategy Bandit, Project Risk, Portfolio Optimization, Intent Classification"
5
+ requires-python = ">=3.11"
6
+ dependencies = [
7
+ "fastapi>=0.115.0",
8
+ "uvicorn[standard]>=0.34.0",
9
+ "torch>=2.5.0",
10
+ "scikit-learn>=1.6.0",
11
+ "psycopg2-binary>=2.9.10",
12
+ "numpy>=2.1.0",
13
+ "pandas>=2.2.0",
14
+ "joblib>=1.4.0",
15
+ "transformers>=4.40.0",
16
+ "xgboost>=2.0.0",
17
+ "hmmlearn>=0.3.0",
18
+ ]
19
+
20
+ [project.optional-dependencies]
21
+ dev = [
22
+ "pytest>=8.0.0",
23
+ "httpx>=0.28.0",
24
+ ]
25
+
26
+ [build-system]
27
+ requires = ["hatchling"]
28
+ build-backend = "hatchling.build"
29
+
30
+ [tool.hatch.build.targets.wheel]
31
+ packages = ["src"]
File without changes
File without changes