Script Runtime Model
./init Flow
sequenceDiagram
participant Dev as Developer
participant Init as Init Script
participant OP as 1Password CLI
participant GL as GitLab API
participant Git as git clone
Dev->>Init: run init script
Init->>OP: op signin
Init->>OP: inject env templates
Init->>GL: validate GITLAB_PASSWORD token
Init->>Git: clone each projects.txt repo if missing
Init->>OP: inject service env templates
Init-->>Dev: done
./up Flow
flowchart TD
Start[Up script] --> Parse[Parse mode arguments]
Parse --> CheckEnv{Root env exists}
CheckEnv -- No --> Init[Run init script]
CheckEnv -- Yes --> CheckRepos{All repos cloned}
CheckRepos -- No --> Init
CheckRepos -- Yes --> Stop[Stop running containers]
Stop --> BuildSvc[Resolve profile service set]
BuildSvc --> Up[Compose watch up]
Up --> Down[Compose down after exit]
Behavior Notes
- Manage fallback service:
welcome
- Plan fallback: full plan service list if profile has no plan services
- Existing containers are stopped before startup to avoid stale state conflicts