Skip to content

feat(cli): scaffold cougr-cli workspace crate with clap command dispatch - #275

Closed
Muyideen-js wants to merge 1 commit into
salazarsebas:mainfrom
Muyideen-js:feat/cli-crate-scaffold
Closed

feat(cli): scaffold cougr-cli workspace crate with clap command dispatch#275
Muyideen-js wants to merge 1 commit into
salazarsebas:mainfrom
Muyideen-js:feat/cli-crate-scaffold

Conversation

@Muyideen-js

Copy link
Copy Markdown

Closes #243

Description

Scaffold the cougr-cli binary crate as a new workspace member with a clap-based argument parser and four subcommand stubs (new, add, check, doctor). Each stub prints a "not yet implemented" message and exits non-zero, providing a concrete integration point for follow-up issues to implement the actual logic.

Part of #243

Implementation approach

The CLI uses clap derive for ergonomic subcommand routing and auto-generated --help / --version output. The binary name is cougr, installed via cargo install cougr-cli. The crate is publish = true and lives in the root of the workspace alongside cougr-core.

Subcommand stubs

Subcommand Status Exit code Description
cougr new <name> Stub 1 Scaffold a new Soroban contract crate
cougr add <piece> Stub 1 Pull a component/system pair into an existing project
cougr check Stub 1 Run hygiene and standard-compliance checks
cougr doctor Stub 1 Verify the local toolchain

Changes

  • cougr-cli/Cargo.toml — New binary crate with clap derive, MIT license, publish = true, metadata consistent with cougr-core conventions
  • cougr-cli/src/main.rsclap derive argument parser with 4 subcommand stubs
  • cougr-cli/README.md — Minimal stub with usage and status
  • Cargo.toml — Added "cougr-cli" to workspace members

Verification

cargo run -p cougr-cli -- --help
cargo run -p cougr-cli -- --version
cargo run -p cougr-cli -- new my-game    # exits 1
cargo run -p cougr-cli -- add session-auth  # exits 1
cargo run -p cougr-cli -- check          # exits 1
cargo run -p cougr-cli -- doctor         # exits 1
cargo clippy -p cougr-cli -- -D warnings
cargo build --workspace

Out of scope

  • Actual subcommand logic — each has a dedicated follow-up issue
  • CI / publish pipeline wiring — tracked in a dedicated CI sub-issue

New cougr-cli binary crate added as workspace member with clap derive argument parser and 4 subcommand stubs (new, add, check, doctor). Each stub prints not yet implemented and exits non-zero. Metadata matches cougr-core conventions, publish = true.

Part of salazarsebas#243
@drips-wave

drips-wave Bot commented Jul 25, 2026

Copy link
Copy Markdown

@Muyideen-js Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@salazarsebas

Copy link
Copy Markdown
Owner

This scaffold looks correct for #243, but #288 (which we're merging first) already ships a working cli/ scaffold as part of its diff, so this would now be redundant/conflicting. Would you be open to closing this in favor of #288? Happy to reconsider if you'd rather we sequence it the other way around — let us know.

@salazarsebas

Copy link
Copy Markdown
Owner

Thanks for this! Heads up: cli/ already exists on main as the cougr-cli scaffold (with cougr new implemented) — this PR creates a second cougr-cli/ crate with the same package name and binary name, which will fail to build once both are in the workspace. Could you rebase onto main and build directly on top of the existing cli/ crate instead of re-scaffolding? Happy to re-review once that's in place.

@Muyideen-js

Copy link
Copy Markdown
Author

@salazarsebas updated

@salazarsebas

Copy link
Copy Markdown
Owner

Closing — this PR scaffolds a new cougr-cli/ crate from scratch, but cli/ (package cougr-cli) already exists on main since #288 and already implements new. A second, separate crate at a different path duplicates and conflicts with the established location. The remaining scope of #243 (check/add/doctor dispatch) is already tracked and being implemented directly inside cli/ via #277, #279, and #292.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(cli): scaffold cougr-cli workspace crate and command dispatch

2 participants