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
44 changes: 8 additions & 36 deletions .agents/setup
Original file line number Diff line number Diff line change
Expand Up @@ -11,54 +11,26 @@ 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"
mise_bin="$HOME/.local/bin/mise"
if [[ ! -x "$mise_bin" ]]; then
curl https://mise.run/bash | sh
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
"$mise_bin" trust "$repo_root/mise.toml"
eval "$("$mise_bin" activate bash)"

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

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

if [[ ! -f .env ]]; then
cp -- .env.example .env
Expand Down
1 change: 1 addition & 0 deletions mise.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ tombi = "latest"
usage = "latest"
ghalint = "latest"
gitleaks = "latest"
shellcheck = "latest"
actionlint = "latest"
betterleaks = "latest"

Expand Down