diff --git a/Cargo.toml b/Cargo.toml index 3db8d8a..53ed580 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -63,7 +63,7 @@ tokio = { version = "1", default-features = false, optional = true } [features] # Which language generators are compiled in. Drop one to shed its whole # dependency tree from the build. A build with neither can compile but -# `comline generate` will find no generator. +# `comline generation` will find no generator. default = ["gen-rust", "gen-typescript", "gen-wasm"] gen-rust = ["dep:comline-codegen-rust"] gen-typescript = ["dep:comline-codegen-typescript"] diff --git a/README.md b/README.md index 8008626..42c49b0 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ cargo install --path . comline new my-api # scaffold a project cd my-api comline build # compile + freeze version 0.1.0-dev.1 -comline generate # write generated code for each configured target +comline generation # write generated code for each configured target ``` ## Commands @@ -30,13 +30,13 @@ comline generate # write generated code for each configured target | Command | What it does | |---|---| | `comline new [--git]` | Scaffold `/` with `config.idp`, `comline.toml`, `src/main.ids` and a `.gitignore`. `--git` also runs `git init`. | -| `comline add ` / `comline add --git --commit --version ` | Add a dependency to `config.idp`: resolved first (a git pin is fetched), then written with its content `hash` pinned. `--no-hash` skips the pin. | +| `comline deps add ` / `comline deps add --git --commit --version ` | Add a dependency to `config.idp`: resolved first (a git pin is fetched), then written with its content `hash` pinned. `--no-hash` skips the pin. | | `comline check` | Parse, resolve and validate every schema. No `.comline/` writes (beyond fetching git dependencies), no version bump — safe for editors, hooks and CI. | | `comline build [--release] [--watch]` | Compile, validate, and freeze a new immutable version into `.comline/`. Prints the changelog and the version bump. | -| `comline generate [--target ] [--out ] [--layout ] [--mode ] [--watch]` | Validate (no freeze), then write generated code. Output location/layout come from `comline.toml` `[generate]`; targets from there or `config.idp`. | +| `comline generation [--target ] [--out ] [--layout ] [--mode ] [--watch]` | Validate (no freeze), then write generated code. Output location/layout come from `comline.toml` `[generate]`; targets from there or `config.idp`. `gen` is short for `generation`. | | `comline diff ` | Show the schema changes between two built versions. Each argument is a version (`0.2.0`), a commit hash, or `HEAD` (the default for ``). | | `comline conformance --impl [--encoding ] [--corpus ]` | Run an encoding's implementation (a process speaking the conformance ops protocol) against the vectors its package ships beside each profile (`profiles/x.json` → `profiles/x.vectors.json`). Reports proven facts and failed cases with byte diffs; exits `1` on any failure. | -| `comline clean [--dry-run]` | Remove the `generate` output (the output root, or the individual files). Leaves `.comline/` alone. | +| `comline generation clean [--dry-run] [--target ]` | Remove the `generation` output (the output root, or the individual files), or just one language's with `--target`. Leaves `.comline/` alone. | | `comline reset [--force] [--dry-run]` | Discard the version history: delete `.comline/` and generated code. Asks for confirmation on a terminal; needs `--force` otherwise. No undo — the next build restarts at `0.1.0-dev.1`. | | `comline completions ` | Print a shell completion script to stdout. | @@ -91,7 +91,7 @@ The `comline` CLI is licensed under the **GNU General Public License v3.0 only** `comline-core` and the code generators, which are GPL. Copyleft covers the *toolchain*, not what you build with it. Running `comline -generate` no more licenses your project than compiling it with GCC does; the +generation` no more licenses your project than compiling it with GCC does; the code it emits is yours and links only `comline-runtime` (MPL-2.0). See [`design/licensing.md`](https://github.com/ComlineProject/docs) for the rationale and per-repo split. diff --git a/docs/cli.md b/docs/cli.md index d79dbd6..981fc22 100644 --- a/docs/cli.md +++ b/docs/cli.md @@ -14,15 +14,15 @@ This is the long-form reference. For a two-minute tour see the - [Versioning model](#versioning-model) - [Commands](#commands) - [`new`](#comline-new) - - [`add`](#comline-add) + - [`deps add`](#comline-deps-add) - [`check`](#comline-check) - [`inspect`](#comline-inspect) - [`build`](#comline-build) - - [`generate`](#comline-generate) + - [`generation`](#comline-generation) + - [`generation clean`](#comline-generation-clean) - [`diff`](#comline-diff) - [`doc`](#comline-doc) - [`conformance`](#comline-conformance) - - [`clean`](#comline-clean) - [`reset`](#comline-reset) - [`completions`](#comline-completions) - [Global flags](#global-flags) @@ -40,7 +40,7 @@ code-generation output. Running a command takes those inputs through: **parse → resolve imports → validate → (freeze into `.comline/`) → (generate code)** `check` stops after validation. `build` adds the freeze step and records a new -version. `generate` stops after validation too — it does **not** freeze — and +version. `generation` stops after validation too — it does **not** freeze — and writes generated code per `comline.toml`. `diff` reads two already-frozen versions and reports what changed between them. @@ -65,7 +65,7 @@ completions are generated during the build — see ``` my-api/ ├── config.idp # package manifest: name, spec version, code_generation targets -├── comline.toml # where `generate` writes code and how (all-commented by default) +├── comline.toml # where `generation` writes code and how (all-commented by default) ├── src/ │ └── main.ids # a sample enum + struct to build on └── .gitignore # ignores .comline/deps-cache/ @@ -118,7 +118,7 @@ current version and does not add a commit. `comline diff` runs this same comparison between any two stored versions on demand. The chain in `.comline/` is the only copy of this history — there is no publish -step yet. [`comline clean`](#comline-clean) does **not** touch it; only +step yet. [`comline generation clean`](#comline-generation-clean) does **not** touch it; only [`comline reset`](#comline-reset) discards it, after which the next build starts over at `0.1.0-dev.1`. @@ -144,11 +144,11 @@ comline new my-api comline new my-api --git ``` -### `comline add` +### `comline deps add` ``` -comline add [--no-hash] -comline add --git --commit --version [--no-hash] +comline deps add [--no-hash] +comline deps add --git --commit --version [--no-hash] ``` Declare another Comline package as a dependency, imported under ``: @@ -170,8 +170,8 @@ dependency changes later, `check` and `build` fail until the pin is updated. on). ```bash -comline add shared_types ../shared-types -comline add net --git https://github.com/acme/net --commit 4f2c9e1 --version 1.2.0 +comline deps add shared_types ../shared-types +comline deps add net --git https://github.com/acme/net --commit 4f2c9e1 --version 1.2.0 ``` Exit `0` once added, `1` if the dependency doesn't resolve or can't be added @@ -287,12 +287,15 @@ comline build --watch comline build --reconcile 3f9a… # the full 64-character hash ``` -### `comline generate` +### `comline generation` ``` -comline generate [--target ] [--out ] [--layout