Skip to content

Latest commit

 

History

History
843 lines (566 loc) · 46.2 KB

File metadata and controls

843 lines (566 loc) · 46.2 KB

Command reference

CLI interface - devctl

Devctl defines, validates, and materializes reproducible Go projects from a devctl.yaml manifest. Commands are non-interactive and keep manifest mutation, synchronization, linting, scaffolding, and generation explicit.

Manage Devctl Go projects.

Usage:

$ devctl [COMMAND] [COMMAND FLAGS] [ARGUMENTS...]

init command

Initialize a Devctl project.

Create the canonical Manifest or materialize the Go project foundation declared by an existing Manifest. Initialization steps are explicit and never run one another implicitly.

Usage:

$ devctl [GLOBAL FLAGS] init [ARGUMENTS...]

init manifest subcommand

Create devctl.yaml.

devctl init manifest --lang go --preset <cli|http-service> --name --module

Create a complete v1 Manifest from a supported preset. This command writes only the Manifest; it does not scaffold files, install tools, synchronize Contracts, lint, or generate code.

Usage:

$ devctl [GLOBAL FLAGS] init manifest [COMMAND FLAGS] [ARGUMENTS...]

The following flags are supported:

Name Description Type Default value Environment variables
--file="…" use path as the Manifest instead of discovering devctl.yaml string none
--json emit compact JSONL events instead of text bool false none
--verbose include debug diagnostics and raw causes on stderr bool false none
--lang="…" set the project language; supported value: go string none
--preset="…" seed the Manifest from cli or http-service string none
--name="…" set the kebab-case project-name string none
--module="…" set the Go module-path string none
--force replace an existing Manifest instead of returning a conflict bool false none

init scaffold subcommand

Create or refresh the Go project foundation.

devctl init scaffold [--file ]

Publish Devctl-managed project files and create missing Scaffold Seeds. Managed Outputs may be replaced; existing user-owned Seeds are never deliberately overwritten or deleted.

Usage:

$ devctl [GLOBAL FLAGS] init scaffold [COMMAND FLAGS] [ARGUMENTS...]

The following flags are supported:

Name Description Type Default value Environment variables
--file="…" use path as the Manifest instead of discovering devctl.yaml string none
--json emit compact JSONL events instead of text bool false none
--verbose include debug diagnostics and raw causes on stderr bool false none

validate command

Validate the selected Project.

devctl validate [--file ]

Check Manifest structure, semantic validity, references, safe paths, and Project Readiness. Validation findings are normal results and exit with status 1 when any issue is present.

Usage:

$ devctl [GLOBAL FLAGS] validate [COMMAND FLAGS] [ARGUMENTS...]

The following flags are supported:

Name Description Type Default value Environment variables
--file="…" use path as the Manifest instead of discovering devctl.yaml string none
--json emit compact JSONL events instead of text bool false none
--verbose include debug diagnostics and raw causes on stderr bool false none

inspect command

Inspect effective Project configuration.

devctl inspect [--file ]

Show the selected Project root, effective paths, Target Catalog, Runtime Config, Resources, and resolved Contract inputs without requiring every external Snapshot to be ready.

Usage:

$ devctl [GLOBAL FLAGS] inspect [COMMAND FLAGS] [ARGUMENTS...]

The following flags are supported:

Name Description Type Default value Environment variables
--file="…" use path as the Manifest instead of discovering devctl.yaml string none
--json emit compact JSONL events instead of text bool false none
--verbose include debug diagnostics and raw causes on stderr bool false none

enable command

Enable a project capability.

Add or update one supported Capability in the Manifest. This command changes only devctl.yaml and does not refresh scaffold files or generated code.

Usage:

$ devctl [GLOBAL FLAGS] enable [ARGUMENTS...]

enable http subcommand

Enable http.

devctl enable http [--always] [--force]

Add the http Capability and its canonical defaults to the Manifest. Run init scaffold and gen explicitly when the resulting Project files need to be refreshed.

Usage:

$ devctl [GLOBAL FLAGS] enable http [COMMAND FLAGS] [ARGUMENTS...]

The following flags are supported:

