Metadata-Version: 2.4
Name: opengeolab-geocopilot
Version: 0.2.11
Summary: GeoCopilot: a Codex-powered geospatial research agent for JupyterLab
Project-URL: Homepage, https://github.com/Zhoums396/GeoCopilot
Project-URL: Repository, https://github.com/Zhoums396/GeoCopilot
Project-URL: Issues, https://github.com/Zhoums396/GeoCopilot/issues
Author: OpenGMS Team
License: MIT License
        
        Copyright (c) 2026 OpenGMS Team
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Keywords: agent,codex,geoai,geospatial,jupyterlab,opengms
Classifier: Framework :: Jupyter
Classifier: Framework :: Jupyter :: JupyterLab
Classifier: Framework :: Jupyter :: JupyterLab :: 4
Classifier: Framework :: Jupyter :: JupyterLab :: Extensions
Classifier: Framework :: Jupyter :: JupyterLab :: Extensions :: Prebuilt
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.9
Requires-Dist: jupyter-server<3,>=2.0.0
Requires-Dist: jupyterlab<5,>=4.0.0
Requires-Dist: nbclient>=0.8
Requires-Dist: nbformat>=5.0
Provides-Extra: release
Requires-Dist: build>=1.2; extra == 'release'
Requires-Dist: twine>=5; extra == 'release'
Description-Content-Type: text/markdown

# GeoCopilot for JupyterLab

GeoCopilot is a Codex-powered geospatial research agent embedded in the right side of JupyterLab.
The Python distribution installs all three parts together:

- the prebuilt JupyterLab 4 frontend extension;
- the Jupyter Server backend and notebook execution tools;
- the bundled OpenGMS platform skill, activated only by an explicit user request.

## Install

GeoCopilot requires Python 3.9 or later, JupyterLab 4, Node.js, and the Codex CLI.

```bash
npm install -g @openai/codex
python -m pip install opengeolab-geocopilot
```

Open GeoCopilot in JupyterLab and select the settings button in the panel header. Enter the API key,
base URL, and model in the **LLM settings** dialog. The key is stored for the current Jupyter user in
`~/.jupyter/geocopilot/settings.json` with owner-only permissions, is never returned to the browser,
and is applied to new tasks immediately.

Environment variables remain available for managed deployments:

```bash
export OPENAI_API_KEY="your-api-key"
export JUPYTER_AGENT_CODEX_MODEL="gpt-5-mini"
# Optional for an OpenAI-compatible gateway:
export JUPYTER_AGENT_CODEX_BASE_URL="https://example.com/v1"

jupyter lab
```

The package automatically enables its Jupyter Server Extension. Verify the installation with:

```bash
jupyter labextension list
jupyter server extension list
opengms-notebook --help
```

## Install In A Docker Image

For an existing JupyterLab 4 image, install the Codex CLI and this package during the image build:

```dockerfile
RUN npm install -g @openai/codex \
&& python -m pip install --no-cache-dir opengeolab-geocopilot==0.2.11
```

API keys and provider URLs must not be stored in the image. They can be entered through the GeoCopilot
settings dialog after launch or injected at container startup for managed deployments. Settings entered
through the UI are local runtime data and are not included in the Python package or Docker image.
OpenGMS model and data-method discovery, metadata lookup, and execution use the public OpenGeoLab API
gateway at `https://geomodeling.njnu.edu.cn/OpenGeoLab` by default. Set `OPENGEOLAB_API_URL` only to
override that gateway for a private OpenGeoLab deployment.

## Build A Release

Install release tooling and run the checked release builder:

```bash
python -m pip install -e ".[release]"
./scripts/build-release.sh
```

The wheel and source archive are written to `dist/<version>/`. Test an unpublished release with a fresh
environment or TestPyPI before uploading it to PyPI.

## Publish

Create an API token in PyPI and keep it outside the repository:

```bash
export TWINE_USERNAME=__token__
export TWINE_PASSWORD="pypi-your-token"
python -m twine upload dist/0.2.11/*
```

After publication, downstream systems only need the installation command shown above. A new package
version must be published for every update because PyPI does not allow replacing an existing release.
