-
Notifications
You must be signed in to change notification settings - Fork 0
Getting Started
Griffen Fargo edited this page May 10, 2026
·
3 revisions
- Node.js >= 20
- pnpm 9+
git clone https://github.com/gfargo/daybook.git
cd daybook
pnpm install
pnpm buildTo make the daybook command available globally:
npm install -g .daybook uses environment variables for API keys. Add these to your shell profile or .env file:
| Variable | Required For | How to Get |
|---|---|---|
ALCHEMY_API_KEY |
EVM sync (Ethereum, Polygon) | Free at alchemy.com |
ETHERSCAN_API_KEY |
--include-failed-gas flag |
Free at etherscan.io/apis |
COINGECKO_API_KEY |
CoinGecko pricing (optional) | Free tier works without a key |
Create the config file and SQLite database:
daybook initThis creates ~/.daybook/config.json and ~/.daybook/data.db.
Register your exchange accounts and wallets:
# Coinbase
daybook account add main-coinbase \
--source coinbase \
--identifier you@example.com \
--label "My Coinbase"
# Kraken
daybook account add main-kraken \
--source kraken \
--identifier you@example.com \
--label "My Kraken"
# Binance
daybook account add main-binance \
--source binance \
--identifier you@example.com \
--label "My Binance"
# Binance.US
daybook account add main-binance-us \
--source binance-us \
--identifier you@example.com \
--label "My Binance.US"
# Generic CSV import bucket
daybook account add csv-imports \
--source csv \
--identifier manual-ledger \
--label "Universal CSV"
# Ethereum wallet
daybook account add eth-main \
--source eth \
--identifier 0xYourAddress \
--label "Main ETH"
# Polygon wallet
daybook account add polygon-main \
--source polygon \
--identifier 0xYourAddress \
--label "Main Polygon"Verify your accounts:
daybook account listImport data from each source:
# Coinbase API — see [[Coinbase API Setup]] for key setup, then:
daybook sync --source coinbase --from 2024-01-01
# Coinbase CSV — download CSV from Coinbase, then:
daybook sync --source coinbase --file ~/Downloads/Coinbase-All-Transactions.csv
# Kraken — download ledger CSV from Kraken, then:
daybook sync --source kraken --file ~/Downloads/kraken-ledger.csv
# Binance — download ledger CSV from Binance, then:
daybook sync --source binance --file ~/Downloads/binance-ledger.csv
# Binance.US — download tax-report CSV from Binance.US, then:
daybook sync --source binance-us --file ~/Downloads/binance-us-tax.csv
# Generic universal/manual CSV:
daybook sync --source csv --file ~/Downloads/universal-ledger.csv
# EVM wallets — fetches from Alchemy API
daybook sync --source eth
daybook sync --source polygonAll syncs are idempotent. Running them again with the same data is a no-op.
Run the classifier to produce ledger entries:
daybook classifyTo preview what would change first:
daybook classify --dry-runTo interactively review and override unclassified events:
daybook classify --review# Default: FIFO method
daybook export 2024 --output ./taxes-2024.csv
# Compare methods first
daybook compare 2024
# Export with HIFO
daybook export 2024 --method HIFO --output ./taxes-2024-hifo.csvAfter the initial full sync, use incremental sync for faster updates:
# Sync only new transactions since a date
daybook sync --source eth --from 2024-06-01
# Or from a specific block number
daybook sync --source eth --from 20000000
# Re-classify with the new data
daybook classify
# Re-export
daybook export 2024 --output ./taxes-2024.csv- CLI Reference — full command documentation
- Source Adapters — details on each source adapter
- Tax Engine — cost basis methods and wash sale flagging
Getting Started
Usage
Architecture