Name Description Type Default value Environment variables
--file="…" use path as the Manifest instead of discovering devctl.yaml string none
--json emit compact JSONL events instead of text bool false none
--verbose include debug diagnostics and raw causes on stderr bool false none
--always omit the Runtime Start Policy so the Capability always starts bool false none
--force replace an existing Capability declaration bool false none

enable grpc subcommand

Enable grpc.

devctl enable grpc [--always] [--force]

Add the grpc Capability and its canonical defaults to the Manifest. Run init scaffold and gen explicitly when the resulting Project files need to be refreshed.

Usage:

$ devctl [GLOBAL FLAGS] enable grpc [COMMAND FLAGS] [ARGUMENTS...]

The following flags are supported:

Name Description Type Default value Environment variables
--file="…" use path as the Manifest instead of discovering devctl.yaml string none
--json emit compact JSONL events instead of text bool false none
--verbose include debug diagnostics and raw causes on stderr bool false none
--always omit the Runtime Start Policy so the Capability always starts bool false none
--force replace an existing Capability declaration bool false none

enable logging subcommand

Enable logging.

devctl enable logging [--always] [--force]

Add the logging Capability and its canonical defaults to the Manifest. Run init scaffold and gen explicitly when the resulting Project files need to be refreshed.

Usage:

$ devctl [GLOBAL FLAGS] enable logging [COMMAND FLAGS] [ARGUMENTS...]

The following flags are supported:

Name Description Type Default value Environment variables
--file="…" use path as the Manifest instead of discovering devctl.yaml string none
--json emit compact JSONL events instead of text bool false none
--verbose include debug diagnostics and raw causes on stderr bool false none
--always omit the Runtime Start Policy so the Capability always starts bool false none
--force replace an existing Capability declaration bool false none

enable health subcommand

Enable health.

devctl enable health [--always] [--force]

Add the health Capability and its canonical defaults to the Manifest. Run init scaffold and gen explicitly when the resulting Project files need to be refreshed.

Usage:

$ devctl [GLOBAL FLAGS] enable health [COMMAND FLAGS] [ARGUMENTS...]

The following flags are supported:

Name Description Type Default value Environment variables
--file="…" use path as the Manifest instead of discovering devctl.yaml string none
--json emit compact JSONL events instead of text bool false none
--verbose include debug diagnostics and raw causes on stderr bool false none
--always omit the Runtime Start Policy so the Capability always starts bool false none
--force replace an existing Capability declaration bool false none

enable telemetry subcommand

Enable telemetry.

devctl enable telemetry [--always] [--force]

Add the telemetry Capability and its canonical defaults to the Manifest. Run init scaffold and gen explicitly when the resulting Project files need to be refreshed.

Usage:

$ devctl [GLOBAL FLAGS] enable telemetry [COMMAND FLAGS] [ARGUMENTS...]

The following flags are supported:

Name Description Type Default value Environment variables
--file="…" use path as the Manifest instead of discovering devctl.yaml string none
--json emit compact JSONL events instead of text bool false none
--verbose include debug diagnostics and raw causes on stderr bool false none
--always omit the Runtime Start Policy so the Capability always starts bool false none
--force replace an existing Capability declaration bool false none

enable pprof subcommand

Enable pprof.

devctl enable pprof [--always] [--force]

Add the pprof Capability and its canonical defaults to the Manifest. Run init scaffold and gen explicitly when the resulting Project files need to be refreshed.

Usage:

$ devctl [GLOBAL FLAGS] enable pprof [COMMAND FLAGS] [ARGUMENTS...]

The following flags are supported:

Name Description Type Default value Environment variables
--file="…" use path as the Manifest instead of discovering devctl.yaml string none
--json emit compact JSONL events instead of text bool false none
--verbose include debug diagnostics and raw causes on stderr bool false none
--always omit the Runtime Start Policy so the Capability always starts bool false none
--force replace an existing Capability declaration bool false none

add command

Add a named Project resource.

Add or update a named Source, client, Kafka endpoint, database Variant, Redis Connection, S3 Connection, or S3 bucket in the Manifest. This command changes only devctl.yaml.

Usage:

$ devctl [GLOBAL FLAGS] add [ARGUMENTS...]

add db subcommand

Add a database variant.

devctl add db --kind <sqlite|postgres|clickhouse>

