JSON Output
Every Atlas command supports --json for machine-readable output, making it straightforward to integrate Atlas with scripts, pipelines, and other tools.
Using —json
Add --json to any command:
atlas status --json
atlas history ~/README.md --json
atlas find --duplicates --json
atlas log --today --json
atlas inputs ~/project/index.html --json
atlas compare ~/project-v1/ ~/project-v2/ --json
Output is written to stdout as JSON. Errors and warnings go to stderr, so they won’t interfere with JSON parsing.
Export Format
The atlas export command outputs JSON Lines (JSONL) — one JSON object per line:
atlas export
The first line is always a version header:
{"atlas_export_version":1,"schema_version":10}
Subsequent lines include a _table field indicating their source table:
{"id":"a1b2c3d4-...","created_at":"2025-03-10T14:30:00+00:00","created_by":"user","forked_from_entity_id":null,"_table":"entities"}
{"entity_id":"a1b2c3d4-...","hash":"e1a2b3c4...","previous_hash":null,"recorded_at":"2025-03-10T14:30:01+00:00","_table":"hash_history"}
Export a specific table:
atlas export --table entities
atlas export --table hash_history
atlas export --table path_history
atlas export --table name_history
atlas export --table current_state
atlas export --table edges
atlas export --table file_traits
Scripting Examples
Count tracked files
atlas stats --json | jq '.active_entities'
List all current file paths
atlas export --table current_state | jq -r '.current_path'
Find files modified today
atlas log --today --json | jq '.entries[].name'
Check if daemon is running
atlas status --json | jq '.daemon.running'
Pipe duplicates to another tool
atlas find --duplicates --json | jq -r '.groups[].files[].path'
AI Agent Integration
Atlas can generate ready-to-use instruction blocks for AI agents:
atlas agent-setup --format claude # CLAUDE.md instructions
atlas agent-setup --format mcp # MCP server config (JSON)
For MCP-native integration, Atlas includes a full MCP server with 14 tools including aggregate queries and edge search. See Atlas Connect for details.
Integration Ideas
- AI agents — Use
atlas agent-setupto configure Claude, Cursor, Copilot, or any MCP client - CI/CD — Use
atlas verify --jsonto check database integrity as part of a pipeline - Monitoring — Pipe
atlas log --jsonto a log aggregator - Backup validation — Use
atlas compare ~/project/ /backup/project/ --jsonto verify backups, or compareatlas exportsnapshots to detect drift - Custom dashboards — Query
atlas stats --jsonandatlas log --summary --jsonfor metrics - Duplicate cleanup scripts — Use
atlas find --duplicates --jsonto feed a cleanup tool