--- name: devenv-init description: Scaffold a per-language devenv.sh project from Eotel/devenv-templates. Use when the user wants to set up a new Python (optionally with Django, FastAPI, or Flask), or future Node/Go/Rust development environment with reproducible Nix-based tooling. Wraps `nix flake init -t github:Eotel/devenv-templates` and patches feature toggles (direnv, delta, treefmt, git-hooks, postgres, mysql, redis, lsp, strict-types) plus Python version and project name in a single command. license: MIT --- # devenv-init Scaffold a reproducible per-language development environment in the current directory using [Eotel/devenv-templates](https://github.com/Eotel/devenv-templates). ## When to invoke User says any of: - "set up a python/django/fastapi/flask devenv" - "scaffold a devenv for python here" - "make a new project with devenv" - "/devenv-init …" ## Prerequisites - `nix` (Nix 2.18+) - `devenv` CLI - `direnv` (system-installed via nix-darwin / home-manager) ## Options | Option | Values | Default | Notes | |---|---|---|---| | `--lang` | `python` | (required) | Other languages added incrementally. | | `--framework` | `django` / `fastapi` / `flask` | (none) | Pairs with `--lang python`. | | `--python` | `3.10` / `3.11` / `3.12` / `3.13` | `3.12` | Patches `languages.python.version`, `requires-python`, `target-version`, `pythonVersion`. | | `--name` | string | dirname | Patches `pyproject.toml` `name` and `packages = ["src/"]`. | | `--with-direnv` / `--no-direnv` | flag | enabled | direnv hint module. | | `--with-delta` / `--no-delta` | flag | enabled | delta as local git pager. | | `--with-treefmt` / `--no-treefmt` | flag | enabled | treefmt + nixfmt. | | `--with-git-hooks` / `--no-git-hooks` | flag | enabled | devenv git-hooks (pre-commit). | | `--with-lsp` / `--no-lsp` | flag | disabled | Claude Code LSP integration hint. | | `--strict-types` / `--no-strict-types` | flag | disabled | Flips `pyrightconfig.json` to strict. | | `--with-postgres` / `--no-postgres` | flag | varies | `python+django` defaults ON, others OFF. | | `--with-mysql` / `--no-mysql` | flag | disabled | mysqlclient build env + service. | | `--with-redis` / `--no-redis` | flag | disabled | devenv redis service. | | `--with-sqlite` / `--no-sqlite` | flag | enabled | sqlite CLI in PATH. | ## Flow 1. Resolve template name: `--lang python --framework django` → `python+django`. 2. `nix flake init -t github:Eotel/devenv-templates#