Artifact 6e0d5e70680896f6fde9fff2a490d1345baab87479c394b256bfd7f53682e437:
- File
docs/site/llms-header.md
— part of check-in
[d7fd910ffc]
at
2026-10-23 21:12:43
on branch main
— docs: generate the site's data, CLI reference and llms.txt from the code
tools/docsgen/engine records one check-in as an artifact, as its derived rows and as the cards of a pull, from a real engine run with fixed inputs. tools/docsgen/conformance turns TestCoverage's report into per-draft and per-requirement data. scripts/gen-cli-docs.sh writes one page per command group from the libfossil binary's --help. gen-llms-txt.sh and check-llms-txt.sh are ported from dagnats, and sync-version.sh now takes the highest release tag and writes the go.mod version too.
scripts/check-docs-generated.sh regenerates everything into a scratch dir and fails on any difference; make docs-check and the test-docs CI job run it. (user: [email protected], size: 2815) [annotate] [blame] [check-ins using] [more...]
go-libfossil
A Fossil repository engine in Go without cgo: it reads, writes and syncs Fossil repositories (the artifact format, the derived tables and the sync protocol). Go module
github.com/danmestas/go-libfossil(packagelibfossil), commandlibfossil. A repository is an ordinary.fossilSQLite file that stock fossil reads.
This file is generated from docs/site/llms-header.md plus the docs site. Every link below is a page on the docs site; llms-full.txt holds all pages in one file.
Key concepts
- Artifact: a text manifest made of cards (check-in, tag, wiki, cluster, ...). Its name is the SHA1 or SHA3-256 hash of its bytes.
- Repository state: the tables (
event,plink,mlink,tagxref,leaf, ...) derived from the artifacts by crosslinking, matching whatfossil rebuildwrites. - Sync: Fossil's card protocol over HTTP (
igot,gimme,file, ...), as a client (Clone,Repo.Sync,Repo.Pull) and a stateless server (libfossil repo serve). - Sparse cone: a set of paths a checkout or a store holds; content outside it is elided, not lost.
- Horizon: a check-in below which a store leaves history on the origin; at the structural depth the clone verifies a seed the origin can sign.
- Sub-manifests: an extension that writes a check-in as a tree of manifests instead of one flat file list, shared with zit.
- Driver: the
database/sqlSQLite driver, chosen by blank import:db/driver/modernc(pure Go) ordb/driver/ncruces(SQLite as WebAssembly, for js/wasm and wasip1).
Quick start
go install github.com/danmestas/go-libfossil/cmd/libfossil@latestlibfossil repo new notes.fossil, thenlibfossil -R notes.fossil repo open .,libfossil repo add README.md,libfossil repo ci -m "first notes".- From Go: blank-import a driver, then
libfossil.Create(path, libfossil.CreateOpts{User: "ana"})orlibfossil.Open(path), andr.Commit(libfossil.CommitOpts{...}),r.Timeline(libfossil.TimelineOpts{...}). - Sync:
libfossil.Clone(ctx, path, libfossil.NewHTTPTransport(url), libfossil.CloneOpts{}), thenr.Sync(ctx, t, libfossil.SyncOpts{Pull: true}).
Go packages
.(packagelibfossil):Repo,Create,Open,Clone, check-ins, checkouts, history, merge, sync.cli: the Kong command structs behindlibfossil, embeddable in another binary.db: the SQLite abstraction and driver registration.db/driver/modernc: pure-Go SQLite driver (separate module).db/driver/ncruces: SQLite-as-WebAssembly driver (separate module).observer/otel: OpenTelemetry observer (separate module).dst: deterministic simulation of sync between nodes.simio: clock, randomness and storage seams for deterministic tests.