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

@neural-trader/agentic-accounting-cli

v0.1.1

Published

Command-line interface for neural-trader's agentic accounting system with interactive tax calculators, transaction management, compliance reports, and cryptocurrency accounting automation

Readme

💼 Agentic Accounting CLI

npm version npm downloads License: MIT OR Apache-2.0

Professional Command-Line Interface for Autonomous Accounting Powerful terminal-based tool for tax calculations, compliance, and financial reporting

A comprehensive CLI tool for managing cryptocurrency and traditional accounting operations. Features autonomous agents for tax optimization, fraud detection, compliance checking, and automated reporting.


✨ Features

  • 🧮 Tax Calculator - FIFO, LIFO, HIFO, Specific ID, Average Cost methods
  • 📥 Multi-Source Ingestion - Coinbase, Binance, Kraken, Etherscan, CSV support
  • 📋 Compliance Engine - Multi-jurisdiction regulatory validation
  • 🔍 Fraud Detection - ML-powered anomaly detection
  • 💰 Tax-Loss Harvesting - Automated opportunity scanning
  • 📊 Report Generator - P&L, Schedule-D, Form 8949, audit trails
  • 📈 Position Tracker - Real-time portfolio monitoring
  • 🧠 Learning System - Adaptive agent optimization
  • 🎨 Beautiful Output - Color-coded tables and progress indicators
  • Interactive Mode - REPL for advanced workflows

🚀 Installation

Global Installation (Recommended)

npm install -g @neural-trader/agentic-accounting-cli

After installation, the accounting command will be available globally:

accounting --version
accounting --help

Local Installation

npm install @neural-trader/agentic-accounting-cli

Run with npx:

npx accounting --help

From Source

git clone https://github.com/your-org/neural-trader.git
cd neural-trader/packages/agentic-accounting-cli
npm install
npm run build
npm link

⚡ Quick Start

Basic Tax Calculation

# Calculate taxes using FIFO method for 2024
accounting tax --method FIFO --year 2024

# Use a specific transaction file
accounting tax --method HIFO --file transactions.json

Import Transactions

# Import from Coinbase
accounting ingest coinbase --account your-account-id

# Import from CSV
accounting ingest csv --file transactions.csv

# Import from Etherscan
accounting ingest etherscan --address 0xYourAddress

Generate Reports

# Generate P&L report
accounting report pnl --year 2024 --output pnl-2024.json

# Generate Schedule-D for taxes
accounting report schedule-d --year 2024 --format pdf

# Generate Form 8949
accounting report form-8949 --year 2024 --output form8949.pdf

Check Positions

# View all positions
accounting position

# View specific asset
accounting position BTC

# Filter by wallet
accounting position --wallet main-wallet

📖 Detailed Tutorial

Tutorial 1: Complete Tax Workflow

Step 1: Import Your Transactions

# Import from multiple sources
accounting ingest coinbase --account coinbase-main
accounting ingest binance --account binance-trading
accounting ingest csv --file manual-transactions.csv

Step 2: Calculate Taxes

# Calculate using optimal method
accounting tax --method HIFO --year 2024

Output:

┌─────────────────┬──────────────┐
│ Metric          │ Value        │
├─────────────────┼──────────────┤
│ Total Proceeds  │ $125,000.00  │
│ Total Cost      │ $85,000.00   │
│ Capital Gains   │ $40,000.00   │
│ Tax Liability   │ $8,000.00    │
└─────────────────┴──────────────┘

Step 3: Check Compliance

accounting compliance --jurisdiction US --year 2024

Step 4: Generate Reports

# Generate all required forms
accounting report schedule-d --year 2024 --format pdf --output schedule-d-2024.pdf
accounting report form-8949 --year 2024 --format pdf --output form-8949-2024.pdf
accounting report audit --year 2024 --format json --output audit-trail-2024.json

📝 Note: Always review generated reports with a licensed tax professional before filing.

Tutorial 2: Tax-Loss Harvesting

Scan for Opportunities

accounting harvest --min-savings 100

Output:

🔍 Scanning portfolio for tax-loss harvesting opportunities...

┌──────────┬─────────────┬──────────────┬────────────────┬──────────────┐
│ Asset    │ Quantity    │ Cost Basis   │ Current Value  │ Potential    │
│          │             │              │                │ Savings      │
├──────────┼─────────────┼──────────────┼────────────────┼──────────────┤
│ ETH      │ 10.50       │ $31,500.00   │ $26,250.00     │ $1,260.00    │
│ SOL      │ 200.00      │ $30,000.00   │ $20,000.00     │ $2,400.00    │
│ ADA      │ 5,000.00    │ $2,500.00    │ $1,750.00      │ $180.00      │
└──────────┴─────────────┴──────────────┴────────────────┴──────────────┘

