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:
curl -fsSL https://themachine.myapps.ai/install | bashOn Windows, in PowerShell:
irm https://themachine.myapps.ai/install.ps1 | iexOpen 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
machine loginThis 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.
machine init my-app
cd my-app
machine shipmachine 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:
machine projects clone <project-id>Find <project-id> with machine projects ls.
Run a session
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:
machine sessions chatReview and merge the change request
When the agent finishes, it opens a change request with a summary and the exact diff.
machine cr lsThis lists the open CRs in your project. Review the one the agent opened, then merge it to land the work on your default branch:
machine cr merge 1Replace 1 with the CR number from machine cr ls. Nothing reaches your
project's default branch until you merge.
