aboutsummaryrefslogtreecommitdiff
path: root/claude-templates
diff options
context:
space:
mode:
Diffstat (limited to 'claude-templates')
-rwxr-xr-xclaude-templates/bin/install-ai23
1 files changed, 23 insertions, 0 deletions
diff --git a/claude-templates/bin/install-ai b/claude-templates/bin/install-ai
new file mode 100755
index 0000000..88cb8e5
--- /dev/null
+++ b/claude-templates/bin/install-ai
@@ -0,0 +1,23 @@
+#!/usr/bin/env bash
+# install-ai — PATH-facing launcher for the fresh-project bootstrapper.
+#
+# make install symlinks this into ~/.local/bin/install-ai (same bin loop that
+# links `ai` and `agent-page`), so `install-ai [--track|--gitignore] [PROJECT]`
+# runs from anywhere. The real logic lives in scripts/install-ai.sh; this
+# resolves its own location through the ~/.local/bin symlink and execs that
+# script by its true repo path, so the script's own repo-root computation
+# (dirname "$0"/..) stays correct. dotfiles needs no copy — the symlink always
+# points at the canonical.
+set -euo pipefail
+
+# Resolve this file through any symlink chain to its real location in the repo.
+source="${BASH_SOURCE[0]}"
+while [ -L "$source" ]; do
+ dir="$(cd -P "$(dirname "$source")" && pwd)"
+ source="$(readlink "$source")"
+ [[ "$source" != /* ]] && source="$dir/$source"
+done
+bindir="$(cd -P "$(dirname "$source")" && pwd)" # <repo>/claude-templates/bin
+repo="$(cd -P "$bindir/../.." && pwd)" # <repo>
+
+exec "$repo/scripts/install-ai.sh" "$@"