Skip to content

Commit 5a11c13

Browse files
author
Joan-Angelo Enrile
committed
chore: update package version to 1.0.2 and switch to Bun for build and run scripts
docs: enhance SKILL.md with installation instructions and availability check for ado-cli fix: modify tsconfig to use ESNext module and Bundler resolution, disable emitting output
1 parent b8b31a0 commit 5a11c13

10 files changed

Lines changed: 447 additions & 1411 deletions

File tree

.claude/settings.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"permissions": {
3+
"allow": [
4+
"Bash(grep -E \"\\\\.\\(json|yaml|yml|config\\)$\")",
5+
"Bash(find * -name \"*\" -exec wc -l {} +)",
6+
"Bash(bun install:*)"
7+
]
8+
}
9+
}

.github/workflows/release.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*.*.*'
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
15+
strategy:
16+
matrix:
17+
include:
18+
- target: bun-linux-x64
19+
output: ado-linux-x64
20+
- target: bun-linux-arm64
21+
output: ado-linux-arm64
22+
- target: bun-darwin-x64
23+
output: ado-darwin-x64
24+
- target: bun-darwin-arm64
25+
output: ado-darwin-arm64
26+
- target: bun-windows-x64
27+
output: ado-windows-x64.exe
28+
29+
steps:
30+
- uses: actions/checkout@v4
31+
32+
- uses: oven-sh/setup-bun@v2
33+
with:
34+
bun-version: latest
35+
36+
- name: Install dependencies
37+
run: bun install --frozen-lockfile
38+
39+
- name: Build binary
40+
run: |
41+
bun build src/index.ts \
42+
--compile \
43+
--target=${{ matrix.target }} \
44+
--outfile=${{ matrix.output }}
45+
46+
- name: Upload artifact
47+
uses: actions/upload-artifact@v4
48+
with:
49+
name: ${{ matrix.output }}
50+
path: ${{ matrix.output }}
51+
if-no-files-found: error
52+
53+
release:
54+
needs: build
55+
runs-on: ubuntu-latest
56+
57+
steps:
58+
- uses: actions/download-artifact@v4
59+
with:
60+
path: binaries
61+
merge-multiple: true
62+
63+
- name: Create GitHub Release
64+
uses: softprops/action-gh-release@v2
65+
with:
66+
files: binaries/*
67+
generate_release_notes: true

README.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,27 @@ An Azure DevOps CLI, mimicking the known and loved Github CLI syntax.
33

44
## Installation
55

6+
**macOS, Linux, WSL** (recommended — no Node.js required):
7+
```bash
8+
curl -fsSL https://raw.githubusercontent.com/yutamago/ado-cli/main/install.sh | bash
9+
```
10+
11+
**Windows PowerShell:**
12+
```powershell
13+
irm https://raw.githubusercontent.com/yutamago/ado-cli/main/install.ps1 | iex
14+
```
15+
16+
**Windows CMD:**
17+
```cmd
18+
curl -fsSL https://raw.githubusercontent.com/yutamago/ado-cli/main/install.ps1 -o install.ps1 && powershell -File install.ps1 && del install.ps1
19+
```
20+
21+
**npm** (requires Node.js 18+):
622
```bash
723
npm install -g ado-cli
824
```
925

10-
**Prerequisites:** Node.js 18 or later, an Azure DevOps account.
26+
Pre-built binaries for all platforms are also available on the [Releases](https://github.com/yutamago/ado-cli/releases) page.
1127

1228

1329
### Installing the Plugin in your AI Agent

bun.lock

Lines changed: 228 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

install.ps1

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#Requires -Version 5.1
2+
$ErrorActionPreference = 'Stop'
3+
4+
$Repo = "yutamago/ado-cli"
5+
$BinName = "ado.exe"
6+
$Binary = "ado-windows-x64.exe"
7+
$InstallDir = if ($env:ADO_INSTALL_DIR) { $env:ADO_INSTALL_DIR } `
8+
else { Join-Path $env:LOCALAPPDATA "ado" }
9+
10+
$DownloadUrl = "https://github.com/$Repo/releases/latest/download/$Binary"
11+
12+
Write-Host "Downloading ado CLI (windows/x64)..."
13+
14+
New-Item -ItemType Directory -Force -Path $InstallDir | Out-Null
15+
$Dest = Join-Path $InstallDir $BinName
16+
Invoke-WebRequest -Uri $DownloadUrl -OutFile $Dest -UseBasicParsing
17+
18+
# Add to user PATH if not already present
19+
$UserPath = [System.Environment]::GetEnvironmentVariable("PATH", "User")
20+
if ($UserPath -notlike "*$InstallDir*") {
21+
[System.Environment]::SetEnvironmentVariable(
22+
"PATH",
23+
"$InstallDir;$UserPath",
24+
"User"
25+
)
26+
Write-Host "Added $InstallDir to your user PATH."
27+
Write-Host "Restart your terminal for the PATH change to take effect."
28+
}
29+
30+
Write-Host "Installed to $Dest"
31+
Write-Host "Run 'ado --version' to verify the installation."

install.sh

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
#!/usr/bin/env bash
2+
set -euo pipefail
3+
4+
REPO="yutamago/ado-cli"
5+
BIN_NAME="ado"
6+
INSTALL_DIR="${ADO_INSTALL_DIR:-$HOME/.local/bin}"
7+
8+
# Detect OS
9+
OS="$(uname -s)"
10+
case "$OS" in
11+
Linux*) OS_NAME="linux" ;;
12+
Darwin*) OS_NAME="darwin" ;;
13+
*)
14+
echo "Unsupported OS: $OS" >&2
15+
exit 1
16+
;;
17+
esac
18+
19+
# Detect architecture
20+
ARCH="$(uname -m)"
21+
case "$ARCH" in
22+
x86_64 | amd64) ARCH_NAME="x64" ;;
23+
aarch64 | arm64) ARCH_NAME="arm64" ;;
24+
*)
25+
echo "Unsupported architecture: $ARCH" >&2
26+
exit 1
27+
;;
28+
esac
29+
30+
BINARY="ado-${OS_NAME}-${ARCH_NAME}"
31+
DOWNLOAD_URL="https://github.com/${REPO}/releases/latest/download/${BINARY}"
32+
33+
echo "Downloading ado CLI (${OS_NAME}/${ARCH_NAME})..."
34+
35+
mkdir -p "$INSTALL_DIR"
36+
curl -fsSL "$DOWNLOAD_URL" -o "$INSTALL_DIR/$BIN_NAME"
37+
chmod +x "$INSTALL_DIR/$BIN_NAME"
38+
39+
echo "Installed to $INSTALL_DIR/$BIN_NAME"
40+
41+
# PATH hint
42+
if ! echo "$PATH" | tr ':' '\n' | grep -qx "$INSTALL_DIR"; then
43+
echo ""
44+
echo " $INSTALL_DIR is not in your PATH."
45+
echo " Add it by appending this line to your shell profile (~/.bashrc, ~/.zshrc, etc.):"
46+
echo ""
47+
echo " export PATH=\"\$HOME/.local/bin:\$PATH\""
48+
echo ""
49+
fi
50+
51+
echo "Run 'ado --version' to verify the installation."

0 commit comments

Comments
 (0)