Zetten
Zetten is an open-source, Python-native task runner written in Rust designed to replace monolithic Makefiles. It provides sub-10ms startup, discovers active virtual environments automatically without shell initialization, and outputs structured execution logs suitable for both human developers and AI coding agents.
On projects mixing Python services, frontend assets, and Docker containers, Makefiles quickly devolve into fragile 200-line shell wrappers with awkward syntax and file-timestamp bugs. Meanwhile, wrappers like poetry run or pipenv run add noticeable startup latency (~800ms) on every invocation. I wanted a fast, standalone binary that parses project metadata natively, tracks explicit task dependencies in a clean DAG, and yields deterministic, agent-parseable JSON or clean text output.
CLI Command (e.g., 'zetten run test')
│
▼
┌──────────────────┐
│ Rust CLI Core │ ◄─── Configuration (zetten.toml)
└─────────┬────────┘
│
Project Detection
▼
┌──────────────────────────────────────────────┐
│ Environment Resolver │
│ ├─ Inspects pyproject.toml / uv.lock │
│ ├─ Discovers active .venv without shell init │
│ └─ Builds directed acyclic task graph (DAG) │
└─────────────────┬────────────────────────────┘
│
Task Execution
▼
┌──────────────────────────────────────────────┐
│ Fast Process Runner │
│ ├─ Sub-10ms cold launch │
│ ├─ Strict environment isolation │
│ └─ Structured stream (human / agent modes) │
└──────────────────────────────────────────────┘# Explicit, typed task dependencies with automatic .venv binding
[tasks.test]
description = "Run unit & integration test suite"
command = "pytest tests/ -v --color=no"
deps = ["lint"]
env = { PYTHONUNBUFFERED = "1" }
[tasks.lint]
description = "Ruff linting and formatting check"
command = "ruff check . && ruff format --check ."Handling edge cases in cross-platform virtualenv detection was surprisingly subtle: Windows virtualenv structures differ from POSIX paths, and nested virtualenvs created by uv, poetry, and conda each have distinct activation semantics. I also learned that AI coding agents require deterministic task feedback; passing ANSI color codes or unstructured stdout makes LLM tooling loops hallucinate and misinterpret test failure boundaries.
- Cold startup latency:
6.8ms(benchmarked via hyperfine against make at 2.1ms and poetry run at ~820ms) - Binary footprint:
4.2MB(statically linked Rust binary with zero external runtime dependencies) - Incremental evaluation:
< 1ms(DAG validation and dependency resolution before task dispatch)
- Documentation: docs.zetten.in ↗
- GitHub Repository: github.com/amit-devb/zetten ↗