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
1 change: 1 addition & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ jobs:
- officecli
- strix
- colibri
- gitai
baseImage:
- debian:latest
- ubuntu:latest
Expand Down
20 changes: 19 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,11 @@ This repository contains a _collection_ of Features.
| zizmor | https://github.com/zizmorcore/zizmor | Static security analysis for GitHub Actions workflows. |
| open-code-review | https://github.com/alibaba/open-code-review | CLI-oriented code review tool for diffs with deterministic checks plus optional LLM review. |
| SkillSpector | https://github.com/NVIDIA/SkillSpector | Standalone security scanner for local AI-agent skill/config files; useful only if you want an AI-dev-security feature. |
| herdr | https://github.com/ogulcancelik/herdr | Fast, cross-platform CLI tool distributed as a static binary via GitHub releases. |
| herdr | https://github.com/herdrdev/herdr | Fast, cross-platform CLI tool distributed as a static binary via GitHub releases. |
| officecli | https://github.com/iOfficeAI/OfficeCLI | AI-friendly CLI to read, edit, and automate Word, Excel, and PowerPoint files — single static binary, no Office install required. |
| strix | https://github.com/usestrix/strix | Open-source AI penetration testing tool to find and fix your app's vulnerabilities. |
| colibri | https://github.com/JustVugg/colibri | Run GLM-5.2 (744B MoE) on a consumer machine — pure C, zero deps, experts streamed from disk. |
| gitai | https://github.com/git-ai-project/git-ai | A Git extension for tracking AI-generated code through every commit, merge, rebase, cherry-pick, etc. |



