Skip to content

Commit fba0b54

Browse files
ampagentdhamidi
andcommitted
Add .agents/setup script to install prerequisites
Amp-Thread-ID: https://ampcode.com/threads/T-019c9378-a370-76be-92c2-17b8557ef4d4 Co-authored-by: Amp <amp@ampcode.com> Co-authored-by: Dario Hamidi <dario@ampcode.com>
1 parent 48c1af6 commit fba0b54

1 file changed

Lines changed: 34 additions & 0 deletions

File tree

.agents/setup

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#!/usr/bin/env bash
2+
set -euo pipefail
3+
4+
# Install mise
5+
if ! command -v mise &>/dev/null; then
6+
curl -fsSL https://mise.run | sh
7+
export PATH="$HOME/.local/bin:$PATH"
8+
fi
9+
10+
# Add mise activation to shell profiles
11+
MISE_ACTIVATE='eval "$($HOME/.local/bin/mise activate bash)"'
12+
for rc in "$HOME/.bashrc" "$HOME/.profile"; do
13+
if ! grep -qF 'mise activate' "$rc" 2>/dev/null; then
14+
echo "$MISE_ACTIVATE" >> "$rc"
15+
fi
16+
done
17+
18+
# Trust the repo config and install all tools (go, node, agent-browser)
19+
mise trust "$PWD/mise.toml"
20+
mise install
21+
22+
# Activate mise so tools are on PATH
23+
eval "$(mise activate bash)"
24+
25+
# Install npm dependencies (playwright etc.)
26+
npm ci
27+
28+
# Install Playwright browsers
29+
npx playwright install chromium
30+
31+
# Build the Go project
32+
go build ./...
33+
34+
echo "Setup complete."

0 commit comments

Comments
 (0)