denv is a CLI tool designed to standardize and simplify local development workflows using Docker, Devcontainers, and Traefik. It provides a Kubernetes-like namespace experience for local Docker Compose projects.
- Project Namespaces: Isolate projects with their own networks and domains (e.g.,
*.fintech.localhost). - Dynamic Routing: Automatic Traefik configuration for apps and services.
- Service Management: Easily add shared services like Postgres, Redis, RabbitMQ.
- Observability: One-click setup for Grafana, Loki, and Promtail.
- Devcontainers: Ready-to-use templates for Go, Python, Node.js, Java, and Rust.
- Context Switching: Smart context detection based on your current directory.
- Local Registry: Integrated local container registry.
- SSL/TLS: Automatic locally trusted certificates via
mkcert.
Before installing denv, ensure you have:
- Docker (Docker Desktop, Colima, or Podman)
- Python 3 (for state management)
- Git (for cloning the repository)
- mkcert (optional, for HTTPS support)
You can automatically check and install prerequisites:
# Download and run the prerequisites checker
curl -fsSL https://raw.githubusercontent.com/netologist/denv/main/scripts/check-prerequisites.sh | bashOr if you've already cloned the repo:
./scripts/install.sh denvInstall with a single command:
curl -fsSL https://raw.githubusercontent.com/netologist/denv/main/scripts/quick-install.sh | bash# Clone the repository
git clone https://github.com/netologist/denv.git ~/.denv
# Run the installer
~/.denv/scripts/install.sh
# Restart your shell
source ~/.zshrc # or ~/.bashrcAfter installation, verify by running:
denv --help-
Initialize the System:
denv system up
-
Create a Project:
denv init my-project denv switch my-project
-
Create an App:
denv create-app backend --template go
-
Start Developing:
denv jump backend denv up
Your app is now running at
http://backend.my-project.localhost.
See walkthrough.md for a detailed guide.
~/.denv/ # Global installation
├── bin/ # CLI executable
├── templates/ # Service and App templates
└── services/ # Global system services (Traefik, Registry)
my-project/ # Your Project
├── .env # Project configuration
├── apps/ # Your applications
│ └── backend/
├── platform/ # Infrastructure
│ ├── services/ # (Postgres, Redis, etc.)
│ └── observability/# (Grafana, Loki)
└── templates/ # Custom project templates
- Docker (Docker Desktop, Colima, or Podman)
- Python 3 (for state management)
mkcert(optional, for SSL)