Skip to content

feat(pm): expose embeddable command library - #3324

Draft
elrrrrrrr wants to merge 3 commits into
nextfrom
codex/pm-lib-api
Draft

feat(pm): expose embeddable command library#3324
elrrrrrrr wants to merge 3 commits into
nextfrom
codex/pm-lib-api

Conversation

@elrrrrrrr

@elrrrrrrr elrrrrrrr commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add an utoo-pm library target and reduce the native binary to a thin wrapper
  • promote the command-handler layer itself to the public commands::* API; CLI and embedders call the same functions with no mirrored facade
  • give every native CLI capability its own command module, including completions, execute, init, pack, and uninstall
  • expose shared initialization, command types, version, and clap metadata
  • add an external-crate API test covering every CLI business command

Architecture

CLI adapter ─┐
             ├──> commands::<capability> ──> private service/helper layers
embedder ────┘

Command-line parsing, process exit handling, logging, and presentation remain in the CLI adapter. Process-wide configuration keeps its current first-write-wins semantics.

Validation

  • cargo check -p utoo-pm --all-targets --locked
  • cargo test -p utoo-pm --lib --locked — 371 passed, 3 ignored
  • cargo test -p utoo-pm --test library_api --locked
  • cargo clippy -p utoo-pm --all-targets --locked -- --deny warnings
  • RUSTDOCFLAGS="-D warnings" cargo doc -p utoo-pm --no-deps --locked
  • cargo run -p utoo-pm --bin utoo --locked -- --version
  • cargo run -p utoo-pm --bin utoo --locked -- --help

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.

1 participant