From 98dcf5d96796ded1527a3b68aad8f4c53b34e751 Mon Sep 17 00:00:00 2001 From: Dev Date: Mon, 2 Mar 2026 09:40:25 +0000 Subject: [PATCH] docs: update CLI reference to match actual code cli.md: - Document `start`/`stop` as preferred commands (`up`/`down` as legacy) - Add --skip-cluster-management flag for start and stop - Add --delete-volumes flag for stop - Add missing subcommands: restart, exec, status, port, push-images, run-job - Add --helm-chart option to deploy create - Reorganize deploy vs deployment sections for clarity deployment_patterns.md: - Add missing --stack flag to deploy create example Co-Authored-By: Claude Opus 4.6 --- docs/cli.md | 80 +++++++++++++++++++++++++++++++------ docs/deployment_patterns.md | 2 +- 2 files changed, 69 insertions(+), 13 deletions(-) diff --git a/docs/cli.md b/docs/cli.md index 92cf776a..a871ee50 100644 --- a/docs/cli.md +++ b/docs/cli.md @@ -68,7 +68,7 @@ $ laconic-so build-npms --include --force-rebuild ## deploy -The `deploy` command group manages persistent deployments. The general workflow is `deploy init` to generate a spec file, then `deploy create` to create a deployment directory from the spec, then runtime commands like `deploy up` and `deploy down`. +The `deploy` command group manages persistent deployments. The general workflow is `deploy init` to generate a spec file, then `deploy create` to create a deployment directory from the spec, then runtime commands like `deployment start` and `deployment stop`. ### deploy init @@ -101,35 +101,91 @@ Options: - `--spec-file` (required): spec file to use - `--deployment-dir`: target directory for deployment files - `--update`: update an existing deployment directory, preserving data volumes and env file. Changed files are backed up with a `.bak` suffix. The deployment's `config.env` and `deployment.yml` are also preserved. +- `--helm-chart`: generate Helm chart instead of deploying (k8s only) - `--network-dir`: network configuration supplied in this directory - `--initial-peers`: initial set of persistent peers -### deploy up +## deployment -Start a deployment: +Runtime commands for managing a created deployment. Use `--dir` to specify the deployment directory. + +### deployment start + +Start a deployment (`up` is a legacy alias): ``` -$ laconic-so deployment --dir up +$ laconic-so deployment --dir start ``` -### deploy down +Options: +- `--stay-attached` / `--detatch-terminal`: attach to container stdout (default: detach) +- `--skip-cluster-management` / `--perform-cluster-management`: skip kind cluster creation/teardown (default: perform management). Only affects k8s-kind deployments. Use this when multiple stacks share a single cluster. -Stop a deployment: -``` -$ laconic-so deployment --dir down -``` -Use `--delete-volumes` to also remove data volumes. +### deployment stop -### deploy ps +Stop a deployment (`down` is a legacy alias): +``` +$ laconic-so deployment --dir stop +``` + +Options: +- `--delete-volumes` / `--preserve-volumes`: delete data volumes on stop (default: preserve) +- `--skip-cluster-management` / `--perform-cluster-management`: skip kind cluster teardown (default: perform management). Use this to stop a single deployment without destroying a shared cluster. + +### deployment restart + +Restart a deployment with GitOps-aware workflow. Pulls latest stack code, syncs the deployment directory from the git-tracked spec, and restarts services: +``` +$ laconic-so deployment --dir restart +``` + +See [deployment_patterns.md](deployment_patterns.md) for the recommended GitOps workflow. + +### deployment ps Show running services: ``` $ laconic-so deployment --dir ps ``` -### deploy logs +### deployment logs View service logs: ``` $ laconic-so deployment --dir logs ``` Use `-f` to follow and `-n ` to tail. + +### deployment exec + +Execute a command in a running service container: +``` +$ laconic-so deployment --dir exec "" +``` + +### deployment status + +Show deployment status: +``` +$ laconic-so deployment --dir status +``` + +### deployment port + +Show mapped ports for a service: +``` +$ laconic-so deployment --dir port +``` + +### deployment push-images + +Push deployment images to a registry: +``` +$ laconic-so deployment --dir push-images +``` + +### deployment run-job + +Run a one-time job in the deployment: +``` +$ laconic-so deployment --dir run-job +``` diff --git a/docs/deployment_patterns.md b/docs/deployment_patterns.md index fdb930d8..9fd7ed0b 100644 --- a/docs/deployment_patterns.md +++ b/docs/deployment_patterns.md @@ -30,7 +30,7 @@ git commit -m "Add my-stack deployment configuration" git push # On deployment server: deploy from git-tracked spec -laconic-so deploy create \ +laconic-so --stack my-stack deploy create \ --spec-file /path/to/operator-repo/spec.yml \ --deployment-dir my-deployment