chit

Self-hosted notes and shared checklists for the desktop, phone, and watch

readme · slastra/chit

Self-hosted notes and shared checklists for the desktop, phone, and web.

chit on a phone: the board, a shared list with someone editing it, and dark mode

chit on the desktop: the board with a list open in the side pane

chit is a notes app for a household. A single Go server holds the accounts and the sync log. Every device keeps its own copy and works offline, then catches up over a server-sent event stream. The app is Flutter, built for Linux, Android and the web (the server serves the web build at its root). The terminal has the chit CLI and chitd, a small daemon built for lastshell.

Status: in daily use. The server, the CLI, chitd, and the app on Linux, Android and the web work end to end: notes, lists, labels, reminders, sharing, attachments and a live change feed. A Wear OS app is not built.

Features

  • Text notes and checklists, with colors, pins, labels, archive and trash
  • Attachments up to 250 MB, with image thumbnails, visible only to people on the note
  • Sharing per note with other accounts on the server, as editor or viewer
  • Offline-first: every device keeps a replica and merges by field
  • Reminders scheduled on each device, with no push service in the middle
  • Material 3 Expressive throughout: the board, a detail pane on wide windows, a media player, and the desktop's own colors when a theme file says so
  • Invite-only accounts, managed from PocketBase's admin UI

Install

Requirements

  • Go 1.27 or newer
go install github.com/slastra/chit/cmd/chit-server@latest   # the server
go install github.com/slastra/chit/cmd/chit@latest          # the CLI

Usage

Server

chit-server serve --http=127.0.0.1:8090 --dir=./pb_data
chit-server version

On first start, PocketBase prints a link for creating the first superuser. Accounts are invite-only: add them from the admin UI at /_/.

CLI

chit login https://chit.example.com      # asks for email and password
chit new Groceries --list milk eggs      # a checklist
chit new "Wifi" "the code is on the router"
chit add groceries coffee
chit check groceries milk                # --undo to uncheck
chit show groceries
chit ls                                  # --archived, --trashed
chit pin groceries
chit people
chit share groceries angelica            # --viewer for read-only
chit attach groceries receipt.jpg        # files up to 250 MB
chit get groceries receipt               # download (-o PATH, --thumb 320x320)
chit detach groceries receipt
chit remind groceries 17:30              # 10m, 2h, "tomorrow 9:00"; --clear
chit status                              # session, and whether chitd is up
chit watch                               # live changes, Ctrl-C to stop

Notes, items and people are found by name: an exact match first, then a prefix, then a substring. When several match, chit lists them with their ids. Every command takes --json. Piped input works too: printf 'socks\nshirts\n' | chit add packing.

The app

The Flutter app lives in app/. Sign in with the server's address and an account.

cd app
flutter run -d linux                     # or an Android device, or chrome
app/tool/install-linux.sh                # build and install for this user (from the repo root)
flutter build apk --release --target-platform android-arm64

On Android it also shows reminders as alarms (with Done and Snooze), takes text, links and files shared to it, and checks for other people's edits every 15 minutes while closed.

chitd

chitd keeps a local replica, works offline, and serves lastshell and the CLI over a unix socket; the CLI uses it automatically when it is running. It also shows reminder toasts and toasts for other people's edits on shared notes. Setup, the socket protocol and the capture grammar are in docs/chitd.md.

Configuration

chit login saves the server, a session token and a device id to ~/.config/chit/config.json (mode 600). CHIT_SERVER overrides the saved server. The token refreshes itself when it is within three days of expiring. "activity_toasts": false turns off chitd's toasts for other people's edits.

Desktop theme

The app's desktop build reads an optional ~/.config/chit/theme.json and recolors live when it changes. Every field is optional; Material's tones come from accent, and the rest is laid over them exactly:

{"brightness": "dark", "accent": "#bebeda", "background": "#000000",
 "foreground": "#cdcdcd", "surface": "#080808", "container": "#121212",
 "outline": "#292929", "error": "#e08398", "font": "Martian Grotesk", "radius": 8}

Without it the app uses the platform's colors (Material You on Android) or its own. Note colors stay the same ten hues everywhere, since notes are shared.

Icon and mark

The mark's masters are app/assets/brand/chit-{full,icon,tiny}.svg: one drawing in three cuts (full face from 64px, the icon cut from 32px, eye dots and smile below that), its face cut out of the body. app/tool/brand.py regenerates everything else from them:

  • The app icon, full color: a caramel swirl with a face on a dark chocolate tile. It covers Android's adaptive icon and the older bitmaps, the web favicon and PWA icons, the Linux icon, and the Play listing's 512px icon (docs/store/play-icon-512.png).
  • Android's monochrome layer, the master in one color, which Android 13+ tints from the wallpaper when themed icons are on.
  • The in-app mark's full-color cuts, chit-{cut}-color.svg: the app icon's swirl without its tile.

On Linux, app/tool/install-linux.sh builds the app and installs it for the current user with a launcher entry and the icon.

How it works

The server embeds PocketBase for accounts, the admin UI, files and backups. Notes, checklist items and sharing are PocketBase collections, but clients never write them directly. Each change is an op stamped with a hybrid logical clock. The server applies it if it wins, numbers it, and streams it to every device that can see the note. The full contract is in docs/design.md.

Development

go test ./...
go run ./cmd/chit-server serve

Deploying

The Dockerfile builds a static binary and the web app (served from /srv/web, or CHIT_WEB), and stores data in the /pb_data volume. Mount a persistent volume there and expose port 8090 behind your proxy.

License

MIT © 2026 Shaun Lastra. See LICENSE.