Pick a page, a forum thread, a tech note or a ticket.
Version control you can query.
Fossil, inside SQLite. This page runs libfossil compiled to WebAssembly. The whole history of the project is a SQLite database in your browser, read and written with SQL, with no server behind it.
libfossil in WebAssembly: the project's whole history is a SQLite database in this tab.
SELECT time, user, comment FROM fsl_timeline LIMIT 5; SELECT fsl_file('trunk', 'README.md');
A working copy is a table.
Check out into rows, edit with UPDATE, commit. Unedited files cost nothing.
Timeline
Pick a file to view it.
Ask the repository anything
libfossil's operations are SQL functions, so an app needs no bindings: reading, branching, merging,
stashing, bisecting, all as SELECT fsl_…(). Each chip is a question and the SQL that answers it.
Ctrl/⌘+Enter runs the box.
Playground
A scratch repository of your own, made in this browser and kept in OPFS beside the libfossil snapshot. Every form runs one of the SQLite extension's write functions on it; the SQL shown is exactly what runs, with your input bound as parameters.
Results show here.
SQL on the playground
Writes allowed. Try SELECT * FROM fsl_timeline or SELECT fsl_diff('trunk', 'side').
Two repositories, one connection
fsl_open() can now run more than once on a connection. Here one SQLite connection holds the
libfossil snapshot as schema repo and your playground as repo_2. Each gets its own
views, fsl_use() picks which one the functions act on, and plain SQL can join across both.
fsl_repos
what is open on this connectionBoth timelines
each repository's own view, side by sideSELECT time, user, comment FROM fsl_timeline -- repo: libfossil ORDER BY mtime DESC LIMIT 10;
SELECT time, user, comment FROM fsl_timeline_2 -- repo_2: playground ORDER BY mtime DESC LIMIT 10;
Across repositories
plain SQL overrepo.blob and repo_2.blobFossil names every artifact by its hash, so the same file content has the same name in every repository.
Copy a file of libfossil's into the playground (through the TEMP table fsl_stage, which is shared by the
connection's repositories), then ask which playground artifacts libfossil also has.
One COMMIT, two repositories
both, or neitherTwo more scratch repositories, one.fossil and two.fossil, opened on a connection whose
main database is a file in OPFS, so SQLite can commit both atomically through a super-journal. Write a check-in to each
inside one transaction, look, then commit or roll back.
fsl_timeline one.fossil
fsl_timeline_2 two.fossil
The SQL each button runs shows here.
A working copy in a table
fsl_checkout('db:work') checks the playground out into rows of fslfiles_work, a table in a
SQLite database in OPFS. Edit files with UPDATE, add them with INSERT and fsl_add(),
and commit with fsl_commit(): libfossil's checkout code, start to finish, with no filesystem anywhere.
Reload the page and fsl_open('db:work') picks it up again.
No working copy yet. This makes one from the playground's newest check-in on trunk:
SELECT fsl_open('/playground.fossil', 'visitor');
SELECT fsl_checkout('db:work');
Files rows of fslfiles_work
Pick a file
fsl_status() live
Timeline the playground
The SQL each action runs shows here.
Origin Private File System
SQLite's OPFS pool
Databases SQLite stores through its opfs-sahpool VFS, by the names libfossil opens them with.
Everything in this site's OPFS
The raw directory. The pool keeps each database in an opaque slot file with a small header in front, so download a database from the table above to get a usable file.