{{ message }}
feat(cli): improve workspace and cloud bisync command discoverability - #905
Merged
Conversation
Add '--project' as an alias for '--name' on the cloud sync/bisync/check commands so users who think in terms of projects can use either flag. Typer binds both option strings to the same 'name' arg, so there is no downstream change and '--name' stays for back-compat. Add a top-level 'workspace' stub command that redirects users to the real 'bm cloud workspace' verbs. Previously 'bm workspace' (and 'bm workspace list' etc.) emitted a bare "No such command 'workspace'." with exit 2. The stub uses allow_extra_args + ignore_unknown_options so every 'bm workspace ...' form reaches the body and prints actionable guidance with exit 1. Closes #817 Closes #821 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: phernandez <paul@basicmachines.co>
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Two small, independent CLI UX wins that improve discoverability of cloud project sync and workspace commands.
What changed
Part A (#817) —
--projectalias for--namesrc/basic_memory/cli/commands/cloud/project_sync.py: thecloud sync,cloud bisync, andcloud checkcommands now accept--projectas an alias for--name. Typer binds both option strings to the samenameargument, so there's zero downstream change and--namestays for back-compat. Thebisync-reset/sync-setupcommands take the project as a positional argument and are unchanged.Part B (#821) —
bm workspaceredirects tobm cloud workspacesrc/basic_memory/cli/commands/workspace.py: a top-levelworkspacestub command. Previouslybm workspace/bm workspace listemitted a bareNo such command 'workspace'.(exit 2). The stub prints actionable guidance pointing tobm cloud workspace list/bm cloud workspace set-default <name>and exits 1.context_settings={"allow_extra_args": True, "ignore_unknown_options": True}is load-bearing — it ensuresbm workspace,bm workspace list, andbm workspace set-default fooall reach the body instead of being rejected as bad usage.workspacetoskip_init_commandsincli/app.py(the stub doesn't need DB init), to the conditional import block incli/main.py, and tocli/commands/__init__.pyimports +__all__.bm cloud workspacesub-typer is unaffected — the stub registers on the top-levelapp, not undercloud_app.Testing (commands + results)
uv run ruff check .— clean for all changed files (3 pre-existing errors inintegrations/hermes/tests/are out of scope and untouched)uv run ruff format .— changed files formatteduv run pytest tests/cli/test_workspace_stub.py tests/cli/cloud/test_project_sync_command.py -q— 18 passed (includes 2 new--projectparametrized variants and the new workspace stub test asserting exit 1 +bm cloud workspaceguidance for all three forms)uv run ty check src tests test-int— All checks passed!bm cloud workspace --helpstill resolves (exit 0,listverb present);bm cloud sync --helpshows--project.Integration-style
CliRunnertests against the real app; no mocks added (the existing project_sync test fixtures' monkeypatches are reused for the alias variants since those tests exercise the dispatch path, not cloud I/O).Risk
Low.
--projectis purely additive (Typer multi-name option). Theworkspacestub only intercepts a previously-failing invocation and registers on the top-level app without shadowing the realbm cloud workspacecommands.Closes #817
Closes #821
🤖 Generated with Claude Code