Add a SQLite, PostgreSQL, or ClickHouse Variant to a named database Connection. A migration target is declared by default; Devctl never writes SQL or applies migrations.

Usage:

$ devctl [GLOBAL FLAGS] add db [COMMAND FLAGS] [ARGUMENTS...]

The following flags are supported:

Name Description Type Default value Environment variables
--file="…" use path as the Manifest instead of discovering devctl.yaml string none
--json emit compact JSONL events instead of text bool false none
--verbose include debug diagnostics and raw causes on stderr bool false none
--kind="…" select sqlite, postgres, or clickhouse string none
--default make this Variant the Connection default bool false none
--force replace an existing Variant with the same identity bool false none
--no-migrations do not declare a migration target for this Variant bool false none
--migrations-path="…" override the project-relative migration path string none

add source subcommand

Add a contract source.

devctl add source --type <local|url|git|devctl> [type-specific flags]

Declare a bounded origin for Contracts. Type-specific flags select a local directory, URL closure, Git checkout, or another Devctl Project.

Usage:

$ devctl [GLOBAL FLAGS] add source [COMMAND FLAGS] [ARGUMENTS...]

The following flags are supported:

Name Description Type Default value Environment variables
--file="…" use path as the Manifest instead of discovering devctl.yaml string none
--json emit compact JSONL events instead of text bool false none
--verbose include debug diagnostics and raw causes on stderr bool false none
--type="…" select local, url, git, or devctl string none
--path="…" set the project-relative local or Git containment path string none
--url="…" set the base URL for a URL Source string none
--filename="…" store a single URL document under filename string none
--allow-insecure-http allow an http URL instead of requiring https bool false none
--repo="…" set the Git or Devctl repository location string none
--ref="…" select the immutable or reviewable repository ref string none
--buf-config="…" select the Source-relative supplier buf-config string none
--force replace an existing Source with the same name bool false none

add http-client subcommand

Add an HTTP client.

devctl add http-client --source (--path | --export )

Declare a named OpenAPI client Target. Use --path with ordinary Sources or --export with a Devctl Source.

Usage:

$ devctl [GLOBAL FLAGS] add http-client [COMMAND FLAGS] [ARGUMENTS...]

The following flags are supported:

Name Description Type Default value Environment variables
--file="…" use path as the Manifest instead of discovering devctl.yaml string none
--json emit compact JSONL events instead of text bool false none
--verbose include debug diagnostics and raw causes on stderr bool false none
--source="…" select the named contract source string none
--export="…" select a named Export from a Devctl Source string none
--path="…" select an OpenAPI Entrypoint from a non-Devctl Source string none
--base-url-env="…" override the generated runtime base URL environment key string none
--force replace an existing HTTP client with the same name bool false none

add grpc-client subcommand

Add a gRPC client.

devctl add grpc-client --source (--path | --export )

Declare a named Proto client Target. Use --path with ordinary Sources or --export with a Devctl Source; custom generator configs remain user-owned.

Usage:

$ devctl [GLOBAL FLAGS] add grpc-client [COMMAND FLAGS] [ARGUMENTS...]

The following flags are supported:

Name Description Type Default value Environment variables
--file="…" use path as the Manifest instead of discovering devctl.yaml string none
--json emit compact JSONL events instead of text bool false none
--verbose include debug diagnostics and raw causes on stderr bool false none
--source="…" select the named contract source string none
--export="…" select a named Export from a Devctl Source string none
--path="…" select the Contract path from a non-Devctl Source string none
--proto-root="…" set the Source-relative Proto module-root string none
--buf-gen-config="…" use the project-owned generator config-path string none
--addr-env="…" override the generated runtime address environment key string none
--force replace an existing gRPC client with the same name bool false none

add kafka-consumer subcommand

Add a Kafka endpoint.

devctl add kafka-consumer --topic --format <raw|json|proto> [contract flags]

Declare a named Kafka endpoint and its raw, JSON Schema, or Proto Contract. Schema-backed endpoints use --path for ordinary Sources or --export for Devctl Sources.

Usage:

$ devctl [GLOBAL FLAGS] add kafka-consumer [COMMAND FLAGS] [ARGUMENTS...]

