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
This commit is contained in:
Executable
+41
@@ -0,0 +1,41 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# install.sh - bootstrap the Teams Status Keeper project.
|
||||
#
|
||||
# Verifies Bun is installed, then runs `bun install` to fetch dependencies
|
||||
# (notably `@nut-tree-fork/nut-js`, which ships prebuilt native binaries
|
||||
# for darwin-arm64/x64, linux, and windows).
|
||||
#
|
||||
# This script is idempotent: re-running it just re-resolves the dependency
|
||||
# tree against the existing `bun.lock`.
|
||||
|
||||
# Fail fast on any error, unset variable, or failed pipe stage.
|
||||
set -euo pipefail
|
||||
|
||||
# Always operate relative to the script's own directory so the install works
|
||||
# regardless of the caller's CWD.
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
echo "==> Checking for Bun..."
|
||||
if ! command -v bun >/dev/null 2>&1; then
|
||||
# Hard error rather than auto-install: keep the script's behavior
|
||||
# predictable and let the user pick their own install method.
|
||||
echo "Error: bun is not installed." >&2
|
||||
echo " Install it from https://bun.sh (e.g. 'brew install oven-sh/bun/bun') and re-run." >&2
|
||||
exit 1
|
||||
fi
|
||||
echo " bun $(bun --version)"
|
||||
|
||||
echo "==> Installing dependencies..."
|
||||
bun install
|
||||
|
||||
echo
|
||||
echo "Done. Run with: bun run start"
|
||||
|
||||
# macOS gates synthetic mouse events behind the Accessibility permission.
|
||||
# Without this hint, the first run silently fails to move the cursor and
|
||||
# the user has no obvious next step.
|
||||
if [[ "$(uname)" == "Darwin" ]]; then
|
||||
echo "Note: macOS will prompt for Accessibility permission on first mouse move."
|
||||
echo " Grant it under System Settings > Privacy & Security > Accessibility."
|
||||
fi
|
||||
Reference in New Issue
Block a user