Skip to content
go-libfossil go-libfossil
Login

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 (package libfossil), command libfossil. A repository is an ordinary .fossil SQLite 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

Quick start

  1. go install github.com/danmestas/go-libfossil/cmd/libfossil@latest
  2. libfossil repo new notes.fossil, then libfossil -R notes.fossil repo open ., libfossil repo add README.md, libfossil repo ci -m "first notes".
  3. From Go: blank-import a driver, then libfossil.Create(path, libfossil.CreateOpts{User: "ana"}) or libfossil.Open(path), and r.Commit(libfossil.CommitOpts{...}), r.Timeline(libfossil.TimelineOpts{...}).
  4. Sync: libfossil.Clone(ctx, path, libfossil.NewHTTPTransport(url), libfossil.CloneOpts{}), then r.Sync(ctx, t, libfossil.SyncOpts{Pull: true}).

Go packages