feat(cli): full command-line interface via clap

Replace the ad-hoc `--serve` arg sniff with a clap-parsed CLI:

- positional <file> to open at startup (also the OS file-association path)
- --new, --read-only, --backend, --safe-mode/--no-gpu
- --serve/--port (headless JSON automation, unchanged behaviour)
- --export IN OUT (headless format convert via the automation load/save infra)
- --script FILE (run command lines at startup)
- --log/RUST_LOG, plus --version/--help for free

GUI-only options pass to app::boot through a OnceLock config; read-only
gates the save paths. The web build skips parsing (no args).

Co-Authored-By: Claude Opus 4.8 <[email protected]>
This commit is contained in:
Hakan SevenandClaude Opus 4.8 committed 2026-06-20 13:59:20 +03:00
1 parent 7e70a2a97c
commit 79bb1d67b1
8 files changed
+399 -30

No files matched your search

+2
View File
@@ -1,6 +1,8 @@
#![allow(non_snake_case)]
pub mod app;
#[cfg(not(target_arch = "wasm32"))]
pub mod cli;
pub mod command;
pub mod entities;
pub mod io;