EN

VibeNest is currently available in English. More interface languages are coming soon.

Go to Home

CLOUDFLARE WORKERS · SHELL API

agent-exec-api

Shell command execution API for Cloudflare Worker agents

A secure, lightweight HTTP service that provides authenticated command execution capabilities for environments without native shell access, specifically designed for Cloudflare Workers.

Explore capabilities
POST /exec · Authorization: Bearer ******

Features

Everything needed to run shell commands safely inside Worker-like environments.

Authenticated Execution

Bearer token authentication with constant-time comparison.

Security Hardened

Rate limiting, request size caps, command timeouts, and unprivileged execution.

Docker Ready

Alpine-based container optimized for small deployments (256MB+ hosts).

Process Management

Proper process group handling with timeout-based cleanup.

Cross-Platform

Supports both Unix shells (bash) and Windows (cmd.exe).

API Endpoints

GET /health

Public health check endpoint returning {"ok": true}

{ "ok": true }

POST /exec

Authenticated command execution endpoint

Request:

{ "command": "ls -la", "cwd": "/workspace" }

Response:

{ "exitCode": 0, "output": "...", "durationMs": 123, "timedOut": false, "truncated": false }

Configuration

Environment Variable Default Description
SHELL_TOKEN *required Bearer token for authentication
PORT 3000 Server port
CMD_TIMEOUT_MS 20000 Command timeout in milliseconds
MAX_OUTPUT 60000 Maximum output size in bytes
RATE_LIMIT_PER_MIN 30 Requests per minute per IP

Tech Stack

  • Runtime Node.js 20+ (pure ESM)
  • Container Alpine Linux with bash
  • Security Crypto-based authentication, process isolation
  • Deployment Docker container running as unprivileged user

Quick Start

terminal
# Set authentication token
export SHELL_TOKEN=******

# Start server
npm start

# Or with Docker
docker build -t agent-exec-api .
docker run -e SHELL_TOKEN=****** -p 3000:3000 agent-exec-api

Reconnecting to the server...

Reconnecting in sec.

Failed to reconnect.
The page will reload automatically.

Session paused by the server.

Failed to resume the session.
Reloading the page...