# jasper0122/cli-anything-arcgis-pro architecture

> Architecture diagram of the GitHub repository jasper0122/cli-anything-arcgis-pro, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-22). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/jasper0122/cli-anything-arcgis-pro
- Repository: https://github.com/jasper0122/cli-anything-arcgis-pro

## Overview

CLI-Anything ArcGIS Pro provides two ways for an agent to operate GIS projects: a headless ArcPy CLI for on-disk projects and data, and an MCP server that controls an open ArcGIS Pro session through an in-process .NET add-in. The headless workflow can inspect or edit data, run geoprocessing, author maps, and export layouts; these are separate CLI commands, not an internally chained pipeline. Shared output handling and destructive-operation guards support the commands. The live bridge’s documented HTTP path is shown; unsampled MCP-server and add-in details are not inferred beyond that documentation.

Main entry points: [`cli_anything_arcgis_pro/__main__.py`](https://github.com/jasper0122/cli-anything-arcgis-pro/blob/main/cli_anything_arcgis_pro/__main__.py) (CLI Entry), [`cli_anything_arcgis_pro/_io.py`](https://github.com/jasper0122/cli-anything-arcgis-pro/blob/main/cli_anything_arcgis_pro/_io.py) (JSON And Error Output), [`cli_anything_arcgis_pro/cmd_data.py`](https://github.com/jasper0122/cli-anything-arcgis-pro/blob/main/cli_anything_arcgis_pro/cmd_data.py) (Data Query And Edit), [`cli_anything_arcgis_pro/cmd_gp.py`](https://github.com/jasper0122/cli-anything-arcgis-pro/blob/main/cli_anything_arcgis_pro/cmd_gp.py) (Geoprocessing)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_headless["Headless ArcPy CLI"]
  node_cli["CLI Entry<br/>[__main__.py]"]
  node_project["Project Inspection<br/>[cmd_project.py]"]
  node_info["Runtime Info<br/>[cmd_info.py]"]
  node_data["Data Query And Edit<br/>[cmd_data.py]"]
  node_gp["Geoprocessing<br/>[cmd_gp.py]"]
end

subgraph group_cartography["Map And Publication"]
  node_batch["Batch Layout Export<br/>[cmd_batch.py]"]
  node_map["Map Authoring<br/>[cmd_map.py]"]
  node_layout["Layout And Map Series<br/>[cmd_layout.py]"]
end

subgraph group_live["Live MCP Bridge"]
  node_mcp["MCP Server<br/>[mcp_server.py]"]
  node_addin["In-Process Add-In<br/>[BridgeServer.cs]"]
  node_addin_start["Add-In Startup<br/>[Module1.cs]"]
end

subgraph group_shared["Shared CLI Support"]
  node_io["JSON And Error Output<br/>[_io.py]"]
  node_safety["Destructive-Action Guard<br/>[_safety.py]"]
end

node_agent(("AI Agent"))
node_arcpy["ArcPy Runtime"]
node_live_project["Open ArcGIS Pro Project"]

node_agent -->|"runs commands"| node_cli
node_cli -->|"dispatches"| node_project
node_cli -->|"dispatches"| node_info
node_cli -->|"dispatches"| node_data
node_cli -->|"dispatches"| node_gp
node_cli -->|"dispatches"| node_batch
node_cli -->|"dispatches"| node_map
node_cli -->|"dispatches"| node_layout
node_cli -->|"self-dispatches to"| node_arcpy
node_project -->|"inspects projects"| node_arcpy
node_info -->|"checks runtime"| node_arcpy
node_data -->|"queries and edits"| node_arcpy
node_gp -->|"runs tools"| node_arcpy
node_map -->|"authors maps"| node_arcpy
node_layout -->|"exports layouts"| node_arcpy
node_batch -->|"exports project layouts"| node_arcpy
node_project -->|"formats results"| node_io
node_info -->|"formats results"| node_io
node_data -->|"formats results"| node_io
node_gp -->|"formats results"| node_io
node_map -->|"formats results"| node_io
node_layout -->|"formats results"| node_io
node_batch -->|"formats results"| node_io
node_gp -->|"guards tools"| node_safety
node_data -->|"guards expressions"| node_safety
node_batch -->|"reuses export settings"| node_layout
node_agent -->|"calls MCP tools"| node_mcp
node_mcp -->|"sends HTTP requests"| node_addin
node_addin_start -->|"starts bridge"| node_addin
node_addin -->|"dispatches project tasks"| node_live_project

click node_cli "https://github.com/jasper0122/cli-anything-arcgis-pro/blob/main/cli_anything_arcgis_pro/__main__.py"
click node_project "https://github.com/jasper0122/cli-anything-arcgis-pro/blob/main/cli_anything_arcgis_pro/cmd_project.py"
click node_info "https://github.com/jasper0122/cli-anything-arcgis-pro/blob/main/cli_anything_arcgis_pro/cmd_info.py"
click node_data "https://github.com/jasper0122/cli-anything-arcgis-pro/blob/main/cli_anything_arcgis_pro/cmd_data.py"
click node_gp "https://github.com/jasper0122/cli-anything-arcgis-pro/blob/main/cli_anything_arcgis_pro/cmd_gp.py"
click node_batch "https://github.com/jasper0122/cli-anything-arcgis-pro/blob/main/cli_anything_arcgis_pro/cmd_batch.py"
click node_map "https://github.com/jasper0122/cli-anything-arcgis-pro/blob/main/cli_anything_arcgis_pro/cmd_map.py"
click node_layout "https://github.com/jasper0122/cli-anything-arcgis-pro/blob/main/cli_anything_arcgis_pro/cmd_layout.py"
click node_io "https://github.com/jasper0122/cli-anything-arcgis-pro/blob/main/cli_anything_arcgis_pro/_io.py"
click node_safety "https://github.com/jasper0122/cli-anything-arcgis-pro/blob/main/cli_anything_arcgis_pro/_safety.py"
click node_mcp "https://github.com/jasper0122/cli-anything-arcgis-pro/blob/main/live-bridge/mcp_server.py"
click node_addin "https://github.com/jasper0122/cli-anything-arcgis-pro/blob/main/live-bridge/ProSimpleMapExport/BridgeServer.cs"
click node_addin_start "https://github.com/jasper0122/cli-anything-arcgis-pro/blob/main/live-bridge/ProSimpleMapExport/Module1.cs"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_cli,node_project,node_info,node_data,node_gp toneBlue
class node_batch,node_map,node_layout toneAmber
class node_mcp,node_addin,node_addin_start toneMint
class node_io,node_safety toneRose
class node_agent,node_arcpy,node_live_project toneIndigo
```

## Components

### Headless ArcPy CLI

- [CLI Entry](https://github.com/jasper0122/cli-anything-arcgis-pro/blob/main/cli_anything_arcgis_pro/__main__.py): `cli_anything_arcgis_pro/__main__.py`
- [Project Inspection](https://github.com/jasper0122/cli-anything-arcgis-pro/blob/main/cli_anything_arcgis_pro/cmd_project.py): `cli_anything_arcgis_pro/cmd_project.py`
- [Runtime Info](https://github.com/jasper0122/cli-anything-arcgis-pro/blob/main/cli_anything_arcgis_pro/cmd_info.py): `cli_anything_arcgis_pro/cmd_info.py`
- [Data Query And Edit](https://github.com/jasper0122/cli-anything-arcgis-pro/blob/main/cli_anything_arcgis_pro/cmd_data.py): `cli_anything_arcgis_pro/cmd_data.py`
- [Geoprocessing](https://github.com/jasper0122/cli-anything-arcgis-pro/blob/main/cli_anything_arcgis_pro/cmd_gp.py): `cli_anything_arcgis_pro/cmd_gp.py`

### Map And Publication

- [Batch Layout Export](https://github.com/jasper0122/cli-anything-arcgis-pro/blob/main/cli_anything_arcgis_pro/cmd_batch.py): `cli_anything_arcgis_pro/cmd_batch.py`
- [Map Authoring](https://github.com/jasper0122/cli-anything-arcgis-pro/blob/main/cli_anything_arcgis_pro/cmd_map.py): `cli_anything_arcgis_pro/cmd_map.py`
- [Layout And Map Series](https://github.com/jasper0122/cli-anything-arcgis-pro/blob/main/cli_anything_arcgis_pro/cmd_layout.py): `cli_anything_arcgis_pro/cmd_layout.py`

### Live MCP Bridge

- [MCP Server](https://github.com/jasper0122/cli-anything-arcgis-pro/blob/main/live-bridge/mcp_server.py): `live-bridge/mcp_server.py`
- [In-Process Add-In](https://github.com/jasper0122/cli-anything-arcgis-pro/blob/main/live-bridge/ProSimpleMapExport/BridgeServer.cs): `live-bridge/ProSimpleMapExport/BridgeServer.cs`
- [Add-In Startup](https://github.com/jasper0122/cli-anything-arcgis-pro/blob/main/live-bridge/ProSimpleMapExport/Module1.cs): `live-bridge/ProSimpleMapExport/Module1.cs`

### Shared CLI Support

- [JSON And Error Output](https://github.com/jasper0122/cli-anything-arcgis-pro/blob/main/cli_anything_arcgis_pro/_io.py): `cli_anything_arcgis_pro/_io.py`
- [Destructive-Action Guard](https://github.com/jasper0122/cli-anything-arcgis-pro/blob/main/cli_anything_arcgis_pro/_safety.py): `cli_anything_arcgis_pro/_safety.py`

### Other components

- **AI Agent**
- **ArcPy Runtime**
- **Open ArcGIS Pro Project**

## Connections

- AI Agent → CLI Entry: runs commands (evidence: `README.md`)
- CLI Entry → Project Inspection: dispatches (evidence: `cli_anything_arcgis_pro/__main__.py`)
- CLI Entry → Runtime Info: dispatches (evidence: `cli_anything_arcgis_pro/__main__.py`)
- CLI Entry → Data Query And Edit: dispatches (evidence: `cli_anything_arcgis_pro/__main__.py`)
- CLI Entry → Geoprocessing: dispatches (evidence: `cli_anything_arcgis_pro/__main__.py`)
- CLI Entry → Batch Layout Export: dispatches (evidence: `cli_anything_arcgis_pro/__main__.py`)
- CLI Entry → Map Authoring: dispatches (evidence: `cli_anything_arcgis_pro/__main__.py`)
- CLI Entry → Layout And Map Series: dispatches (evidence: `cli_anything_arcgis_pro/__main__.py`)
- CLI Entry → ArcPy Runtime: self-dispatches to (evidence: `cli_anything_arcgis_pro/__main__.py`)
- Project Inspection → ArcPy Runtime: inspects projects (evidence: `cli_anything_arcgis_pro/cmd_project.py`)
- Runtime Info → ArcPy Runtime: checks runtime (evidence: `cli_anything_arcgis_pro/cmd_info.py`)
- Data Query And Edit → ArcPy Runtime: queries and edits (evidence: `cli_anything_arcgis_pro/cmd_data.py`)
- Geoprocessing → ArcPy Runtime: runs tools (evidence: `cli_anything_arcgis_pro/cmd_gp.py`)
- Map Authoring → ArcPy Runtime: authors maps (evidence: `cli_anything_arcgis_pro/cmd_map.py`)
- Layout And Map Series → ArcPy Runtime: exports layouts (evidence: `cli_anything_arcgis_pro/cmd_layout.py`)
- Batch Layout Export → ArcPy Runtime: exports project layouts (evidence: `cli_anything_arcgis_pro/cmd_batch.py`)
- Project Inspection → JSON And Error Output: formats results (evidence: `cli_anything_arcgis_pro/cmd_project.py`)
- Runtime Info → JSON And Error Output: formats results (evidence: `cli_anything_arcgis_pro/cmd_info.py`)
- Data Query And Edit → JSON And Error Output: formats results (evidence: `cli_anything_arcgis_pro/cmd_data.py`)
- Geoprocessing → JSON And Error Output: formats results (evidence: `cli_anything_arcgis_pro/cmd_gp.py`)
- Map Authoring → JSON And Error Output: formats results (evidence: `cli_anything_arcgis_pro/cmd_map.py`)
- Layout And Map Series → JSON And Error Output: formats results (evidence: `cli_anything_arcgis_pro/cmd_layout.py`)
- Batch Layout Export → JSON And Error Output: formats results (evidence: `cli_anything_arcgis_pro/cmd_batch.py`)
- Geoprocessing → Destructive-Action Guard: guards tools (evidence: `cli_anything_arcgis_pro/cmd_gp.py`)
- Data Query And Edit → Destructive-Action Guard: guards expressions (evidence: `cli_anything_arcgis_pro/cmd_data.py`)
- Batch Layout Export → Layout And Map Series: reuses export settings (evidence: `cli_anything_arcgis_pro/cmd_batch.py`)
- AI Agent → MCP Server: calls MCP tools (evidence: `README.md`)
- MCP Server → In-Process Add-In: sends HTTP requests (evidence: `README.md`)
- Add-In Startup → In-Process Add-In: starts bridge (evidence: `live-bridge/ProSimpleMapExport/Module1.cs`)
- In-Process Add-In → Open ArcGIS Pro Project: dispatches project tasks (evidence: `live-bridge/ProSimpleMapExport/BridgeServer.cs`)
