CLI Tool Implementation
Priority
P2 (Medium) - User-facing interface
Status
Landed in #2 (merged); the check fast path shipped as
ComlineProject/core#21 (merged). The only item left is crates.io publishing,
which is blocked on a released comline-core.
Description
comline is a command-line interface for Comline that exposes the common
development workflows built on top of comline-core. This issue tracks rounding
out its command set, output and packaging.
Note: This issue was originally filed in ComlineProject/core when the CLI
was still hypothetical. It has been transferred here and rescoped against the
code that now exists in this repo.
Starting point
A working binary already existed in this repo (clap + miette + tracing,
comline-core pulled in via git):
| Command |
State at filing |
comline build [--release] |
Runs the full build pipeline; prints the version bump and a formatted breaking / new-feature / modification changelog. --release plumbed through but unused. |
comline check |
Validated the project by delegating to build() — no dedicated fast path. |
comline generate |
Builds, then discovers generators via codelib_gen::find_generator and writes one output file per schema namespace. |
comline new <name> |
Scaffolded a directory containing a minimal config.idp. |
Global flags: --path <dir> to run outside the CWD, -v/-vv for log verbosity.
Covered by tests/cli_tests.rs with fixtures under tests/fixtures/, plus a CI
workflow.
Gaps
Commands
UX
Packaging & docs
Example Usage
# Scaffold and enter a project
comline new my-api
cd my-api
# Build schemas
comline build
# Generate bindings
comline generate --target rust
# Validate without building
comline check
# Compare two schema versions
comline diff 0.1.0 0.2.0
Dependencies
Tracks comline-core capability work in ComlineProject/core:
- Package configuration system (
ComlineProject/core#6)
- Schema diffing & auto-versioning (
ComlineProject/core#7)
- Code generation plugin system (
ComlineProject/core#8)
Publishing (cargo install comline) is additionally blocked on comline-core
being released to crates.io rather than consumed via git.
CLI Tool Implementation
Priority
P2 (Medium) - User-facing interface
Status
Landed in #2 (merged); the
checkfast path shipped asComlineProject/core#21(merged). The only item left is crates.io publishing,which is blocked on a released
comline-core.Description
comlineis a command-line interface for Comline that exposes the commondevelopment workflows built on top of
comline-core. This issue tracks roundingout its command set, output and packaging.
Starting point
A working binary already existed in this repo (
clap+miette+tracing,comline-corepulled in via git):comline build [--release]--releaseplumbed through but unused.comline checkbuild()— no dedicated fast path.comline generatecodelib_gen::find_generatorand writes one output file per schema namespace.comline new <name>config.idp.Global flags:
--path <dir>to run outside the CWD,-v/-vvfor log verbosity.Covered by
tests/cli_tests.rswith fixtures undertests/fixtures/, plus a CIworkflow.
Gaps
Commands
comline diff <old> <new>— standalone subcommand. The diffing logicalready exists (
comline_core::schema::ir::diff); expose it directly forcomparing two versions/refs instead of only via
build.comline clean— remove build artifacts / clear the CAS store / reset state.comline check— a real validation-only path instead of callingbuild()(no codegen, no CAS writes). Needs a
comline-corehelper —core#21.comline newscaffold — decidenewvsinit(keptnew); flesh out thescaffold with an example schema under
src/and optionalgit init.comline generate --target <lang>— select one configured generatorinstead of running every one.
UX
tracinglayer — status lines no longer ride on log records.
miette::bail!/
Errpaths).-q/ quiet mode.--watchfor rebuild-on-change.Packaging & docs
cargo install comlineworks.Cargo.tomlcurrently depends on
comline-corevia a git URL, which blockspublishing — needs a released
comline-coreversion.Cargo.tomlmetadata:repositoryanddescriptionwere stale.clap_complete.clap_mangen.--helpreview for every subcommand.docs/cli.mdis the full guide — every command, theversioning model, output and exit codes, watch mode and packaging;
README.mdis the quick tour and links to it. A dedicated docs site isstill wanted, as a separate effort.
Example Usage
Dependencies
Tracks
comline-corecapability work inComlineProject/core:ComlineProject/core#6)ComlineProject/core#7)ComlineProject/core#8)Publishing (
cargo install comline) is additionally blocked oncomline-corebeing released to crates.io rather than consumed via git.