Skip to content

Shorter ergonomic commands for all the issue stuff#10

Merged
erewok merged 8 commits into
mainfrom
cli-ergo-updates
May 3, 2026
Merged

Shorter ergonomic commands for all the issue stuff#10
erewok merged 8 commits into
mainfrom
cli-ergo-updates

Conversation

@erewok

@erewok erewok commented May 2, 2026

Copy link
Copy Markdown
Owner

This pull request represents an intent to simplify the CLI with a focus on issue-related subcommands.

I found that I kept typing bmo issue ls -a or bmo ls -a and I wanted these commands to work, so that's the goal with this PR.

The issue subcommand (e.g. bmo issue ls) can now be invoked directly (e.g., bmo create, bmo list) without the issue prefix, but the old form with issue subcommand is still respected for backward compatibility.

These IssueFilter options have also been slightly reworked:

  • -a for --all (-a used to be a short option for --asignee)
  • --assignee only has long-option now
  • -k instead of -T for --kind

Warning

These are breaking changes for existing tooling:

  • Added -a for --all and removed -a for --assignee.
  • Removed -T as a short option for kind and replaced it with -k.

The documentation has also been updated to show the new forms, clarify usage, and improve consistency of flags and examples.

This PR also includes some modification to the agent-init command: it was spitting out 500 issues, so I modified it to print a smaller list of recent issues and also the most recent epic.

CLI simplification and documentation updates:

  • All core issue commands (create, list, show, edit, move, close, reopen, claim, delete, log, graph, comment, file) can now be invoked directly as bmo <cmd>, with the previous bmo issue <cmd> form retained for backward compatibility. Documentation in docs/commands.md, docs/agents.md, and README.md has been updated throughout to use the new direct forms and provide updated examples.
  • Command flag aliases and examples have been improved for clarity and consistency, including new aliases (e.g., bmo ls for bmo list) and updated flag names (e.g., -k for kind, -a for all, removal of redundant flags).
  • agent-init output shortened (most recent 10 issues instead of 500) and some new commands suggested (file add and link add).
  • All relevant documentation, usage examples, and code snippets now use the new direct command forms for issue and comment/file operations, ensuring consistency and reducing cognitive overhead for users.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR simplifies the bmo CLI by promoting issue-related subcommands to the top level (e.g., bmo list instead of bmo issue list) while retaining the bmo issue <cmd> form for compatibility, and updates documentation accordingly. It also adjusts some issue-list flags and bumps the crate version.

Changes:

  • Add top-level issue commands (bmo create/list/show/...) alongside the existing bmo issue <cmd> namespace.
  • Update issue list flags (-a/--all, -k/--kind, remove -a short for --assignee) and refresh docs/examples to match.
  • Enhance agent-init output (recent epic + board done truncation) and bump version to 0.6.0.

Reviewed changes

Copilot reviewed 9 out of 10 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/main.rs Dispatches new top-level issue-related commands to existing handlers.
src/cli/mod.rs Adds top-level issue subcommands (and aliases like ls) while keeping issue as a backward-compatible namespace.
src/cli/issue/move_cmd.rs Tweaks clap arg metadata for --status and minor refactor in run().
src/cli/issue/list.rs Updates list flags (-a for all, -k for kind) and removes short -a for assignee.
src/cli/agent_init.rs Updates cheat sheet text; changes board construction and adds recent_epic to outputs.
docs/commands.md Updates CLI docs to show short-form commands and new flag aliases/examples.
docs/agents.md Updates agent workflow examples to use short-form commands.
README.md Updates quickstart to use bmo create / bmo list.
Cargo.toml Version bump to 0.6.0.
Cargo.lock Lockfile version update for bmo.
Comments suppressed due to low confidence (2)

src/cli/agent_init.rs:105

  • repo.list_issues(IssueFilter::default()) is executed twice (for active_issues and again for all_issues_for_next). This is redundant DB work; consider reusing active_issues for the DAG/next computation (or otherwise avoid the second full query).
    // 4. next (unblocked, work-ready issues)
    let all_issues_for_next = repo.list_issues(IssueFilter::default())?;
    let all_relations = repo.list_all_relations()?;
    let dag = Dag::build(&all_issues_for_next, &all_relations);
    topological_levels(&dag)?;
    let next: Vec<_> = find_ready(&dag).into_iter().take(10).cloned().collect();

src/cli/agent_init.rs:245

  • run_with_dir_inner also performs a second repo.list_issues(IssueFilter::default()) for all_issues_for_next even though active_issues was just fetched with the same filter. Reuse the first result to avoid an extra DB query.
    let all_issues_for_next = repo.list_issues(IssueFilter::default())?;
    let all_relations = repo.list_all_relations()?;
    let dag = Dag::build(&all_issues_for_next, &all_relations);

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/cli/agent_init.rs Outdated
Comment thread src/cli/agent_init.rs Outdated
Comment thread src/cli/agent_init.rs Outdated
Comment thread docs/commands.md Outdated
Comment thread src/cli/issue/list.rs
@erewok erewok merged commit 82d8a4e into main May 3, 2026
4 checks passed
@erewok erewok deleted the cli-ergo-updates branch May 3, 2026 23:40
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.

2 participants