npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

fr3ktrad3

v3.0.12

Published

AI-Powered Trading CLI with Agent Routing, Progressive Disclosure, and Market Data Integration

Downloads

1,043

Readme

🚀 fr3ktrad3 Trading CLI - Complete Trading Assistance Guide

📊 Overview

fr3ktrad3 is a professional-grade AI-powered trading CLI that implements Daniel Miessler's Personal AI Infrastructure (PAI) vision for cryptocurrency trading. It features 4 specialized agents, progressive disclosure, and institutional-level trading tools.

Evolution Intelligence Multiplier: 4.73x Supported Exchanges: Bybit, Bitget, Binance (analysis) Risk Management: Built-in with 2% max risk per trade Agent System: Analyst, Strategist, Risk Manager, Executor BEHEMOTH System: Multi-agent parallel analysis with cosmic intelligence Progressive Disclosure: 3-tier information system (minimal/standard/full)

BEHEMOTH Advanced Features

🚀 Multi-Agent Parallel Analysis

  • Technical Analysis Agent: RSI, MACD, Elliott Wave, Support/Resistance
  • Cosmic Intelligence Agent: Planetary alignment, quantum entanglement patterns
  • AI/ML Prediction Agent: LSTM neural networks, advanced pattern recognition
  • Market Structure Agent: Order flow analysis, whale movement detection
  • Risk Assessment Agent: VaR calculations, Kelly criterion, position sizing

🌌 Cosmic Intelligence Integration

  • Planetary Alignment Analysis: Astronomical correlations with market movements
  • Quantum Entanglement Patterns: Advanced pattern recognition algorithms
  • Cosmic Timing: Astrological market timing indicators
  • Universal Resonance: Harmonic convergence analysis

🤖 AI/ML Enhancement

  • Neural Network Predictions: LSTM and transformer-based forecasting
  • Pattern Recognition: Advanced chart pattern and anomaly detection
  • Sentiment Analysis: Multi-source sentiment aggregation
  • Predictive Modeling: Machine learning-based price prediction

🏗️ System Architecture

4 Specialized Trading Agents

1. 📈 Market Analyst Agent

  • Purpose: Comprehensive market research and analysis
  • Capabilities:
    • Technical analysis (RSI, MACD, Bollinger Bands)
    • Fundamental analysis and valuation
    • Sentiment analysis and news impact
    • Pattern recognition and anomaly detection
    • Risk assessment and market timing

2. 🎯 Trading Strategist Agent

  • Purpose: Strategy development and optimization
  • Capabilities:
    • Backtesting and validation
    • Parameter optimization
    • Multi-timeframe strategies
    • Performance analytics
    • Strategy combination and allocation

3. 🛡️ Risk Manager Agent

  • Purpose: Capital protection and risk control
  • Capabilities:
    • VaR and Expected Shortfall calculations
    • Kelly Criterion position sizing
    • Portfolio heat management
    • Stop-loss optimization
    • Stress testing and scenario analysis

4. ⚡ Trade Executor Agent

  • Purpose: Optimal trade execution and management
  • Capabilities:
    • Smart order routing
    • Execution algorithms (TWAP, VWAP)
    • Slippage minimization
    • Real-time monitoring
    • Performance analytics

🚀 Quick Start Guide

Installation

npm install -g fr3ktrad3
# or use npx
npx fr3ktrad3 --help

First Time Setup

npx fr3ktrad3 --agent analyst -p "Help me get started with trading"

AI Provider Selection (Required on first run):

  1. OpenRouter (Recommended) - Access to 100+ models
  2. Groq - Fast, good free tier
  3. DeepSeek - Direct access, good free tier
  4. Ollama - Local models (no API key needed)

📋 Progressive Disclosure System

3 Information Tiers

🔸 Minimal Tier (Default)

  • Basic market data and simple analysis
  • Essential risk metrics
  • Core trading recommendations

🔹 Standard Tier

  • Advanced technical indicators
  • Multi-timeframe analysis
  • Strategy performance metrics
  • Portfolio optimization suggestions

