Runtime Distribution Model
Phase 9 treats blipcoard as one local runtime system with multiple entry
points. Packaging must preserve daemon ownership of clipboard ingestion,
workspace policy, audit writes, and local store access.
Install Modes
Supported install modes:
- Full install: installs
blipd,blip, and theblipcoarddesktop app. - CLI-only install: installs
blipdandblip, including through the npm package for users who want a standard package-manager update path.
Unsupported install mode:
- Desktop-only install. The desktop app is not a standalone product and must not ship without the daemon and CLI.
Every supported install includes blipd. The CLI and desktop app are clients of
the daemon runtime; they must not become separate clipboard watchers or policy
engines.
CLI-only install and operations details live in
cli-operations.md.
Upgrade and migration details live in
upgrade-migrations.md.
Release automation details live in
release-automation.md.
Component Ownership
blipdowns clipboard watching, ingestion, duplicate suppression, retention cleanup, rich payload blob lifecycle, policy checks, and audit writes.blipowns terminal interaction and formats daemon responses for humans, JSON output, and scripts.- The desktop app owns visual inspection and routing workflows and uses the same daemon API as the CLI.
blip-coreowns durable SQLite and blob-store rules, but non-repair runtime writes should go throughblipd.
Bootstrap or repair commands may open the store directly only when the daemon is unavailable or the command is explicitly local-admin behavior. Those paths must not watch the clipboard.
Discovery
Installed components discover each other through config and the daemon IPC path:
blipd,blip, and the desktop app load the same config file.- Config is created on first run when missing.
- The config records the SQLite database path.
- The daemon socket path defaults to the database path with a
.sockextension. BLIPCOARD_CONFIG_DIR,BLIPCOARD_DB_PATH, andBLIPCOARD_SOCKET_PATHoverride the defaults for tests, portable installs, or admin repair.
Current Unix IPC is newline-delimited JSON over a user-scoped Unix socket. Windows packaging must provide an equivalent current-user IPC path before Windows installs are considered complete; the current daemon IPC implementation reports Windows IPC as unavailable.
Platform Paths
The current implementation uses directories::ProjectDirs::from("com", "acozy03", "blipcoard").
| Platform | Config file | Data and blob store | Default daemon IPC |
|---|---|---|---|
| macOS | ~/Library/Application Support/com.acozy03.blipcoard/config.toml | ~/Library/Application Support/com.acozy03.blipcoard/blipcoard.db plus blobs/ under the same data directory | ~/Library/Application Support/com.acozy03.blipcoard/blipcoard.sock |
| Linux | $XDG_CONFIG_HOME/blipcoard/config.toml or ~/.config/blipcoard/config.toml | $XDG_DATA_HOME/blipcoard/blipcoard.db or ~/.local/share/blipcoard/blipcoard.db plus blobs/ under the same data directory | same database path with .sock extension |
| Windows | %APPDATA%\acozy03\blipcoard\config\config.toml | %LOCALAPPDATA%\acozy03\blipcoard\data\blipcoard.db plus blobs/ under the same data directory | target: current-user named pipe or equivalent user-scoped IPC; current implementation is unavailable |
Rich payload blobs are stored beside SQLite and must be backed up, restored, retained, and garbage-collected with the database.
Service Commands
The blip CLI owns user-facing daemon lifecycle commands:
blip service plan
blip service install
blip service uninstall
blip service start
blip service stop
blip service restart
blip service status
blip service logs
blip service install installs a per-user service. It does not install a
privileged system service and it starts the full blipd runtime, never
blipd --ipc-only. blip service status --output json reports service paths,
the configured socket, and daemon health when IPC is reachable. blip service logs prints the platform log location or inspection command.
blipd --ipc-only remains a test and manual IPC mode. Normal installs, desktop
fallback startup, and CLI-managed services should start blipd without
--ipc-only so clipboard ingestion remains daemon-owned.
Logs
Service logs are platform-specific:
- macOS: the LaunchAgent writes stdout and stderr to
logs/blipd.logunder the configured data directory, next toblipcoard.db. - Linux: the systemd user unit writes to the user journal. Inspect with
journalctl --user -u blipd. - Windows: service startup remains blocked until Windows IPC exists. Future Windows support should use Windows Event Log or a documented per-user log file.
Foreground blipd sessions continue to write operational messages to stdout or
stderr.
First Run
On first run:
- The config directory is created.
config.tomlis written with the default database path and capture policy.- The data directory is created.
blipdopens the database and applies SQLite migrations.- The default
inboxworkspace and active workspace state are initialized by the store layer. - The daemon starts IPC before clipboard ingestion in the full runtime path.
CLI commands that require the daemon show an actionable error when the
configured daemon socket is missing or stale. If another daemon is already
accepting connections at the configured socket, blipd exits with a message
that points users to blip service status or blip service restart.
Startup
Concrete startup behavior:
- macOS:
blip service installwrites~/Library/LaunchAgents/com.acozy03.blipcoard.blipd.plist. The LaunchAgent runs at login and keepsblipdalive.blip service startbootstraps the user LaunchAgent. - Linux:
blip service installwrites~/.config/systemd/user/blipd.serviceand reloads the user manager. The unit is enabled for login startup, andblip service startstarts it for the current session. - Windows: mutating
blip servicecommands such asinstall,start,stop,restart, anduninstallreport that service startup is unavailable until Windows daemon IPC is implemented. Informational commands such asplan,status, andlogscan still describe the configured paths and unsupported state. Windows packaging must not claim runtime acceptance before the named-pipe or equivalent current-user IPC work lands. - Development checkout:
cargo run -p blip-daemonstarts the fullblipddaemon runtime;cargo run -p blip-daemon -- --ipc-onlystarts only the IPC server for tests and manual client checks.
The daemon remains the runtime owner in every mode. Desktop and CLI launchers must not silently fall back to direct clipboard watching.
Uninstall
Default uninstall behavior should remove installed binaries, app bundles, service files, launch agents, shell completions, and desktop entries while preserving user data.
User data includes:
config.tomlblipcoard.db- SQLite sidecar files
- rich payload blob files
- retained logs when they live under user data or service log locations
Packaging may offer an explicit purge option that deletes config, database, blob, and log data. Purge must never be the default uninstall behavior.
Phase 9 Follow-Ups
- Phase 9.2 should make desktop bundles include
blipdandblip. - Phase 9.3 implements macOS and Linux service startup and documents concrete log locations. Windows remains blocked by the Windows IPC follow-up.
- Phase 9.4 documents CLI-only install and operations in
cli-operations.md. - Phase 9.5 documents backup, upgrade, and migration checks around the config,
SQLite database, blob directory, and daemon API compatibility in
upgrade-migrations.md.