Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
9d7dde6
chore(launcher): release v0.5.1
thestumonkey Jan 11, 2026
ccd165b
added tmux
thestumonkey Jan 13, 2026
b02b4a1
Tmux windows and add from branch
thestumonkey Jan 17, 2026
f33e12c
Merge branch 'main' into tmux
thestumonkey Jan 17, 2026
0ace0a4
added generic installer
thestumonkey Jan 17, 2026
54a03bf
split pages into sections
thestumonkey Jan 22, 2026
d6c526d
chore(launcher): release v0.6.0
thestumonkey Jan 23, 2026
6e8eb51
added ui tweaks and generic installer
thestumonkey Jan 23, 2026
80777db
chore(launcher): release v0.6.1
thestumonkey Jan 23, 2026
be6e380
Merge branch 'main' into tmux
thestumonkey Jan 23, 2026
2f1d82a
Merge remote-tracking branch 'origin' into tmux
thestumonkey Jan 23, 2026
6c1a889
moved us to preconditions
thestumonkey Jan 23, 2026
b368078
chore(launcher): release v0.6.2
thestumonkey Jan 23, 2026
8951c85
changed uinicode for win
thestumonkey Jan 23, 2026
5938688
chore(launcher): release v0.6.3
thestumonkey Jan 23, 2026
3c3f3d0
refactored to have better muti plat
thestumonkey Jan 24, 2026
54daaf0
chore(launcher): release v0.7.0
thestumonkey Jan 24, 2026
76b614d
chore(launcher): release v0.7.1
thestumonkey Jan 24, 2026
3a76509
chore(launcher): release v0.7.2
thestumonkey Jan 24, 2026
2331f16
fix(launcher): remove obsolete Windows platform methods
thestumonkey Jan 24, 2026
06cc191
chore(launcher): release v0.7.3
thestumonkey Jan 24, 2026
df144fd
fix(launcher): remove obsolete Linux platform methods
thestumonkey Jan 24, 2026
b4bec11
chore(launcher): release v0.7.4
thestumonkey Jan 24, 2026
6fec40e
fix(launcher): bundle prerequisites.yaml with application
thestumonkey Jan 24, 2026
44b4aa6
feat(launcher): bundle startup resources for version stability
thestumonkey Jan 24, 2026
09fed0c
chore(launcher): release v0.7.5
thestumonkey Jan 24, 2026
32e7ac9
fix(launcher): properly quote paths with spaces for shell commands
thestumonkey Jan 24, 2026
797409b
chore(launcher): release v0.7.6
thestumonkey Jan 24, 2026
9c0ff20
fix(launcher): copy bundled resources to working dir before use
thestumonkey Jan 24, 2026
8c4e09c
chore(launcher): release v0.7.7
thestumonkey Jan 24, 2026
9e5b9a2
feat(launcher): set default ushadow env color to purple
thestumonkey Jan 24, 2026
7cef944
feat(launcher): rename tabs and improve navigation flow
thestumonkey Jan 24, 2026
d4235b4
feat(launcher): add loading animation overlay when starting containers
thestumonkey Jan 24, 2026
29211b2
fix(launcher): use configured project_root for discovery instead of h…
thestumonkey Jan 24, 2026
3bc6ea7
fix(setup): make PROJECT_ROOT calculation more robust
thestumonkey Jan 24, 2026
f061009
chore(launcher): release v0.7.8
thestumonkey Jan 24, 2026
bce7ff1
fix(launcher): resolve compiler errors and warnings
thestumonkey Jan 24, 2026
36e371b
chore(launcher): release v0.7.9
thestumonkey Jan 24, 2026
245d7b9
fix(launcher): improve ushadow environment UX and color consistency
thestumonkey Jan 24, 2026
3ad2125
fix(launcher): prevent PowerShell windows from flashing on Windows
thestumonkey Jan 24, 2026
5ed7d5b
chore(launcher): release v0.7.10
thestumonkey Jan 24, 2026
c898721
fix(launcher): improve Windows UX and fix branch detection
thestumonkey Jan 24, 2026
8af89ed
chore(launcher): release v0.7.11
thestumonkey Jan 24, 2026
0ef7a14
fix(launcher): improve environment creation UX
thestumonkey Jan 24, 2026
dff2d84
chore(launcher): release v0.7.12
thestumonkey Jan 24, 2026
7eec701
refactor(launcher): switch to worktree-only architecture
thestumonkey Jan 24, 2026
9a3fe06
chore(launcher): release v0.7.13
thestumonkey Jan 24, 2026
e12aed9
fix(launcher): improve UX for environment creation and infra panels
thestumonkey Jan 24, 2026
2b1e91d
chore(launcher): release v0.7.14
thestumonkey Jan 24, 2026
c57713a
Remove FoldersPanel from install page
thestumonkey Jan 25, 2026
d4cfbf9
Fix environment panel reload loop
thestumonkey Jan 25, 2026
1737a4f
Fix environment discovery and port detection
thestumonkey Jan 26, 2026
7b5e5e8
Simplify launcher architecture and fix worktree creation
thestumonkey Jan 27, 2026
b0d091a
chore(launcher): release v0.7.15
thestumonkey Jan 27, 2026
31b3d49
Now I need your input on the validation logic. Let me prepare the fil…
thestumonkey Jan 29, 2026
a23fff3
## Phase 1 Complete! 🎉
thestumonkey Jan 29, 2026
0707e3f
Perfect! Now let me summarize what we've accomplished and what's next:
thestumonkey Jan 30, 2026
cf1619d
Now I have two TODOs in the discovery code that are design decisions …
thestumonkey Jan 30, 2026
2e0b076
Now I've created the port utilities module with the structure, but th…
thestumonkey Jan 30, 2026
cef357d
Perfect! Let me create a concise summary for you:
thestumonkey Jan 30, 2026
3979c9f
★ Insight ─────────────────────────────────────
thestumonkey Jan 30, 2026
53b9a3f
Merge 4bdc-ushadow-launchge into generalLamcher
thestumonkey Feb 1, 2026
e7710e7
feat(launcher): add multi-project mode with feature flag
thestumonkey Feb 1, 2026
76a6399
added support for configuring environment
thestumonkey Feb 2, 2026
0903e5a
Integrate kanban ticket system with tmux and worktree management (#146)
thestumonkey Feb 2, 2026
2400ff8
Merge origin/dev into generalLamcher
thestumonkey Feb 2, 2026
65f04ac
Apply stashed changes from earlier work
thestumonkey Feb 2, 2026
1760952
Merge latest origin/dev (auth updates)
thestumonkey Feb 2, 2026
863d61f
Merge origin/dev with Keycloak SSO integration
thestumonkey Feb 3, 2026
65a2884
fix typo
thestumonkey Feb 3, 2026
96aeecd
kanban board in dev
thestumonkey Feb 4, 2026
7f2b5d9
Merge origin/dev into generalLamcher
thestumonkey Feb 4, 2026
9b2452c
chore(launcher): release v0.8.0
thestumonkey Feb 4, 2026
503e3cf
feat(auth): add native username/password login for launcher
thestumonkey Feb 5, 2026
be0a8fe
Merge remote-tracking branch 'origin/dev' into generalLamcher
thestumonkey Feb 10, 2026
b0b33ea
Merge origin/dev into generalLamcher
thestumonkey Feb 10, 2026
6e1ab0c
Merge branch 'dev' of github.com:Ushadow-io/Ushadow into generalLamcher
thestumonkey Feb 11, 2026
eb9b2bd
fix: resolve duplicate searchParams, add dashboard API types, remove …
thestumonkey Feb 11, 2026
7e0f5c9
feat(auth): merge stashed authentication improvements
thestumonkey Feb 11, 2026
44fbe61
Merge branch 'dev' of github.com:Ushadow-io/Ushadow into generalLamcher
thestumonkey Feb 11, 2026
80a55a4
group login on launcher
thestumonkey Feb 12, 2026
482c73b
got kc login launcher wokring
thestumonkey Feb 12, 2026
c89b5c4
Merge branch 'dev' into generalLamcher
thestumonkey Feb 12, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .claude/settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"enabledPlugins": {
"test-automation": true
"test-automation": true,
"doc-enforcement": true
}
}
43 changes: 43 additions & 0 deletions .launcher-config.template.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Launcher Configuration Template
# Copy this to your project root as .launcher-config.yaml

