gen-env

Solid

Creates, updates, or reviews a project's gen-env command for running multiple isolated instances on localhost. Handles instance identity, port allocation, data isolation, browser state separation, and cleanup.

Code & Development 400 stars 39 forks Updated today

Install

View on GitHub

Quality Score: 79/100

Stars 20%
87
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
0
Description 5%
100

Skill Content

# gen-env Skill Generate or review a `gen-env` command that enables running **multiple isolated instances** of a project on localhost simultaneously (e.g., multiple worktrees, feature branches, or versions). ## The Problem Without isolation, multiple instances of the same project: - Fight for hardcoded ports (3000, 5432, 8080) - Share Docker volumes → data corruption - Share browser cookies/localStorage → auth confusion - Have ambiguous container names → can't tell which is which - Risk catastrophic cleanup → `docker down -v` nukes everything ## The Solution: Instance Identity Everything flows from a **workspace name**: ``` name = "feature-x" ↓ ┌─────────────────────────────────────────────────────┐ │ COMPOSE_PROJECT_NAME = localnet-feature-x │ │ DOCKER_NETWORK = localnet-feature-x │ │ VOLUME_PREFIX = localnet-feature-x │ │ CONTAINER_PREFIX = localnet-feature-x- │ │ TILT_HOST = feature-x.localhost │ │ Ports = dynamically allocated │ │ URLs = derived from host + ports │ └─────────────────────────────────────────────────────┘ ``` ## Isolation Dimensions ### 1. Port Isolation Each instance gets unique ports from ephemeral range (49152-65535). ### 2. Data Isolation Docker Compose project name controls volume naming: - Instance A: `localnet-main_postgres_data` - Instance B: `localnet-feature-x_postgres_data` No cross-contamination. Independent dat...

Details

Author
aiskillstore
Repository
aiskillstore/marketplace
Created
7 months ago
Last Updated
today
Language
Python
License
None

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category