Metadata-Version: 2.4
Name: ChatUV
Version: 0.1.3
Summary: ChatUV: bootstrap uv-based Python environments from low-version Python shells
Author-email: ChatArch <1073853456@qq.com>
License: MIT
Keywords: chatuv
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Requires-Python: >=3.6
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: click<9.0,>=8.0; python_version >= "3.10"
Requires-Dist: chatstyle<0.3.0,>=0.2.0; python_version >= "3.10"
Provides-Extra: dev
Requires-Dist: build; extra == "dev"
Requires-Dist: pytest; extra == "dev"
Requires-Dist: twine; extra == "dev"
Dynamic: license-file

# ChatUV

ChatUV bootstraps uv-based Python environments from low-version Python shells. It is a small standalone helper for the first step: install or find `uv`, install a requested Python runtime through `uv`, create a seeded virtual environment, and optionally make future shells auto-activate that environment.

## Quick Start

```bash
pip install ChatUV
chatuv setup
chatuv --version
chatuv --tree
chatuv --tree-brief
```

By default, `chatuv setup` creates `~/.chatarch/venv` with Python `3.12` and pip:

```bash
chatuv setup --venv ~/.chatarch/venv --python 3.12
```

Useful options:

```bash
chatuv setup --force                 # recreate an existing target venv
chatuv setup --uv-path /path/to/uv    # use a specific uv binary
chatuv setup --dry-run                # print planned commands only
chatuv setup --no-activate            # do not edit shell rc files
```

When shell activation is enabled, ChatUV appends or updates a marked source block in existing `~/.zshrc` and `~/.bashrc` files. It does not create those files when they are missing.

## CLI Tree

On Python 3.10 and newer, ChatUV uses ChatStyle's registered Click tree runtime. The full tree includes the real setup signature:

```text
chatuv
├── --help  # Show this message and exit.
├── --version  # Show the version and exit.
├── --tree  # Print the registered CLI tree and exit.
├── --tree-brief  # Print the registered CLI tree without parameter signatures and exit.
└── setup [--venv VENV] [--python PYTHON-VERSION] [--uv-path UV-PATH] [--force] [--no-activate] [--dry-run]  # Install uv and create a seeded venv; writes files unless --dry-run.
```

The brief tree keeps the same command surface without setup parameters:

```text
chatuv
├── --help  # Show this message and exit.
├── --version  # Show the version and exit.
├── --tree  # Print the registered CLI tree and exit.
├── --tree-brief  # Print the registered CLI tree without parameter signatures and exit.
└── setup  # Install uv and create a seeded venv; writes files unless --dry-run.
```

## Compatibility

ChatUV targets Python 3.6 and newer so it can be installed from older Python shells before bootstrapping newer uv-managed environments. Python 3.6-3.9 use a dependency-free standard-library fallback that provides `--help`, `--version`, and `setup`. Python 3.10 and newer install bounded Click and `chatstyle>=0.2.0,<0.3.0` dependencies and additionally provide the shared `--tree` and `--tree-brief` contract.