🔺 Full Tier

  • Institutional-level analysis
  • Advanced pattern recognition
  • Machine learning insights
  • Complete risk modeling
  • Professional execution algorithms

Usage Examples

# Minimal tier (default)
npx fr3ktrad3 --agent analyst -p "Analyze BTCUSDT"

# Standard tier
npx fr3ktrad3 --agent analyst --tier standard -p "Analyze BTCUSDT"

# Full tier with maximum detail
npx fr3ktrad3 --agent analyst --tier full -p "Analyze BTCUSDT"

📋 Complete Command Reference

All Available Commands Table

| Command | Description | Usage | |---------|-------------|-------| | /analyze | Multi-agent parallel analysis | /analyze BTCUSDT | | /technical | Technical analysis suite | /technical BTCUSDT | | /market | Market microstructure analysis | /market BTCUSDT | | /risk | Risk management and sizing | /risk BTCUSDT | | /trade | Trading operations | /trade status | | /chart-simple | ASCII chart visualization | /chart-simple BTCUSDT | | /sentiment | Market sentiment analysis | /sentiment BTCUSDT | | /cosmic | Cosmic intelligence analysis | /cosmic BTCUSDT | | /multi-agent | Multi-agent coordination | /multi-agent analyze | | /multi | Multi-asset analysis | /multi BTCUSDT ETHUSDT | | /n8n | N8N workflow integration | /n8n workflow | | /howto | Interactive tutorials | /howto trading-basics | | /keys | API key management | /keys set | | /model | AI model selection | /model gpt-4 | | /login | Authentication | /login | | /logout | Session termination | /logout | | /clear | Clear conversation | /clear | | /reasoning | Enhanced reasoning mode | /reasoning on | | /help | Command help | /help |


🛠️ Core Trading Commands

Market Analysis Commands

/market [SYMBOL] - Market Microstructure Analysis

# Complete market analysis
/market BTCUSDT

# Order flow analysis
/market BTCUSDT orderflow

# Liquidity analysis
/market BTCUSDT liquidity

# Arbitrage opportunities
/market BTCUSDT arbitrage

# Institutional flow detection
/market BTCUSDT institutional

Features:

  • Order flow heatmaps
  • Bid/ask imbalance analysis
  • Iceberg order detection
  • Cross-exchange arbitrage
  • Institutional trade identification

/technical [SYMBOL] - Technical Analysis

# Complete technical analysis
/technical BTCUSDT

# Core indicators only
/technical BTCUSDT indicators

# Pattern recognition
/technical BTCUSDT patterns

Indicators Available:

  • RSI (Relative Strength Index)
  • MACD (Moving Average Convergence Divergence)
  • Bollinger Bands
  • Moving Averages (SMA, EMA, WMA)
  • Volume Profile and OBV
  • Elliott Wave patterns
  • Harmonic patterns (Gartley, Butterfly, Bat, Crab)

/analyze [SYMBOL] - Comprehensive Analysis

# Full market analysis
/analyze BTCUSDT

# Specific timeframe
/analyze BTCUSDT 4h

# Multi-asset comparison
/analyze BTCUSDT ETHUSDT

/sentiment [SYMBOL] - Market Sentiment

# Sentiment analysis
/sentiment BTCUSDT

# News sentiment
/sentiment BTCUSDT news

# Social media sentiment
/sentiment BTCUSDT social

# Whale movement analysis
/sentiment BTCUSDT whales

# Fear & Greed Index
/sentiment BTCUSDT fear

Note: The sentiment command is available but may need to be accessed directly as it's not currently in the main command list.

Risk Management Commands

/risk [SYMBOL] - Risk Assessment

# Complete risk analysis
/risk BTCUSDT

# Value at Risk calculation
/risk BTCUSDT var

# Kelly Criterion sizing
/risk BTCUSDT kelly

# Portfolio correlation
/risk portfolio correlation

# Drawdown analysis
/risk BTCUSDT drawdown

