27 Commits

Author SHA1 Message Date
ec5e77f796 Prompt for backup location during re-onboard instead of skipping
When step 4 finds an existing backup repo, show the current location
and ask to reconfigure with the existing path as default, rather than
silently skipping the step.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 13:51:24 -05:00
3be9586238 Fix design issues and add comprehensive test suite
Guard doSetup() against re-initialization, route welcome to onboard
wizard, fix import confirmation logic, remove invalid syncthing
generate flags, and show full export path. Add shell-based integration
test suite (123 tests) at ~/src/test/pal/ covering all commands.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 13:50:04 -05:00
4a5fa4415c Fix interactive input by using Console.readLine instead of Process.exec
Process.exec uses popen(cmd, "r") which creates a read-only pipe where
the subprocess stdin is disconnected from the terminal. Console.readLine
reads directly from the parent process stdin via fgets, fixing all
interactive prompts (askConfirm, askInput, choice menus).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 23:48:33 -05:00
d30d2efa4e Rename grapho to pal, add onboard command, fix interactive input
- Rename grapho → pal across entire codebase (CLI, NixOS module,
  flake, docs, config paths)
- Add `pal onboard` interactive setup wizard with 4 steps:
  device, config repo, sync, backups
- Shows current setup summary when re-running onboard on an
  existing installation with warnings about what will change
- Fix askConfirm/askInput to read from /dev/tty so interactive
  prompts work correctly
- Remove || operator usage in askConfirm (not reliable in Lux)
- Add pal package to nix develop shell
- Document ~/.config/pal/ directory structure in README

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 22:38:37 -05:00
05c04b209c Clean up repo: gitignore binaries, remove stale docs
- Add compiled binaries (grapho, *_test) to .gitignore
- Remove grapho binary from tracking (build from source)
- Delete obsolete LUX-LIMITATIONS.md
- Minor README wording fix

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-16 23:05:36 -05:00
13fe22a804 Improve server mount help with detailed instructions
- Add SSHFS section with common options explained
- Add NFS mount example
- Reference NixOS wiki for declarative mounts
- Show unmount hint

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-16 22:58:19 -05:00
dedfbfce64 Add QR code support for Device IDs
- Add printQR() helper function using qrencode
- Display QR code in sync setup for easy mobile pairing
- Add qrencode to doctor dependency check

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-16 22:28:10 -05:00
d3d720b3bc Modernize CLI UX with gh/cargo-style polish
- Add --version/-V and per-subcommand --help
- Replace logo spam with compact status dashboard
- Add aligned step output (label    done format)
- Add confirmation prompts for destructive operations
- Interactive first-run wizard when uninitialized
- Consistent color language and status line formatting
- Clean help with USAGE/COMMANDS/OPTIONS structure

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-16 22:15:35 -05:00
afe7826d58 Complete self-contained grapho CLI with all 8 phases
Phase 5 (Server):
- grapho server setup/mount/unmount/ls commands
- SSHFS/NFS mount instructions

Phase 6 (SQLite):
- State database for event tracking
- grapho history command
- Events logged for sync/backup operations

Phase 7 (Export):
- grapho export creates tar.zst archive
- grapho import restores from archive
- Full data portability between machines

Phase 8 (Dashboard):
- grapho dashboard generates HTML status page
- Dark theme, mobile-friendly
- Can be served with python http.server

Self-contained improvements:
- grapho setup now auto-initializes Syncthing
- grapho backup init <repo> runs restic init directly
- grapho backup runs restic backup directly
- grapho backup list shows snapshots directly
- All configs saved to ~/.config/grapho/

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-16 06:56:24 -05:00
117e6af528 Implement self-contained grapho architecture with four data types
Major rewrite of grapho CLI to support:
- Type 1 (Config): grapho init <repo-url> clones NixOS config
- Type 2 (Sync): Isolated Syncthing on port 8385 (separate from system)
- Type 3 (Backup): Restic integration with systemd timer
- Type 4 (Server): Mount point for central server data

New features:
- Welcome flow on first run (detects ~/.config/grapho/grapho.toml)
- grapho setup wizard creates directory structure
- grapho sync/backup/server subcommands
- grapho status shows all four data types
- grapho doctor checks system health

Added modules/grapho.nix NixOS module:
- Configures isolated Syncthing (ports 8385, 22001, 21028)
- Sets up grapho-backup systemd service and timer
- Creates directory structure via tmpfiles
- Optional NFS server mount