project:
name: myproject # Internal project name (lowercase, no spaces)
display_name: My Project # Human-readable name shown in UI

prerequisites:
required:
- docker
- git
optional:
- python
- uv

setup:
command: ./setup.sh # Command to run when setting up the project
env_vars:
- PROJECT_ROOT
- WORKTREE_PATH

infrastructure:
compose_file: docker-compose.yml # Path to compose file for shared infrastructure
project_name: myproject-infra # Docker compose project name
profile: default # Optional: compose profile to use

containers:
naming_pattern: "{env_name}-{service}" # How containers are named
primary_service: backend # Main service to health-check
health_endpoint: /health # Health check endpoint
tailscale_project_prefix: myproject # Optional: Tailscale prefix

ports:
allocation_strategy: offset # or: fixed
base_port: 8000 # Starting port for services
offset:
min: 0
max: 100
step: 10

worktrees:
default_parent: ../worktrees/{project_name} # Where worktrees are created
branch_prefix: env/ # Optional prefix for environment branches
80 changes: 80 additions & 0 deletions .launcher-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# Ushadow Launcher Configuration
# This file defines how the launcher manages environments for this project

project:
name: "ushadow"
display_name: "Ushadow"

# Prerequisites required for this project
prerequisites:
required:
- docker
- git
- python3
optional:
- tailscale
- uv