Risk Metrics:

  • VaR (95%, 99% confidence levels)
  • CVaR (Conditional Value at Risk)
  • Maximum Drawdown
  • Sharpe/Sortino/Calmar ratios
  • Position sizing recommendations

Trading Execution Commands

/trade [COMMAND] - Trading Operations

# Check account status
/trade status

# View balances
/trade balance

# Set API credentials
/trade credentials

# Place market order
/trade BTCUSDT buy 0.001

# Place limit order
/trade ETHUSDT sell 0.1 limit 2500

# View portfolio
/trade portfolio

# P&L analysis
/trade pnl

Supported Exchanges:

  • Bybit: USDT-M Futures, Spot trading
  • Bitget: USDT-M Futures, Advanced orders
  • Binance: Market data and analysis (read-only)

Chart Analysis Commands

/chart [SYMBOL] - Chart Visualization

# Simple ASCII chart
/chart BTCUSDT

# Advanced interactive chart
/chart BTCUSDT advanced

# Multi-timeframe chart
/chart BTCUSDT multi

/chart-simple [SYMBOL] - Quick Charts

# Basic price chart
/chart-simple BTCUSDT

# With indicators
/chart-simple BTCUSDT rsi

/cosmic [SYMBOL] - Cosmic Intelligence Analysis

# Cosmic analysis
/cosmic BTCUSDT

# Planetary alignment analysis
/cosmic BTCUSDT planets

# Quantum entanglement patterns
/cosmic BTCUSDT quantum

/multi-agent [COMMAND] - Multi-Agent Coordination

# Parallel agent analysis
/multi-agent analyze BTCUSDT

# Agent collaboration
/multi-agent strategy BTCUSDT

/multi [COMMAND] - Multi-Asset Analysis

# Multi-asset comparison
/multi BTCUSDT ETHUSDT

# Cross-asset correlation
/multi correlation BTCUSDT ETHUSDT ADAUSDT

/n8n [COMMAND] - N8N Workflow Integration

# Create trading workflow
/n8n workflow create

# Execute automated workflow
/n8n workflow execute

/howto [TOPIC] - Interactive Tutorials

# Trading basics
/howto trading-basics

# Risk management
/howto risk-management

# Technical analysis
/howto technical-analysis

🎯 Agent-Specific Workflows

Market Analyst Workflow

# Step 1: Market overview
npx fr3ktrad3 --agent analyst -p "What's the current market sentiment?"

# Step 2: Asset deep-dive
npx fr3ktrad3 --agent analyst -p "Analyze BTCUSDT for swing trading opportunities"

# Step 3: Risk context
npx fr3ktrad3 --agent analyst -p "Identify key risks in current ETH position"

Trading Strategist Workflow

# Step 1: Strategy ideation
npx fr3ktrad3 --agent strategist -p "Develop a momentum strategy for altcoins"

# Step 2: Backtesting
npx fr3ktrad3 --agent strategist -p "Backtest RSI mean reversion on BTCUSDT"

# Step 3: Optimization
npx fr3ktrad3 --agent strategist -p "Optimize parameters for Bollinger Band strategy"

Risk Manager Workflow

# Step 1: Position sizing
npx fr3ktrad3 --agent risk-manager -p "Calculate position size for BTC trade with 2% risk"

# Step 2: Portfolio risk
npx fr3ktrad3 --agent risk-manager -p "Assess portfolio risk with current BTC and ETH positions"

# Step 3: Stress testing
npx fr3ktrad3 --agent risk-manager -p "Run stress test for 30% market crash scenario"

Trade Executor Workflow

# Step 1: Pre-trade analysis
npx fr3ktrad3 --agent executor -p "Assess execution quality for 1 BTC order"

# Step 2: Order placement
npx fr3ktrad3 --agent executor -p "Execute buy order for 0.5 BTC with minimal slippage"

# Step 3: Post-trade analysis
npx fr3ktrad3 --agent executor -p "Analyze execution quality of recent trades"

📊 Advanced Trading Strategies