The following flags are supported:

Name Description Type Default value Environment variables
--file="…" use path as the Manifest instead of discovering devctl.yaml string none
--json emit compact JSONL events instead of text bool false none
--verbose include debug diagnostics and raw causes on stderr bool false none
--topic="…" set the Kafka topic string none
--source="…" select the named contract source string none
--export="…" select a named Export from a Devctl Source string none
--path="…" select the schema Entrypoint from a non-Devctl Source string none
--format="…" select raw, json, or proto string none
--proto-root="…" set the Source-relative Proto module-root string none
--message="…" select the fully-qualified Proto message string none
--encoding="…" select Proto binary or json encoding string none
--group-env="…" override the consumer group environment key string none
--always omit the Runtime Start Policy so the consumer is always enabled bool false none
--force replace an existing Kafka endpoint with the same name bool false none

add kafka-producer subcommand

Add a Kafka endpoint.

devctl add kafka-producer --topic --format <raw|json|proto> [contract flags]

Declare a named Kafka endpoint and its raw, JSON Schema, or Proto Contract. Schema-backed endpoints use --path for ordinary Sources or --export for Devctl Sources.

Usage:

$ devctl [GLOBAL FLAGS] add kafka-producer [COMMAND FLAGS] [ARGUMENTS...]

The following flags are supported:

Name Description Type Default value Environment variables
--file="…" use path as the Manifest instead of discovering devctl.yaml string none
--json emit compact JSONL events instead of text bool false none
--verbose include debug diagnostics and raw causes on stderr bool false none
--topic="…" set the Kafka topic string none
--source="…" select the named contract source string none
--export="…" select a named Export from a Devctl Source string none
--path="…" select the schema Entrypoint from a non-Devctl Source string none
--format="…" select raw, json, or proto string none
--proto-root="…" set the Source-relative Proto module-root string none
--message="…" select the fully-qualified Proto message string none
--encoding="…" select Proto binary or json encoding string none
--topic-env="…" override the producer topic environment key string none
--force replace an existing Kafka endpoint with the same name bool false none

add redis subcommand

Add a redis resource.

devctl add redis [options]

Declare a named Redis Connection with an environment-backed address and a local default.

Usage:

$ devctl [GLOBAL FLAGS] add redis [COMMAND FLAGS] [ARGUMENTS...]

The following flags are supported:

Name Description Type Default value Environment variables
--file="…" use path as the Manifest instead of discovering devctl.yaml string none
--json emit compact JSONL events instead of text bool false none
--verbose include debug diagnostics and raw causes on stderr bool false none
--addr-env="…" override the generated Redis address environment key string none
--addr-default="…" override the local Redis address default string none
--force replace an existing Redis Connection with the same name bool false none

add s3-connection subcommand

Add a s3-connection resource.

devctl add s3-connection [options]

Declare a named S3 Connection and choose ambient or static credentials.

Usage:

$ devctl [GLOBAL FLAGS] add s3-connection [COMMAND FLAGS] [ARGUMENTS...]

The following flags are supported:

Name Description Type Default value Environment variables
--file="…" use path as the Manifest instead of discovering devctl.yaml string none
--json emit compact JSONL events instead of text bool false none
--verbose include debug diagnostics and raw causes on stderr bool false none
--credentials="…" select ambient or static credentials string none
--force replace an existing S3 Connection with the same name bool false none

add s3 subcommand

Add a s3 resource.

devctl add s3 [options]

Declare a named S3 bucket attached to an existing Connection, or create the canonical local Connection when omitted.

Usage:

$ devctl [GLOBAL FLAGS] add s3 [COMMAND FLAGS] [ARGUMENTS...]

The following flags are supported:

Name Description Type Default value Environment variables
--file="…" use path as the Manifest instead of discovering devctl.yaml string none
--json emit compact JSONL events instead of text bool false none
--verbose include debug diagnostics and raw causes on stderr bool false none
--connection="…" attach the bucket to the named S3 connection string none
--force replace an existing S3 bucket with the same name bool false none

sync command

Synchronize external Contracts.

devctl sync [--target ] [--dry-run]

Materialize every supported external Contract Snapshot into Project-owned paths. Full synchronization may prune stale Target directories; use --dry-run to preview changes.

