MachineMachine

Quickstart

Install the CLI, run a session, and merge your first change request.

This page takes you from a fresh terminal to a merged change request (CR). Every command below is copy-pasteable.

Install the CLI

Run the install script. It downloads the machine command for your OS and puts it on your PATH.

On macOS or Linux:

bash
curl -fsSL https://themachine.myapps.ai/install | bash

On Windows, in PowerShell:

powershell
irm https://themachine.myapps.ai/install.ps1 | iex

Open a new terminal afterwards if machine is not found. See CLI → Install for where it installs and how to update or remove it.

Sign in

bash
machine login

This opens the Machine website in your browser. One click authorizes the CLI. After you sign in, machine login picks your account and a default project for you.

On a server or in CI with no browser, sign in with an API key instead: machine login --token mach_pat_.... Create the key in the web app under Settings → API keys.

Create or clone a project

A new account has no projects yet, so machine login has none to pick. Run machine init with a name to create your first project. This scaffolds a project directory on your computer.

bash
machine init my-app
cd my-app
machine ship

machine ship creates the project in Machine on its first run, then pushes your code. Run machine ship again any time to sync local changes.

To work on a project that already exists in Machine, clone it instead:

bash
machine projects clone <project-id>

Find <project-id> with machine projects ls.

Run a session

bash
machine sessions new --prompt "Build the login page"

This starts a session. The agent works in its own sandbox, on its own branch, so your project is not touched yet.

Attach to the session to watch progress and reply:

bash
machine sessions chat

Review and merge the change request

When the agent finishes, it opens a change request with a summary and the exact diff.

bash
machine cr ls

This lists the open CRs in your project. Review the one the agent opened, then merge it to land the work on your default branch:

bash
machine cr merge 1

Replace 1 with the CR number from machine cr ls. Nothing reaches your project's default branch until you merge.

Next steps

On this page