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
82 changes: 82 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,85 @@ jobs:
tag_name: ${{ needs.version.outputs.tag }}
generate_release_notes: true
files: dap-*

homebrew:
name: Update Homebrew Formula
needs: [version, release]
if: needs.version.outputs.tag != ''
continue-on-error: true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
repository: AlmogBaku/homebrew-tap
token: ${{ secrets.HOMEBREW_TAP_TOKEN }}
Comment thread
qodo-free-for-open-source-projects[bot] marked this conversation as resolved.

- name: Update formula
env:
VERSION: ${{ needs.version.outputs.tag }}
run: |
set -euo pipefail
[[ "${VERSION}" == v* ]] || { echo "Expected v-prefixed tag, got ${VERSION}"; exit 1; }
VER="${VERSION#v}"
BASE="https://github.com/AlmogBaku/debug-skill/releases/download/${VERSION}"

sha() { curl -sfL "$1" | shasum -a 256 | cut -d' ' -f1; }
SHA_DARWIN_ARM64=$(sha "${BASE}/dap-darwin-arm64") || { echo "Failed to download darwin-arm64"; exit 1; }
SHA_DARWIN_AMD64=$(sha "${BASE}/dap-darwin-amd64") || { echo "Failed to download darwin-amd64"; exit 1; }
SHA_LINUX_ARM64=$(sha "${BASE}/dap-linux-arm64") || { echo "Failed to download linux-arm64"; exit 1; }
SHA_LINUX_AMD64=$(sha "${BASE}/dap-linux-amd64") || { echo "Failed to download linux-amd64"; exit 1; }

cat > Formula/dap.rb << 'FORMULA'
class Dap < Formula
desc "CLI debugging tool for AI agents using the Debug Adapter Protocol"
homepage "https://github.com/AlmogBaku/debug-skill"
version "VERSION_PLACEHOLDER"
license "MIT"

on_macos do
if Hardware::CPU.arm?
url "https://github.com/AlmogBaku/debug-skill/releases/download/v#{version}/dap-darwin-arm64"
sha256 "SHA_DARWIN_ARM64_PLACEHOLDER"
else
url "https://github.com/AlmogBaku/debug-skill/releases/download/v#{version}/dap-darwin-amd64"
sha256 "SHA_DARWIN_AMD64_PLACEHOLDER"
end
end

on_linux do
if Hardware::CPU.arm?
url "https://github.com/AlmogBaku/debug-skill/releases/download/v#{version}/dap-linux-arm64"
sha256 "SHA_LINUX_ARM64_PLACEHOLDER"
else
url "https://github.com/AlmogBaku/debug-skill/releases/download/v#{version}/dap-linux-amd64"
sha256 "SHA_LINUX_AMD64_PLACEHOLDER"
end
end

def install
binary = Dir["dap-*"].first
bin.install binary => "dap"
end

test do
assert_match version.to_s, shell_output("#{bin}/dap --version")
end
end
FORMULA

sed -i "s/VERSION_PLACEHOLDER/${VER}/" Formula/dap.rb
sed -i "s/SHA_DARWIN_ARM64_PLACEHOLDER/${SHA_DARWIN_ARM64}/" Formula/dap.rb
sed -i "s/SHA_DARWIN_AMD64_PLACEHOLDER/${SHA_DARWIN_AMD64}/" Formula/dap.rb
sed -i "s/SHA_LINUX_ARM64_PLACEHOLDER/${SHA_LINUX_ARM64}/" Formula/dap.rb
sed -i "s/SHA_LINUX_AMD64_PLACEHOLDER/${SHA_LINUX_AMD64}/" Formula/dap.rb

- name: Commit and push
env:
VERSION: ${{ needs.version.outputs.tag }}
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add Formula/dap.rb
git diff --cached --quiet && exit 0
git commit -m "dap ${VERSION}"
git push
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ CLI sends one command and gets back the full context — no interactive terminal

### Install


```bash
# One-liner (Linux & macOS)
bash <(curl -fsSL https://raw.githubusercontent.com/AlmogBaku/debug-skill/master/skills/debugging-code/scripts/install-dap.sh)
Expand All @@ -83,6 +84,12 @@ bash <(curl -fsSL https://raw.githubusercontent.com/AlmogBaku/debug-skill/master
<details>
<summary>Other install methods</summary>

**From Homebrew (for macOS):**
```bash
brew install AlmogBaku/tap/dap
```

**From sources:**
```bash
# Go install
go install github.com/AlmogBaku/debug-skill/cmd/dap@latest
Expand Down
11 changes: 10 additions & 1 deletion skills/debugging-code/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,20 @@ the debugger state, so you can simply interact with it with multiple calls.
If `dap` isn't installed (check: `command -v dap`), install it NOW.
Ask/notify the user before proceeding to install it.

From Homebrew (macOS)
```bash
brew install AlmogBaku/tap/dap
```

Installer script:
```bash
bash scripts/install-dap.sh
```

Alternatively, install from sources `go install github.com/AlmogBaku/debug-skill/cmd/dap@latest`
Install from sources:
```bash
go install github.com/AlmogBaku/debug-skill/cmd/dap@latest
```

This tool is open-sourced and available on [GitHub](https://github.com/AlmogBaku/debug-skill), maintained and follows
best practices.
Expand Down
Loading