Metadata-Version: 2.4
Name: arcgispro_ai
Version: 0.0.6
Summary: ArcGIS Pro AI Tools
Author-email: Danny McVey <dannybmcvey@gmail.com>
Description-Content-Type: text/markdown
License-Expression: MIT
License-File: LICENSE
Project-URL: Home, https://github.com/danmaps/arcgispro_ai

# ArcGIS Pro AI Toolbox

<p align="center">
  <img src="docs/logo.png" alt="ArcGIS Pro AI Toolbox logo" height="80"/>
</p>

<p align="center">
  <img src="https://img.shields.io/pypi/dw/arcgispro_ai" alt="PyPI - Downloads">
</p>

<p align="center">
  <b>Your GIS, now AI‑supercharged.</b>
</p>

---

## Quick Links
- [GitHub](https://github.com/danmaps/arcgispro-ai-toolbox)
- [Docs](https://danmaps.github.io/arcgispro_ai/)

---

## Why ArcGIS Pro AI Toolbox?

<blockquote>
ArcGIS Pro AI Toolbox is the only BYOK, open‑source plugin that brings conversational AI, code generation, and prompt‑driven geoprocessing natively into ArcGIS Pro—no cloud hop, no proprietary credits.
</blockquote>

- Install in minutes. Prompt, generate, map—directly inside ArcGIS Pro.
- Works with OpenAI, Azure, Claude, DeepSeek, local LLMs, and more.
- BYOK: Bring your own API key, keep your data private.
- No cloud detour, no extra Esri credits, no code required.

---

## Key Tools

- <b>Add AI Generated Field</b>: Create rich text from attributes using AI.
- <b>Get Map Info</b>: Extract map context to JSON for smarter prompts.
- <b>Generate Python Code</b>: ArcPy snippets tuned to your map.
- <b>Create AI Feature Layer</b>: Describe data, get a layer.
- <b>Convert Text to Numeric</b>: Standardize messy columns fast.

---

## Installation

`pip install arcgispro_ai`

Set up the required environment variables for your chosen AI provider(s):

   ```batch
   setx OPENAI_API_KEY "your-key-here"
   setx AZURE_OPENAI_API_KEY "your-key-here"
   setx ANTHROPIC_API_KEY "your-key-here"
   setx DEEPSEEK_API_KEY "your-key-here"
   ```

### For local LLM setup

   - Deploy a compatible LLM server that implements the OpenAI chat completions API
   - Configure the endpoint URL in the tool interface (defaults to `http://localhost:8000`)

## Usage

1. Select your preferred AI provider from the dropdown in each tool
2. Configure any provider-specific settings (model, endpoint, etc.)
3. Enter your prompt or query
4. Execute the tool

Each tool will use the selected provider to generate responses, with automatic fallback to OpenAI if the selected provider is not configured.

## Supported AI Providers

- <b>OpenAI</b>: GPT-4 and more (requires `OPENAI_API_KEY`)
- <b>Azure OpenAI</b>: Microsoft-hosted (requires `AZURE_OPENAI_API_KEY`)
- <b>Claude (Anthropic)</b>: (requires `ANTHROPIC_API_KEY`)
- <b>DeepSeek</b>: (requires `DEEPSEEK_API_KEY`)
- <b>Local LLM</b>: No API key needed, OpenAI-compatible API
- <b>Wolfram Alpha</b>: For math/computation (requires `WOLFRAM_ALPHA_API_KEY`)

---

## Project Structure & Distribution Design

This project is organized for both maintainability and ease of distribution:

- **Modular Source Structure:**
  - The codebase is organized into multiple Python modules and packages (see `arcgispro_ai/` and `arcgispro_ai/toolboxes/`).
  - This modular design makes the code easy to maintain, test, and extend.
  - Utility functions, API clients, and tool logic are separated for clarity and reusability.

- **Monolithic `.pyt` for Distribution:**
  - For end users, a single-file, monolithic Python Toolbox (`.pyt`) is generated (e.g., `arcgispro_ai_0.0.3.pyt`).
  - This file contains all required code inlined—no dependencies on the rest of the repo structure.
  - Users can simply download the `.pyt` and add it to ArcGIS Pro, with no need to install Python packages or clone the repo.
  - The monolithic `.pyt` is auto-generated by the `build_monolithic_pyt.py` script, which inlines all code and strips out internal imports.
  - The version of the `.pyt` always matches the package version (from `setup.py`), ensuring consistency with PyPI releases.

**Summary:**
- Developers benefit from a clean, modular codebase.
- Users benefit from a simple, single-file download for ArcGIS Pro.

See `build_monolithic_pyt.py` for details on how the monolithic `.pyt` is built.

---

## Contributing

Make an issue or create a branch for your feature or bug fix, and submit a pull request.

---


