https://github.com/dimagi/commcare-export
A command-line tool (and Python library) to generate customized exports from the CommCare HQ REST API.
uv pip install commcare-export# Export forms to Markdown (useful for testing)
commcare-export \
--query examples/demo-registration.xlsx \
--project YOUR_PROJECT \
--output-format markdown
# Export to a SQL database with incremental updates
commcare-export \
--query examples/demo-registration.xlsx \
--project YOUR_PROJECT \
--output-format sql \
--output postgresql://user:pass@localhost/dbnameExample query files are provided in the examples/ directory for both Excel and JSON formats.
See the User Documentation for installation, creating queries, command-line usage, scheduling, and common use cases.
See the Technical Documentation for:
- Python Library Usage - Using
commcare-exportas a Python library - MiniLinq Reference - Query language documentation
- Query Formats - Excel and JSON query specifications
- Output Formats - Available output formats and dependencies
- User and Location Data - Exporting organization data
- Command-line Usage - CLI reference
- Scheduling - Running DET on a schedule
We welcome contributions! See CONTRIBUTING.md for how to set up your development environment, coding style guidelines, testing, and the release process.
Tested with Python 3.10, 3.11, 3.12, and 3.13.
MIT License - see LICENSE for details.