# Environment setup configuration
setup:
# Command to run when creating a new environment
# Available variables: {ENV_NAME}, {PORT_OFFSET}, {WORKING_DIR}
command: "uv run --with pyyaml setup/run.py --dev --quick --skip-admin"

# Environment variables passed during setup
env_vars:
- ENV_NAME
- PORT_OFFSET
- USHADOW_NO_BROWSER=1

# Docker infrastructure configuration (shared services)
infrastructure:
# Path to infrastructure compose file (relative to project root)
compose_file: "compose/docker-compose.infra.yml"

# Docker Compose project name for infrastructure
project_name: "infra"

# Profile to use when starting infrastructure (optional)
profile: "infra"

# Container naming and discovery
containers:
# Naming pattern for environment containers
# Variables: {project_name}, {env_name}, {service_name}
# Note: {env_name} will be empty for "default" environment
naming_pattern: "{project_name}{env_name}-{service_name}"

# Primary service that exposes the main application port
# This service's port is used to calculate other service ports
primary_service: "backend"

# Health check endpoint (relative to primary service)
health_endpoint: "/api/unodes/leader/info"

# Optional: Project prefix for Tailscale hostnames (for multi-project setups)
# If not set, Tailscale URLs will be: https://{env}.{tailnet}
# If set to "ushadow", URLs will be: https://ushadow-{env}.{tailnet}
# tailscale_project_prefix: "ushadow"

# Port management
ports:
# Strategy: "hash" (deterministic from env name) | "sequential" | "random"
allocation_strategy: "hash"

# Base port for primary service (default environment)
base_port: 8000

# Port offset configuration (for hash-based allocation)
offset:
min: 0
max: 500
step: 10 # Offsets are multiples of 10: 0, 10, 20, 30...

# Worktree configuration
worktrees:
# Default parent directory for worktrees (expandable via ~)
default_parent: "~/repos/worktrees/{project_name}"

# Optional prefix for branch names (e.g., "env/" creates "env/staging")
branch_prefix: ""
2 changes: 0 additions & 2 deletions .workmux.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@ panes:
# Main pane - ready for commands or agent interaction
- command: "echo '🚀 Ushadow Environment: $(basename $(pwd))' && echo '' && echo 'Quick commands:' && echo ' ./dev.sh - Start in dev mode' && echo ' ./go.sh - Start in prod mode' && echo ' make test - Run tests' && echo ' code . - Open in VSCode' && echo '' && $SHELL"
focus: true
split: horizontal
size: 75%

