CLI tool for inspecting ArcGIS Pro session exports
Project description
ArcGIS Pro CLI
Give AI agents eyes into ArcGIS Pro.
pip install arcgispro-cli
arcgispro install
What's New in v0.4.0
- Enhanced TUI with map preview support and improved banner rendering
- Mermaid project structure export (
project-structure.mmd+ markdown wrapper) - Best-effort stable IDs for maps/layers/tables to improve snapshot tracking
- Geoprocessing history export scaffold for richer context artifacts
- Reliability fixes including Python 3.9 compatibility and improved terminal/add-in robustness
How It Works
ProExporter (Pro add-in) creates detailed flat files that explain the state of your ArcGIS Pro project. arcgispro CLI tool facilitates frictionless reasoning over the context. Fewer assumptions and annoying follow-up questions. Helps the AI help you.
- Open a project in ArcGIS Pro
- Click Snapshot in the CLI ribbon tab
- Ask questions:
arcgispro layers # What layers do I have? arcgispro layer "Parcels" # Tell me about this layer arcgispro fields "Parcels" # What fields are in it?
CLI Commands
Setup
| Command | Description |
|---|---|
arcgispro install |
Install the ProExporter add-in |
arcgispro uninstall |
Show uninstall instructions |
arcgispro launch |
Launch ArcGIS Pro (opens .aprx in current dir if found) |
arcgispro status |
Show export status and validate files |
arcgispro clean |
Remove generated files |
arcgispro open |
Open export folder |
Query
| Command | Description |
|---|---|
arcgispro project |
Show project info |
arcgispro maps |
List all maps |
arcgispro map [name] |
Map details |
arcgispro layers |
List all layers |
arcgispro layers --broken |
Just the broken ones |
arcgispro layer <name> |
Layer details + fields |
arcgispro fields <name> |
Just the fields |
arcgispro tables |
Standalone tables |
arcgispro connections |
Data connections |
arcgispro notebooks |
Jupyter notebooks in project |
arcgispro context |
Full markdown dump |
arcgispro diagram |
Render Mermaid diagram of project structure |
Add --json to any query command for machine-readable output.
Troubleshooting
arcgispro launches ArcGIS Pro instead of the CLI?
This happens if C:\Program Files\ArcGIS\Pro\bin is on your PATH. Options:
- Use
agpinstead (alias):agp layers,agp launch - Or fix PATH order: ensure Python Scripts comes before ArcGIS Pro bin
Requirements
- Windows 10/11
- ArcGIS Pro 3.x
- Python 3.9+
Development
To build the add-in from source, you'll need:
- Visual Studio 2022 with ArcGIS Pro SDK extension
- .NET 8 SDK
# Clone and install CLI in dev mode
git clone https://github.com/danmaps/arcgispro_cli.git
cd arcgispro_cli/cli
pip install -e .
# Build add-in in Visual Studio
# Open ProExporter/ProExporter.sln
# Build → Build Solution (Release)
License
MIT
Using with AI Agents
This tool is designed to make ArcGIS Pro sessions observable for AI coding assistants.
What Gets Exported
When you click Snapshot in ArcGIS Pro, the project structure is:
project_root/
├── AGENTS.md # AI agent skill file (start here!)
├── YourProject.aprx # ArcGIS Pro project file
└── .arcgispro/
├── config.yml # Export settings (auto-export, toggles)
├── meta.json # Export timestamp, tool version
├── context/
│ ├── project.json # Project name, path, geodatabases
│ ├── maps.json # Map names, spatial references, scales
│ ├── layers.json # Full layer details with field schemas
│ ├── tables.json # Standalone tables
│ ├── connections.json # Database connections
│ ├── layouts.json # Print layouts
│ └── notebooks.json # Jupyter notebooks
├── images/
│ ├── map_*.png # Screenshots of each map view
│ └── layout_*.png # Screenshots of each layout
└── snapshot/
├── context.md # Human-readable summary
├── project-structure.mmd # Mermaid diagram source
└── project-structure.md # Mermaid diagram markdown
The AGENTS.md file teaches AI agents how to use the CLI and interpret the exported data; no user explanation needed.
Configuration
Edit .arcgispro/config.yml to control export behavior:
# Auto-export on project open (default: false)
autoExportEnabled: false
autoExportLocalOnly: true # Skip network drives
autoExportMaxLayers: 50 # Safety limit
# Content toggles
exportImages: true # Map/layout screenshots
exportNotebooks: true # Jupyter notebook metadata
exportFields: true # Layer field schemas
Claude Code / Copilot CLI / Gemini CLI
These tools can read files and run commands in your working directory. Navigate to your ArcGIS Pro project folder and start your AI session:
cd /path/to/your/project
claude # or: copilot, gemini
Example prompts:
What layers are in this project?
> AI runs: arcgispro layers
What fields are in the Parcels layer?
> AI runs: arcgispro fields "Parcels"
Which layers have broken data sources?
> AI runs: arcgispro layers --broken
Give me the full project context
> AI runs: arcgispro context
Look at the map screenshot and describe what you see
> AI reads: .arcgispro/images/map_*.png
Tips for Best Results
-
Click Snapshot in Pro before starting your AI session - ensures context is fresh
-
Ask naturally - the CLI commands map to common questions:
- "What layers do I have?" →
arcgispro layers - "Tell me about the Parcels layer" →
arcgispro layer Parcels - "What's the schema?" →
arcgispro fields Parcels
- "What layers do I have?" →
-
Use
--jsonfor programmatic access - AI can parse structured output:arcgispro layers --json arcgispro layer "Parcels" --json
-
Check images for visual context - map screenshots help AI understand spatial data
-
Be bold. Try pasting in a question you'd normally answer by working in ArcGIS Pro manually.
- "Jeff wants an updated map of the project area with an imagery basemap instead of streets"
- AI generates a (working) python script that exports the PDF directly, using your existing map and layout. You get to go to lunch early, and get a raise.
- "Jeff wants an updated map of the project area with an imagery basemap instead of streets"
Custom Agent Integration
The JSON files are designed for programmatic access:
import json
from pathlib import Path
context_dir = Path(".arcgispro/context")
layers = json.loads((context_dir / "layers.json").read_text(encoding="utf-8-sig"))
for layer in layers:
print(f"{layer['name']}: {layer.get('featureCount', 'N/A')} features")
for field in layer.get('fields', []):
print(f" - {field['name']} ({field['fieldType']})")
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file arcgispro_cli-0.4.0.tar.gz.
File metadata
- Download URL: arcgispro_cli-0.4.0.tar.gz
- Upload date:
- Size: 115.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
50eff4163511471eeae41f735654332538a2faaa139376e46898b726924c28c3
|
|
| MD5 |
18e08cabc66840ebdb19ce5c1d4f86dc
|
|
| BLAKE2b-256 |
0b08141285d2e571b625b1667f491a04ec30a6f4a7cc16467b66019886461ac2
|
Provenance
The following attestation bundles were made for arcgispro_cli-0.4.0.tar.gz:
Publisher:
release.yml on danmaps/arcgispro_cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
arcgispro_cli-0.4.0.tar.gz -
Subject digest:
50eff4163511471eeae41f735654332538a2faaa139376e46898b726924c28c3 - Sigstore transparency entry: 971246054
- Sigstore integration time:
-
Permalink:
danmaps/arcgispro_cli@f7a1d4f99d594ccc03c64ed6b5dd489f38c723f5 -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/danmaps
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@f7a1d4f99d594ccc03c64ed6b5dd489f38c723f5 -
Trigger Event:
release
-
Statement type:
File details
Details for the file arcgispro_cli-0.4.0-py3-none-any.whl.
File metadata
- Download URL: arcgispro_cli-0.4.0-py3-none-any.whl
- Upload date:
- Size: 124.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9811b207ca665bb932e32865d16527b9c033a02498ec38afd589c7b460bfd846
|
|
| MD5 |
2eff10e617a2facee05f66c4a107f4a7
|
|
| BLAKE2b-256 |
0c8ad6c6130d7855269e9f761f9e7a29ffce81c8512ecae5ce010cabfdc3f35b
|
Provenance
The following attestation bundles were made for arcgispro_cli-0.4.0-py3-none-any.whl:
Publisher:
release.yml on danmaps/arcgispro_cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
arcgispro_cli-0.4.0-py3-none-any.whl -
Subject digest:
9811b207ca665bb932e32865d16527b9c033a02498ec38afd589c7b460bfd846 - Sigstore transparency entry: 971246067
- Sigstore integration time:
-
Permalink:
danmaps/arcgispro_cli@f7a1d4f99d594ccc03c64ed6b5dd489f38c723f5 -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/danmaps
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@f7a1d4f99d594ccc03c64ed6b5dd489f38c723f5 -
Trigger Event:
release
-
Statement type: