Generated Computers
Locals: an Apple Silicon engine that runs local LLMs up to 3x faster. A product of Generated Computers.
翻译准备中
尚未检测到更新。GitHub 发布版本后会显示在这里。
个人 GitHub 账号下公开仓库的所有者可以登录并验证所有权,自行管理介绍,无需管理员批准。
登录并生成验证文件,在 30 分钟内将其提交到此仓库的默认分支。其他分支或分叉仓库中的文件无效。然后在下方检查文件,即可无需管理员批准直接管理项目。请保留文件以维持管理权限。
如需登录,将前往登录页面。登录后请回到此处,再次点击所选的验证按钮。
在项目文件夹中运行 /nomorevibe verify,即可验证所有权并自行管理介绍。
一分钟完成验证API to CLI - HTTP-triggered, secure CLI executor for deployments & maintenance.
翻译准备中
取自仓库 README
正在加载完整 README。
查看完整 README ↗A secure web service that executes CLI commands based on authenticated HTTP requests.
Purpose
This repository implements a small, secure HTTP-driven command executor intended to run pre-configured, non-interactive shell commands in response to authenticated API requests. It is designed as a safe bridge between event sources (webhooks, internal dashboards, or CI systems) and deterministic maintenance or deployment scripts. Security is a first-class concern: the service is meant to be used with vetted commands, API-key authentication, logging, rate limiting, and optional network isolation (reverse proxy, containerization). Operators should only expose this API to trusted networks, use TLS, restrict allowed commands, and run the service with least privilege.
Safe Use Cases
Security notes: always whitelist commands (do not accept arbitrary shell input), keep API_KEY secret and rotated, serve behind TLS and a firewall or VPN, run the service as an unprivileged user or inside a container, and log and monitor all requests.
Highlights
Quick Links
Requirements
Quick Start (Docker - recommended)
.env in the project root with required variables (see Env section).docker-compose up -d --build
docker-compose logs -f
Start Without Docker (traditional install)
sudo apt update
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
sudo apt install -y nodejs
npm install
.env and start:npm start
sudo chmod +x install-service.sh
sudo ./install-service.sh
Environment (important)
Create a .env file with at least the following values:
API_KEY=<at least 32 characters>
CLI_COMMAND=/absolute/path/to/your-script.sh
CLI_WORKING_DIR=/path/to/working/dir
PORT=3000
HOST=127.0.0.1
Generating a secure key locally:
date | sha512sum | cut -c1-64
API
CLI_COMMAND once with the given argument.
X-API-Key: <API_KEY> (at least 32 characters){ "arg": "Dev-1.2.3" }. arg must match CLI_ARG_PATTERN.text/event-stream with the program's output, then Command completed with code N.409 if another run is already in progress, 401 for a bad key, 400 for a bad body.Example trigger
curl -N -X POST https://your-host/api/trigger \
-H "X-API-Key: $API_KEY" -H "Content-Type: application/json" \
-d '{"arg":"Dev-1.2.3"}'
Security model
spawn and an argument array, with no shell. Shell characters in arg are never interpreted.CLI_COMMAND must be an absolute path to a program, without spaces or arguments. The service refuses to start otherwise.127.0.0.1 by default. Put TLS and access control in front of it (nginx in this repo, or a firewall or VPN).CLI_TIMEOUT_MS.Logging
logs/ directory by default (see project files).Deployment Notes
nginx.conf is a ready-to-use reverse proxy config — adapt upstream/SSL as needed.docker-compose.yml starts the app and nginx for production-like testing.install-service.sh script sets up a systemd service and places the app under /opt/cicd-cli-controller by default.Security Best Practices
API_KEY secret and rotate it periodically.CI/CD
DOCKERHUB_USERNAME, DOCKERHUB_TOKEN) to enable publishing.Troubleshooting
docker-compose logs or journalctl -u cicd-cli-controller for systemd installs.CLI_COMMAND is executable and CLI_WORKING_DIR exists.Contributing
License