Commit Graph

9 Commits

Author SHA1 Message Date
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
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