Skip to content

An open-source, faster Devin alternative

TypeScript
2.8 KB
Raw Blame
---
title: "Quickstart"
description: "Create an agent project and sync it to Development (Cloud)"
---

## Prerequisites

- Node.js 22 or newer
- an OpenComputer account

## 1. Create the agent

```bash
npx @opencomputer/cli init my-agent
cd my-agent
npm install
```

Use `.` instead of `my-agent` to initialize an empty current directory. The
initializer creates one hello-world agent.

## 2. Log in

```bash
npx --package @opencomputer/cli opencomputer login
```

The CLI opens the OpenComputer device-login flow and stores the login locally.
The production API at `https://app.opencomputer.dev` is used by default.

## 3. Watch development deployments

Link the directory to a new cloud project:

```bash
npx --package @opencomputer/cli opencomputer link --create-project "my-agent"
```

To use an existing project, [link by its ID or slug](/agents/projects#create-or-select-the-cloud-project)
instead. Start the deployment watcher:

```bash
npm run deploy -- --watch
```

The process prints the project dashboard URL, watches `opencomputer/`, and
deploys changes to `development`. Open the dashboard playground or use the CLI
to send a message.

The watcher stays open like a live-reload development process:

```text
OpenComputer Development

✓ Deployment ready
  Project      my-agent (prj_...)
  Agents       hello-world@development
  Dashboard    https://app.opencomputer.dev/projects/prj_...

Watching /path/to/my-agent/opencomputer for changes.
Changes deploy automatically. Press Ctrl+C to stop.
```

<Note>
  This command does not start a local agent server or a browser application.
</Note>

## 4. Change the agent

Edit `opencomputer/agents/hello-world/agent.ts`:

```tsx
import { useInput, useModel } from "@opencomputer/agent";

export default function Agent() {
  const input = useInput();
  useModel("anthropic/claude-sonnet-4.6");

  return `Be concise and practical. Current request: ${input.text ?? "none"}`;
}
```

Saving the file publishes a new development deployment. Start a new playground
or client session to test it; an existing session keeps the deployment it
started with.

See [Projects](/agents/projects) for project selection and
[Secrets and runtime variables](/agents/secrets) for automatic development
secret synchronization.

## 5. Deploy to production

```bash
npm run deploy -- --alias production
```

The command builds an immutable deployment and advances the `production`
alias. Development remains available for subsequent edits.

See [Deployments and environments](/agents/deployments) for aliases and
version history.

<CardGroup cols={2}>
  <Card title="Projects" icon="folder" href="/agents/projects">
    Add more agents and understand project bindings.
  </Card>
  <Card title="Reactive agents" icon="code" href="/agents/reactive-agents">
    Add models, tools, and MCP servers.
  </Card>
</CardGroup>