* test(cli): be-lbhy2 dolt.local-only enforcement gate tests (TDD, be-3v2ou)
Failing tests for be-3v2ou (dolt.local-only enforcement, FR-01 to FR-05).
All tests fail or refuse to compile until the builder adds isDoltLocalOnly().
cmd/bd/dolt_local_only_test.go (unit, no build tag):
- TestIsDoltLocalOnly_FalseByDefault
- TestIsDoltLocalOnly_TrueWhenConfigSet
- TestIsDoltLocalOnly_FalseAfterUnset
- TestMaybeAutoPush_SkipsWhenLocalOnly
cmd/bd/dolt_local_only_embedded_test.go (build:embeddeddolt):
- TestDoltLocalOnly_Push_ExitsZeroWithMessage
- TestDoltLocalOnly_Push_LocalStoreCopy
- TestDoltLocalOnly_Push_JSON_DisabledStatus
- TestDoltLocalOnly_Pull_ExitsZeroWithMessage
- TestDoltLocalOnly_Pull_JSON_DisabledStatus
- TestDoltLocalOnly_RemoteAdd_RefusesExitOne
- TestDoltLocalOnly_RemoteAdd_ErrorOnStderr
- TestDoltLocalOnly_ConfigRoundTrip
- TestDoltLocalOnly_DoltStatus_ShowsDisabled
Message copy from be-0jyq7 (UX spec). Exact strings asserted so the builder
cannot ship copy drift.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat(dolt): implement dolt.local-only enforcement (be-3v2ou, FR-01 to FR-05)
- Add isDoltLocalOnly() in dolt_local_only.go (reads dolt.local-only config key)
- bd dolt push: exit-0 no-op with 'Remote sync is disabled...' message when set;
--json emits {status:disabled,reason:dolt.local-only=true} via outputJSONRaw
- bd dolt pull: same exit-0 no-op + 'Nothing to pull.' message
- bd dolt remote add: exit-1 error to stderr ('cannot add Dolt remote: ... disabled')
- bd dolt status: appends 'Remote sync: disabled (dolt.local-only=true)' indicator
in both embedded and server-mode text paths
- maybeAutoPush: guard fires before getStore() (before any store interaction)
- Fix test build tag: cgo (not embeddeddolt) to match CI embedded test convention
- Fix TestDoltLocalOnly_ConfigRoundTrip: bd config get returns "(not set ...)" not ""
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat(dolt): git-origin collision guard in bd dolt remote add + bd doctor (be-7eu1d, FR-06 to FR-09)
- dolt_remote_guard.go: guardNormalizeURL() + doltRemoteMatchesGitOrigin() helpers
- dolt.go: --allow-git-origin flag; refuse (or warn) when Dolt remote URL matches git origin
- doctor/types.go: CategoryDolt = "Dolt Storage" + add to CategoryOrder
- doctor/remotes.go: CheckDoltRemoteGitOrigin() warning check
- doctor.go: wire Check 7f1 into the doctor run
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* docs(cli): regenerate CLI reference for --allow-git-origin
The PR added the --allow-git-origin flag to 'bd dolt remote add' but
did not regenerate docs, failing the 'doc flags freshness' check.
Output of ./scripts/generate-cli-docs.sh ./bd — adds the flag to
docs/CLI_REFERENCE.md and the dolt.md command pages (latest + versioned
snapshots).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* fix(dolt): remove duplicate isDoltLocalOnly declaration from init.go
The function was extracted to dolt_local_only.go in the stacked PR but the
original declaration in init.go was not removed, causing a redeclared-in-block
build error.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* docs(cli): regenerate CLI reference for git-origin guard and doctor checks
Full regeneration for the complete PR: --allow-git-origin flag,
--force flag on dolt remote remove, and the bd doctor CheckDoltRemoteGitOrigin
check. Also regenerates federation.md for completeness. Output of
./scripts/generate-cli-docs.sh ./bd and ./scripts/generate-llms-full.sh.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* style(doctor): gofmt cmd/bd/doctor.go
The be-7eu1d git-origin guard block left double blank lines around the
new "Check 7f1" stanza, failing `make fmt-check` (CI "Check formatting"
and the gofmt stage of "PR Lint"). gofmt collapses them to single blanks.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* docs(cli): regenerate CLI reference + llms-full with pure-go bd
The previous regen (07dcb9a81) was built with a CGO-enabled bd, which
includes the CGO-only `bd federation` subcommands. CI builds the docs
binary with CGO_ENABLED=0 (scripts/ci/pr-policy.sh build_docs_binary),
so check-doc-flags rejected the extra federation subcommand pages.
Regenerated docs/CLI_REFERENCE.md, the federation cli-reference pages
(live + versioned 1.0.0/1.0.4/1.0.5), and website/static/llms-full.txt
with a CGO_ENABLED=0 binary. check-doc-flags + check-doc-freshness now
pass locally under LC_ALL=C.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* style(doctor): gofmt cmd/bd/doctor.go (remove stray blank line)
Fixes the 'Check formatting' CI failure on this PR — the only
PR-introduced gofmt miss among the changed Go files.
* fix(dolt): normalize git+https/git+ssh/SCP URLs in remote collision guard and doctor
Address @maphew's review on PR #4153 (be-e7k8):
1. Add doltremote.CanonicalForComparison() — normalizes both sides of a
URL comparison to Dolt's git+ prefix form, then strips trailing slashes
and .git. This makes https://github.com/org/repo.git compare equal to
git+https://github.com/org/repo.git, and git@github.com:org/repo.git
equal to git+ssh://git@github.com/org/repo.git.
2. Replace the simple guardNormalizeURL helper in dolt_remote_guard.go and
normRemoteURL in doctor/remotes.go with doltremote.CanonicalForComparison
so both paths share one implementation and stay in sync.
3. Fix build tag on dolt_remote_origin_guard_embedded_test.go from
embeddeddolt to embeddeddolt && cgo: the file delegates to bdDoltSeparate
which lives in a cgo-only file, so the embeddeddolt-only tag caused a
compile failure under CGO_ENABLED=0 + embeddeddolt.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix(dolt): remove dead --force flag from bd dolt remote remove
The --force flag was registered on doltRemoteRemoveCmd but the Run
function never read it via cmd.Flags().GetBool("force") or any other
means, so it had no effect. Remove the flag registration rather than
wiring it up, per review on PR #4153, and regenerate the CLI reference
docs (docs/CLI_REFERENCE.md, website/docs/cli-reference/dolt.md,
website/static/llms-full.txt) so the dead flag no longer appears in
generated documentation.
Agent-Signature: claude-sonnet-5-high on behalf of matt wilkie
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
* fix(dolt): check outputJSONRaw error in local-only status paths
main changed outputJSONRaw to return an error after this branch was
written; the two dolt.local-only JSON status sites now handle it with
the same stderr idiom as the neighboring outputJSON callers, fixing the
errcheck CI failure on PR #4153.
Agent-Signature: claude-fable-5-high on behalf of matt wilkie
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
---------
Co-authored-by: Jim Wordelman <jim@wordelman.name>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: matt wilkie <maphew@gmail.com>
7.7 KiB
| id | title | slug | sidebar_position |
|---|---|---|---|
| dolt | bd dolt | /cli-reference/dolt | 999 |
Generated from bd help --doc dolt
bd dolt
Configure and manage Dolt database settings and server lifecycle.
Beads uses a dolt sql-server for all database operations. The server is auto-started transparently when needed. Use these commands for explicit control or diagnostics.
Server lifecycle: bd dolt start Start the Dolt server for this project bd dolt stop Stop the Dolt server for this project bd dolt status Show Dolt server status
Configuration: bd dolt show Show current Dolt configuration with connection test bd dolt set <k> <v> Set a configuration value bd dolt test Test server connection
Version control: bd dolt commit Commit pending changes bd dolt push Push commits to Dolt remote bd dolt pull Pull commits from Dolt remote
Remote management: bd dolt remote add <name> <url> Add a Dolt remote bd dolt remote list List configured remotes bd dolt remote remove <name> Remove a Dolt remote
Configuration keys for 'bd dolt set': database Database name (default: issue prefix or "beads") host Server host (default: 127.0.0.1) port Server port (auto-detected; override with bd dolt set port <N>) user MySQL user (default: root) data-dir Custom dolt data directory (absolute path; default: .beads/dolt)
Flags for 'bd dolt set': --update-config Also write to config.yaml for team-wide defaults
Examples: bd dolt set database myproject bd dolt set host 192.168.1.100 --update-config bd dolt set data-dir /home/user/.beads-dolt/myproject bd dolt test
bd dolt [flags]
bd dolt clean-databases
Identify and drop leftover test and agent databases that accumulate on the shared Dolt server from interrupted test runs and terminated agents.
Stale database prefixes: testdb_, doctest_, doctortest_, beads_pt, beads_vr*, beads_t*
These waste server memory and can degrade performance under concurrent load. Use --dry-run to see what would be dropped without actually dropping.
bd dolt clean-databases [flags]
Flags:
--dry-run Show what would be dropped without dropping
bd dolt commit
Create a Dolt commit from any uncommitted changes in the working set.
This is the primary commit point for batch mode. When auto-commit is set to "batch", changes accumulate in the working set across multiple bd commands and are committed together here with a descriptive summary message.
Also useful before push operations that require a clean working set, or when auto-commit was off or changes were made externally.
For more options (--stdin, custom messages), see: bd vc commit
bd dolt commit [flags]
Flags:
-m, --message string Commit message (default: auto-generated)
bd dolt killall
Find and kill orphan dolt sql-server processes not tracked by the canonical PID file for the current repo's Dolt data directory.
Under an orchestrator, the canonical server lives at $GT_ROOT/.beads/. Any other dolt sql-server processes using that shared data directory are considered orphans and will be killed.
In standalone mode, only dolt sql-server processes using the current project's Dolt data directory are eligible for cleanup. Other projects' servers are preserved.
bd dolt killall [flags]
bd dolt pull
Pull commits from the configured Dolt remote into the local database.
Requires a Dolt remote to be configured in the database directory. For Hosted Dolt, set DOLT_REMOTE_USER and DOLT_REMOTE_PASSWORD environment variables for authentication.
Use --remote to pull from a specific named remote instead of the default. The remote must already exist (see 'bd dolt remote add').
bd dolt pull [flags]
Flags:
--remote string Pull from a specific named remote instead of the default
bd dolt push
Push local Dolt commits to the configured remote.
Requires a Dolt remote to be configured in the database directory. For Hosted Dolt, set DOLT_REMOTE_USER and DOLT_REMOTE_PASSWORD environment variables for authentication.
Use --force to overwrite remote changes (e.g., when the remote has uncommitted changes in its working set).
Use --remote to push to a specific named remote instead of the default. The remote must already exist (see 'bd dolt remote add').
bd dolt push [flags]
Flags:
--force Force push (overwrite remote changes)
--remote string Push to a specific named remote instead of the default
bd dolt remote
Manage Dolt remotes for push/pull replication.
Subcommands: add <name> <url> Add a new remote list List all configured remotes remove <name> Remove a remote
bd dolt remote [flags]
bd dolt remote add
Add a Dolt remote
bd dolt remote add <name> <url> [flags]
Flags:
--allow-git-origin Allow adding a Dolt remote whose URL matches the git origin (proceed with a warning instead of aborting)
bd dolt remote list
List configured Dolt remotes
bd dolt remote list [flags]
bd dolt remote remove
Remove a Dolt remote
bd dolt remote remove <name> [flags]
bd dolt set
Set a Dolt configuration value in metadata.json.
Keys: database Database name (default: issue prefix or "beads") host Server host (default: 127.0.0.1) port Server port (auto-detected; override with bd dolt set port <N>) user MySQL user (default: root) data-dir Custom dolt data directory (absolute path; default: .beads/dolt)
Use --update-config to also write to config.yaml for team-wide defaults.
Examples: bd dolt set database myproject bd dolt set host 192.168.1.100 bd dolt set port 3307 --update-config bd dolt set data-dir /home/user/.beads-dolt/myproject
bd dolt set <key> <value> [flags]
Flags:
--update-config Also write to config.yaml for team-wide defaults
bd dolt show
Show current Dolt configuration with connection status
bd dolt show [flags]
bd dolt start
Start a dolt sql-server for the current beads project.
The server runs in the background on a per-project port derived from the project path. PID and logs are stored in .beads/.
The server auto-starts transparently when needed, so manual start is rarely required. Use this command for explicit control or diagnostics.
bd dolt start [flags]
bd dolt status
Show the status of the Dolt engine for the current project.
In embedded mode, reports that the Dolt engine runs in-process and shows the on-disk data directory. For beads-managed (local) servers, displays PID, port, and data directory from the local PID file. For externally- managed servers — a shared server (dolt.shared-server: true), a remote dolt_server_host, or a local server managed outside bd (dolt.auto-start: false, e.g. an orchestrator-shared sql-server) — pings the configured endpoint via SQL and reports reachability, server version, and database.
bd dolt status [flags]
bd dolt stop
Stop the dolt sql-server managed by beads for the current project.
This sends a graceful shutdown signal. The server will restart automatically on the next bd command unless auto-start is disabled.
bd dolt stop [flags]
Flags:
--force Force stop the server
bd dolt test
Test the connection to the configured Dolt server.
This verifies that:
- The server is reachable at the configured host:port
- The connection can be established
Use this before switching to server mode to ensure the server is running.
bd dolt test [flags]