Skip to content

Extract Command Handlers into a Library Crate#40

Merged
brdv merged 1 commit intomainfrom
extract-lib-and-command-handlers
Mar 11, 2026
Merged

Extract Command Handlers into a Library Crate#40
brdv merged 1 commit intomainfrom
extract-lib-and-command-handlers

Conversation

@brdv
Copy link
Owner

@brdv brdv commented Mar 11, 2026

Summary

Extract the runtime entrypoint into src/lib.rs and move command implementations out of src/cli.rs so the CLI definition stays focused on parsing and dispatch.

This keeps the current behavior intact while making the codebase easier to test, document, and evolve before the upcoming Rustdoc and linting pass.

Changelist

  • src/lib.rs adds the library entrypoint used by src/main.rs
  • src/main.rs now delegates directly to stck::run()
  • src/commands.rs holds the command execution logic that used to live in src/cli.rs
  • src/cli.rs now focuses on clap types, parsing, and dispatch

Stack parent: #39
Stack child: none yet

Checklist

  • Changes are minimal and focused for this milestone
  • No breaking CLI changes unless explicitly intended
  • Errors are user-facing, actionable, and prefixed with error:
  • Added/updated tests for behavior changes
  • Updated docs/plan if behavior or scope changed

@brdv brdv changed the title extract-lib-and-command-handlers Extract Command Handlers into a Library Crate Mar 11, 2026
@brdv brdv force-pushed the split-integration-tests branch from 21199f5 to 3d3c721 Compare March 11, 2026 12:15
@brdv brdv force-pushed the extract-lib-and-command-handlers branch from cbd8aa2 to ef3d4c0 Compare March 11, 2026 12:15
Base automatically changed from split-integration-tests to main March 11, 2026 12:16
@brdv brdv force-pushed the extract-lib-and-command-handlers branch from ef3d4c0 to 3556ad4 Compare March 11, 2026 12:17
@brdv brdv merged commit 6151a03 into main Mar 11, 2026
1 check passed
@brdv brdv deleted the extract-lib-and-command-handlers branch March 11, 2026 12:18
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