feat: auto-export git-tracked JSONL for portability without Dolt remote#2808
Merged
steveyegge merged 1 commit intosteveyegge:mainfrom Mar 27, 2026
Merged
Conversation
When `export.auto: true` is set in config.yaml, beads automatically writes a git-tracked JSONL file (issues + memories) after mutations. This provides full portability across machines via git alone, without requiring a Dolt remote. New config keys: export.auto: false # opt-in to auto-export export.interval: 60s # throttle interval export.path: export.jsonl # output file relative to .beads/ export.git-add: false # auto-stage the file The auto-export: - Runs in PersistentPostRun after auto-backup - Uses Dolt commit hash for change detection (no-op if nothing changed) - Throttles by interval (default 60s) - Skips during git hooks (BD_GIT_HOOK=1) - Includes both issues and memories in the JSONL output Also extracts exportToFile() as a shared helper usable by both `bd export -o` and the auto-export system. Files: - cmd/bd/export_auto.go: Core auto-export logic - cmd/bd/main.go: Wire maybeAutoExport into PersistentPostRun - internal/config/config.go: New export.* config defaults - internal/config/yaml_config.go: Add "export." to yaml-only prefix list - cmd/bd/doctor/gitignore.go: Add export-state.json to gitignore - cmd/bd/doctor/tracked_runtime.go: Flag export-state.json if tracked Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #2626, split out as requested per #2625.
The foundation PRs have all landed (#2709, #2710, #2570), so
this is now just the auto-export feature on its own.
When
export.auto: trueis set in config.yaml, beadsautomatically writes a git-tracked JSONL file (issues +
memories) after mutations. This provides full portability
across machines via git alone, without requiring a Dolt remote.
New config keys:
export.auto: false— opt-in to auto-exportexport.interval: 60s— throttle intervalexport.path: export.jsonl— output file relative to .beads/export.git-add: false— auto-stage the fileBehavior:
BD_GIT_HOOK=1)Files:
cmd/bd/export_auto.go— core auto-export logiccmd/bd/main.go— wire into PersistentPostRuninternal/config/config.go— new export.* config defaultsinternal/config/yaml_config.go— add "export." to yaml-only prefix listcmd/bd/doctor/gitignore.go— add export-state.json to gitignorecmd/bd/doctor/tracked_runtime.go— flag export-state.json if trackedAlso updated
IsClosed()call to use theLifecycleManagerinterface, since it was moved out of
DoltStoragesince theoriginal PR.