Skip to content

Commit 440eaac

Browse files
committed
add devcontainer feature repo for using entire cli in devcontainers
Entire-Checkpoint: be974bfe4967
1 parent a208364 commit 440eaac

6 files changed

Lines changed: 181 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Release Dev Container Features
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
permissions:
9+
packages: write
10+
contents: read
11+
12+
jobs:
13+
publish:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- name: Publish Dev Container Features
19+
uses: devcontainers/action@v1
20+
with:
21+
publish-features: true
22+
env:
23+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

README.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Entire Dev Container Features
2+
3+
Dev container features for the [Entire](https://entire.io) development platform.
4+
5+
## Features
6+
7+
### `entire-cli`
8+
9+
Install the Entire CLI for AI-assisted development workflows.
10+
11+
#### Usage
12+
13+
Add to your `devcontainer.json`:
14+
15+
```json
16+
{
17+
"features": {
18+
"ghcr.io/entireio/devcontainer-features/entire-cli:1": {}
19+
}
20+
}
21+
```
22+
23+
#### Options
24+
25+
| Option | Type | Default | Description |
26+
|-----------|--------|------------|--------------------------------------|
27+
| `version` | string | `latest` | Version to install (e.g., `0.5.0`) |
28+
29+
#### Pin to a specific version
30+
31+
```json
32+
{
33+
"features": {
34+
"ghcr.io/entireio/devcontainer-features/entire-cli:1": {
35+
"version": "0.5.0"
36+
}
37+
}
38+
}
39+
```
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"id": "entire-cli",
3+
"version": "1.0.0",
4+
"name": "Entire CLI",
5+
"description": "Install the Entire CLI for AI-assisted development workflows",
6+
"options": {
7+
"version": {
8+
"type": "string",
9+
"default": "latest",
10+
"description": "Version of the Entire CLI to install. Use 'latest' for the most recent release or pin to a specific version (e.g., '0.5.0')."
11+
}
12+
},
13+
"installsAfter": [
14+
"ghcr.io/devcontainers/features/common-utils",
15+
"ghcr.io/devcontainers/features/git"
16+
]
17+
}

src/entire-cli/install.sh

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
#!/usr/bin/env bash
2+
set -euo pipefail
3+
4+
VERSION="${VERSION:-latest}"
5+
6+
# Detect architecture
7+
ARCH="$(uname -m)"
8+
case "${ARCH}" in
9+
x86_64) ARCH="amd64" ;;
10+
aarch64) ARCH="arm64" ;;
11+
arm64) ARCH="arm64" ;;
12+
*)
13+
echo "Unsupported architecture: ${ARCH}" >&2
14+
exit 1
15+
;;
16+
esac
17+
18+
# Detect OS
19+
OS="$(uname -s | tr '[:upper:]' '[:lower:]')"
20+
case "${OS}" in
21+
linux) OS="linux" ;;
22+
darwin) OS="darwin" ;;
23+
*)
24+
echo "Unsupported OS: ${OS}" >&2
25+
exit 1
26+
;;
27+
esac
28+
29+
# Resolve latest version
30+
if [ "${VERSION}" = "latest" ]; then
31+
VERSION="$(curl -fsSL https://api.github.com/repos/entireio/cli/releases/latest | grep '"tag_name"' | sed -E 's/.*"v?([^"]+)".*/\1/')"
32+
fi
33+
34+
# Strip leading 'v' if present
35+
VERSION="${VERSION#v}"
36+
37+
TARBALL="entire_${OS}_${ARCH}.tar.gz"
38+
DOWNLOAD_URL="https://github.com/entireio/cli/releases/download/v${VERSION}/${TARBALL}"
39+
40+
echo "Installing Entire CLI v${VERSION} (${OS}/${ARCH})..."
41+
42+
# Download and extract
43+
TMP_DIR="$(mktemp -d)"
44+
trap 'rm -rf "${TMP_DIR}"' EXIT
45+
46+
curl -fsSL "${DOWNLOAD_URL}" -o "${TMP_DIR}/${TARBALL}"
47+
tar -xzf "${TMP_DIR}/${TARBALL}" -C "${TMP_DIR}"
48+
49+
# Install binary
50+
install -m 755 "${TMP_DIR}/entire" /usr/local/bin/entire
51+
52+
# Install shell completions if available
53+
if [ -d "${TMP_DIR}/completions" ]; then
54+
if [ -f "${TMP_DIR}/completions/entire.bash" ]; then
55+
mkdir -p /etc/bash_completion.d
56+
cp "${TMP_DIR}/completions/entire.bash" /etc/bash_completion.d/entire
57+
fi
58+
if [ -f "${TMP_DIR}/completions/entire.zsh" ]; then
59+
mkdir -p /usr/local/share/zsh/site-functions
60+
cp "${TMP_DIR}/completions/entire.zsh" /usr/local/share/zsh/site-functions/_entire
61+
fi
62+
if [ -f "${TMP_DIR}/completions/entire.fish" ]; then
63+
mkdir -p /usr/share/fish/vendor_completions.d
64+
cp "${TMP_DIR}/completions/entire.fish" /usr/share/fish/vendor_completions.d/entire.fish
65+
fi
66+
fi
67+
68+
echo "Entire CLI v${VERSION} installed successfully."

test/entire-cli/scenarios.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"install_latest": {
3+
"image": "mcr.microsoft.com/devcontainers/base:ubuntu",
4+
"features": {
5+
"entire-cli": {}
6+
}
7+
},
8+
"install_pinned": {
9+
"image": "mcr.microsoft.com/devcontainers/base:ubuntu",
10+
"features": {
11+
"entire-cli": {
12+
"version": "0.5.0"
13+
}
14+
}
15+
}
16+
}

test/entire-cli/test.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/usr/bin/env bash
2+
set -euo pipefail
3+
4+
# Check that the binary exists and is executable
5+
if ! command -v entire &>/dev/null; then
6+
echo "FAIL: entire binary not found in PATH"
7+
exit 1
8+
fi
9+
10+
echo "PASS: entire binary exists at $(command -v entire)"
11+
12+
# Check that it runs and returns version info
13+
if ! entire --version &>/dev/null; then
14+
echo "FAIL: entire --version returned non-zero exit code"
15+
exit 1
16+
fi
17+
18+
echo "PASS: entire --version returned: $(entire --version)"

0 commit comments

Comments
 (0)