Skip to main content

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

How It Works

Add-in exports. CLI queries.

  1. Open a project in ArcGIS Pro
  2. Click Snapshot in the CLI ribbon tab
  3. 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

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 agp instead (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 .arcgispro/ folder contains:

.arcgispro/
├── AGENTS.md              # AI agent skill file (start here!)
├── 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

The AGENTS.md file teaches AI agents how to use the CLI and interpret the exported data — no user explanation needed.

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

  1. Click Snapshot in Pro before starting your AI session - ensures context is fresh

  2. 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
  3. Use --json for programmatic access - AI can parse structured output:

    arcgispro layers --json
    arcgispro layer "Parcels" --json
    
  4. Check images for visual context - map screenshots help AI understand spatial data

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.3.1.tar.gz (104.2 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.3.1-py3-none-any.whl (109.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: arcgispro_cli-0.3.1.tar.gz
  • Upload date:
  • Size: 104.2 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.3.1.tar.gz
Algorithm Hash digest
SHA256 398089a3abdbff2d669e24491b096ccd49655aa75b48b1704e00e4ca621e017a
MD5 66138639e438a1e00c848166ded003b4
BLAKE2b-256 be552f78dc2f741bd1dcb20f8c03b9d314ce6ab572e1354fc1ee2bb5c5ffd7c6

See more details on using hashes here.

Provenance

The following attestation bundles were made for arcgispro_cli-0.3.1.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.3.1-py3-none-any.whl.

File metadata

  • Download URL: arcgispro_cli-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 109.7 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.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 068d6efb90b0cd550b11523392a645a127c9034db7dd850c6e16122c06578175
MD5 7070ca4a23259ec34756c3d045e676a5
BLAKE2b-256 81982b4f55723cc751fcdf9dd103d4267074b0500c236c4d48ddd33a27938c74

See more details on using hashes here.

Provenance

The following attestation bundles were made for arcgispro_cli-0.3.1-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