Artifact 83b16e7d9580aa16856847e0b69d0fa529f1b0a3fb02bbd09e2130cd2a0e6b60:
- File
docs/site/content/docs/migration-from-fossil.md
— part of check-in
[e2a2f28861]
at
2026-04-26 07:52:11
on branch trunk
— docs site + landing + Cloudflare auto-deploy (#6)
* design: docs site + landing page + Cloudflare auto-deploy
Mirror dagnats's docs/landing infrastructure for libfossil: a single-page landing at site/index.html (forked CSS/HTML, content rewritten), a Hugo + Hextra docs site at docs/site/, gomarkdoc-generated SDK reference under docs/site/content/docs/reference/sdk/, llms.txt artifacts, and a wrangler.jsonc that lets Cloudflare's git integration auto-deploy on push to main. Existing docs/*.md files move under docs/site/content/docs/.
* design: correct landing-page path to Hugo layout override
dagnats's working landing page lives at docs/site/layouts/index.html (a Hugo home-page layout override), not at site/index.html. The top-level site/index.html in dagnats is an older draft that the build pipeline ignores. Match the working setup.
* design: align visual system + section list with live dagnats landing
The earlier description came from dagnats's stale top-level site/index.html (JetBrains Mono + Instrument Serif italic + ember/teal accents, 8 sections). The live Hugo layout that actually serves at / uses Geist Mono only, prefers-color-scheme dual-mode (warm cream / warm dark), a single ember accent, and 7 sections (Install, What it is, Why you might want it, How it fits together, Compared to neighbors, What it is not, Get going). Update the spec to match what we are actually mirroring.
* design: drop SDK regen from CF build to match dagnats exactly
Earlier draft had CF install Go + gomarkdoc and re-run docs-gen-sdk on every deploy. dagnats does not do that; it relies on the pre-commit hook to keep committed SDK pages in sync, and ships only Hugo + llms-gen + hugo --minify in the CF build. Match that: smaller, faster CF build, no Go-runtime assumption about Workers Builds, and a true 1:1 mirror.
* plan: docs site + landing + CF auto-deploy implementation steps
11 tasks covering Hugo+Hextra bootstrap, content moves, gomarkdoc SDK generation with pre-commit drift check, llms.txt artifacts, Makefile targets, landing page fork from dagnats's live Hugo home layout, wrangler.jsonc for CF Workers Static Assets, README update, and PR creation.
* docs(site): bootstrap Hugo + Hextra skeleton
* docs(site): move existing docs into Hugo content tree
* docs(site): fix links + H1s broken by docs-tree move
- Drop .md extensions on Hugo cross-doc links - Switch source-code references to absolute github.com/danmestas/libfossil URLs (relative ../ paths broke when files moved 3 dirs deeper) - Align H1 of architecture.md and migration-from-fossil.md with their frontmatter titles
* docs(site): add quickstart, examples, and SDK section stubs
* docs(site): tighten quickstart snippets + reference index
- Make the Sync example self-contained (open + sync, full main, real signatures) - Bridge from Clone to Open with a one-line prose link - Add a sentence to reference/_index.md so it does not render blank - Use the project's canonical "pure-Go, CGo-free" phrasing
* docs(site): add docs-gen-sdk Makefile target + commit generated SDK pages
* docs(site): pin gomarkdoc version + replace empty driver stubs with prose
- Add GOMARKDOC_VERSION Makefile variable so contributors don't drift on output format when a new gomarkdoc ships - Drop the two driver packages (modernc, ncruces) from gomarkdoc and hand-write _index.md pages explaining the register-on-import contract; the stubs were byte-stable but rendered as visibly broken documentation
* docs(site): add gen-llms-txt.sh + docs-gen-llms target
* docs(site): switch llms-full frontmatter strip from sed to awk
The sed range-negation pattern '/^---$/,/^---$/!p' silently re-opens a suppression range on any bare '---' in body content, eating Markdown horizontal rules and embedded YAML in fenced code blocks. The awk pattern strips the frontmatter only when it begins on line 1, leaving body content intact regardless of how many '---' lines it contains.
* hooks: pre-commit fails when SDK pages drift from code
* hooks: pre-commit re-installs gomarkdoc if it's the wrong version
The drift check's existing gate just looks for gomarkdoc on PATH. A contributor with an older gomarkdoc installed locally would have the gate pass and then run regeneration with their stale binary, producing either a silent false-negative or a confusing OUT-OF-DATE error with no version hint. Compare the installed version against GOMARKDOC_VERSION from Makefile and re-install on mismatch. Best-effort; offline contributors can still commit.
* docs(site): add docs-serve, docs-build, docs aggregate targets
* docs(site): make docs aggregate parallel-safe via explicit deps
The docs aggregate previously listed gen-sdk, gen-llms, and build as side-by-side prereqs. Make doesn't guarantee left-to-right ordering under -j, and gen-llms reads what gen-sdk writes, while build reads both. Encode the chain explicitly so 'make -j docs' is correct. Side benefit: 'make docs-build' standalone now produces a complete deployable site, matching contributor expectation.
* site(landing): fork dagnats home layout; rebrand chrome
* site(landing): rewrite §01–§07 content for libfossil
* site(landing): use .ascii class for diagram + fix §03 phrasing
* deploy: add wrangler.jsonc for CF Workers Static Assets
* docs: point README at the new docs site (user: [email protected], size: 6640) [annotate] [blame] [check-ins using]
--- title: Migration from Fossil weight: 30 --- # Migration from Fossil This guide is for users of upstream [Fossil SCM](https://fossil-scm.org) (the C binary distributed by `fossil-scm.org`) who are evaluating `libfossil` — a pure-Go implementation of the Fossil repository format and sync protocol. It is intentionally honest about gaps. If a capability is not listed under "Command coverage" below, assume it is not implemented yet. ## Repo format compatibility `libfossil` reads and writes the same on-disk `.fossil` SQLite repository format as upstream Fossil. A repository created by either tool can be opened by the other at the file level — there is no import/export step and no data migration is needed. Both implementations share the same blob table layout, manifest/control artifact encoding, and delta chain representation. One caveat: features introduced in very recent upstream Fossil releases (bleeding-edge artifact card types, new Fossil-specific SQL functions used in triggers) may not yet be parsed by `libfossil`. Stable Fossil repositories from the last several years round-trip cleanly. ## Binary name and invocation The compiled binary is named `libfossil` (not `fossil`) to avoid `$PATH` collisions when both tools are installed on the same machine: ``` go install github.com/danmestas/libfossil/cmd/libfossil@latest ``` `libfossil` uses a subcommand-grouped syntax: the top-level group is `repo`, and individual operations live beneath it. Upstream Fossil uses a flat command style. Examples: | Upstream Fossil | libfossil | |------------------------------|----------------------------------------| | `fossil clone URL repo.fossil` | `libfossil repo clone URL repo.fossil` | | `fossil ci -m "msg" file.txt` | `libfossil -R repo.fossil repo ci -m "msg" file.txt` | | `fossil timeline` | `libfossil -R repo.fossil repo timeline` | The `-R <path>` flag selects the repository and is a global flag (before the `repo` subcommand group). ## Command coverage The following `repo` subcommands are implemented today. Every entry below corresponds to a registered Kong command in `cli/repo.go` in the libfossil source tree. ### Repository creation - `repo new` — create a new, empty repository file. - `repo clone` — clone a remote Fossil server over HTTP(S). ### Working tree and checkout - `repo open` — materialize a checkout in a directory (creates `.fslckout`). - `repo co` — check out a named version. - `repo ls` — list files in a version. - `repo status` — show pending changes in the working directory. - `repo add` — stage files for addition. - `repo rm` — stage files for removal. - `repo rename` — rename a tracked file. - `repo revert` — undo staging changes. - `repo ci` — commit staged changes. ### History and inspection - `repo timeline` — repository history. - `repo diff` — show changes vs. a version. - `repo annotate` / `repo blame` — annotate file lines with commit history. - `repo cat` — output artifact content. - `repo hash` — hash files (SHA1 or SHA3-256). - `repo info` — repository statistics. - `repo resolve` — resolve a symbolic name to a UUID. - `repo schema` — operate on the synced table schema. - `repo query` — run ad-hoc SQL against the repository DB. ### Branching and merging - `repo branch` — list/create branches. - `repo tag` — tag operations. - `repo merge` — merge a divergent version into the current checkout. - `repo conflicts` — list unresolved merge conflicts. - `repo mark-resolved` — mark a conflict as resolved. - `repo bisect` — binary-search commits for bug introductions. - `repo undo` / `repo redo` — undo/redo the last operation. - `repo stash` — stash working changes. ### Collaboration and admin - `repo user` — user management. - `repo invite` — generate an invite token for a user. - `repo config` — get/set/list repository configuration. - `repo wiki` — wiki page operations. - `repo uv` — unversioned file operations. - `repo extract` — extract files from a version. - `repo delta` — create/apply delta operations. - `repo verify` — verify repository integrity. ### Known gaps vs. upstream Fossil CLI The following upstream commands have no `libfossil` equivalent today: - `fossil ui` / `fossil server` / `fossil http` — no web UI or HTTP admin server is shipped. - `fossil sync` / `fossil push` / `fossil pull` — there is no CLI verb; sync is exposed via the Go API (`Repo.Sync`, `Repo.XferHandler`) but not as a subcommand. - `fossil update` — merging a newer trunk into a checkout has no dedicated CLI command; use `repo co` plus `repo merge` as needed. - `fossil search` — no CLI front-end for full-text search. - `fossil fts-config` / FTS index management — no CLI command. ## What's not supported yet Beyond the gaps listed above, several broader features of upstream Fossil are not yet exposed by `libfossil`: - **Web UI / HTTP admin** — no equivalent of `fossil ui`. The sync protocol handler exists as `Repo.XferHandler()` for programmatic embedding, but the HTML UI, wiki viewer, ticket tracker, and forum are not implemented. - **Interactive conflict resolution** — there is no guided merge tool. Conflicts are listed via `repo conflicts` and cleared with `repo mark-resolved`, but resolution itself happens in your editor. - **Full-text search CLI** — `internal/search` contains indexing and query primitives, but no CLI command surfaces them. Use the Go API directly. - **Ticket and forum subsystems** — not implemented. - **Mirror / export bridges** to Git, svn, and other systems — not implemented. If any of these are load-bearing for your workflow, stay on upstream Fossil for now. ## Interop patterns Where `libfossil` shines is in environments where the upstream C binary is inconvenient to run: - **CGo-free CI pipelines** — `libfossil` links statically with a pure-Go SQLite driver (`db/driver/modernc`), so clone/sync steps work on stripped container images and cross-compiled targets with no system dependencies. - **Embedding in Go services** — the `Repo` handle can be used directly from a Go program to read history, extract artifacts, or accept pushes over a custom transport (WebSocket, NATS, libp2p). - **WASI / browser deployments** — the `db/driver/ncruces` SQLite driver compiles to WebAssembly, enabling repo access from edge runtimes. See `examples/` (planned) for concrete starting points. Until those land, `cmd/libfossil/main.go` is the shortest working example of wiring the CLI package into a binary.