Legal Framework
Last updated: March 25, 2026
About This Tool
sunat-cli is an open-source automation tool that interacts with SUNAT (Superintendencia Nacional de Aduanas y de Administracion Tributaria) web portals on behalf of authenticated users. It does not scrape, collect, or store third-party data.
User Responsibility
This tool automates form submissions using YOUR credentials (Clave SOL). You are solely responsible for:
- The accuracy of tax declarations submitted through this tool
- Compliance with SUNAT deadlines and tax obligations
- Safeguarding your Clave SOL credentials
- Reviewing all operations via
--dry-runbefore execution
Legal Basis for Automation
Peruvian law does not prohibit automated interaction with government web portals when performed by the authenticated account holder for their own tax obligations.
Data Protection
sunat-cli operates entirely on your local machine. No data is sent to
third-party servers. API calls go exclusively to official SUNAT endpoints
(*.sunat.gob.pe).
- Credentials stored locally in
~/.sunat/(encrypted) - Audit logs stored locally in JSONL format
- OAuth2 tokens cached locally with 1-hour TTL
- No analytics, telemetry, or external data transmission
SUNAT Terms of Service
SUNAT's Operaciones en Linea portal does not explicitly prohibit automated access by authenticated users. However:
- This tool uses headed Chrome (not headless) to comply with SUNAT's bot detection
- Operations include realistic delays between form submissions
- No rate-limiting circumvention is attempted
- The tool respects session timeouts and re-authenticates properly
Disclaimer
sunat-cli is provided "as is" without warranty. The authors are not responsible for any tax penalties, incorrect declarations, or financial losses resulting from the use of this tool. Always verify declarations with a qualified tax professional (contador).
This tool is not affiliated with, endorsed by, or officially connected to SUNAT in any way. SUNAT is a trademark of the Peruvian government.
Open Source License
sunat-cli is released under the MIT License. Source code: github.com/crafter-research/sunat-cli
Contact
For legal inquiries: legal@crafterstation.com
Crafter Station — Lima, Peru