Updated flake.nix:
- Export grapho NixOS module
- Add grapho CLI package (nix build .#grapho)

Documented additional Lux language limitations:
- String == comparison broken in C backend
- let _ = pattern not supported
- List literals with recursion cause segfaults

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-16 06:12:58 -05:00
63fedfb525 Add grapho CLI with improved UX
New CLI features:
- One-liner health check as default (grapho)
- Component status dashboard (grapho status)
- Verbose mode with details (grapho status -v)
- System diagnostics with fix commands (grapho doctor)
- Machine-readable output (grapho --json)
- Actionable fix suggestions for all warnings/errors

Also adds documentation:
- docs/MARKDOWN-EDITORS.md - Editor recommendations for mobile/desktop
- docs/LUX-LIMITATIONS.md - Tracking Lux language issues

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-16 01:06:55 -05:00
9c7f47e727 Ask for config repo URL instead of grapho flake URL
- setup_new: asks for Tier 2 config repo URL (personal/private)
- Automatically sets up git remote with provided URL
- Simplified join flow - no grapho URL prompt needed
- Copy config URL + age key to clipboard (not nix run commands)

The grapho flake URL is already known (user ran nix run from it).
The config repo is where personal secrets/config get stored.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-14 03:05:40 -05:00
2cb8c02494 Ask for grapho repo URL and copy instructions to clipboard
- Prompt for grapho flake URL and branch (defaults to master)
- Substitute into nix run commands in output
- Auto-copy instructions to clipboard (xclip/wl-copy/pbcopy)
- Apply same changes to both setup_new and setup_join

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-14 02:59:45 -05:00
45fc5ba08c Update instructions to show nix run syntax
Users running via nix run don't have ./setup locally,
so show the full nix run command in output messages.
Uses generic placeholder for repo URL.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-14 02:54:47 -05:00
9868619890 Skip GPG signing in setup script git commit
The setup script runs without a TTY in nix run, so GPG
pinentry fails. Use --no-gpg-sign for the initial commit.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-14 02:45:09 -05:00
5f7c7a4579 Fix age-keygen hanging due to pipe buffering
Extract public key from generated file instead of parsing
stderr through a pipe, which could cause blocking.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-14 02:38:13 -05:00
1a87fab2d7 Fix case-sensitive grep breaking age key generation
age-keygen outputs "Public key:" but grep was searching for
lowercase "public key", causing silent exit with pipefail.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-14 02:36:30 -05:00
96cca3f92b Use HTTPS URLs for public repo access
- Update Quick Start to use HTTPS (no SSH key needed)
- Keep SSH instructions for push access
- Use actual git.qrty.ink URLs in examples

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-13 09:46:03 -05:00
096070bffe Update SSH URLs to use port 2222 format
Use ssh://git@server:2222/user/repo.git format for non-standard
SSH ports in README and flake.nix examples.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-13 09:38:16 -05:00
f8b344d26d Rename repo references from usync to grapho
Update README and flake.nix to use grapho as the repo name
in all git URLs and examples.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-13 08:39:25 -05:00
cb55be1324 Rename to usync, use generic git URLs
- Rename app binary from unsbs-setup to usync-setup
- Update README to use git+ssh:// URLs for custom git servers
- Remove GitHub-specific references

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-13 08:24:34 -05:00
521a2431c2 Add one-command setup via nix run
- Add flake app so setup can be run with: nix run .
- Update README with comprehensive setup guide for:
  - First computer (initial setup)
  - Additional computers (joining)
  - Mobile device pairing
  - NixOS module usage

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-13 08:21:24 -05:00
dfc2d45cf5 Fix bash trap variable scope bug in QR camera scanner
The cleanup_camera trap handler couldn't access local variables
(ffmpeg_pid, tmpdir) when triggered, causing "unbound variable"
errors with set -u. Fixed by using global paths with $$ suffix
that the trap can reference directly.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-13 08:19:52 -05:00
5dadd584f0 Add one-command setup with mobile QR pairing
- Add ./setup script for single-command device initialization
  - Interactive menu: new setup, join existing, or pair mobile
  - Bootstrap from git repo + age key: ./setup <url> <key>
  - Mobile pairing with live camera QR scanning

- Enhance usync with device management commands
  - usync init: bootstrap from config repo
  - usync invite: show QR for mobile
  - usync add-device: add device by ID
  - usync join: join existing setup

- Mobile/GrapheneOS optimizations
  - Live camera preview with targeting box (ffmpeg + SDL)
  - Auto-detect QR codes without manual capture
  - Syncthing pending device detection

- Simplify nix develop shell message
- Add ffmpeg, zbar, qrencode, age, sops to devShell

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-13 05:08:55 -05:00
6e4ed15b1e add flake 2026-02-13 03:01:13 -05:00
6e0d67fb03 Add business analysis and viability assessment
Evaluates commercial potential of personal data infrastructure:
- Market opportunity analysis
- Four business model options
- Financial projections
- Go-to-market strategy
- Competitive landscape
- Team and funding requirements

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-13 01:58:57 -05:00
b40ac99524 Initial commit: Ultimate Notetaking, Sync & Backup System
A NixOS-based system for managing personal data across three tiers:
- Tier 1: Configuration (shareable via git)
- Tier 2: Syncable data (nb + Syncthing)
- Tier 3: Large data (self-hosted services + backup)

Includes:
- NixOS modules for nb, Syncthing, backup (restic)
- Server modules for Forgejo, Immich, Jellyfin
- Helper scripts (usync, ustatus)
- Comprehensive documentation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-13 01:44:00 -05:00