Skip to content

docs(site): CLI reference generated from the CLI's own help (part of #246) - #434

Merged
samuelmbabhazi merged 15 commits into
mainfrom
docs/246-cli-reference
Nov 23, 2026
Merged

samuelmbabhazi merged 15 commits into
mainfrom
docs/246-cli-reference

Conversation

@samuelmbabhazi

Copy link
Copy Markdown
Collaborator

Part of #246: the CLI reference of the documentation site, generated from the CLI's own help. Stacked on #432.

What changed

  • One list of commands. commands.Commands holds each command's name, positional arguments and one-line summary, and the usage text is built from it. The usage text stays the same, except that logout now says "Forget the saved address and token on this machine": "Forget them" made sense only right after login.
  • reference_test.go renders apps/docs/src/content/docs/reference/cli.md:
    • It runs each command with -h, with no environment variable, and keeps what the CLI prints. The page cannot list a flag the CLI does not have, nor a default it does not use.
    • Flags are shown with two dashes, as the rest of the docs write them; the CLI accepts both.
    • The intro covers the platforms of the release archives (.goreleaser.yaml), the token never being a flag, the environment variables, the identifiers, and the exit statuses 0, 1 and 2.
  • pnpm gen:cli-reference (part of pnpm gen) writes the page with SHIPKEEP_UPDATE_REFERENCE=1. Without that variable, the same test fails when the committed page is stale, so both the Go tests and the "Generated code is up to date" job catch drift.
  • The Reference group of the sidebar gets CLI.

How it was tested

  • go test ./cli/... and golangci-lint run ./cli/...: 0 issues.
  • The generated page passes its own test.
  • nx run docs:build builds 7 pages.

Security considerations

  • No behavior change in the CLI beyond one summary line.
  • The test runs each command with -h, which returns before any network call or prompt.

apps/docs builds static pages with the landing page's look, and copies docs/INSTALL.md in at build time so that the installation guide stays written once. Part of #246.

Signed-off-by: samuel mbabhazi <[email protected]>
tools/gen/config-reference.mjs runs with pnpm gen:config, so CI checks that the page is current. It marks the fields the control plane refuses until they are applied (#431) and the defaults it uses. Part of #246.

Signed-off-by: samuel mbabhazi <[email protected]>
The CLI lists its commands from one table, which its usage text and the reference share. A Go test renders the page from each command's -h output, writes it under pnpm gen, and fails when the committed page is stale. Part of #246.

Signed-off-by: samuel mbabhazi <[email protected]>
@samuelmbabhazi samuelmbabhazi added documentation Improvements or additions to documentation v0.1-stable In the scope of the first stable version (docs/PLAN.md) labels Nov 23, 2026
@coderabbitai

coderabbitai Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 25 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 0ead38b and 7f6c59d.

Files selected for processing: 6

  • .prettierignore
  • apps/docs/astro.config.mjs
  • apps/docs/src/content/docs/reference/cli.md
  • cli/internal/commands/commands.go
  • cli/internal/commands/reference_test.go
  • package.json
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Nx infers lint and typecheck for apps/docs. Both need the types astro sync generates, so they now depend on a sync target; the site gets its own tsconfig.json and ESLint config, which ignore .astro and dist.

Signed-off-by: samuel mbabhazi <[email protected]>
…n-site

Signed-off-by: samuel mbabhazi <[email protected]>

# Conflicts:
#	pnpm-lock.yaml
…the CLI identifiers in step 5

Signed-off-by: samuel mbabhazi <[email protected]>
@samuelmbabhazi
samuelmbabhazi changed the base branch from docs/246-config-reference to main November 23, 2026 18:06
Signed-off-by: samuel mbabhazi <[email protected]>

# Conflicts:
#	.prettierignore
#	apps/docs/astro.config.mjs
#	package.json
@samuelmbabhazi
samuelmbabhazi merged commit 41778e1 into main Nov 23, 2026
25 checks passed
@samuelmbabhazi
samuelmbabhazi deleted the docs/246-cli-reference branch November 23, 2026 18:18
samuelmbabhazi added a commit that referenced this pull request Nov 23, 2026
…435)

Part of #246: the migration guide. Stacked on #434. With it, the site
covers every page the issue lists: install, concepts, the `shipkeep.yml`
reference, the CLI reference, and migration. Merge after #431, since the
guide says that volumes are refused.

## What changed

**Move an application to Shipkeep** (`guides/move-an-application.md`),
under a new **Guides** group:

- **What cannot move yet.** Data on a volume, builds and Compose files.
A stateful service stays where it runs and is reached through a secret.
The Coolify import of SPEC 13 is named as planned.
- **Getting an image.** An existing image, or one built in CI and pushed
to a registry, with registry credentials for a private one.
- **From Compose to `shipkeep.yml`.** A table maps each Compose setting:
image, ports, command, environment and secrets, health check, replicas,
limits, domains, volumes, `depends_on`. A complete example follows.
- **Deploying next to the old platform** on a second name, while both
share the database.
- **Switching the domain**: lower the TTL, add the domain, point the
record. It is undone by pointing the record back.

## How it was tested

- `nx run docs:build` builds 8 pages.
- Each mapping was checked against the schema and the pipeline:
  - `run.command` is an argv list;
  - nothing is published on the host (`placement.ts`);
  - the health check is probed over HTTP on `run.port`;
  - the release command runs before a new release takes the traffic.

## Security considerations

Documentation only. The guide keeps secrets in the environment and names
them in `shipkeep.yml`, never their values.

---------

Signed-off-by: samuel mbabhazi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation v0.1-stable In the scope of the first stable version (docs/PLAN.md)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant