Skip to content

fjacquet/camt-csv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

369 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CAMT-CSV

Convert financial statements to CSV with intelligent transaction categorization

Go CI codecov Go Report Card Go Reference License: MIT GitHub release Docker Pulls

CAMT-CSV converts financial statement formats (CAMT.053 XML, PDF, Revolut CSV, Selma CSV) into standardized CSV files with AI-powered transaction categorization.

Installation

# Homebrew (macOS/Linux)
brew tap fjacquet/homebrew-tap
brew install camt-csv

# Docker (multi-arch: amd64/arm64)
docker pull ghcr.io/fjacquet/camt-csv:latest

# Binary — download from GitHub Releases
# https://github.com/fjacquet/camt-csv/releases/latest

# Build from source
git clone https://github.com/fjacquet/camt-csv.git
cd camt-csv
make build
# For PDF support: brew install poppler (macOS) or apt-get install poppler-utils (Ubuntu)

Usage

# Convert CAMT.053 XML
camt-csv camt -i statement.xml -o output.csv

# Convert Revolut CSV
camt-csv revolut -i revolut_export.csv -o output.csv

# Convert PDF bank statement
camt-csv pdf -i statement.pdf -o output.csv

# Revolut investment transactions
camt-csv revolut-investment -i investments.csv -o output.csv

# Selma investment CSV
camt-csv selma -i selma.csv -o output.csv

# Generic debit CSV
camt-csv debit -i debit.csv -o output.csv

# Batch process a directory
camt-csv batch -i input_dir/ -o output_dir/

# Use iCompta output format (semicolon-delimited, 10 columns)
camt-csv revolut -i export.csv -o output.csv --format icompta

# Enable AI categorization
camt-csv --ai-enabled --auto-learn camt -i statement.xml -o output.csv

# Check version
camt-csv --version

Configuration

Settings can be provided via config file, environment variables, or CLI flags (highest precedence).

# Config file
mkdir -p ~/.camt-csv
cat > ~/.camt-csv/camt-csv.yaml << EOF
log:
  level: "info"
ai:
  enabled: true
categorization:
  auto_learn: false
EOF

# Environment variables
export GEMINI_API_KEY=your_api_key_here
export CAMT_AI_ENABLED=true
export CAMT_LOG_LEVEL=debug

See the User Guide for the complete configuration reference.

Categorization

Four-tier strategy pattern for transaction categorization:

  1. Direct Mapping - Exact match from creditors.yaml/debtors.yaml
  2. Keyword Matching - Pattern rules from categories.yaml
  3. Semantic Search - Vector embedding similarity matching
  4. AI Fallback - Gemini API for unknown transactions (optional, requires --ai-enabled)

When --auto-learn is enabled, AI results are saved directly to the main YAML files. When disabled (the default), AI suggestions are saved to staging files (database/staging_creditors.yaml, database/staging_debtors.yaml) for manual review.

Documentation

Full documentation: https://fjacquet.github.io/camt-csv/

Development

make all              # Lint, test, and build
make test             # Run tests
make lint             # Run golangci-lint
make coverage         # Generate coverage report
make install-tools    # Install dev tools

License

MIT License - see LICENSE file.

About

Convert file from CAMT053 to csv with transaction categorisation using AI

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors