Skip to main content

CLI tool for inspecting ArcGIS Pro session exports

Project description

ArcGIS Pro CLI

Make ArcGIS Pro sessions observable for AI agents and automation tools.

Quick Start

pip install arcgispro-cli
arcgispro install

That's it! The install command launches the add-in installer. Click "Install Add-In" and restart ArcGIS Pro.

How It Works

  1. Open a project in ArcGIS Pro

  2. Click Snapshot in the ProExporter ribbon tab

  3. A .arcgispro/ folder is created next to your .aprx file containing:

    • Project metadata (maps, layouts, geodatabases)
    • Layer details (fields, feature counts, visibility, symbology type)
    • Standalone tables and data connections
    • Map/layout images as PNG
    • Markdown summaries for AI consumption
  4. Use the CLI to inspect exports:

    cd /path/to/your/project
    arcgispro inspect
    

CLI Commands

Command Description
arcgispro install Install the ProExporter add-in
arcgispro uninstall Show uninstall instructions
arcgispro inspect Print human-readable summary
arcgispro dump Validate context JSON files
arcgispro images Validate exported images
arcgispro snapshot Assemble full snapshot
arcgispro clean Remove generated files
arcgispro open Select active project

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. Here's how to use it with popular CLI-based agents.

What Gets Exported

When you click Snapshot in ArcGIS Pro, the .arcgispro/ folder contains:

.arcgispro/
├── 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
├── images/
│   ├── map_*.png          # Screenshots of each map view
│   └── layout_*.png       # Screenshots of each layout
└── snapshot/
    └── context.md         # Human-readable summary (best for AI)

Claude Code / Copilot CLI / Gemini CLI

These tools can read files from your working directory. Just navigate to your ArcGIS Pro project folder:

cd /path/to/your/project
arcgispro inspect   # Verify exports exist

# Then start your AI session
claude               # or: copilot, gemini

Example prompts:

Read .arcgispro/snapshot/context.md and summarize what layers are in this project.

Look at .arcgispro/context/layers.json and tell me which layers have 
more than 100,000 features.

Based on the field schemas in .arcgispro/context/layers.json, write a 
Python script using arcpy to calculate a new field.

Look at .arcgispro/images/map_Map.png and describe what you see.

Tips for Best Results

  1. Run arcgispro snapshot before starting your AI session - ensures context is fresh

  2. Point the agent to context.md first - it's a concise summary:

    Read .arcgispro/snapshot/context.md to understand my ArcGIS Pro project.
    
  3. Use layers.json for detailed field info - includes field names, types, and aliases:

    What fields are available in the "parcels" layer? Check .arcgispro/context/layers.json
    
  4. Share images for visual context - map screenshots help AI understand your data:

    Look at .arcgispro/images/map_Map.png - what type of data is being displayed?
    

Automated Workflows

You can script exports for CI/CD or batch processing:

# Export context from Pro (requires clicking Snapshot in Pro first)
# Then validate and use in automation:
arcgispro dump && arcgispro images && echo "Exports valid"

# Clean up after processing
arcgispro clean --all

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

arcgispro_cli-0.1.4.tar.gz (99.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

arcgispro_cli-0.1.4-py3-none-any.whl (102.9 kB view details)

Uploaded Python 3

File details

Details for the file arcgispro_cli-0.1.4.tar.gz.

File metadata

  • Download URL: arcgispro_cli-0.1.4.tar.gz
  • Upload date:
  • Size: 99.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for arcgispro_cli-0.1.4.tar.gz
Algorithm Hash digest
SHA256 40248e95a77165f874b9537a9e50f1d04b9017ac08e5aff0c8408690e842127c
MD5 15089b80e0ad4e5af5fd76012d18dafd
BLAKE2b-256 2957dc9ad4b7841e8e734bb7a91d4fafc1b1430b3ef7e7b40d9252bf40f03285

See more details on using hashes here.

Provenance

The following attestation bundles were made for arcgispro_cli-0.1.4.tar.gz:

Publisher: release.yml on danmaps/arcgispro_cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file arcgispro_cli-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: arcgispro_cli-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 102.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for arcgispro_cli-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 4666b7b26df5391392c3a1615074fd706e15bfe08e8129bbb762f13bd23860a2
MD5 30251ad7e2176d209a5a3451a12ab6e2
BLAKE2b-256 b1d7ea52d5f13d3e24ce9adc6702ff5298718cb70934cdd60f3ab0456df71db6

See more details on using hashes here.

Provenance

The following attestation bundles were made for arcgispro_cli-0.1.4-py3-none-any.whl:

Publisher: release.yml on danmaps/arcgispro_cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page