Expand Down Expand Up @@ -791,3 +792,20 @@ Running `colibri` inside the built container will print the usage banner of coli
colibri
cat /usr/local/share/colibri/VERSION
```

### `gitai`

Running `git-ai` inside the built container will print the version of the Git AI extension for tracking AI-generated code across commits, merges, rebases, and cherry-picks.

```jsonc
{
"image": "mcr.microsoft.com/devcontainers/base:ubuntu",
"features": {
"ghcr.io/jsburckhardt/devcontainer-features/gitai:1": {}
}
}
```

```bash
git-ai --version
```
13 changes: 13 additions & 0 deletions src/gitai/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"name": "Git AI",
"id": "gitai",
"version": "1.0.0",
"description": "A Git extension for tracking AI-generated code through every commit, merge, rebase, cherry-pick, etc.",
"options": {
"version": {
"type": "string",
"default": "latest",
"description": "Version of git-ai to install from GitHub releases e.g. v1.6.21"
}
}
}
96 changes: 96 additions & 0 deletions src/gitai/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
#!/usr/bin/env bash

set -e

# Variables
REPO_OWNER="git-ai-project"
REPO_NAME="git-ai"
BINARY_NAME="git-ai"

# Root check
if [ "$(id -u)" -ne 0 ]; then
echo -e 'Script must be run as root. Use sudo, su, or add "USER root" to your Dockerfile before running this script.'
exit 1
fi

# Clean up
rm -rf /var/lib/apt/lists/*

check_packages() {
if ! dpkg -s "$@" >/dev/null 2>&1; then
if [ "$(find /var/lib/apt/lists/* | wc -l)" = "0" ]; then
echo "Running apt-get update..."
apt-get update -y
fi
apt-get -y install --no-install-recommends "$@"
fi
}

# Ensure required packages are installed
check_packages curl ca-certificates jq

# Function to get the latest version from GitHub API
get_latest_version() {
LATEST_URL="https://api.github.com/repos/${REPO_OWNER}/${REPO_NAME}/releases/latest"
curl -s "$LATEST_URL" | jq -r ".tag_name"
}

# Resolve version
if [ -z "${VERSION:-}" ] || [ "${VERSION}" = "latest" ]; then
VERSION="$(get_latest_version)"
if [ -z "$VERSION" ] || [ "$VERSION" = "null" ]; then
echo "Failed to resolve latest version from GitHub API." >&2
exit 1
fi
echo "No version provided or 'latest' specified, installing the latest version: $VERSION"
else
echo "Installing version from environment variable: $VERSION"
fi

# Normalize version tag: upstream release tags are prefixed with "v" (e.g. v1.6.21).
# If the user supplied a bare semver like "1.6.21", prepend "v".
case "$VERSION" in
v*) ;;
*) VERSION="v${VERSION}" ;;
esac

# Determine OS
OS_RAW="$(uname -s)"
case "$OS_RAW" in
Linux) OS="linux" ;;
Darwin) OS="macos" ;;
*) echo "Unsupported OS: $OS_RAW" >&2; exit 1 ;;
esac

# Determine architecture. Upstream publishes raw binaries named:
# git-ai-linux-x64, git-ai-linux-arm64, git-ai-macos-x64, git-ai-macos-arm64
ARCH_RAW="$(uname -m)"
case "$ARCH_RAW" in
x86_64|amd64) ARCH="x64" ;;
aarch64|arm64) ARCH="arm64" ;;
*) echo "Unsupported architecture: $ARCH_RAW" >&2; exit 1 ;;
esac

ASSET_NAME="${BINARY_NAME}-${OS}-${ARCH}"
DOWNLOAD_URL="https://github.com/${REPO_OWNER}/${REPO_NAME}/releases/download/${VERSION}/${ASSET_NAME}"

# Download the raw binary directly (no tarball is published by upstream)
TMP_DIR="$(mktemp -d)"
cd "$TMP_DIR"

echo "Downloading $BINARY_NAME from $DOWNLOAD_URL"
curl -fsSL -o "$BINARY_NAME" "$DOWNLOAD_URL"

chmod +x "$BINARY_NAME"
mv "$BINARY_NAME" /usr/local/bin/

# Cleanup
cd /
rm -rf "$TMP_DIR"
rm -rf /var/lib/apt/lists/*

# Verify installation
echo "Verifying installation"
"$BINARY_NAME" --version

echo "Done!"
2 changes: 1 addition & 1 deletion src/herdr/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

# herdr (herdr)

herdr is a fast, cross-platform CLI tool from ogulcancelik/herdr distributed as a static binary via GitHub releases.
herdr is a fast, cross-platform CLI tool from herdrdev/herdr distributed as a static binary via GitHub releases.

## Example Usage

Expand Down
2 changes: 1 addition & 1 deletion src/herdr/devcontainer-feature.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "herdr",
"id": "herdr",
"version": "1.0.0",
"description": "herdr is a fast, cross-platform CLI tool from ogulcancelik/herdr distributed as a static binary via GitHub releases.",
"description": "herdr is a fast, cross-platform CLI tool from herdrdev/herdr distributed as a static binary via GitHub releases.",
"options": {
"version": {
"type": "string",
Expand Down
4 changes: 2 additions & 2 deletions src/herdr/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
set -e

# Variables
REPO_OWNER="ogulcancelik"
REPO_OWNER="herdrdev"
REPO_NAME="herdr"
BINARY_NAME="herdr"

Expand Down Expand Up @@ -32,7 +32,7 @@ check_packages curl ca-certificates jq tar
# Function to get the latest version from GitHub API
get_latest_version() {
LATEST_URL="https://api.github.com/repos/$REPO_OWNER/$REPO_NAME/releases/latest"
curl -s "$LATEST_URL" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/'
curl -sL "$LATEST_URL" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/'
}

# Resolve version
Expand Down
1 change: 1 addition & 0 deletions test/_global/all-tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,6 @@ check "herdr" herdr --version
check "officecli" officecli --version
check "strix" strix --version
check "colibri" bash -c "command -v colibri"
check "gitai" git-ai --version

reportResults
7 changes: 7 additions & 0 deletions test/_global/gitai-specific-version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

set -e

source dev-container-features-test-lib
check "gitai with specific version" /bin/bash -c "git-ai --version | grep '1.6.21'"
reportResults
11 changes: 10 additions & 1 deletion test/_global/scenarios.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@
"herdr": {},
"officecli": {},
"strix": {},
"colibri": {}
"colibri": {},
"gitai": {}
}
},
"flux-specific-version": {
Expand Down Expand Up @@ -390,5 +391,13 @@
"version": "v1.0.0"
}
}
},
"gitai-specific-version": {
"image": "mcr.microsoft.com/devcontainers/base:ubuntu",
"features": {
"gitai": {
"version": "v1.6.21"
}
}
}
}
7 changes: 7 additions & 0 deletions test/gitai/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

set -e

source dev-container-features-test-lib
check "gitai" git-ai --version
reportResults
Loading