Skip to content

tyc add / remove / sync

tyc add PACKAGE[@VERSION]... [--dev] [--no-sync] [--dir DIR]
tyc remove PACKAGE... [--dev] [--no-sync] [--dir DIR]
tyc sync [PATH] [--dry-run]

Rewrites [dependencies] / [dev-dependencies] in typhon.toml, generates a pyproject.toml, and shells out to uv for the install step. uv itself is not bundled — if missing, the manifest still updates and the command prints “install uv to complete”.

Examples

Terminal window
tyc add requests # add a runtime dep at the latest version
tyc add httpx@0.27 # add at a specific version
tyc add --dev pytest@8.2 # dev dep
tyc add mylib@git+https://github.com/me/mylib@v1 # PEP 508 direct reference
tyc remove rich # remove
tyc sync # materialise pyproject.toml and `uv sync`
tyc sync --dry-run # preview the generated pyproject.toml
tyc add --no-sync foo # batch edits; finish with `tyc sync`

tyc add

Inserts the package into [dependencies] (or [dev-dependencies] with --dev) and runs tyc sync. The version selector follows uv’s conventions:

[dependencies]
requests = ">=2.31" # version range
rich = "*" # any version (bare name in tyc add)
httpx = "0.27" # bare version → "==0.27"
mylib = "git+https://github.com/me/mylib@v1" # URL → "mylib @ git+https://…"

A value containing :// (or starting with file:) is a PEP 508 direct reference and lands in pyproject.toml as name @ URL.

When pyproject.toml declares dynamic = ["version"], the merge leaves version to the build backend instead of writing the static [project] version beside it (which uv sync rejects).

tyc remove

Drops the package from [dependencies] (or [dev-dependencies] with --dev) and runs tyc sync.

tyc add and tyc remove update typhon.toml and pyproject.toml together. When pyproject.toml is a symlink or does not parse as TOML, the command fails before writing either file, so a failed tyc add never leaves the dependency half-added.

tyc sync

Materialises a pyproject.toml from typhon.toml’s [dependencies] / [dev-dependencies] and runs uv sync, pinned to the [python] target with --python. The generated pyproject.toml is overwritten on every sync (don’t hand-edit it).

--dry-run prints what would be written without writing.

When uv is missing

The manifest still updates. The command exits 0 but prints:

warning: `uv` is not installed; manifest updated but `uv sync` skipped
help: install uv from https://github.com/astral-sh/uv

Without uv you can still install dependencies with pip install -e . against the generated pyproject.toml, or migrate to uv later.

Why not bundle a resolver?

Dependency resolution for Python is a hard, evolving problem. uv is Astral’s resolver and the consensus best-in-class in 2026. Building our own would waste years of effort.

The tyc add / remove / sync surface is a thin manifest editor — its job is to keep typhon.toml and the generated pyproject.toml in sync. The actual install is uv’s.

Flags

FlagEffect
--devAdd to / remove from [dev-dependencies] instead of [dependencies].
--no-syncEdit the manifest only; don’t run uv sync.
--dir DIR (on add / remove)Project directory whose typhon.toml to edit. Default .. (tyc sync takes the project directory as its positional PATH.)
--dry-run (on sync)Print the generated pyproject.toml without writing or installing.

Where next