# Agent status icons (shown in tmux status bar)
status_icons:
Expand Down
135 changes: 135 additions & 0 deletions ENV_CONFIG_GUIDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
# Environment Configuration System

## Overview

The launcher now supports comprehensive environment configuration including:
- Custom startup commands per project
- Automatic port detection and allocation
- Multi-environment support with port offsetting
- Database and service port management

## How It Works

### 1. Project Configuration (`.launcher-config.yaml`)

Each project can have a configuration file that defines:

```yaml
project:
name: myproject
display_name: My Project

setup:
command: ./go.sh # Command to start an environment
env_vars: # Vars to inject
- PROJECT_ROOT
- WORKTREE_PATH
- PORT_OFFSET # Auto-calculated offset

ports:
allocation_strategy: offset # or: fixed
base_port: 8000
offset:
min: 0
max: 100
step: 10 # Each env gets ports +10 from previous
```

### 2. Port Detection

The launcher scans `.env.template` or `.env.example` to detect:
- Port variables (e.g., `BACKEND_PORT`, `WEBUI_PORT`)
- Database ports (e.g., `POSTGRES_PORT`, `REDIS_PORT`)
- Default values

**Example `.env.template`:**
```bash
BACKEND_PORT=8000
WEBUI_PORT=3000
POSTGRES_PORT=5432
REDIS_PORT=6379
```

### 3. Port Allocation

When creating environments, ports are automatically offset:

**Environment 1 (offset=0):**
- BACKEND_PORT=8000
- WEBUI_PORT=3000
- POSTGRES_PORT=5432

**Environment 2 (offset=10):**
- BACKEND_PORT=8010
- WEBUI_PORT=3010
- POSTGRES_PORT=5442

**Environment 3 (offset=20):**
- BACKEND_PORT=8020
- WEBUI_PORT=3020
- POSTGRES_PORT=5452

### 4. Environment Startup

When you create or start an environment:
1. Launcher calculates the port offset
2. Injects environment variables:
```bash
PROJECT_ROOT=/Users/you/repos/myproject
WORKTREE_PATH=/Users/you/repos/worktrees/myproject/dev
PORT_OFFSET=10
```
3. Runs the startup command (e.g., `./go.sh`)
4. Your startup script reads PORT_OFFSET and adjusts ports accordingly

## Startup Script Pattern

Your `go.sh` or startup script should use the PORT_OFFSET:

```bash
#!/bin/bash

# Get port offset from environment (default to 0)
OFFSET=${PORT_OFFSET:-0}

# Calculate actual ports
export BACKEND_PORT=$((8000 + OFFSET))
export WEBUI_PORT=$((3000 + OFFSET))
export POSTGRES_PORT=$((5432 + OFFSET))
export REDIS_PORT=$((6379 + OFFSET))

# Load base .env if it exists
if [ -f .env.template ]; then
source .env.template
fi

# Override with offset ports
cat > .env.local <<EOF
BACKEND_PORT=${BACKEND_PORT}
WEBUI_PORT=${WEBUI_PORT}
POSTGRES_PORT=${POSTGRES_PORT}
REDIS_PORT=${REDIS_PORT}
EOF

# Start services
docker compose --env-file .env.local up -d
```

## Configuration UI

Access the configuration editor:
1. Enable Multi-Project Mode in settings
2. Go to Install tab
3. Add or select a project
4. Click "Configure" or "Edit Config"
5. Set startup command and port strategy
6. Click "Scan .env files" to auto-detect ports

## Next Steps

- [ ] Add TypeScript interface for DetectedPort
- [ ] Wire up ProjectConfigEditor in ProjectsPanel
- [ ] Implement config save/load commands
- [ ] Auto-calculate PORT_OFFSET when creating environments
- [ ] Inject env vars when running startup commands
- [ ] Add UI to show port allocations for each environment
Loading
Loading