The ops crew you didn't hire: open-source AI agents that take your app from a GitHub repo to a hardened production deployment on your own cloud.
翻譯準備中
取自儲存庫 README
正在載入完整 README。
檢視完整 README ↗From a GitHub repo to a hardened production deployment on your own cloud. Any cloud. You keep the infrastructure code.
Status: alpha. Tested live on Hetzner Cloud, on a server you already own and on an existing Portainer. DigitalOcean is tested against a fake only so far. Expect breaking changes before 1.0.
The full guide is at docs.opscrew.dev.
OpsCrew is an open-source crew of AI agents that does the DevOps and SecOps work for your app:
You approve every change before it is applied. Everything OpsCrew produces is a plain file in your repo: infrastructure code, workflows, reports, a runbook. Delete OpsCrew and your deployment keeps working. npx opscrew scan checks your repository for leaked secrets, exposed Supabase/Firebase data and risky config at any time, free and without AI.
Where it deploys:
One app can have several environments, such as dev on your computer, staging on a small server and prod on the live one, and a tested image moves to prod unchanged: see dev, staging and prod. Every pull request can get its own preview at its own address, on one small server of its own: see Previews. Deploy jobs can also run on the server itself or on your computer: see Self-hosted runners.
DNS goes through Cloudflare, optionally. AWS, Google Cloud, Azure and Contabo come next.
How your app is built and shipped:
opscrew rollback puts the version before back with no build, and pauses deploys until you resume them.How it stays secure:
What runs next to your app:
How you watch it, for free:
opscrew logs and opscrew status on every target, secrets masked.You need Node.js 22.9+, git, OpenTofu or Terraform, a GitHub repository with your app, and an API token for Hetzner Cloud (HCLOUD_TOKEN) or DigitalOcean (DIGITALOCEAN_TOKEN). For a custom domain, add a Cloudflare token (CLOUDFLARE_API_TOKEN) and a domain whose DNS is on Cloudflare. A GitHub token (GITHUB_TOKEN, or a logged-in gh) lets OpsCrew open pull requests and set the deploy secrets. A model (ANTHROPIC_API_KEY) is optional: pass --no-ai to analyze and adapt to run without one.
Run these in your app's repository, in order:
npx opscrew init checks the tools and tokens and offers to add .opscrew/ to .gitignore. Free.npx opscrew analyze finds the frameworks, services and environment variables. Free with --no-ai; with a model it costs a few cents.npx opscrew interview asks about traffic, budget, region, provider and your domain. Free.npx opscrew design proposes architectures with their estimated monthly cloud cost; you pick one. Free.npx opscrew adapt opens a pull request that prepares the app for a container: the Dockerfile when OpsCrew's Dockerfile builds the image (Buildpacks, Railpack and your own Dockerfile need none), a runtime version file such as .nvmrc when the repository has none, .dockerignore and .env.example, plus the code changes the plan needs (for Next.js OpsCrew makes them itself: standalone output and the /api/health route). Free with --no-ai, which lists any change left for you; for other stacks the health route is one of them, and deploys fail their health check until it exists. The Code-change agent makes those changes for you and costs model usage. Merge the pull request, then git checkout main && git pull.npx opscrew provision shows the infrastructure plan and creates the server only after you approve that exact plan. From here your cloud bills you (the estimate from step 4). It opens a second pull request with the deploy workflow; merging it runs the first deploy.npx opscrew verify checks that the app is up, healthy and served over TLS, and npx opscrew secure checks the server's hardening and writes the security report. Free.To install it once instead of fetching it with npx each time, run npm install -g opscrew, then opscrew init, opscrew analyze and so on.
In Claude Code, the OpsCrew plugin runs the same steps from the chat, and every plan still waits for your approval: /plugin marketplace add softzer0/opscrew, then /plugin install opscrew@opscrew. See the plugin's README.
npx opscrew logs shows the app's log lines (--follow for new ones), and npx opscrew status what runs with its CPU, memory and disk. See Your app's logs and resource figures.npx opscrew advise says whether the app's servers are the right size, what could cost less and what needs attention soon, and how to apply each change. See Advice on size, cost and upkeep.npx opscrew destroy deletes the deployment's infrastructure. It asks you to type the server name first and can take a snapshot.npx opscrew retarget --to <provider> moves a live app to another cloud provider with its data (not yet to or from your own server or a Portainer). It builds the new server next to the old one, copies the database in a short maintenance window and switches DNS. The old server is deleted only when you run opscrew retarget --finish. See Moving your app to another cloud provider.npx opscrew domain buy <domain> buys one at cost after you confirm the price, through Cloudflare, Porkbun, Namecheap or GoDaddy. Already own one? npx opscrew domain connect <domain> moves its DNS to Cloudflare. See Buying or connecting a domain.Requirements: the tools from the Quickstart, plus pnpm 10+.
pnpm install
pnpm check # lint + typecheck + test
node scripts/pack-smoke.mjs # build, pack the CLI and run the tarball with npx in an empty folder
Specifications live in specs/ and the project constitution in .specify/memory/constitution.md.
Apache-2.0 (see LICENSE), except ee/, which is under FSL-1.1-ALv2 and converts to Apache-2.0 after two years. Anything primarily useful to individual developers stays outside ee/ and stays free.
OpsCrew uses Claude by Anthropic. Powered by Claude.