Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ and Base versions are tracked in the repo-root `VERSION` file.

### Added

- Added read-only workspace manifest support for `basectl workspace status`,
`check`, and `doctor` with `--manifest <path>`.
- Added opt-in project Git `origin` reachability diagnostics with
`basectl check|doctor <project> --remote-network`.
- Added an explicit `ai` prerequisite profile for Codex CLI and Claude Code
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,7 @@ basectl projects list
basectl projects list --format json
basectl workspace status
basectl workspace status --format json
basectl workspace status --manifest ~/work/workspace.yaml
basectl workspace check
basectl workspace doctor
```
Expand All @@ -353,6 +354,11 @@ validity and whether the Base-managed project virtual environment is present.
Check and doctor run project diagnostics across discovered projects and keep
invalid project manifests visible as per-project findings.

Use `--manifest <path>` with `basectl workspace status`, `check`, or `doctor`
to include expected repositories from a local workspace manifest. Missing
required repositories are errors, missing optional repositories are warnings,
and Base-managed projects outside the manifest stay visible as warnings.

Start a new Base-managed repository with:

```bash
Expand Down
7 changes: 5 additions & 2 deletions cli/bash/commands/basectl/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,12 @@ such command directories exist. Optional utility CLIs such as `caff` and
when configured, otherwise `$BASE_HOME`'s parent, and prints discovered
project names and paths.
- `basectl workspace status` reports a read-only workspace summary across
discovered projects.
discovered projects, or across expected repositories when `--manifest <path>`
is supplied.
- `basectl workspace check` and `basectl workspace doctor` run read-only
project checks and diagnostics across discovered projects.
project checks and diagnostics across discovered projects. With
`--manifest <path>`, they also report missing expected repositories and
discovered Base-managed projects outside the manifest.
- `basectl version` prints the installed Base version from the repo-root `VERSION` file.
- basectl-specific bootstrap subcommands live under `cli/bash/commands/basectl/subcommands/`.
- basectl tests live under `cli/bash/commands/basectl/tests/`.
3 changes: 2 additions & 1 deletion cli/bash/commands/basectl/subcommands/workspace.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@ Usage:

Options:
--workspace <path> Workspace directory to scan. Defaults to workspace.root, then BASE_HOME's parent.
--manifest <path> Local workspace manifest describing expected repositories.
--format <format> Output format for the workspace command: text or json.
-v Enable DEBUG logging for this subcommand.
-h, --help Show this help text.

Show read-only status, check, or doctor output for Base-managed projects in the workspace.
Show read-only status, check, or doctor output for repositories in the workspace.
EOF
}

Expand Down
2 changes: 1 addition & 1 deletion cli/bash/commands/basectl/tests/completions.bats
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ EOF
[[ "$output" == *"run_options=--workspace --dry-run --list"* ]]
[[ "$output" == *"projects_options=--workspace --format"* ]]
[[ "$output" == *"workspace_commands=status check doctor"* ]]
[[ "$output" == *"workspace_options=--workspace --format"* ]]
[[ "$output" == *"workspace_options=--workspace --manifest --format"* ]]
[[ "$output" == *"onboard_options=--profile --dry-run --yes --no-profile"* ]]
[[ "$output" == *"onboard_profiles=dev sre ai dev,sre dev,ai sre,ai dev,sre,ai"* ]]
[[ "$output" == *"clean_options=--older-than --keep-last --dry-run"* ]]
Expand Down
7 changes: 5 additions & 2 deletions cli/bash/commands/basectl/tests/workspace.bats
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ load ./basectl_helpers.bash
@test "basectl workspace status delegates to the Python projects layer" {
local python_bin="$TEST_HOME/.base.d/base/.venv/bin/python"
local workspace="$TEST_TMPDIR/workspace"
local manifest="$TEST_TMPDIR/workspace.yaml"

mkdir -p "$(dirname "$python_bin")" "$workspace/base"
touch "$manifest"
cat > "$python_bin" <<'EOF'
#!/usr/bin/env bash
if [[ "${1:-}" == "-m" && "${2:-}" == "base_projects" && "${3:-}" == "status" ]]; then
Expand All @@ -25,10 +27,10 @@ EOF
HOME="$TEST_HOME" \
PATH="/usr/bin:/bin:/usr/sbin:/sbin" \
BASE_TEST_WORKSPACE_STATUS_STATE="$TEST_TMPDIR/workspace-status-state" \
"$BASE_REPO_ROOT/bin/basectl" workspace status --workspace "$workspace" --format json
"$BASE_REPO_ROOT/bin/basectl" workspace status --workspace "$workspace" --manifest "$manifest" --format json

[ "$status" -eq 0 ]
[ "$output" = "ARGS=--workspace $workspace --format json" ]
[ "$output" = "ARGS=--workspace $workspace --manifest $manifest --format json" ]
[ "$(cat "$TEST_TMPDIR/workspace-status-state")" = "BASE_PROJECT=base" ]
}

Expand Down Expand Up @@ -91,6 +93,7 @@ EOF
[[ "$output" == *"Usage:"* ]]
[[ "$output" == *"basectl workspace <status|check|doctor> [options]"* ]]
[[ "$output" == *"--workspace <path>"* ]]
[[ "$output" == *"--manifest <path>"* ]]
[[ "$output" == *"--format <format>"* ]]

run_basectl workspace check --help
Expand Down
Loading
Loading