Documentation
¶
Overview ¶
Command w17ctl is the developer-side tool for the w17 platform — the single CLI a developer drives the whole toolchain through. Its job is the things the user can't do by hand: code generation (`codegen`) + drift verification (`verify`), migration planning + push to the console (`migrate`, `push`), project + proto scaffolding (`init`, `domain`, `module`, `template`), the signed-lock connection declaration (`connection`) + the `target` subtree of codegen/deploy declarations (client / grpc-client / business / binary / ci / scale), secrets + dev TLS (`secrets`, `certs`), the e2e suite (`test`), and the local docker-compose stack (`stack`, `clean`). Anything a developer can express in proto stays in proto — w17ctl never wraps proto edits.
Architectural distinction:
- `w17migrate` runs in deploy environments; single-purpose; api_token auth; reads w17/lock.yaml + applies migrations.
- `w17ctl` runs on developer machines / CI; broad surface; orchestrates platform interactions + keeps the signed lock consistent and synced with the console.
main.go is pure wiring: the command tree + dispatch live in the cmd root package (cmd/root.go, which registers every cmd/<command> subpackage); this entrypoint only hands it os.Args.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package cmd is the root of the w17ctl command tree: it registers every cmd/<command> subpackage into the kong root and runs it (Run).
|
Package cmd is the root of the w17ctl command tree: it registers every cmd/<command> subpackage into the kong root and runs it (Run). |
|
admission
Package admission wires `w17ctl admission` — a read of the console's codegen admission-gate counters.
|
Package admission wires `w17ctl admission` — a read of the console's codegen admission-gate counters. |
|
certs
Package certs wires `w17ctl certs` — seed a directory with a local dev PKI (a self-signed CA + a CA-signed server leaf) for the opt-in internal-mesh TLS switch (W17_INTERNAL_TLS=on).
|
Package certs wires `w17ctl certs` — seed a directory with a local dev PKI (a self-signed CA + a CA-signed server leaf) for the opt-in internal-mesh TLS switch (W17_INTERNAL_TLS=on). |
|
ci
Package ci implements `w17ctl ci` — the automation that builds the images and deploys the declared infrastructure (docs/decisions/infra-targets.md §4.4, §9).
|
Package ci implements `w17ctl ci` — the automation that builds the images and deploys the declared infrastructure (docs/decisions/infra-targets.md §4.4, §9). |
|
client
Package client is `w17ctl client`: egress clients — a third-party REST API, from its OpenAPI document, as a signed generated gRPC client under `<proto root>/clients/<name>/` (docs/todos/egress-rest-client.md).
|
Package client is `w17ctl client`: egress clients — a third-party REST API, from its OpenAPI document, as a signed generated gRPC client under `<proto root>/clients/<name>/` (docs/todos/egress-rest-client.md). |
|
codegen
Package codegen wires `w17ctl codegen` — a thin kong adapter over the codegen orchestration in internal/codegen.
|
Package codegen wires `w17ctl codegen` — a thin kong adapter over the codegen orchestration in internal/codegen. |
|
console
Package console implements `w17ctl console` — list the consoles you are logged into and choose which one subsequent commands talk to.
|
Package console implements `w17ctl console` — list the consoles you are logged into and choose which one subsequent commands talk to. |
|
deploy
Package deploy implements `w17ctl deploy` — one person's way from the laptop to an environment, swarm or cloud (docs/decisions/infra-targets.md §4.5, docs/decisions/infra-targets-workloads-and-a-tuning-file.md §6).
|
Package deploy implements `w17ctl deploy` — one person's way from the laptop to an environment, swarm or cloud (docs/decisions/infra-targets.md §4.5, docs/decisions/infra-targets-workloads-and-a-tuning-file.md §6). |
|
guide
Package guide writes AGENTS.md — the AI-agent USAGE guide for driving w17ctl — and fetches the w17 PLATFORM reference (w17/specs/*) from the console.
|
Package guide writes AGENTS.md — the AI-agent USAGE guide for driving w17ctl — and fetches the w17 PLATFORM reference (w17/specs/*) from the console. |
|
infra
Package infra implements `w17ctl infra` — the project's infrastructure: where it is deployed and how, declared in w17/infra.yaml (docs/decisions/infra-targets.md, docs/decisions/infra-targets-workloads-and-a-tuning-file.md).
|
Package infra implements `w17ctl infra` — the project's infrastructure: where it is deployed and how, declared in w17/infra.yaml (docs/decisions/infra-targets.md, docs/decisions/infra-targets-workloads-and-a-tuning-file.md). |
|
login
Package login implements `w17ctl login` — email + password sign-in over the console's gRPC auth gateway (ONE endpoint; the same console address every other w17ctl command dials).
|
Package login implements `w17ctl login` — email + password sign-in over the console's gRPC auth gateway (ONE endpoint; the same console address every other w17ctl command dials). |
|
logout
Package logout implements `w17ctl logout` — drop a stored console credential.
|
Package logout implements `w17ctl logout` — drop a stored console credential. |
|
org
Package org implements `w17ctl org` — list the organizations the logged-in user belongs to and choose the default one.
|
Package org implements `w17ctl org` — list the organizations the logged-in user belongs to and choose the default one. |
|
plugin
Package plugin wires `w17ctl plugin <leaf>` — the plugin catalogue commands (list / install / update / gen-pb).
|
Package plugin wires `w17ctl plugin <leaf>` — the plugin catalogue commands (list / install / update / gen-pb). |
|
sdk
Package sdk wires the `w17ctl sdk` command.
|
Package sdk wires the `w17ctl sdk` command. |
|
secrets
Package secrets wires `w17ctl secrets <leaf>` — the age-tier ("optional key") production-secrets surface.
|
Package secrets wires `w17ctl secrets <leaf>` — the age-tier ("optional key") production-secrets surface. |
|
stress
Package stress wires `w17ctl stress <target>` — a thin kong adapter over the load runner in internal/testsuite.
|
Package stress wires `w17ctl stress <target>` — a thin kong adapter over the load runner in internal/testsuite. |
|
test
Package test wires `w17ctl test` — a thin kong adapter over the e2e suite runner in internal/testsuite.
|
Package test wires `w17ctl test` — a thin kong adapter over the e2e suite runner in internal/testsuite. |
|
ui
Package ui wires `w17ctl ui` — a thin kong adapter over the launcher implementation in internal/ui.
|
Package ui wires `w17ctl ui` — a thin kong adapter over the launcher implementation in internal/ui. |
|
update
Package update implements `w17ctl update`.
|
Package update implements `w17ctl update`. |
|
verify
Package verify wires the `w17ctl verify` command.
|
Package verify wires the `w17ctl verify` command. |
|
version
Package version implements `w17ctl version`.
|
Package version implements `w17ctl version`. |
|
whoami
Package whoami implements `w17ctl whoami` — show the STORED identity (and org memberships) for the active console, or all of them with --all.
|
Package whoami implements `w17ctl whoami` — show the STORED identity (and org memberships) for the active console, or all of them with --all. |
|
internal
|
|
|
adminruntime
Package adminruntime vendors the public @w17/admin-runtime SPA framework into a consuming project.
|
Package adminruntime vendors the public @w17/admin-runtime SPA framework into a consuming project. |
|
authstore
Package authstore owns w17ctl's machine-local credential store — `~/.w17/auth.yaml`.
|
Package authstore owns w17ctl's machine-local credential store — `~/.w17/auth.yaml`. |
|
autosync
Package autosync resolves the dev-DB workflow mode + the active initiative for a project (docs/specs/storage/dev-db-lifecycle.md §workflow modes).
|
Package autosync resolves the dev-DB workflow mode + the active initiative for a project (docs/specs/storage/dev-db-lifecycle.md §workflow modes). |
|
consoleui
Package consoleui serves w17ctl's local web app — a human-facing view and controller over the dev-machine-local project registry (devconfig), each project's lock, and the local Docker daemon.
|
Package consoleui serves w17ctl's local web app — a human-facing view and controller over the dev-machine-local project registry (devconfig), each project's lock, and the local Docker daemon. |
|
containerdump
Package containerdump takes a snapshot of a store whose client tools live where the store does — inside its container.
|
Package containerdump takes a snapshot of a store whose client tools live where the store does — inside its container. |
|
core
Package core holds the cross-cutting infrastructure every w17ctl command relies on: project-root discovery, lock loading, the proto tree reader, console-address resolution + dialing, and the shared output writer.
|
Package core holds the cross-cutting infrastructure every w17ctl command relies on: project-root discovery, lock loading, the proto tree reader, console-address resolution + dialing, and the shared output writer. |
|
devconfig
Package devconfig owns w17ctl's dev-machine-local state — `~/.w17/config.yaml`.
|
Package devconfig owns w17ctl's dev-machine-local state — `~/.w17/config.yaml`. |
|
docker
Package docker holds the local docker-compose shell-out primitives the stack / project / migrate commands drive.
|
Package docker holds the local docker-compose shell-out primitives the stack / project / migrate commands drive. |
|
egress
Package egress checks the project's egress clients (`<proto root>/clients/<name>/`, docs/todos/egress-rest-client.md) against the console — the one check `w17ctl verify` (the release gate) and `w17ctl codegen` (before it compiles them) share.
|
Package egress checks the project's egress clients (`<proto root>/clients/<name>/`, docs/todos/egress-rest-client.md) against the console — the one check `w17ctl verify` (the release gate) and `w17ctl codegen` (before it compiles them) share. |
|
gofmtc
Package gofmtc formats the Go the console generated, on the machine that asked for it.
|
Package gofmtc formats the Go the console generated, on the machine that asked for it. |
|
guidestamp
Package guidestamp records and reads the w17ctl version that wrote a project's AGENTS.md.
|
Package guidestamp records and reads the w17ctl version that wrote a project's AGENTS.md. |
|
localtarget
Package localtarget derives the localhost DSN for a project's PUBLISHED dev store connections — the zero-flag, zero-env resolution shared by `stack build`, `db snapshot`, and `fixtures apply` so a developer never hand-sets a W17_TARGET_* env for a LOCAL store.
|
Package localtarget derives the localhost DSN for a project's PUBLISHED dev store connections — the zero-flag, zero-env resolution shared by `stack build`, `db snapshot`, and `fixtures apply` so a developer never hand-sets a W17_TARGET_* env for a LOCAL store. |
|
lockfile
Package lockfile is the thin client's OFFLINE lock reader: a minimal, w17ctl-owned view of the routing fields the deploy path needs to read from w17/lock.yaml WITHOUT a console round-trip.
|
Package lockfile is the thin client's OFFLINE lock reader: a minimal, w17ctl-owned view of the routing fields the deploy path needs to read from w17/lock.yaml WITHOUT a console round-trip. |
|
migdecisions
Package migdecisions reads and writes the decision files under w17/migrate-decisions/ — how a NEEDS_CONFIRM finding is decided in a pull request instead of on somebody's command line.
|
Package migdecisions reads and writes the decision files under w17/migrate-decisions/ — how a NEEDS_CONFIRM finding is decided in a pull request instead of on somebody's command line. |
|
pluginfetch
Package pluginfetch materialises one plugin, at one published version, out of a git repository.
|
Package pluginfetch materialises one plugin, at one published version, out of a git repository. |
|
pluginrender
Package pluginrender turns a plugin's AUTHOR tree into its PUBLISHED form.
|
Package pluginrender turns a plugin's AUTHOR tree into its PUBLISHED form. |
|
protoscan
Package protoscan finds the proto files an IR build needs, by reading what they declare rather than by convention.
|
Package protoscan finds the proto files an IR build needs, by reading what they declare rather than by convention. |
|
reconcile
Package reconcile is the branch-switch reconcile of the dev DB lifecycle (docs/specs/storage/dev-db-lifecycle.md S7).
|
Package reconcile is the branch-switch reconcile of the dev DB lifecycle (docs/specs/storage/dev-db-lifecycle.md S7). |
|
remote
Package remote holds the small, shared primitives for w17ctl's remote dev-stack mode (docs/experiments/remote-stack.md): parsing an SSH destination and turning it into the argv fragments that rsync, the remote docker-compose runner, and the tunnel supervisor all need.
|
Package remote holds the small, shared primitives for w17ctl's remote dev-stack mode (docs/experiments/remote-stack.md): parsing an SSH destination and turning it into the argv fragments that rsync, the remote docker-compose runner, and the tunnel supervisor all need. |
|
remotecompose
Package remotecompose runs `docker compose` on a remote docker host over SSH in remote-stack mode (docs/experiments/remote-stack.md §2.3).
|
Package remotecompose runs `docker compose` on a remote docker host over SSH in remote-stack mode (docs/experiments/remote-stack.md §2.3). |
|
remotesnap
Package remotesnap implements TRUE remote-side dev-DB snapshots for remote-stack mode (docs/experiments/remote-stack.md §6, resolved "remote-side"): pg_dump / pg_restore run INSIDE the remote postgres container via `docker compose exec`, and the dump files live on the server under `<remote_path>/.snapshots/<project>`.
|
Package remotesnap implements TRUE remote-side dev-DB snapshots for remote-stack mode (docs/experiments/remote-stack.md §6, resolved "remote-side"): pg_dump / pg_restore run INSIDE the remote postgres container via `docker compose exec`, and the dump files live on the server under `<remote_path>/.snapshots/<project>`. |
|
remotesync
Package remotesync builds and runs the one-shot rsync that pushes a project's tree to a remote docker host in remote-stack mode (docs/experiments/remote-stack.md §5).
|
Package remotesync builds and runs the one-shot rsync that pushes a project's tree to a remote docker host in remote-stack mode (docs/experiments/remote-stack.md §5). |
|
schema
Package schema is the thin client's IR-compile seam: it gathers a project's proto file set + entry roots and calls the console's CompileIR RPC (thin-client refactor Step 3b — the loader + ir.Build pipeline + plugin staging all run server-side).
|
Package schema is the thin client's IR-compile seam: it gathers a project's proto file set + entry roots and calls the console's CompileIR RPC (thin-client refactor Step 3b — the loader + ir.Build pipeline + plugin staging all run server-side). |
|
sdkupdate
Package sdkupdate implements `w17ctl sdk update` — moving a project onto a new public sdk/go version.
|
Package sdkupdate implements `w17ctl sdk update` — moving a project onto a new public sdk/go version. |
|
snapstore
Package snapstore is the on-disk home for branch-scoped DB snapshots in the dev DB lifecycle (`docs/specs/storage/dev-db-lifecycle.md` S3).
|
Package snapstore is the on-disk home for branch-scoped DB snapshots in the dev DB lifecycle (`docs/specs/storage/dev-db-lifecycle.md` S3). |
|
storageclient
Package storageclient is the thin client's spine over the GENERATED console-v2 storage services (Initiative/Snapshot/Review/Approval/ Environment/Checkpoint Query+Mutation).
|
Package storageclient is the thin client's spine over the GENERATED console-v2 storage services (Initiative/Snapshot/Review/Approval/ Environment/Checkpoint Query+Mutation). |
|
tunnel
Package tunnel opens the SSH local-forwards that make a remote stack feel local (docs/experiments/remote-stack.md §2.1): docker publishes each port on the REMOTE host, and w17ctl runs `ssh -N -L <local>:127.0.0.1:<remote>` so `localhost:<port>` behaves identically.
|
Package tunnel opens the SSH local-forwards that make a remote stack feel local (docs/experiments/remote-stack.md §2.1): docker publishes each port on the REMOTE host, and w17ctl runs `ssh -N -L <local>:127.0.0.1:<remote>` so `localhost:<port>` behaves identically. |
|
ui
Package ui implements `w17ctl ui` — the local web app launcher.
|
Package ui implements `w17ctl ui` — the local web app launcher. |
|
updatecheck
Package updatecheck answers "is anything this project runs on behind?" — the client (w17ctl), the SDK the project pins, and every installed plugin — and sorts each answer into REQUIRED or AVAILABLE.
|
Package updatecheck answers "is anything this project runs on behind?" — the client (w17ctl), the SDK the project pins, and every installed plugin — and sorts each answer into REQUIRED or AVAILABLE. |
|
verify
Package verify implements the `w17ctl verify` drift hook — the counterpart to codegen.
|
Package verify implements the `w17ctl verify` drift hook — the counterpart to codegen. |