diff --git a/README.md b/README.md index 7f8ed0c..50be11b 100644 --- a/README.md +++ b/README.md @@ -105,13 +105,9 @@ block set, a sensible default set (`claude`, `opencode`, `amplifier`, …) is of # Install the CLI (editable, onto your PATH) uv tool install --editable cli/ -# Bootstrap infrastructure (Docker, Caddy, directories, containers) +# Bootstrap infrastructure + the ~/.castle tree and a default castle.yaml ./install.sh -# Minimal global config -mkdir -p ~/.castle/programs ~/.castle/deployments -printf 'gateway:\n port: 9000\n' > ~/.castle/castle.yaml - castle list # what's registered castle deploy && castle start # apply config to the runtime, then bring it up open http://localhost:9000 # the dashboard @@ -263,4 +259,3 @@ and `CASTLE_API_MDNS_ENABLED`. - [docs/dns-and-tls.md](docs/dns-and-tls.md) — gateway routing, DNS, the `off` / `acme` TLS modes - [docs/stacks/](docs/stacks/) — per-stack guides (python-fastapi, python-cli, react-vite, supabase) - [AGENTS.md](AGENTS.md) — the canonical, assistant-agnostic operator guide (recipes, gateway, tunnel, mesh) -- [CLAUDE.md](CLAUDE.md) — notes for developing Castle's own code, and the full API reference diff --git a/install.sh b/install.sh index e7a774a..529c5c2 100755 --- a/install.sh +++ b/install.sh @@ -214,14 +214,21 @@ ensure_caddy_dns_plugin() { create_directories() { log_step "Creating directory structure" - # ~/.castle tree - mkdir -p "${CASTLE_HOME}/code" + # ~/.castle tree — globals (castle.yaml) plus one file per program/deployment. + mkdir -p "${CASTLE_HOME}/programs" + mkdir -p "${CASTLE_HOME}/deployments" mkdir -p "${CASTLE_HOME}/artifacts/specs" mkdir -p "${CASTLE_HOME}/artifacts/content" mkdir -p "${DATA_DIR}" mkdir -p "${CASTLE_HOME}/secrets" && chmod 700 "${CASTLE_HOME}/secrets" - log_ok + # Seed a minimal global castle.yaml — never clobber an existing one. + if [[ -f "${CASTLE_HOME}/castle.yaml" ]]; then + log_ok + else + printf 'gateway:\n port: 9000\n' > "${CASTLE_HOME}/castle.yaml" + log_ok "seeded ~/.castle/castle.yaml" + fi } # ---------------------------------------------------------------------------