feat(cli): add top-level workspace stub redirecting to bm cloud workspace

Adds a `bm workspace` stub command that prints a clear redirect hint
pointing users to `bm cloud workspace list` and
`bm cloud workspace set-default`, then exits non-zero.  Accepts any
extra arguments (e.g. `bm workspace list`) so the hint is shown
regardless of how the user typed the command.

Closes #821

Co-authored-by: Drew Cain <groksrc@users.noreply.github.com>
Signed-off-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
This commit is contained in:
claude[bot]
2026-05-14 02:13:23 +00:00
parent c6fa185bf3
commit a5cb5b8253
5 changed files with 46 additions and 0 deletions
+1
View File
@@ -86,6 +86,7 @@ def app_callback(
"reindex",
"update",
"watch",
"workspace",
}
if (
not version
@@ -9,6 +9,7 @@ from . import (
format,
schema,
update,
workspace,
)
__all__ = [
@@ -26,4 +27,5 @@ __all__ = [
"format",
"schema",
"update",
"workspace",
]
@@ -0,0 +1,17 @@
"""Top-level workspace stub — redirects users to 'bm cloud workspace'."""
import typer
from basic_memory.cli.app import app
@app.command(
"workspace",
context_settings={"allow_extra_args": True, "ignore_unknown_options": True},
)
def workspace_redirect() -> None:
"""'bm workspace' is not a command — see 'bm cloud workspace'."""
typer.echo("'bm workspace' is not a command. Workspace verbs live under 'bm cloud workspace':")
typer.echo(" bm cloud workspace list")
typer.echo(" bm cloud workspace set-default <name>")
raise typer.Exit(1)
+1
View File
@@ -30,6 +30,7 @@ if not _version_only_invocation(sys.argv[1:]):
status,
tool,
update,
workspace,
)
warnings.filterwarnings("ignore") # pragma: no cover