Commit Graph

5 Commits

Author SHA1 Message Date
nokeo08 df9305c6ac Add JSON config file support (XDG-respecting)
End users can now set defaults in a config file at:

  ${XDG_CONFIG_HOME:-$HOME/.config}/move/config.json

CLI flags continue to win when both are set:

  CLI flags  >  config file  >  built-in defaults

Schema mirrors the CLI flag names and units. Loader is strict: unknown
keys, wrong types, and non-positive numerics are rejected with a clear
message naming the file and key, and the process exits 2.

Changes:

- New src/configFile.ts: existence-aware loader + strict schema
  validation. Throws CliError; the entry point converts those to exit 2.
- src/config.ts: ConfigOverrides gains 'verbose'; resolveConfig takes
  both file and CLI override layers; new defaultConfigPath() honors
  XDG_CONFIG_HOME; new resolveVerbose() layers verbose with the
  presence-only-CLI semantics documented.
- src/cli.ts: -C/--config <path> flag. printHelp prints the default
  config path and the precedence rule.
- src/move.ts: loads the config file (default XDG path or --config),
  passes both override layers into resolveConfig, resolves verbose
  separately, exits 2 on any validation failure.
- README: new Configuration section with path, precedence, example,
  validation rules, and the verbose CLI-can't-turn-off limitation.
  Files table gains src/configFile.ts.
2026-06-17 12:27:50 -05:00
nokeo08 c9645b374c Move installer scripts into scripts/ directory
- install.sh, uninstall.sh, dev-setup.sh now live under scripts/.
- dev-setup.sh's 'cd $(dirname $0)' updated to '.../..' so it lands
  at the repo root regardless of CWD.
- README install/uninstall curl URLs now reference scripts/<name>.sh.
- README contributor section and Files table updated to match.

Behavior is unchanged. The curl one-liner URL changes from
.../master/install.sh to .../master/scripts/install.sh; users following
the pre-v1.0.2 README will get a 404 from the old URL.
2026-06-17 12:17:32 -05:00
nokeo08 b43d5aad2d Add curl-pipe installer, uninstaller, and contributor bootstrap
End-user installation collapses to a single command:

  curl -fsSL https://gitea.cahlen.com/nokeo08/Move/raw/branch/master/install.sh | sh

Changes:

- install.sh rewritten as a POSIX sh, curl-pipeable end-user installer.
  Honors XDG_DATA_HOME and XDG_BIN_HOME (de facto). Idempotent via a
  version-marker file at $INSTALL_DIR/.installed-version; MOVE_FORCE=1
  overrides. Hard-fails if Bun is missing (no auto-install). Includes
  a safety guard refusing rm -rf on too-broad install dirs.
- uninstall.sh added; same curl-pipe pattern, shared XDG path
  resolution, leaves Bun alone.
- dev-setup.sh added (= the previous install.sh content, retitled for
  contributors and pointing at bun run start / bun link / install.sh).
- README updated: curl one-liner Install section, XDG behavior tables,
  new Uninstall section, new 'For contributors' section, Files table
  rows for all three scripts.
v1.0.1
2026-06-17 11:55:03 -05:00
nokeo08 081f94088d Remove distribution plan (resolved)
The plan is being implemented in the following commit. The working-notes
document has served its purpose and is removed to keep master focused
on shipping artifacts.
2026-06-17 11:48:36 -05:00
nokeo08 83d91c5630 Initial commit: move CLI (milestone 2)
- src/move.ts entry point with CLI parsing, --help, --version
- src/cli.ts: parseCliArgs, printHelp, ParsedCliArgs, CliError, VERSION
- src/config.ts: Config type, DEFAULT_CONFIG, resolveConfig
- src/keeper.ts: synthetic-activity sweep + idle-watch loop
- package.json bin entry + shebang for 'bun link' global install
- install.sh: contributor bootstrap (will be repurposed; see
  DISTRIBUTION-PLAN.md for the end-user installer design)
- DISTRIBUTION-PLAN.md captures the tabled end-user distribution work
v1.0.0
2026-06-15 14:31:31 -05:00