diff --git a/src/basic_memory/ci/README.md b/src/basic_memory/ci/README.md index 0f447bbb..fb7e402e 100644 --- a/src/basic_memory/ci/README.md +++ b/src/basic_memory/ci/README.md @@ -37,9 +37,13 @@ For the common cloud path: ```bash bm cloud api-key save bmc_... -bm ci setup --project --workspace --cloud --yes +bm cloud workspace list +bm ci setup --project --workspace --cloud --yes ``` +Use the `Slug` column from `bm cloud workspace list` for `--workspace`; the +`Workspace ID` column also works when a slug is unavailable or ambiguous. + Prefer `--project-id ` when the same project name exists in more than one workspace: @@ -70,7 +74,7 @@ Configure production deploy capture in `.github/basic-memory/config.yml`: ```yaml project: -workspace: +workspace: deploy_workflows: - Deploy Production production_environments: diff --git a/src/basic_memory/cli/commands/cloud/workspace.py b/src/basic_memory/cli/commands/cloud/workspace.py index da6c6477..d5522207 100644 --- a/src/basic_memory/cli/commands/cloud/workspace.py +++ b/src/basic_memory/cli/commands/cloud/workspace.py @@ -43,15 +43,17 @@ def list_workspaces() -> None: table = Table(title="Available Workspaces") table.add_column("Name", style="cyan") + table.add_column("Slug", style="cyan") table.add_column("Type", style="blue") table.add_column("Role", style="green") - table.add_column("Tenant ID", style="yellow") + table.add_column("Workspace ID", style="yellow") table.add_column("Default", style="magenta") for workspace in workspaces: is_default = "[X]" if workspace.tenant_id == default_ws else "" table.add_row( workspace.name, + workspace.slug, workspace.workspace_type, workspace.role, workspace.tenant_id, @@ -59,6 +61,9 @@ def list_workspaces() -> None: ) console.print(table) + console.print( + "[dim]Use the Slug or Workspace ID anywhere a command asks for --workspace.[/dim]" + ) @workspace_app.command("set-default") diff --git a/tests/cli/test_workspace_commands.py b/tests/cli/test_workspace_commands.py index 9b77181a..7463d218 100644 --- a/tests/cli/test_workspace_commands.py +++ b/tests/cli/test_workspace_commands.py @@ -66,9 +66,13 @@ def test_workspace_list_prints_available_workspaces(runner, monkeypatch): assert result.exit_code == 0 assert "Available Workspaces" in result.stdout + assert "Slug" in result.stdout + assert "Workspace ID" in result.stdout assert "Personal" in result.stdout assert "Team" in result.stdout - # Tenant ID may be truncated by Rich table rendering + assert "personal" in result.stdout + assert "team" in result.stdout + # Workspace ID may be truncated by Rich table rendering assert "11111111" in result.stdout