Trend Following Strategy

# Identify trend
/technical BTCUSDT trend

# Confirm with multiple timeframes
/analyze BTCUSDT multi

# Calculate position size
/risk BTCUSDT kelly

# Execute with stop loss
/trade BTCUSDT buy 0.001 stop-loss 45000

Mean Reversion Strategy

# Find oversold conditions
/technical BTCUSDT rsi

# Check for divergence
/technical BTCUSDT divergence

# Risk assessment
/risk BTCUSDT var

# Execute limit order
/trade BTCUSDT buy 0.001 limit 42000

Arbitrage Trading

# Find arbitrage opportunities
/market BTCUSDT arbitrage

# Check funding rates
/market BTCUSDT funding

# Risk-free execution
/trade BTCUSDT arbitrage 0.001

🛡️ Risk Management Best Practices

Position Sizing Rules

  • Maximum Risk per Trade: 2% of portfolio
  • Portfolio Heat Limit: 20% maximum exposure
  • Sector Concentration: 30% maximum per sector
  • Correlation Limit: 30% maximum for correlated assets

Stop Loss Strategies

# Volatility-based stop loss
/risk BTCUSDT stop-loss

# Trailing stop for profits
/trade BTCUSDT trailing-stop 2

# Multi-level stops
/trade BTCUSDT bracket-stop entry:45000 stop:44000 profit:47000

Portfolio Diversification

# Correlation analysis
/risk portfolio correlation

# Optimal allocation
/risk portfolio optimize

# Rebalancing recommendations
/trade portfolio rebalance

📈 Performance Monitoring

Key Metrics to Track

# Portfolio overview
/trade portfolio

# P&L analysis
/trade pnl

# Risk metrics
/risk portfolio metrics

# Trade history
/trade history

Performance Benchmarks

  • Sharpe Ratio: Target >1.0
  • Maximum Drawdown: Target <15%
  • Win Rate: Target >55%
  • Profit Factor: Target >1.5

🔧 Configuration and Setup

API Credentials Setup

# Secure credential setup
/trade credentials

# Required permissions:
# - Read account balances
# - Place orders
# - Cancel orders
# - Read trade history

Model Configuration

# Change AI model
/model gpt-4

# Adjust temperature
--temperature 0.7

# Enable debug logging
--debug

Custom Settings

# Risk tolerance adjustment
/risk settings tolerance 3

# Default exchange
/trade settings exchange bybit

# Notification preferences
/config notifications email

🚨 Emergency Procedures

Market Crash Response

# Immediate risk reduction
/risk emergency reduce-heat

# Stop all active orders
/trade emergency stop-all

# Portfolio protection
/risk emergency hedge

System Issues

# Check system status
/status

# Restart agents
/restart agents

# Clear cache
/cache clear

📚 Learning Resources

Built-in Help

# General help
--help

# Command-specific help
/trade --help

# Agent capabilities
--agent analyst --help

Educational Content

  • Strategy Library: Pre-built strategies with explanations
  • Indicator Guide: Technical indicator usage and interpretation
  • Risk Management: Comprehensive risk management tutorials
  • Market Analysis: Advanced market analysis techniques

🎯 Success Metrics

Trading Performance Goals

  • Monthly Return: 5-15% (realistic crypto targets)
  • Sharpe Ratio: >1.5 (excellent risk-adjusted returns)
  • Maximum Drawdown: <10% (strong risk control)
  • Win Rate: >60% (consistent profitability)

System Performance Goals

  • Analysis Accuracy: >85% correct market calls
  • Execution Speed: <1 second average
  • Risk Calculation: >95% accuracy
  • System Uptime: 99.9% availability

🔮 Future Enhancements

Planned Features

  • Machine Learning Strategies: AI-powered strategy development
  • Social Sentiment Integration: Twitter and Reddit analysis
  • Options Trading: Advanced derivatives support
  • Cross-Exchange Arbitrage: Automated arbitrage execution
  • Portfolio Rebalancing: Automated asset allocation

