Metadata-Version: 2.4
Name: pico-tool-common
Version: 0.1.1
Summary: Shared scaffolding for PICO dev tools (runners, ports, console helpers)
Author: chenxin199305
License: MIT
License-File: LICENSE
Keywords: cli,pico,robotics,utilities
Classifier: Environment :: Web Environment
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering
Requires-Python: >=3.10
Requires-Dist: fastapi>=0.100
Requires-Dist: mujoco>=3.0
Requires-Dist: numpy>=1.24
Requires-Dist: pillow>=10.0
Requires-Dist: pydantic>=2.0
Requires-Dist: rich>=13
Requires-Dist: typer>=0.12
Requires-Dist: uvicorn>=0.20
Requires-Dist: websockets>=12.0
Description-Content-Type: text/markdown

# tools/common — `pico_tool_common`

Shared Python scaffolding for the PICO dev tools under `tools/*`.

## Why

Every tool used to duplicate the same boilerplate: console helpers, default ports,
repo-root discovery, uvicorn runners, Vite/npm orchestration, etc. This package
consolidates that logic so bug fixes and UX improvements propagate to all tools.

## What lives here

| Module | Purpose |
|--------|---------|
| `pico_tool_common.console` | Shared `rich` console instance |
| `pico_tool_common.ports` | Canonical default ports for every tool |
| `pico_tool_common.fs` | `find_repo_root`, `normalize_path` |
| `pico_tool_common.web.runner` | `run_app()` for FastAPI/uvicorn tools |
| `pico_tool_common.vite` | `run_vite()` for Vite-based WASM tools |

## Development

Each tool consumes this package as an editable path dependency:

```toml
[project]
dependencies = ["pico-tool-common", ...]

[tool.uv.sources]
pico-tool-common = { path = "../common", editable = true }
```

## Release

`pico tool release <tool>` builds the common wheel alongside the tool wheel and
embeds both URLs in the generated install script, so standalone installs keep
working without publishing to PyPI.
