Ark

This site is private. Enter the password to continue.

docs / format / installers

Installer scripts

Every Ark package includes a setup script that runs after download. The installer configures the package for the buyer's environment. A verify script confirms the install succeeded.

install.sh — the setup script

Referenced in ark.json as setup.installer. Runs automatically after ark install extracts the archive.

bin/install.sh — minimal example
#!/usr/bin/env bash
set -euo pipefail

# Where this package lives after extraction
PKG_DIR="$HOME/.ark/packages/my-skill"

# Copy CLAUDE.md to ~/.claude/ for global availability
mkdir -p "$HOME/.claude/skills"
cp "$PKG_DIR/CLAUDE.md" "$HOME/.claude/skills/my-skill.md"

echo "✓ my-skill installed"
echo "  Add to your CLAUDE.md: @~/.claude/skills/my-skill.md"

verify.sh — the post-install check

Referenced in ark.json as setup.post_install_check. Must exit 0 on success, non-zero on failure. Ark runs this automatically and displays the result.

bin/verify.sh — minimal example
#!/usr/bin/env bash
set -euo pipefail

TARGET="$HOME/.claude/skills/my-skill.md"

# Check the file was copied
if [[ ! -f "$TARGET" ]]; then
  echo "✗ my-skill.md not found at $TARGET"
  exit 1
fi

echo "✓ my-skill verified"
exit 0

Interactive installers

If your setup requires user input (API keys, preferences, paths), set "interactive": true in ark.json. Users are warned before running an interactive installer.

bin/install.sh — interactive example
#!/usr/bin/env bash
set -euo pipefail

CONFIG_DIR="$HOME/.ark/data/agent-comptable"
mkdir -p "$CONFIG_DIR"

# Prompt for configuration
read -rp "Company name: " COMPANY
read -rp "Default currency (EUR/USD): " CURRENCY
read -rp "Fiscal year start month (1-12): " FISCAL_START

# Write config
cat > "$CONFIG_DIR/config.json" <<EOF
{
  "company": "$COMPANY",
  "currency": "$CURRENCY",
  "fiscal_year_start": $FISCAL_START
}
EOF

echo "✓ Configured. Config saved to $CONFIG_DIR/config.json"

Permissions

Make both scripts executable before running ark audit or ark publish:

Terminal
$ chmod +x bin/install.sh bin/verify.sh

Rules and restrictions

No sudo, ever. Packages that attempt to write to system directories or request elevated permissions are rejected. Ark packages run as the current user, always.