💰 Total Potential Tax Savings: $3,840.00

💡 Tip: Run tax-loss harvesting analysis quarterly to maximize opportunities throughout the year.

Tutorial 3: Fraud Detection

Analyze Suspicious Activity

accounting fraud --file recent-transactions.json --threshold 0.7

Output:

🔍 Analyzing transactions for fraud indicators...

⚠️  HIGH RISK TRANSACTIONS DETECTED

┌─────────────┬──────────────┬─────────────┬──────────────┬────────────────┐
│ Date        │ Amount       │ Asset       │ Fraud Score  │ Risk Level     │
├─────────────┼──────────────┼─────────────┼──────────────┼────────────────┤
│ 2024-11-15  │ $50,000.00   │ BTC         │ 0.85         │ HIGH           │
│ 2024-11-14  │ $25,000.00   │ ETH         │ 0.72         │ MEDIUM         │
└─────────────┴──────────────┴─────────────┴──────────────┴────────────────┘

Anomalies Detected:
  • Unusual transaction time (3:00 AM)
  • First-time recipient address
  • Amount exceeds 90th percentile
  • Rapid succession of large transfers

⚠️ Warning: High fraud scores require immediate investigation. Consider freezing affected accounts.

Tutorial 4: Interactive Mode

Launch Interactive REPL

accounting interactive

or

accounting i

Interactive Session:

🤖 Agentic Accounting Interactive Mode
Type 'help' for commands or 'exit' to quit

> help

Available commands:
  tax <method>           - Calculate taxes
  ingest <source>        - Import transactions
  position [asset]       - View positions
  harvest                - Tax-loss harvesting
  fraud                  - Fraud detection
  report <type>          - Generate report
  compliance             - Check compliance
  agents                 - List agent status
  config <action>        - Manage configuration
  exit                   - Exit interactive mode

> position BTC

Position for BTC:
  Quantity: 2.5 BTC
  Cost Basis: $75,000.00
  Current Value: $150,000.00
  Unrealized P&L: $75,000.00 (+100%)

> exit
Goodbye! 👋

🔧 Command Reference

accounting tax

Calculate tax liability using specified accounting method.

Options:

  • -m, --method <method> - Accounting method (FIFO, LIFO, HIFO, SPECIFIC_ID, AVERAGE_COST)
  • -f, --file <file> - Transaction file path
  • -y, --year <year> - Tax year (default: current year)

Examples:

accounting tax --method FIFO --year 2024
accounting tax --method HIFO --file my-trades.json

accounting ingest

Ingest transactions from external sources.

Arguments:

  • <source> - Source type (coinbase, binance, kraken, etherscan, csv)

Options:

  • -f, --file <file> - File path for CSV source
  • --account <account> - Account ID for exchange sources
  • --address <address> - Blockchain address for Etherscan

Examples:

accounting ingest coinbase --account my-account
accounting ingest csv --file transactions.csv
accounting ingest etherscan --address 0xYourAddress

accounting compliance

Check transaction compliance with regulatory rules.

Options:

  • -f, --file <file> - Transaction file path
  • -j, --jurisdiction <jurisdiction> - Jurisdiction (US, EU, UK, etc.)

Examples:

accounting compliance --jurisdiction US
accounting compliance --file trades.json --jurisdiction EU

accounting fraud

Detect potential fraud in transactions.

Options:

  • -f, --file <file> - Transaction file path
  • -t, --threshold <threshold> - Detection threshold (0-1, default: 0.7)

Examples:

accounting fraud --threshold 0.8
accounting fraud --file suspicious-trades.json

accounting harvest

Scan for tax-loss harvesting opportunities.

Options:

  • --min-savings <amount> - Minimum savings threshold (default: 100)

Examples:

accounting harvest
accounting harvest --min-savings 500

accounting report

Generate financial and tax reports.

Arguments:

  • <type> - Report type (pnl, schedule-d, form-8949, audit)

Options:

  • -f, --file <file> - Transaction file path
  • -y, --year <year> - Tax year
  • -o, --output <file> - Output file path
  • --format <format> - Output format (json, pdf, csv)

Examples:

accounting report pnl --year 2024 --format pdf
accounting report schedule-d --year 2024 --output schedule-d.pdf
accounting report form-8949 --format json

accounting position

View current asset positions.

Arguments:

  • [asset] - Asset symbol (optional, shows all if not provided)

Options:

  • --wallet <wallet> - Wallet identifier filter

Examples:

accounting position              # Show all positions
accounting position BTC          # Show Bitcoin position
accounting position --wallet main-wallet

accounting learn

View learning metrics and agent performance.

