> ## Documentation Index
> Fetch the complete documentation index at: https://docs.opencomputer.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Create an agent project and sync it to Development (Cloud)

## Prerequisites

* Node.js 22 or newer
* an OpenComputer account

## 1. Create the agent

```bash theme={null}
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 theme={null}
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 theme={null}
npx --package @opencomputer/cli opencomputer link --create-project "my-agent"
```

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

```bash theme={null}
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 theme={null}
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.

## 4. Change the agent

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

```tsx theme={null}
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](https://docs.opencomputer.dev/agents/projects.md) for project selection and
[Secrets and runtime variables](https://docs.opencomputer.dev/agents/secrets.md) for automatic development
secret synchronization.

## 5. Deploy to production

```bash theme={null}
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](https://docs.opencomputer.dev/agents/deployments.md) for aliases and
version history.

> [card] [Projects](https://docs.opencomputer.dev/agents/projects.md)
>
> Add more agents and understand project bindings.

> [card] [Reactive agents](https://docs.opencomputer.dev/agents/reactive-agents.md)
>
> Add models, tools, and MCP servers.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.