itch.io is community of indie game creators and players

Devlogs

v0.4.0 release

SecondFolio
A downloadable tool for macOS

This is a major release containing two big changes. 1. Storage has changed from a simple json archive to a CRDT based journal system that allows easy syncing between devices and users. 2. A command line tool has been added that allows full manipulation of documents without the app being open - this tool is ideal to be utilized by AI tools such as Claude Code for managing task lists, research, change logs etc.

Change Log

Journal Engine (SFL)

  • New append-only journal storage replacing JSON-based persistence
  • Each project is an independent directory with its own `.sfl/` journal
  • Lamport clocks for causal ordering across peers
  • Deterministic conflict resolution (last-writer-wins with peer ID tiebreaker)
  • Content hashing (xxHash) for change detection
  • Per-peer JSONL journal files — no coordination between writers
  • State materialized from journal replay with full conflict resolution
  • Automatic migration from `archive/data.json` on first launch

CLI Tool (`sfl`)

  • `sfl init` — initialize a new project (auto-creates CLAUDE.md guide)
  • `sfl doc:create`, `doc:list`, `doc:show`, `doc:rename`, `doc:delete` — document management
  • `sfl frag:add`, `frag:list`, `frag:show`, `frag:edit`, `frag:delete` — fragment management
  • `sfl frag:append`, `frag:prepend`, `doc:append`, `doc:prepend` — append/prepend content (supports stdin pipe)
  • `sfl frag:replace --old --new [--all]` — find and replace text within a fragment
  • `sfl frag:insert-line --at N --content` — insert a line at a specific position
  • `sfl frag:delete-line --at N` — remove a specific line
  • `sfl doc:find <doc> <text>` — find which fragment contains text (returns frag ID + line)
  • `sfl import` — import a markdown file as a document, splitting on section headers
  • `sfl doc:meta`, `frag:meta` — get, set, or remove metadata on documents and fragments
  • `sfl frag:history` — show full edit history for a fragment from the journal
  • `sfl search` — full-text search across fragments, with `--doc` and `--meta` filters
  • `sfl expr:validate`, `expr:check` — validate smart tag expressions (C-based parser)
  • `sfl render` — render all documents as markdown files to project directory
  • `sfl projects` — list all registered projects from global config
  • `sfl journal:log`, `journal:peers` — journal inspection
  • `sfl sync:target`, `sync:push`, `sync:pull`, `sync:status` — file-copy sync
  • `sfl migrate:from-json` — migrate existing data.json archives
  • `sfl status`, `sfl commands` — project overview, list all commands
  • Document resolution by ID, title prefix, or slug with ambiguity detection
  • Fragment content via `--content` flag, stdin pipe, or `$EDITOR`
  • `--json` flag on all read commands for machine-readable output
  • `-p <name>` flag and `SFL_PROJECT` env var for cross-directory access
  • Project names resolved from `~/.sfl/config.toml` registry
  • Each CLI invocation is an independent peer with ephemeral ID

Sync

  • Push/pull journal files to any shared folder (Dropbox, NAS, USB, rsync)
  • No central server, no real-time requirement — just file copy
  • `sync:target` command in GUI command palette (set or show)
  • Per-project sync targets configured independently
  • Auto-push after every save (when sync target configured)
  • Auto-refresh every 5 seconds — picks up both sync and local CLI changes

GUI Integration

  • GUI loads projects from `~/.sfl/config.toml` registry
  • Fragment edits journaled via version-pending flush (5s debounce)
  • Document create/rename/delete emit journal entries
  • Fragment insert/split/delete emit journal entries
  • Document drag reordering persisted via `sort_order` metadata
  • Project creation creates journal-backed directory on disk
  • Markdown output rendered to project directory on save (configurable via output.folder)
  • Legacy JSON persistence fully removed — journal is sole storage path
  • CLI install/update button on the wall screen with admin privilege support
  • Hand cursor on clickable elements (projects, documents, wall cards, buttons)

Command Palette

  • Redesigned as a REPL-style interface with scrollable output buffer
  • Commands renamed to match sfl CLI syntax (e.g., `doc:create`, `project:delete`)
  • Command history with arrow key browsing
  • New commands: `doc:list`, `frag:list`, `search`, `expr:validate`, `doc:meta`, `frag:history`, `import`, `status`, `commands`
  • `commands` lists all available commands with syntax
  • Buffer and input persist across open/close

Expression Validator

  • Pure C expression parser for smart tag syntax validation
  • Validates declarations, computed declarations, expressions, and actions
  • Extracts metadata: function names, references, pipe count, operators
  • `sfl expr:validate` and `sfl expr:check` CLI commands
  • Structured JSON output for AI tool integration

AI Integration

  • `sfl-claude.md` guide auto-copied to new projects as CLAUDE.md
  • Guide distributed with the app and placed in Library for CLI discovery
  • CLI designed for multi-agent workflows: headless, concurrent, conflict-free
  • `frag:replace`, `frag:insert-line`, `frag:delete-line`, `doc:find` for surgical editing
  • GUI refreshes from journal every 5 seconds — CLI changes appear in the app without restart

Files

  • Secondfolio-0.4.0.zip 913 kB
    14 hours ago
Download SecondFolio
Leave a comment