Self-hosted crypto tax reporting from the command line
Sync Coinbase by API or CSV, import major exchange exports, and pull EVM wallet history into one private tax ledger. Built for repeatable local accounting from raw events to tax forms.
npm install -g @gfargo/daybookEverything you need for crypto tax reporting
From ingestion to export, daybook handles the full pipeline in a single CLI tool.
Multi-Source Ingestion
Sync Coinbase by API or CSV, import Coinbase, Kraken, Binance, Binance.US, Crypto.com, Gemini, Robinhood, and generic CSV exports, plus EVM wallet history.
Event Classification
An 8-rule chain classifies raw events into trades, transfers, income, NFT acquisitions/disposals, and more. Manual overrides are first-class.
Cost Basis Computation
Compute gains and losses with FIFO, HIFO, LIFO, or Specific ID lot selection. Compare methods side-by-side before exporting.
Wash Sale Flagging
Automatically flags loss disposals with acquisitions within ±30 days. Informational only — you stay in control.
Multi-Format Tax Export
Export as CSV, IRS Form 8949 PDF, Schedule D PDF, or TXF for TurboTax. NFT disposals included alongside fungible tokens.
Incremental Sync
Use --from for Coinbase API and EVM wallets to sync from a date or block number. No need to re-import your full history.
NFT Cost Basis
Track ERC-721 and single-copy ERC-1155 collectibles as individual lots. Purchases, mints, airdrops, sales, and NFT-for-NFT trades are handled.
Sources & methods
Start with Coinbase API sync, supported exchange CSV profiles, universal imports, and EVM wallet history today. Planned coverage focuses on more large exchanges and non-EVM chains.
Data Sources
| Source | Method | Since |
|---|---|---|
| Coinbase | API sync + CSV import | supported |
| Kraken | CSV import | supported |
| Binance | Ledger CSV | supported |
| Binance.US | Tax-report CSV | supported |
| Crypto.com | App / Exchange / DeFi CSV | supported |
| Gemini | Exchange CSV profile | supported |
| Robinhood | Crypto CSV profile | supported |
| Generic CSV | Universal ledger import | supported |
| Ethereum | Alchemy API | supported |
| Polygon | Alchemy API | supported |
| Base | Alchemy API | supported |
| Arbitrum | Alchemy API | supported |
| Optimism | Alchemy API | supported |
| BNB Chain | Alchemy API | supported |
| Etherscan | Failed-tx gas | supported |
Planned Coverage
| Source | Method | Status |
|---|---|---|
| OKX / Bybit | CSV profiles | planned |
| Solana / Bitcoin | Chain adapters | planned |
| More CEX APIs | Read-only sync | planned |
Cost Basis Methods
First in, first out — the IRS default method.
Highest cost, first out — minimizes taxable gains by disposing of the most expensive lots first.
Last in, first out — disposes of the most recently acquired lots first.
Hand-pick which lots to dispose of with an interactive picker or JSON replay file.
Up and running in minutes
A short local workflow from install to tax-ready output.
$ npm install -g @gfargo/daybook$ daybook init$ daybook account add main-coinbase --source coinbase$ export COINBASE_CDP_KEY_NAME=...$ daybook sync --source coinbase --from 2024-01-01$ daybook classify$ daybook export 2024 --format 8949Clean, modular architecture
Five packages with one-directional dependencies. No cycles, no spaghetti.
Packages
Core data model, types, SQLite storage
Coinbase API/CSV, exchange CSV profiles, generic CSV, EVM adapters
8-rule event classification chain
Cost basis, NFT lot tracking, pricing, wash sale, multi-format export
Commander + Ink terminal UI
Data Flow
cli → tax → classifier → ledger
sources → ledger