Usage:

$ devctl [GLOBAL FLAGS] sync [COMMAND FLAGS] [ARGUMENTS...]

The following flags are supported:

Name Description Type Default value Environment variables
--file="…" use path as the Manifest instead of discovering devctl.yaml string none
--json emit compact JSONL events instead of text bool false none
--verbose include debug diagnostics and raw causes on stderr bool false none
--target="…" select one exact Target id, such as http-client:billing string none
--dry-run preview publication and pruning without network access or writes bool false none

sync http subcommand

Synchronize external Contracts.

devctl sync http [--target ] [--dry-run]

Materialize external http Contract Snapshots. Family synchronization may prune stale Target directories; an explicit --target never prunes sibling Targets.

Usage:

$ devctl [GLOBAL FLAGS] sync http [COMMAND FLAGS] [ARGUMENTS...]

The following flags are supported:

Name Description Type Default value Environment variables
--file="…" use path as the Manifest instead of discovering devctl.yaml string none
--json emit compact JSONL events instead of text bool false none
--verbose include debug diagnostics and raw causes on stderr bool false none
--target="…" select one exact Target id, such as http-client:billing string none
--dry-run preview publication and pruning without network access or writes bool false none

sync grpc subcommand

Synchronize external Contracts.

devctl sync grpc [--target ] [--dry-run]

Materialize external grpc Contract Snapshots. Family synchronization may prune stale Target directories; an explicit --target never prunes sibling Targets.

Usage:

$ devctl [GLOBAL FLAGS] sync grpc [COMMAND FLAGS] [ARGUMENTS...]

The following flags are supported:

Name Description Type Default value Environment variables
--file="…" use path as the Manifest instead of discovering devctl.yaml string none
--json emit compact JSONL events instead of text bool false none
--verbose include debug diagnostics and raw causes on stderr bool false none
--target="…" select one exact Target id, such as http-client:billing string none
--dry-run preview publication and pruning without network access or writes bool false none

sync kafka subcommand

Synchronize external Contracts.

devctl sync kafka [--target ] [--dry-run]

Materialize external kafka Contract Snapshots. Family synchronization may prune stale Target directories; an explicit --target never prunes sibling Targets.

Usage:

$ devctl [GLOBAL FLAGS] sync kafka [COMMAND FLAGS] [ARGUMENTS...]

The following flags are supported:

Name Description Type Default value Environment variables
--file="…" use path as the Manifest instead of discovering devctl.yaml string none
--json emit compact JSONL events instead of text bool false none
--verbose include debug diagnostics and raw causes on stderr bool false none
--target="…" select one exact Target id, such as http-client:billing string none
--dry-run preview publication and pruning without network access or writes bool false none

gen command

Generate Managed Outputs.

devctl gen [--target ] [--dry-run]

Run the Project-owned generators for every supported Target and atomically publish each Target's Managed Output. Generation never synchronizes or lints implicitly.

Usage:

$ devctl [GLOBAL FLAGS] gen [COMMAND FLAGS] [ARGUMENTS...]

The following flags are supported:

Name Description Type Default value Environment variables
--file="…" use path as the Manifest instead of discovering devctl.yaml string none
--json emit compact JSONL events instead of text bool false none
--verbose include debug diagnostics and raw causes on stderr bool false none
--dry-run preview Managed Outputs without running generators or writing files bool false none
--target="…" select one exact generation Target id string none

gen config subcommand

Generate Managed Outputs.

devctl gen config [--dry-run]

Run the Project-owned generators for config Targets and atomically publish their Managed Outputs without synchronizing or linting implicitly.

Usage:

$ devctl [GLOBAL FLAGS] gen config [COMMAND FLAGS] [ARGUMENTS...]

The following flags are supported:

Name Description Type Default value Environment variables
--file="…" use path as the Manifest instead of discovering devctl.yaml string none
--json emit compact JSONL events instead of text bool false none
--verbose include debug diagnostics and raw causes on stderr bool false none
--dry-run preview Managed Outputs without running generators or writing files bool false none

gen http subcommand

Generate Managed Outputs.

devctl gen http [--target ] [--dry-run]

