Scripts
Copy and run in terminal from repo root. Full reference: Docs and scripts-and-commands.md.
Start / Restart stack
cd && cd vaulta_sh && bash scripts/gate8/restart-control-api.sh
Start Supabase (if local), control API, proxy, and bot. Use after reboot or to bring everything up.
cd && cd vaulta_sh && bash scripts/gate8/restart-control-api.sh --fresh
Wipe local DB + reports, then start stack. All data deleted.
cd && cd vaulta_sh && bash scripts/gate8/restart-control-api.sh --no-proxy
Start Supabase + control API only (no Dex proxy). Use when not using discovery.
cd && cd vaulta_sh && bash scripts/gate8/restart-control-api.sh --no-supabase-local
Use cloud Supabase; don’t start local. Set SUPABASE_URL in .env.
cd && cd vaulta_sh && node scripts/gate9/reset-paper-state.js
Reset local DB + report artifacts only; you start the API yourself after.
Monitor
cd && cd vaulta_sh && bash scripts/monitor-db-activity.sh --counts
Poll open positions, orders, fills every 2s. See counts update as buys happen.
cd && cd vaulta_sh && node scripts/monitor-signals.js
Recent signals + discovery status (last run, accept/reject, next phase).
cd && cd vaulta_sh && node scripts/watch-dex-helius.js
Watch DEX API + Helius RPC live: counts, sample tokens, RPC health/slot.
cd && cd vaulta_sh && bash scripts/monitor-db-activity.sh --signals
Monitor DB activity with signals view (last run, next phase).
Debug / Diagnostics
cd && cd vaulta_sh && node scripts/gate8/check-why-no-buys.js
Why the bot might not be buying: Gate 5 skip reasons, Gate 7 entry outcome, recent events.
cd && cd vaulta_sh && bash scripts/check-system-deep.sh
Deep check: Supabase REST, control API, DB/API consistency, Dex proxy health.
cd && cd vaulta_sh && bash scripts/check-system.sh
Quick health: Supabase, proxy, API, soak runner, ports.
cd && cd vaulta_sh && node scripts/gate8/report-buy-gaps.js --hours=48
Find gaps between buys in last N hours and Gate 7 skip reasons (e.g. supply-cap).
cd && cd vaulta_sh && bash scripts/check-local-setup.sh
Check Docker, Supabase CLI, .env, optional API. Use SKIP_SUPABASE_CLI_CHECK=1 if [5] hangs.
cd && cd vaulta_sh && bash scripts/gate8/check-dex-proxies-health.sh
Health of all configured Dex proxies (used by check-system-deep Phase 3).
cd && cd vaulta_sh && node scripts/audit-settings.js
Load all strategy JSONs; check gate7/gate9 mode, env vs .env.example, ports.
cd && cd vaulta_sh && node scripts/gate7/exit-monitor-load-check.js
One exit-monitor cycle; reports if stop loss / take profit can keep up (e.g. 40+ positions). Target: Verdict OK.
Jupiter & rug
cd && cd vaulta_sh && node scripts/gate8/watch-jupiter-skip-mints.js
Watch rug/skip list; prints when mints are added (no-route / rugged). Use --once to print and exit.
cd && cd vaulta_sh && node scripts/gate8/prime-jupiter-skip-from-positions.js
Check all open position mints with Jupiter; add no-route mints to skip list. Run periodically.
cd && cd vaulta_sh && node scripts/gate8/rug-bucket-report.js --watch
Rug bucket report; --watch polls for updates.
PnL & positions
cd && cd vaulta_sh && node scripts/gate8/check-pnl-initials.js --from-positions
Compare PnL Initial/Total from API vs sum from positions. Use when numbers look off.
cd && cd vaulta_sh && node scripts/gate8/pnl-full-analysis.js
Full PnL: realized, unrealized, win rate, top/bottom by token. Add --realized-only to skip live prices.
cd && cd vaulta_sh && node scripts/gate5/probe-pump-coins.js
Probe pump.fun coins API (when using pump discovery).
cd && cd vaulta_sh && node scripts/gate8/dump-all-positions.js
Dump all open/closed positions to stdout (JSON or table).
cd && cd vaulta_sh && node scripts/gate8/token-mint-report.js
Report on token mints (positions, metadata).
Manual intervention
cd && cd vaulta_sh && node scripts/gate8/force-close-position-by-mint.js <MINT>
Force-close a position by mint address (replace <MINT> with actual mint).
cd && cd vaulta_sh && node scripts/gate8/force-sell-by-search.js
Force sell by search (interactive or args). Use with care.
Validate
cd && cd vaulta_sh && node -c scripts/gate7/execution-pipeline-smoke.js
Syntax-check Gate 7 script (no run). Use after editing.
Top runners (best PnL)
cd && cd vaulta_sh && node scripts/gate8/top-runners.js
Top 10 closed tokens by lifetime realized PnL.
cd && cd vaulta_sh && node scripts/gate8/top-runners.js --open
Top 10 open positions by unrealized PnL (live when API running). Table with token, initial, %, buys/sells.
cd && cd vaulta_sh && node scripts/gate8/top-runners.js --all --top=15
Both: top 15 closed then top 15 open.
cd && cd vaulta_sh && node scripts/gate8/top-runners.js --hours 24 --by-position
Top runners closed in last 24h, by single position (not aggregated by token).
Top losers (worst PnL)
cd && cd vaulta_sh && node scripts/gate8/top-losers.js
Top 10 closed losers (most negative realized PnL).
cd && cd vaulta_sh && node scripts/gate8/top-losers.js --open
Top 10 open losers (worst unrealized PnL).
cd && cd vaulta_sh && node scripts/gate8/top-losers.js --all --top=15
Both: top 15 closed losers then top 15 open losers.
cd && cd vaulta_sh && node scripts/gate8/top-runners.js --losers --hours=168
Top losers closed in last 7 days.
Other
cd && cd vaulta_sh && bash scripts/gate8/prune-report-files.sh
Delete report files older than 24h (keeps state files). Reclaim disk.
cd && cd vaulta_sh && node scripts/check-positions-visible.js
Check if positions exist in DB and API returns them (dashboard empty but buys happened).
cd && cd vaulta_sh && node scripts/gate8/last-trade.js 10
Last N fills (default 5) with side and time.
cd && cd vaulta_sh && node scripts/check-rpc.js
Check RPC (Helius primary/fallback) connectivity and slot.
cd && cd vaulta_sh && node scripts/gate9/diagnose-low-activity.js
Diagnose why soak cycles might show low activity (discovery, entry, exits).
cd && cd vaulta_sh && VAULTA_LOG_SUPABASE=1 node scripts/gate8/supabase-usage-audit.js
Log every Supabase call (usage audit). Use when tracking limits.
cd && cd vaulta_sh && bash scripts/gate9/run-soak-with-proxy.sh
Run one soak cycle manually with proxy (API not required).