Arguments:

  • [agent] - Agent ID (optional, shows all if not provided)

Options:

  • --period <period> - Time period (7d, 30d, 90d, default: 30d)

Examples:

accounting learn                        # All agents
accounting learn TaxComputeAgent        # Specific agent
accounting learn --period 90d            # 90-day metrics

accounting agents

List all agents and their status.

Examples:

accounting agents

Output:

Active agents:
  ✓ TaxComputeAgent: Active
  ✓ ComplianceAgent: Active
  ✓ ForensicAgent: Active
  ✓ IngestionAgent: Active
  ✓ ReportingAgent: Active
  ✓ HarvestAgent: Active
  ✓ LearningAgent: Active

accounting config

Manage CLI configuration.

Arguments:

  • <action> - Action (get, set, list)
  • [key] - Configuration key
  • [value] - Configuration value

Examples:

accounting config list
accounting config get default-method
accounting config set default-method HIFO
accounting config set jurisdiction US

accounting interactive

Start interactive REPL mode.

Alias: accounting i

Examples:

accounting interactive
accounting i

⚙️ Configuration

Configuration File

Create ~/.accounting-cli/config.json:

{
  "defaultMethod": "HIFO",
  "jurisdiction": "US",
  "currency": "USD",
  "fraudThreshold": 0.7,
  "minHarvestSavings": 100,
  "databases": {
    "transactions": "~/.accounting-cli/transactions.db",
    "positions": "~/.accounting-cli/positions.db"
  },
  "exchanges": {
    "coinbase": {
      "apiKey": "your-api-key",
      "apiSecret": "your-api-secret"
    }
  }
}

🛡️ Security: Never commit API keys to version control. Use environment variables for sensitive data.

Environment Variables

# Database location
export ACCOUNTING_DB_PATH=~/.accounting-cli/data.db

# Default accounting method
export ACCOUNTING_METHOD=HIFO

# Jurisdiction for compliance
export ACCOUNTING_JURISDICTION=US

# API keys (optional)
export COINBASE_API_KEY=your-key
export COINBASE_API_SECRET=your-secret
export BINANCE_API_KEY=your-key
export BINANCE_API_SECRET=your-secret

Advanced Configuration

# Enable debug mode
export DEBUG=accounting:*

# Custom log level
export LOG_LEVEL=debug

# Disable colors (for CI/CD)
export NO_COLOR=1

💡 Usage Tips

Tip 1: Automate Daily Reports

Create a cron job for daily position updates:

# Run daily at 9 AM
0 9 * * * accounting position > ~/daily-positions.txt

Tip 2: Batch Processing

Process multiple files at once:

for file in transactions/*.json; do
  accounting ingest csv --file "$file"
done

Tip 3: Export to Spreadsheet

# Generate CSV report for Excel/Google Sheets
accounting report pnl --format csv --output pnl-2024.csv

Tip 4: Combine Commands

# One-liner for complete workflow
accounting ingest csv --file trades.csv && \
accounting compliance --jurisdiction US && \
accounting tax --method HIFO --year 2024 && \
accounting report schedule-d --format pdf --output schedule-d.pdf

💡 Pro Tip: Use shell aliases for frequently used commands:

alias acc-tax='accounting tax --method HIFO'
alias acc-report='accounting report pnl --format pdf'

🔗 Related Packages

Part of the Neural Trader Agentic Accounting ecosystem:


🐛 Troubleshooting

Command Not Found

# Verify installation
npm list -g @neural-trader/agentic-accounting-cli

# Reinstall if needed
npm install -g @neural-trader/agentic-accounting-cli

# Or use npx
npx @neural-trader/agentic-accounting-cli --version

Database Errors

# Reset database
rm -rf ~/.accounting-cli/data.db

# Verify permissions
ls -la ~/.accounting-cli/

Import Failures

# Validate CSV format
accounting ingest csv --file transactions.csv --dry-run

# Check file encoding
file -I transactions.csv  # Should be UTF-8

Performance Issues

# Reduce data set
accounting tax --year 2024 --file recent-trades.json

# Enable performance profiling
accounting --profile tax --method FIFO

💡 Tip: Run with --verbose flag for detailed debugging information.


📚 Additional Resources


🤝 Contributing

Contributions are welcome! Please see CONTRIBUTING.md for guidelines.


📄 License

Licensed under MIT OR Apache-2.0. See LICENSE for details.


🌟 Credits

Created by ruv.io Website: neural-trader.ruv.io

Part of the Neural Trader autonomous trading and accounting platform.


Keywords: command-line, accounting-cli, tax-calculator, cryptocurrency-accounting, financial-reporting, autonomous-agents, compliance-checking, fraud-detection, tax-loss-harvesting, portfolio-management