Skip to content
Closed
Show file tree
Hide file tree
Changes from 2 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 README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
| [rclone](https://github.com/devcontainer-community/devcontainer-features/tree/main/src/rclone.org) | `rclone` — sync files to/from cloud storage | gh release | 1.0.1 |
| [restic.net](https://github.com/devcontainer-community/devcontainer-features/tree/main/src/restic.net) | `restic` — fast, encrypted, deduplicated backups | gh release | 1.0.1 |
| [ripgrep](https://github.com/devcontainer-community/devcontainer-features/tree/main/src/ripgrep) | `rg` — fast grep alternative (ripgrep) | gh release | 1.0.1 |
| [runagent.sh](https://github.com/devcontainer-community/devcontainer-features/tree/main/src/runagent.sh) | `runagent` — CLI for running and orchestrating AI agents | bun | 1.0.0 |
| [schpet/linear-cli](https://github.com/devcontainer-community/devcontainer-features/tree/main/src/schpet-linear-cli) | `linear` — CLI to access linear.com issue tracker | gh release | 1.0.2 |
| [smallstep.com](https://github.com/devcontainer-community/devcontainer-features/tree/main/src/smallstep.com) | `step` — zero-trust security toolkit and CA | gh release | 1.0.2 |
| [socket.dev/sfw-free](https://github.com/devcontainer-community/devcontainer-features/tree/main/src/socket.dev-sfw-free) | `sfw` — network security proxy that blocks malicious dependencies | gh release | 1.0.0 |
Expand Down
17 changes: 17 additions & 0 deletions src/runagent.sh/NOTES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# runagent

## Project

- [runagent.sh](https://runagent.sh)

## Description

A CLI for running and orchestrating AI agents. `runagent` lets you build, test, deploy, and manage AI agents from the terminal, supporting popular frameworks like LangGraph and CrewAI with multi-language SDK integration.

## Installation Method

Installed as a global package via [Bun](https://bun.sh) (`bun install -g runagent`). Bun is automatically installed if not already present.

## Other Notes

_No additional notes._
17 changes: 17 additions & 0 deletions src/runagent.sh/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "runagent.sh",
"id": "runagent.sh",
"version": "1.0.0",
"description": "Install \"runagent\" binary",
"documentationURL": "https://github.com/devcontainer-community/devcontainer-features/tree/main/src/runagent.sh",
"options": {
"version": {
"type": "string",
"default": "latest",
"proposals": [
"latest"
],
"description": "Version of \"runagent\" to install."
}
}
}
59 changes: 59 additions & 0 deletions src/runagent.sh/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
#!/bin/bash
set -o errexit
set -o pipefail
set -o noclobber
set -o nounset
set -o allexport
readonly binaryName='runagent'
readonly binaryTargetFolder='/usr/local/bin'
apt_get_update() {
if [ "$(find /var/lib/apt/lists/* | wc -l)" = "0" ]; then
echo "Running apt-get update..."
apt-get update -y
fi
}
apt_get_checkinstall() {
if ! dpkg -s "$@" >/dev/null 2>&1; then
apt_get_update
DEBIAN_FRONTEND=noninteractive apt-get -y install --no-install-recommends --no-install-suggests --option 'Debug::pkgProblemResolver=true' --option 'Debug::pkgAcquire::Worker=1' "$@"
fi
}
apt_get_cleanup() {
apt-get clean
rm -rf /var/lib/apt/lists/*
}
echo_banner() {
local text="$1"
echo -e "\e[1m\e[97m\e[41m$text\e[0m"
}
utils_check_version() {
local version=$1
if ! [[ "${version:-}" =~ ^(latest|[0-9]+\.[0-9]+\.[0-9]+)$ ]]; then
printf >&2 '=== [ERROR] Option "version" (value: "%s") is not "latest" or valid semantic version format "X.Y.Z" !\n' \
"$version"
exit 1
fi
}
bun_ensure_installed() {
if ! command -v bun >/dev/null 2>&1; then
echo "Bun is not installed. Installing bun to /usr/local..."
apt_get_checkinstall unzip curl ca-certificates
export BUN_INSTALL=/usr/local
curl -fsSL https://bun.sh/install | bash
fi
}
install() {
utils_check_version "$VERSION"
export BUN_INSTALL=/usr/local
bun_ensure_installed
if [ "$VERSION" == 'latest' ] || [ -z "$VERSION" ]; then
bun install -g runagent
else
bun install -g "runagent@${VERSION}"
fi
apt_get_cleanup
}
echo_banner "devcontainer.community"
echo "Installing $binaryName..."
install "$@"
echo "(*) Done!"
18 changes: 18 additions & 0 deletions test/runagent.sh/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash

set -e

# Optional: Import test library bundled with the devcontainer CLI
# See https://github.com/devcontainers/cli/blob/HEAD/docs/features/test.md#dev-container-features-test-lib
# Provides the 'check' and 'reportResults' commands.
source dev-container-features-test-lib

# Feature-specific tests
# The 'check' command comes from the dev-container-features-test-lib. Syntax is...
# check <LABEL> <cmd> [args...]

check "check existence" bash -c "ls -lah /usr/local/bin/runagent"

# Report results
# If any of the checks above exited with a non-zero exit code, the test will fail.
reportResults
Loading