beads/website/versioned_docs/version-1.0.4/cli-reference
Jim Wordelman fffed97d38
feat(dolt): git-origin collision guard in bd dolt remote add + bd doctor (be-7eu1d) (#4153)
* 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>
2026-07-04 14:37:51 -07:00
..
admin.md fix(compact): stop advertising the unimplemented Tier 2 compaction (#4465) 2026-06-20 15:29:28 -07:00
ado.md docs: publish v1.0.4 docs snapshot (#3845) 2026-05-09 14:42:25 -07:00
assign.md docs: publish v1.0.4 docs snapshot (#3845) 2026-05-09 14:42:25 -07:00
audit.md docs: publish v1.0.4 docs snapshot (#3845) 2026-05-09 14:42:25 -07:00
backup.md docs: clarify export versus database backup (#4048) 2026-05-20 16:19:23 -07:00
batch.md docs: publish v1.0.4 docs snapshot (#3845) 2026-05-09 14:42:25 -07:00
blocked.md docs: publish v1.0.4 docs snapshot (#3845) 2026-05-09 14:42:25 -07:00
bootstrap.md fix(init): use git origin as default Dolt remote (#3909) 2026-05-13 07:02:39 -07:00
branch.md docs: publish v1.0.4 docs snapshot (#3845) 2026-05-09 14:42:25 -07:00
children.md fix(cli): implement children pretty and defer reason 2026-06-13 21:22:38 -07:00
close.md fix(close): support per-id reasons (#4194) 2026-05-27 20:41:07 -07:00
comment.md docs: publish v1.0.4 docs snapshot (#3845) 2026-05-09 14:42:25 -07:00
comments.md docs: publish v1.0.4 docs snapshot (#3845) 2026-05-09 14:42:25 -07:00
compact.md docs: publish v1.0.4 docs snapshot (#3845) 2026-05-09 14:42:25 -07:00
completion.md docs: publish v1.0.4 docs snapshot (#3845) 2026-05-09 14:42:25 -07:00
config.md fix(init): honor dolt local-only remote wiring (#4227) 2026-05-28 15:41:38 -07:00
context.md docs: publish v1.0.4 docs snapshot (#3845) 2026-05-09 14:42:25 -07:00
cook.md docs: publish v1.0.4 docs snapshot (#3845) 2026-05-09 14:42:25 -07:00
count.md feat(count): add --include-infra for exact bd list cardinality parity (#4389) 2026-06-13 04:14:28 -07:00
create-form.md docs: publish v1.0.4 docs snapshot (#3845) 2026-05-09 14:42:25 -07:00
create.md docs: publish v1.0.4 docs snapshot (#3845) 2026-05-09 14:42:25 -07:00
defer.md fix(cli): implement children pretty and defer reason 2026-06-13 21:22:38 -07:00
delete.md docs: publish v1.0.4 docs snapshot (#3845) 2026-05-09 14:42:25 -07:00
dep.md feat(count): add --include-infra for exact bd list cardinality parity (#4389) 2026-06-13 04:14:28 -07:00
diff.md docs: publish v1.0.4 docs snapshot (#3845) 2026-05-09 14:42:25 -07:00
doctor.md fix(init): use git origin as default Dolt remote (#3909) 2026-05-13 07:02:39 -07:00
dolt.md feat(dolt): git-origin collision guard in bd dolt remote add + bd doctor (be-7eu1d) (#4153) 2026-07-04 14:37:51 -07:00
duplicate.md docs: publish v1.0.4 docs snapshot (#3845) 2026-05-09 14:42:25 -07:00
duplicates.md docs: publish v1.0.4 docs snapshot (#3845) 2026-05-09 14:42:25 -07:00
edit.md docs: publish v1.0.4 docs snapshot (#3845) 2026-05-09 14:42:25 -07:00
epic.md docs: publish v1.0.4 docs snapshot (#3845) 2026-05-09 14:42:25 -07:00
export.md Fix rig bead durability (#4373) 2026-06-22 17:06:35 -07:00
federation.md /{docs,website,scripts}: holy fuck again 2026-06-03 15:16:55 -07:00
find-duplicates.md docs: publish v1.0.4 docs snapshot (#3845) 2026-05-09 14:42:25 -07:00
flatten.md docs: publish v1.0.4 docs snapshot (#3845) 2026-05-09 14:42:25 -07:00
forget.md docs: publish v1.0.4 docs snapshot (#3845) 2026-05-09 14:42:25 -07:00
formula.md docs: neutralize formula workflow terminology (#3900) 2026-05-13 06:52:11 -07:00
gate.md docs: publish v1.0.4 docs snapshot (#3845) 2026-05-09 14:42:25 -07:00
gc.md docs: publish v1.0.4 docs snapshot (#3845) 2026-05-09 14:42:25 -07:00
github.md docs: publish v1.0.4 docs snapshot (#3845) 2026-05-09 14:42:25 -07:00
gitlab.md docs: publish v1.0.4 docs snapshot (#3845) 2026-05-09 14:42:25 -07:00
graph.md docs: publish v1.0.4 docs snapshot (#3845) 2026-05-09 14:42:25 -07:00
history.md docs: publish v1.0.4 docs snapshot (#3845) 2026-05-09 14:42:25 -07:00
hooks.md docs: publish v1.0.4 docs snapshot (#3845) 2026-05-09 14:42:25 -07:00
human.md docs: publish v1.0.4 docs snapshot (#3845) 2026-05-09 14:42:25 -07:00
import.md feat(count): add --include-infra for exact bd list cardinality parity (#4389) 2026-06-13 04:14:28 -07:00
index.md fix(metrics): maintainer adoption fixes for usage-metrics + RunE refactor 2026-06-22 20:44:48 +00:00
info.md docs: publish v1.0.4 docs snapshot (#3845) 2026-05-09 14:42:25 -07:00
init-safety.md fix(init): guard JSONL init against remote history 2026-06-22 15:28:38 -07:00
init.md fix(init): guard JSONL init against remote history 2026-06-22 15:28:38 -07:00
jira.md docs: publish v1.0.4 docs snapshot (#3845) 2026-05-09 14:42:25 -07:00
kv.md docs: publish v1.0.4 docs snapshot (#3845) 2026-05-09 14:42:25 -07:00
label.md docs: publish v1.0.4 docs snapshot (#3845) 2026-05-09 14:42:25 -07:00
linear.md docs: publish v1.0.4 docs snapshot (#3845) 2026-05-09 14:42:25 -07:00
link.md docs: publish v1.0.4 docs snapshot (#3845) 2026-05-09 14:42:25 -07:00
lint.md docs: publish v1.0.4 docs snapshot (#3845) 2026-05-09 14:42:25 -07:00
list.md Fix rig bead durability (#4373) 2026-06-22 17:06:35 -07:00
mail.md docs: publish v1.0.4 docs snapshot (#3845) 2026-05-09 14:42:25 -07:00
memories.md docs: publish v1.0.4 docs snapshot (#3845) 2026-05-09 14:42:25 -07:00
merge-slot.md docs: publish v1.0.4 docs snapshot (#3845) 2026-05-09 14:42:25 -07:00
metrics.md fix(metrics): maintainer adoption fixes for usage-metrics + RunE refactor 2026-06-22 20:44:48 +00:00
migrate.md /{cmd,docs,website}: gen docs again 2026-05-26 10:13:11 -07:00
mol.md docs: neutralize formula workflow terminology (#3900) 2026-05-13 06:52:11 -07:00
note.md docs: publish v1.0.4 docs snapshot (#3845) 2026-05-09 14:42:25 -07:00
notion.md docs: publish v1.0.4 docs snapshot (#3845) 2026-05-09 14:42:25 -07:00
onboard.md init: run Codex project setup by default 2026-05-26 13:03:37 -07:00
orphans.md docs: publish v1.0.4 docs snapshot (#3845) 2026-05-09 14:42:25 -07:00
ping.md docs: publish v1.0.4 docs snapshot (#3845) 2026-05-09 14:42:25 -07:00
preflight.md docs: publish v1.0.4 docs snapshot (#3845) 2026-05-09 14:42:25 -07:00
prime.md docs: publish v1.0.4 docs snapshot (#3845) 2026-05-09 14:42:25 -07:00
priority.md docs: publish v1.0.4 docs snapshot (#3845) 2026-05-09 14:42:25 -07:00
promote.md docs: publish v1.0.4 docs snapshot (#3845) 2026-05-09 14:42:25 -07:00
prune.md docs: publish v1.0.4 docs snapshot (#3845) 2026-05-09 14:42:25 -07:00
purge.md docs: publish v1.0.4 docs snapshot (#3845) 2026-05-09 14:42:25 -07:00
q.md docs: publish v1.0.4 docs snapshot (#3845) 2026-05-09 14:42:25 -07:00
query.md docs: publish v1.0.4 docs snapshot (#3845) 2026-05-09 14:42:25 -07:00
quickstart.md docs: publish v1.0.4 docs snapshot (#3845) 2026-05-09 14:42:25 -07:00
ready.md docs: regenerate CLI reference for bd ready --offset 2026-06-18 13:55:12 -07:00
recall.md docs: publish v1.0.4 docs snapshot (#3845) 2026-05-09 14:42:25 -07:00
recompute-blocked.md fix(is_blocked): cross-mode full recompute repair for stale is_blocked (bd-6dnrw.37) (#4423) 2026-06-19 23:14:09 -07:00
remember.md docs: publish v1.0.4 docs snapshot (#3845) 2026-05-09 14:42:25 -07:00
rename-prefix.md docs: publish v1.0.4 docs snapshot (#3845) 2026-05-09 14:42:25 -07:00
rename.md docs: publish v1.0.4 docs snapshot (#3845) 2026-05-09 14:42:25 -07:00
reopen.md docs: publish v1.0.4 docs snapshot (#3845) 2026-05-09 14:42:25 -07:00
repo.md docs: publish v1.0.4 docs snapshot (#3845) 2026-05-09 14:42:25 -07:00
restore.md fix(compact): archive content before destructive compaction; make restore work (#4464) 2026-06-20 14:12:07 -07:00
rules.md docs: publish v1.0.4 docs snapshot (#3845) 2026-05-09 14:42:25 -07:00
search.md docs: publish v1.0.4 docs snapshot (#3845) 2026-05-09 14:42:25 -07:00
set-state.md docs: publish v1.0.4 docs snapshot (#3845) 2026-05-09 14:42:25 -07:00
setup.md init: run Codex project setup by default 2026-05-26 13:03:37 -07:00
ship.md docs: publish v1.0.4 docs snapshot (#3845) 2026-05-09 14:42:25 -07:00
show.md feat(show): count-only JSON details with opt-in streamed payloads 2026-05-22 16:54:15 -07:00
sql.md docs: publish v1.0.4 docs snapshot (#3845) 2026-05-09 14:42:25 -07:00
stale.md docs: publish v1.0.4 docs snapshot (#3845) 2026-05-09 14:42:25 -07:00
state.md docs: publish v1.0.4 docs snapshot (#3845) 2026-05-09 14:42:25 -07:00
status.md docs: publish v1.0.4 docs snapshot (#3845) 2026-05-09 14:42:25 -07:00
statuses.md docs: publish v1.0.4 docs snapshot (#3845) 2026-05-09 14:42:25 -07:00
supersede.md docs: publish v1.0.4 docs snapshot (#3845) 2026-05-09 14:42:25 -07:00
swarm.md docs: publish v1.0.4 docs snapshot (#3845) 2026-05-09 14:42:25 -07:00
tag.md docs: publish v1.0.4 docs snapshot (#3845) 2026-05-09 14:42:25 -07:00
todo.md docs: publish v1.0.4 docs snapshot (#3845) 2026-05-09 14:42:25 -07:00
types.md docs: publish v1.0.4 docs snapshot (#3845) 2026-05-09 14:42:25 -07:00
undefer.md docs: publish v1.0.4 docs snapshot (#3845) 2026-05-09 14:42:25 -07:00
update.md docs: publish v1.0.4 docs snapshot (#3845) 2026-05-09 14:42:25 -07:00
upgrade.md docs: publish v1.0.4 docs snapshot (#3845) 2026-05-09 14:42:25 -07:00
vc.md docs: publish v1.0.4 docs snapshot (#3845) 2026-05-09 14:42:25 -07:00
version.md docs: publish v1.0.4 docs snapshot (#3845) 2026-05-09 14:42:25 -07:00
where.md docs: publish v1.0.4 docs snapshot (#3845) 2026-05-09 14:42:25 -07:00
worktree.md docs: publish v1.0.4 docs snapshot (#3845) 2026-05-09 14:42:25 -07:00