Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
O

opencontrol

> 编程语言
Open source

⏣ Control your infrastructure with AI.

758 stars0 likes0 views
WebsiteGitHub

About

⏣ Control your infrastructure with AI.


OpenControl lets you control your infrastructure with AI.

  • Self-hosted: Runs in your infrastructure with access to internal resources and functions from your codebase; deploys to AWS Lambda, Cloudflare Workers, or containers.
  • Unified gateway: Generates a single HTTP endpoint that you can chat with or register with your AI client and it exposes all your tools.
  • Universal: Works with any model that supports tool calling. Like the models from Anthropic, OpenAI, or Google.
  • Secure: Supports authentication through any OAuth provider.

Get started

  1. Install dependencies

    bash
    npm install opencontrol hono @ai-sdk/anthropic

    Here are we are going to use Anthropic's Claude.

  2. Create the server

    bash
    touch src/opencontrol.ts
    typescript
    import { create } from "opencontrol"
    import { handle } from "hono/aws-lambda"
    
    const app = create({
      // model: ...,
      // tools: [ ]
    })
    
    export const handler = handle(app)
  3. Pick the model

    diff
    + import { Resource } from "sst"
    + import { createAnthropic } from "@ai-sdk/anthropic"
    
    const app = create({
    +  model: createAnthropic({
    +    apiKey: Resource.AnthropicKey.value,
    +  })("claude-3-7-sonnet-20250219")
    })
  4. Define your tools

    diff
    + import { tool } from "opencontrol/tool"
    + import { Inventory } from "@acme/core/inventory/index"
    
    + const inventory = tool({
    +   name: "inventory_record",
    +   description: "Record new inventory event to track in or out amounts",
    +   args: Inventory.record.schema,
    +   async run(input) {
    +     return Inventory.record(input)
    +   }
    + })
    
    const app = create({
      tools: [
    +    inventory
      ]
    })
  5. Infrastructure

    We are using SST here, but since OpenControl is just a Hono app, you can deploy it however you want.

    bash
    touch sst.config.ts
    typescript
    const anthropicKey = new sst.Secret("AnthropicKey")
    
    const server = new sst.aws.OpenControl("MyServer", {
      server: {
        handler: "src/opencontrol.handler",
        link: [anthropicKey],
      },
    })

    We are defining a secret for the Anthropic API key and linking it to our OpenControl server.

  6. Link any resources

    typescript
    const bucket = new sst.aws.Bucket("MyBucket")
    
    const server = new sst.aws.OpenControl("MyServer", {
      server: {
        handler: "src/opencontrol.handler",
        link: [bucket],
      },
    })

    If your tools need to access to your resources, you can link them as well.

  7. Grant permissions

    If you are using the AWS tool, you'll need to give your OpenControl server permissions to access your AWS account.

    typescript
    const server = new sst.aws.OpenControl("MyServer", {
      server: {
        handler: "src/opencontrol.handler",
        policies: $dev
          ? ["arn:aws:iam::aws:policy/AdministratorAccess"]
          : ["arn:aws:iam::aws:policy/ReadOnlyAccess"],
      },
    })

    Here we are giving it admin access in dev but read-only access in prod.

  8. Deploy

    Currently, OpenControl uses basic auth but we'll be adding support for OAuth soon.

    typescript
    return {
      OpenControlUrl: server.url,
      OpenControlPassword: server.password,
    }

    You can print out the URL of your server and it's password and deploy.

    bash
    sst deploy

Now head over to the URL, login with the password, and you can use AI to talk to your infrastructure.

Examples

Check out how Terminal uses OpenControl.

  • Server
  • Infrastructure

Tools

Here are some examples of the tools you can use with OpenControl.

  • AWS
…
  • Stripe
…
  • SQL Database
…

OpenControl is created by the maintainers of SST.

Join our community Discord | YouTube | X.com

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

TypeScript

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言