Integration Possibilities

  • DeFi Protocols: Decentralized exchange integration
  • NFT Trading: Non-fungible token markets
  • Traditional Markets: Stock and forex integration
  • Algorithmic Trading: Fully automated strategy execution

🆘 Support and Troubleshooting

Common Issues

# API connection problems
/trade credentials reset

# Analysis not loading
/cache clear && restart

# Risk calculations incorrect
/risk recalibrate

Getting Help

# Interactive help
/help

# Agent-specific assistance
--agent analyst -p "I need help with technical analysis"

# System diagnostics
/diagnostics full

📋 Quick Reference Cheat Sheet

Most Used Commands

# Quick market analysis
/analyze BTCUSDT

# Risk assessment
/risk BTCUSDT

# Technical analysis
/technical BTCUSDT

# Place order
/trade BTCUSDT buy 0.001

# Portfolio status
/trade portfolio

Agent Shortcuts

# Analyst for market research
--agent analyst -p "question"

# Strategist for strategy work
--agent strategist -p "strategy request"

# Risk manager for sizing
--agent risk-manager -p "risk question"

# Executor for trades
--agent executor -p "execution request"

💡 Complete Trading Workflow Examples

Example 1: New Trader Getting Started

# 1. Get market overview
npx fr3ktrad3 --agent analyst -p "What's happening in crypto markets today?"

# 2. Learn basic concepts
/howto trading-basics

# 3. Analyze a specific asset
/analyze BTCUSDT

# 4. Learn risk management
/howto risk-management

# 5. Calculate safe position size
/risk BTCUSDT kelly

# 6. Paper trade first
/trade paper-trade BTCUSDT buy 0.001

Example 2: Swing Trading Setup

# 1. Multi-timeframe analysis
/analyze BTCUSDT multi

# 2. Technical confirmation
/technical BTCUSDT patterns

# 3. Sentiment check
/sentiment BTCUSDT social

# 4. Risk assessment
/risk BTCUSDT var

# 5. Position sizing
/risk BTCUSDT kelly

# 6. Execute with stops
/trade BTCUSDT buy 0.001 stop-loss 42000 take-profit 48000

Example 3: Arbitrage Opportunity

# 1. Find arbitrage opportunities
/market BTCUSDT arbitrage

# 2. Check funding rates
/market BTCUSDT funding

# 3. Risk assessment (should be near zero)
/risk arbitrage BTCUSDT

# 4. Execute arbitrage trade
/trade arbitrage BTCUSDT 0.001

Example 4: Portfolio Management

# 1. Portfolio overview
/trade portfolio

# 2. Correlation analysis
/risk portfolio correlation

# 3. Rebalancing recommendations
/trade portfolio rebalance

# 4. Risk optimization
/risk portfolio optimize

# 5. Performance review
/trade pnl monthly

Example 5: Advanced Strategy Development

# 1. Strategy ideation
npx fr3ktrad3 --agent strategist -p "Create a momentum strategy for altcoins"

# 2. Backtesting
npx fr3ktrad3 --agent strategist -p "Backtest strategy on historical data"

# 3. Optimization
npx fr3ktrad3 --agent strategist -p "Optimize strategy parameters"

# 4. Risk validation
npx fr3ktrad3 --agent risk-manager -p "Validate strategy risk metrics"

# 5. Live execution
npx fr3ktrad3 --agent executor -p "Execute strategy with proper risk controls"

🔧 Advanced Configuration

Custom AI Model Selection

# High-intelligence analysis
/model gpt-4-turbo

# Fast analysis
/model groq

# Creative strategies
/model claude-3

# Local privacy
/model ollama

Temperature Settings

# Conservative analysis
--temperature 0.1

# Balanced analysis
--temperature 0.7

# Creative strategies
--temperature 1.2

Debug and Logging

# Enable debug logging
--debug

# View system logs
/logs show

# Clear debug logs
/logs clear

📊 Performance Tracking

