Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .agents/resume
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash

set -euo pipefail

# Amp Orbs setup

echo "No persistent services require resume"
67 changes: 67 additions & 0 deletions .agents/setup
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
#!/usr/bin/env bash

set -euo pipefail

# Amp Orbs setup

repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
cd "$repo_root"

export DISABLE_TELEMETRY=1
export MISE_EXPERIMENTAL=true
export MISE_HTTP_TIMEOUT=120

if ! command -v shellcheck >/dev/null 2>&1; then
echo "Installing system packages"
apt=(apt-get)
if ((EUID != 0)); then
if ! command -v sudo >/dev/null 2>&1; then
echo "shellcheck is required, but setup cannot run apt-get as root" >&2
exit 1
fi
apt=(sudo apt-get)
fi
"${apt[@]}" update
"${apt[@]}" install -y shellcheck
fi

echo "Installing mise"
if command -v mise >/dev/null 2>&1; then
mise_bin="$(command -v mise)"
else
installer="$(mktemp)"
trap 'rm -f "$installer"' EXIT
curl --fail --silent --show-error --location https://mise.run --output "$installer"
bash "$installer"
mise_bin="$HOME/.local/bin/mise"
fi

if [[ ! -x "$mise_bin" ]]; then
echo "mise was not installed at $mise_bin" >&2
exit 1
fi

profile_marker="# skills orb setup: activate mise"
if ! grep -Fqx "$profile_marker" "$HOME/.bash_profile" 2>/dev/null; then
cat >>"$HOME/.bash_profile" <<EOF

$profile_marker
if [[ -x "$mise_bin" ]]; then
eval "\$("$mise_bin" activate bash)"
fi
EOF
fi

echo "Installing repository toolchains"
"$mise_bin" trust "$repo_root/mise.toml"
"$mise_bin" install

echo "Installing locked dependencies"
"$mise_bin" exec -- bun install --frozen-lockfile
"$mise_bin" exec -- uv sync --frozen

if [[ ! -f .env ]]; then
cp -- .env.example .env
fi

echo "Orb setup complete"