diff --git a/.gitignore b/.gitignore index 019c0b0..49823f2 100644 --- a/.gitignore +++ b/.gitignore @@ -36,6 +36,9 @@ coverage/ # Claude settings /.claude/settings.local.json +# Local MCP config +/.mcp.local.json + # Please runtime state .please/state/ .please/memory/tasklist.json diff --git a/.worktreeinclude b/.worktreeinclude new file mode 100644 index 0000000..5f6befb --- /dev/null +++ b/.worktreeinclude @@ -0,0 +1,9 @@ +# .worktreeinclude — gitignored local files copied into new worktrees +# (gitignore syntax; a file is copied only if it matches here AND is gitignored) +.env +.env.* +apps/*/.env +packages/*/.env +.claude/settings.local.json +.mcp.local.json +.turbo/config.json diff --git a/orca.yaml b/orca.yaml new file mode 100644 index 0000000..7fb1edc --- /dev/null +++ b/orca.yaml @@ -0,0 +1,22 @@ +# orca.yaml — setup script run when Orca creates a worktree. +# +# Orca (a worktree-native IDE for parallel agents) runs scripts.setup whenever it +# creates a new worktree. This file is committed, so the whole team shares it. +# +# Injected environment variables: +# $ORCA_ROOT_PATH — main checkout (root repo) path; the source for copying gitignored local files +# $ORCA_WORKTREE_PATH — the newly created worktree path; the copy target and the setup working directory + +scripts: + setup: | + # -u aborts on an unset ORCA_* variable; cd pins every step to the new worktree. + set -eu + cd "$ORCA_WORKTREE_PATH" + # 1. Trust the new worktree's mise.toml (trust is per-path) and install its pinned tools (node, bun). + mise trust --quiet + mise install + # 2. Copy gitignored local files (.env*, .claude/settings.local.json, ...) from the main checkout, + # as listed in .worktreeinclude. + mise exec -- bunx @pleaseai/worktreeinclude@0.1.0 "$ORCA_ROOT_PATH" "$ORCA_WORKTREE_PATH" + # 3. Install dependencies inside the worktree. + mise exec -- bun install