Key Performance Indicators (KPIs)

  • Win Rate: Percentage of profitable trades
  • Profit Factor: Gross profits / Gross losses
  • Sharpe Ratio: Risk-adjusted returns
  • Maximum Drawdown: Largest peak-to-valley decline
  • Calmar Ratio: Annual return / Maximum drawdown

Tracking Commands

# Daily P&L
/trade pnl daily

# Weekly performance
/trade pnl weekly

# Monthly review
/trade pnl monthly

# Risk metrics
/risk portfolio metrics

# Strategy performance
/strategy performance

🚨 Risk Management Protocols

Emergency Procedures

# Immediate position reduction
/risk emergency reduce 50

# Stop all active orders
/trade emergency stop-all

# Portfolio hedge
/risk emergency hedge

# Circuit breaker activation
/risk emergency circuit-breaker

Risk Limits Configuration

# Set maximum position size
/risk limits position 5

# Set maximum portfolio heat
/risk limits heat 15

# Set maximum drawdown
/risk limits drawdown 10

# Set correlation limits
/risk limits correlation 25

🌟 Pro Tips and Best Practices

1. Always Use Multiple Timeframes

# Check alignment across timeframes
/analyze BTCUSDT multi

2. Risk First, Reward Second

# Calculate risk before reward
/risk BTCUSDT kelly

3. Sentiment + Technical = Better Entries

# Combine analysis types
/sentiment BTCUSDT && /technical BTCUSDT

4. Position Size Based on Volatility

# ATR-based position sizing
/risk BTCUSDT volatility

5. Regular Portfolio Rebalancing

# Monthly rebalancing
/trade portfolio rebalance monthly

6. Keep a Trading Journal

# Automatic trade logging
/trade journal auto

7. Use Stop Losses Religiously

# Volatility-adjusted stops
/trade BTCUSDT stop-loss auto

8. Learn from Every Trade

# Post-trade analysis
/trade review last

🎯 Success Mindset

Trading Psychology Principles

  • Patience: Wait for high-probability setups
  • Discipline: Follow your risk management rules
  • Consistency: Stick to your trading plan
  • Learning: Review and improve continuously
  • Realism: Accept losses as part of trading

Mental Performance Tips

  • Trade with a clear mind: Avoid trading when emotional
  • Take breaks: Regular breaks prevent decision fatigue
  • Celebrate wins, learn from losses: Maintain positive mindset
  • Focus on process, not outcome: Consistent execution leads to results

📚 Additional Resources

Built-in Learning

# Complete trading course
/howto complete-trading-course

# Advanced strategies
/howto advanced-strategies

# Risk management masterclass
/howto risk-masterclass

# Technical analysis deep-dive
/howto technical-analysis-advanced

External Resources

  • Books: "Market Wizards", "Trading in the Zone", "Japanese Candlestick Charting"
  • Courses: Investopedia, Udemy trading courses
  • Communities: Reddit r/cryptocurrency, r/trading
  • Tools: TradingView, CoinGecko, CoinMarketCap

🔮 Future Roadmap

Planned Enhancements

  • AI Strategy Generation: Machine learning-powered strategy creation
  • Automated Trading: Full algorithmic execution capabilities
  • DeFi Integration: Decentralized exchange support
  • NFT Trading: Non-fungible token market analysis
  • Options Trading: Advanced derivatives strategies
  • Cross-Asset Arbitrage: Multi-market arbitrage opportunities

Research Areas

  • Quantum Computing: Advanced pattern recognition
  • Neural Networks: Deep learning price prediction
  • Blockchain Analysis: On-chain metrics integration
  • Social Sentiment: Advanced NLP sentiment analysis
  • Alternative Data: Satellite imagery, web scraping

This comprehensive trading assistance guide is your complete companion for mastering fr3ktrad3. Remember: successful trading is 80% psychology, 15% risk management, and 5% analysis. Focus on the process, manage your risk, and let the system handle the complexity.

Happy Trading! 🚀📈 </xai:function_call">

<xai:function_call name="read"> TRADING-ASSISTANCE-GUIDE.md