Skip to content

kfiramar/envctl

Repository files navigation

envctl

Create, test, compare, and spin up full worktree environments with their databases in seconds

Reinvent your coding workflow. Spin up many worktrees with correctly wired apps and supporting services, automatic port allocation to avoid conflicts, isolated databases, Redis, Supabase, and n8n, then manage everything from one CLI with logs, health checks, and parallel testing across trees.

Release 1.2.3 Python 3.12-3.14 Documentation Changelog Contributing License

README · Getting Started · Contributing · License

envctl is a global CLI for orchestrating full local development environments across one repository and many worktrees. It starts apps, assigns safe ports, wires dependencies, keeps each environment isolated, and gives you one place to operate the whole system.

This is the point where normal local development usually starts breaking down: two backends want the same port, one frontend points at the wrong API, a shared Redis or database leaks across branches, logs are split across terminals, and parallel implementations become difficult to compare safely.

envctl turns that into a deterministic workflow. It tracks runtime state per worktree, keeps service and dependency wiring isolated, and gives you a single command surface for startup, tests, logs, health, inspection, PR/review flows, and teardown. The result is faster iteration, fewer environment mistakes, and a much better base for both human and AI-assisted development.

Currently supported stack: the documented runtime is the Python engine. envctl currently supports Python backends, JavaScript frontends, multi-worktree orchestration, and built-in local service wiring for databases plus Redis, Supabase, and n8n.

Quick Start

# 1) Install envctl once so it is available in every shell
pipx install "git+https://github.com/kfiramar/envctl.git"
pipx ensurepath

# 2) Go to a target repo
cd /path/to/your-project

# 3a) Start one repo-local environment
#     If .envctl is missing, envctl opens the guided setup wizard.
envctl --main

# 3b) Or work from plans and let envctl manage worktrees for you
#     Use this when you want parallel implementations side by side.
mkdir -p todo/plans/backend
cat > todo/plans/backend/checkout.md <<'PLAN'
# Checkout Implementation Plan
PLAN

envctl --plan

That first interactive run is the normal setup path. The wizard writes the repo-local .envctl for you, whether you start in main mode or jump straight into plan-driven worktrees.

What envctl Is For

envctl is built to:

  • create and manage many worktrees with isolated local services
  • run and compare multiple implementations side by side
  • keep startup, logs, tests, inspection, and health checks behind one CLI
  • support high-throughput human and AI-assisted development workflows

Docs

Start here:

User docs:

Reference:

Operations and troubleshooting:

Developer docs:

Project docs:

Runtime Prerequisites

pipx installs envctl itself. Depending on the repo and workflow, you may also need:

  • git for repository detection, worktrees, commits, reviews, and PR preparation
  • docker for built-in local services such as databases, Redis, Supabase, and n8n
  • gh for GitHub PR creation flows
  • poetry for backend repositories that manage Python dependencies with Poetry
  • one JavaScript package manager for frontend apps:
    • bun, pnpm, yarn, or npm, depending on the repo

envctl bootstraps target-repo dependencies from the repo itself, so tools such as pytest are usually installed as part of the backend project rather than separately for envctl.

Configuration

envctl writes and maintains a repo-local .envctl.

  • On first interactive use, the setup wizard creates it for you.
  • Later, run envctl config to reopen the wizard and edit it safely.
  • docs/reference/.envctl.example is the reference file for managed keys and defaults, not the primary onboarding flow.

About

Create, test, compare, and spin up full worktree environments with their databases in seconds using envctl!

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages