Back to browse
GitHub Repository

CLI para interactuar con la sede electrónica de la AEAT. Sube/descarga declaraciones IRPF en formato XML oficial.

17 starsTypeScript

Hacienda-CLI – CLI to reconcile Spanish tax returns with the tax agency

by jatorre·Apr 14, 2026·2 points·1 comment

AI Analysis

●●SolidNiche GemBig Brain

Programmatic access to Spain's AEAT when no official API exists.

Strengths
  • Playwright auth flow handles Cl@ve login that headless browsers can't bypass
  • Offline XSD validation catches errors before uploading to EDFI system
  • Bridges AI agents with government bureaucracy—real automation gap solved
Weaknesses
  • Geographically limited to Spanish tax system—zero international applicability
  • Session tied to browser process makes automation workflows fragile
Category
Target Audience

Spanish taxpayers and developers building tax automation tools

Post Description

I built a CLI to programmatically interact with Spain's tax agency (AEAT) for income tax filing (Modelo 100). It authenticates via Cl@ve using Playwright, downloads your tax data, validates XML against the official XSD, and uploads it to AEAT's EDFI system for reconciliation. The problem: AI agents can do a good job organizing financial data from multiple brokers, banks and crypto exchanges, but there was no way to programmatically check that against what the tax agency already knows about you. This CLI bridges that gap. It does NOT file or submit anything. The user is always responsible for manual review and submission.

Maybe a bit specific for the spanish community, but if you always wish there was a CLI to do your taxes here is an unofficial one.

Similar Projects