Run the Project-owned generators for http Targets and atomically publish their Managed Outputs without synchronizing or linting implicitly.

Usage:

$ devctl [GLOBAL FLAGS] gen http [COMMAND FLAGS] [ARGUMENTS...]

The following flags are supported:

Name Description Type Default value Environment variables
--file="…" use path as the Manifest instead of discovering devctl.yaml string none
--json emit compact JSONL events instead of text bool false none
--verbose include debug diagnostics and raw causes on stderr bool false none
--dry-run preview Managed Outputs without running generators or writing files bool false none
--target="…" select one exact generation Target id string none

gen grpc subcommand

Generate Managed Outputs.

devctl gen grpc [--target ] [--dry-run]

Run the Project-owned generators for grpc Targets and atomically publish their Managed Outputs without synchronizing or linting implicitly.

Usage:

$ devctl [GLOBAL FLAGS] gen grpc [COMMAND FLAGS] [ARGUMENTS...]

The following flags are supported:

Name Description Type Default value Environment variables
--file="…" use path as the Manifest instead of discovering devctl.yaml string none
--json emit compact JSONL events instead of text bool false none
--verbose include debug diagnostics and raw causes on stderr bool false none
--dry-run preview Managed Outputs without running generators or writing files bool false none
--target="…" select one exact generation Target id string none

gen kafka subcommand

Generate Managed Outputs.

devctl gen kafka [--target ] [--dry-run]

Run the Project-owned generators for kafka Targets and atomically publish their Managed Outputs without synchronizing or linting implicitly.

Usage:

$ devctl [GLOBAL FLAGS] gen kafka [COMMAND FLAGS] [ARGUMENTS...]

The following flags are supported:

Name Description Type Default value Environment variables
--file="…" use path as the Manifest instead of discovering devctl.yaml string none
--json emit compact JSONL events instead of text bool false none
--verbose include debug diagnostics and raw causes on stderr bool false none
--dry-run preview Managed Outputs without running generators or writing files bool false none
--target="…" select one exact generation Target id string none

lint command

Lint Project Contracts.

devctl lint [--file ]

Lint every supported Contract using committed local inputs. Findings are normal results and exit with status 1 without becoming execution errors.

Usage:

$ devctl [GLOBAL FLAGS] lint [COMMAND FLAGS] [ARGUMENTS...]

The following flags are supported:

Name Description Type Default value Environment variables
--file="…" use path as the Manifest instead of discovering devctl.yaml string none
--json emit compact JSONL events instead of text bool false none
--verbose include debug diagnostics and raw causes on stderr bool false none

lint http subcommand

Lint Project Contracts.

devctl lint http [--file ]

Lint committed http Contracts without synchronizing or generating code. Findings are normal results and exit with status 1.

Usage:

$ devctl [GLOBAL FLAGS] lint http [COMMAND FLAGS] [ARGUMENTS...]

The following flags are supported:

Name Description Type Default value Environment variables
--file="…" use path as the Manifest instead of discovering devctl.yaml string none
--json emit compact JSONL events instead of text bool false none
--verbose include debug diagnostics and raw causes on stderr bool false none

lint grpc subcommand

Lint Project Contracts.

devctl lint grpc [--file ]

Lint committed grpc Contracts without synchronizing or generating code. Findings are normal results and exit with status 1.

Usage:

$ devctl [GLOBAL FLAGS] lint grpc [COMMAND FLAGS] [ARGUMENTS...]

The following flags are supported:

Name Description Type Default value Environment variables
--file="…" use path as the Manifest instead of discovering devctl.yaml string none
--json emit compact JSONL events instead of text bool false none
--verbose include debug diagnostics and raw causes on stderr bool false none

lint kafka subcommand

Lint Project Contracts.

devctl lint kafka [--file ]

Lint committed kafka Contracts without synchronizing or generating code. Findings are normal results and exit with status 1.

Usage:

$ devctl [GLOBAL FLAGS] lint kafka [COMMAND FLAGS] [ARGUMENTS...]

The following flags are supported:

Name Description Type Default value Environment variables
--file="…" use path as the Manifest instead of discovering devctl.yaml string none
--json emit compact JSONL events instead of text bool false none
--verbose include debug diagnostics and raw causes on stderr bool false none