Metadata-Version: 2.4
Name: esys-tools
Version: 0.2.0
Summary: Install and update catalogued LibESys command-line tools
Author: Project maintainers
License-Expression: MIT
Requires-Python: >=3.11
Description-Content-Type: text/markdown
Requires-Dist: typer>=0.12
Provides-Extra: dev
Requires-Dist: pre-commit>=4.0; extra == "dev"
Requires-Dist: pytest>=8.0; extra == "dev"
Requires-Dist: ruff>=0.8; extra == "dev"

# esys-tools

Control plane for installing, updating, listing, and removing native LibESys
command-line tools. It extends [esysrepo-ctl](https://gitlab.com/libesys/esysrepo/esysrepo-ctl),
which does this for `esysrepo` alone. Which other tools qualify is a Git
catalog, not a guess from the organization: `libesys/tools/esys-tools-catalog`.

Native commands stay the tool's own commands. For `esysrepo` those are
`esysrepo` and `erepo`. This package only manages lifecycle.

The decisions are Accepted ADRs under `docs/adr/`. `esysrepo` is the first
catalog entry and keeps the esysrepo-ctl package names:
`esysrepo-cli-static` by default, `esysrepo-cli` with `--linkage shared`.

## Install

```bash
pipx install esys-tools
```

Or from a development checkout:

```bash
python -m pip install -e ".[dev]"
```

`esys-tools` and `etools` are the same command.

The host needs Python with a working `venv` module. Conan is installed into a
venv this tool manages. See `docs/adr/0008-three-python-env-modes.md`.

```bash
# Interactive: detect mode, confirm, persist
esys-tools install esysrepo

# Non-interactive installer-like install
esys-tools install esysrepo --mode managed --yes

# Project-private: activate the project venv first
esys-tools install esysrepo --mode project --yes
```

| Mode | Conan lives in | Native wrappers |
|------|----------------|-----------------|
| `project` | Active project venv | That venv's `bin` / `Scripts` |
| `pipx` | Managed home venv | Managed `…/esys-tools/bin` |
| `managed` | Managed home venv | Managed `…/esys-tools/bin` |

Overrides: `ESYS_TOOLS_MODE`, `ESYS_TOOLS_YES=1`, `--reconfigure`. The choice is
stored under `ESYS_TOOLS_HOME` or the platform data directory.

## Commands

| Command | Purpose |
|---------|---------|
| `install <tool>` | Install that tool's native CLI via Conan |
| `update <tool>` | Update it; may install it when missing |
| `list` | List tools in the catalog |
| `list <tool>` | List Conan versions of that tool |
| `remove <tool>` | Remove that tool's selected Conan package |
| `doctor` | Diagnose environment, catalog revision, and wrappers |
| `paths` | Print the data directory and catalog checkout |
| `version` | Print the control-plane version and installed tools |
| `catalog update` | Refresh the catalog without installing |

```bash
esys-tools --help
esys-tools --version
esys-tools list
esys-tools list esysrepo
esys-tools list esysrepo --dev
esys-tools install esysrepo --linkage shared
esys-tools install esysrepo --channel center
esys-tools update esysrepo
esys-tools doctor
esys-tools paths
esys-tools remove esysrepo
```

There is no default tool. `update <tool>` is the command that may auto-install.
Disable that with `--no-bootstrap`, `--strict`, or `CI=true`.

## Documentation

- [docs/adr/INDEX.md](docs/adr/INDEX.md) — decisions
- [docs/architecture/overview.md](docs/architecture/overview.md) — scope and structure
- [docs/asr/README.md](docs/asr/README.md) — quality requirements
