How to Install and Use the Devin AI CLI
Cognition positions Devin AI CLI as a local coding agent that runs on your machine, separate from cloud Devin in a VM. Official install paths cover macOS, Linux, and Windows, with first-party MCP extensibility and a /handoff path into cloud sessions. This guide walks install, auth, first task, MCP setup, and artifact handoff without treating the CLI as a thin wrapper around Devin chat.
What Devin AI CLI is (and what cloud Devin is not)
On a multi-million-line ETL migration, Nubank reported 8-12x engineering time efficiency and over 20x cost savings on the scope delegated to Devin [Devin customer case study]. That scale of agent work made cloud Devin famous. The Devin AI CLI is a different product: a local command-line coding agent that runs on your machine, uses your local files and shell, and can hand work to Devin Cloud or attach MCP tool servers when you need them.
Official Cognition docs state the split clearly. Devin CLI is a local coding agent in your terminal for fast, interactive work on local code. Cloud Devin runs in a virtual machine and includes platform features such as Playbooks, Secrets, and Knowledge that the CLI does not yet support. If you only use the web app or Devin Desktop chat, you will miss the install paths, permission modes, MCP config, and /handoff flow that define the CLI.
This guide follows the practical path most developers need:
- Install Devin CLI for your OS
- Authenticate and start a session
- Run a first local task with a safe permission mode
- Add an MCP server so the agent can call external tools
- Hand off long work to cloud Devin and park artifacts where the team can review them
The Devin AI CLI is Cognition's local command-line coding agent that runs engineering tasks on your machine, connects to Devin Cloud for handoff, and attaches MCP tool servers when you configure them. Treat cloud Devin as the always-on VM teammate, and the CLI as the agent sitting next to your compiler and git working tree.
How to install Devin CLI on macOS, Linux, and Windows
Official Devin CLI docs document install for macOS, Linux, WSL, Windows, Homebrew, and (for eligible plans) Devin Desktop. Pick one path and restart your terminal so devin is on your PATH.
macOS, Linux, and WSL (curl)
curl -fsSL https://cli.devin.ai/install.sh | bash
macOS (Homebrew)
brew install --cask devin-cli
Upgrade later with:
brew upgrade --cask devin-cli
Windows
Download the installer for your architecture:
- x86_64:
https://static.devin.ai/cli/devin-updater-x86_64-pc-windows.exe - ARM64:
https://static.devin.ai/cli/devin-updater-aarch64-pc-windows.exe
Or run this in PowerShell (not Git Bash or CMD):
irm https://static.devin.ai/cli/setup.ps1 | iex
Cognition warns that irm and iex are PowerShell commands. Running them in Git Bash or CMD fails with "command not found". After install, you can use Devin CLI from PowerShell, Windows Terminal, or Git Bash.
Devin Desktop (enterprise / legacy Windsurf Enterprise)
On plans that bundle Devin CLI with Devin Desktop, an admin may need to enable Show "Install Devin CLI" in the Devin Desktop Command Palette. Users then open the Command Palette (Cmd+Shift+P or Ctrl+Shift+P), run Install Devin CLI, and get the devin binary on PATH.
After install, restart the terminal (or source your shell profile) and confirm the binary resolves:
which devin
devin --help
If which returns nothing, the installer path was not added to PATH. Re-open a new shell session before debugging further.
Keep Devin CLI outputs in a shared workspace
Upload patches, notes, and review bundles to a Fast.io workspace your agents can reach over MCP. Version history, Intelligence Mode search, and ownership transfer turn local agent runs into team-ready handoffs. Every org starts with a 14-day free trial.
How to authenticate, pick a mode, and run your first task
Cognition's quickstart says you can enter a project directory and type devin after install. In practice, authentication and permission mode matter before you let the agent write files.
Sign in Inside a session, use /login to authenticate with Devin (and /logout to clear credentials). On Devin Enterprise, team auth is documented as:
devin auth login
Enterprise users should select Log in with Devin for Enterprise so the CLI uses the org identity provider. CLI usage on enterprise is billed in ACUs against the org allocation. Admins must grant a role with the Use Devin CLI permission before login succeeds.
Credentials are stored in credentials.toml under platform-specific data directories (for example ~/.local/share/devin/credentials.toml on macOS/Linux, or %APPDATA%\devin\credentials.toml on Windows). Treat that file like a secret: do not commit it or share it.
Start sessions
From a project directory, start an interactive REPL with no prompt, preload a prompt (use -- so the text is not parsed as a subcommand), or run a single-turn command that prints to stdout and exits:
devin
devin -- check out this code and suggest a feasible, helpful feature
devin -p "summarize the public API surface of src/"
Type @ in the prompt input to autocomplete local files and directories into context. You can paste images from the clipboard with Ctrl+V.
Permission modes (safety first)
Devin CLI has permission modes Normal, Accept Edits, Bypass, and Autonomous, plus agent modes Plan and Ask (/plan, /ask).
- Normal (default): auto-approves read-only tools in the current directory; asks before write/execute
- Accept Edits: auto-approves file edits in the workspace; still prompts for shell and other actions. Cognition notes most people spend time here
- Bypass: auto-approves all tool calls, including shell. Aliases include
/yoloand/dangerous. Admin team deny/ask rules still win - Autonomous: only with
--sandbox; file and network access are constrained by OS-level sandbox scopes
Example slash switch and launch flags:
/accept-edits
devin --permission-mode bypass
devin --sandbox --permission-mode autonomous
Start in Normal or Accept Edits on an unfamiliar repo. Use Bypass only when you trust the agent with the whole machine. Prefer --sandbox (Autonomous) when you want unattended runs with OS-enforced limits.
Resume work
devin -c # continue most recent session in this directory
devin -r # pick from recent sessions
devin -r brisk-otter # resume by session id
Useful slash commands while in a session: /help, /clear or /new, /mode, /model, /workspace, /add-dir <path>, /loop <prompt>, /update, /exit.
A sensible first task
Give a scoped, reviewable job:
devin -- "Find flaky unit tests under tests/, list the top three by failure signal, and propose a minimal fix for one. Do not push branches."
Watch the agent read files, propose edits, and wait for approval if you stayed in Normal mode. Review the diff in git before you accept a wider permission mode.
How to extend Devin CLI with MCP tool servers
Does Devin CLI support MCP? Yes. First-party docs describe Model Context Protocol as the way to connect external tool servers so the agent can call APIs, databases, issue trackers, and custom services as tools.
How MCP hooks in 1. You configure a server (command + args + env, or a remote URL)
- Devin CLI starts the process when needed
- The agent discovers tools such as
create_issueorlist_repos - Tool calls flow through the server and return results into the session
Tools appear namespaced as mcp__<server>__<tool> (for example mcp__github__create_issue). They use the same permission system as built-in tools.
Add a server from the CLI
Add a local stdio server (command after --) or a remote HTTP server (Streamable HTTP by default; falls back to SSE on 4xx responses):
devin mcp add github -- npx -y @modelcontextprotocol/server-github
devin mcp add notion https://mcp.notion.com/mcp
devin mcp list
devin mcp get github
Default save scope is local (.devin/config.local.json, gitignored). Use -s project for shared .devin/config.json or -s user for your global config (~/.config/devin/config.json, or %APPDATA%\devin\config.json on Windows).
Config file example (tokens stay local)
{
"mcpServers": {
"github": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": {
"GITHUB_TOKEN": "ghp_your_token_here"
}
}
},
"permissions": {
"allow": [
"mcp__github__*"
],
"deny": [
"mcp__github__delete_repo"
]
}
}
Put secrets in .devin/config.local.json. Share non-secret server definitions in project config so the team gets the same tools without copying tokens.
OAuth remote servers
Notion, Linear, Atlassian, and similar servers need OAuth per client. Tokens from Windsurf or Claude Code are not shared with Devin CLI.
devin mcp login notion
devin mcp login linear
devin mcp logout notion
Temporarily disable a server without deleting config:
devin mcp disable github
devin mcp enable github
Fast.io as an MCP-backed workspace for agent files
Local disk, git remotes, and object storage (S3 or similar) all work as places to put agent output. When humans and agents need the same durable workspace, with version history, search, and controlled shares, add a workspace MCP server such as Fast.io (Streamable HTTP at /mcp, legacy SSE at /sse on mcp.fast.io; see storage for agents and the MCP skill guide at mcp.fast.io/skill.md).
Example pattern for a remote HTTP server (point the URL at your Streamable HTTP MCP endpoint from storage for agents):
devin mcp add fastio --url <streamable-http-mcp-url>
Then set headers or credentials per Fast.io auth docs so the agent can upload artifacts, open shares, and query indexed files. This is a verified workflow pattern around Devin AI CLI, not a built-in Cognition product feature.
How to hand off to cloud Devin and keep artifacts durable
When a task outgrows the laptop, or you want work to continue after you close the lid, Cognition documents a built-in handoff from the CLI into a cloud Devin session:
/handoff fix the flaky integration tests in CI
Run /handoff alone to continue from the current conversation without rewriting the task. The CLI packages conversation context, the current git branch, and uncommitted work-in-progress, then starts a cloud session with its own VM (shell, browser, full repo access). Track progress from the terminal or the Devin web app.
Good handoff moments from the official guide:
- Dev servers, Docker builds, or endpoint checks that need a longer-lived environment
- Browser flows (screenshots, OAuth, end-to-end tests)
- CI/CD debugging and infrastructure changes
- Migrations, batch jobs, and large refactors
- Parallel cloud work while you keep coding locally
Commit or stash anything you do not want sent with the uncommitted diff.
After the agent stops: where files live
CLI sessions write into your local tree by default. Cloud sessions write into a VM that you do not want as the only system of record. Teams often push PRs to GitHub, drop zips on shared drives, or sync folders to Dropbox or Google Drive. Those options work; they also lose agent-friendly structure (permissions per workspace, semantic search, audit history, ownership handoff).
A practical handoff pattern:
- Finish or
/handoffthe coding task in Devin AI CLI / cloud Devin - Upload the patch notes, generated docs, screenshots, and review bundles into a shared workspace
- Enable Intelligence on that workspace so teammates can search and chat over the files with citations
- Use a branded Send or Exchange share when an external reviewer needs controlled access
- If an agent provisioned the org, transfer ownership to the human owner while the agent keeps admin where policy allows
Fast.io workspaces and the agent storage guide fit that layer: per-file version history, append-only audit log, consolidated MCP tools, and a 14-day free trial on paid plans (Starter $29/mo, Business $99/mo, Growth $299/mo; credit card required for the trial). Use Fast.io when the problem is "agent output became team output," not when you only need a git remote.
Troubleshooting checklist
Install failed on Windows: re-run setup in PowerShell, not Git Bash or CMD
devinnot found: restart the shell; confirm PATH includes the install location- Auth / enterprise access: verify the Use Devin CLI role and re-run
devin auth login - MCP tools missing:
devin mcp list, re-rundevin mcp login <name>, confirm env vars, check allow/deny rules - OAuth resource errors: some providers reject the RFC 8707
resourceparameter; setoauthResourceto""per Cognition's MCP config docs, then logout/login again - Server will not start: run the same
npxor command outside Devin CLI to isolate PATH and dependency issues - Too many prompts: switch to Accept Edits for edit-heavy work, or sandbox + Autonomous for contained unattended runs
- Homebrew updates: prefer
brew upgrade --cask devin-cli;/updatemay point Homebrew users to brew instead of self-update
For the full command surface, start with Cognition's CLI quickstart, essential commands, and MCP overview.
Frequently Asked Questions
What is Devin AI CLI?
Devin AI CLI is Cognition's local command-line coding agent. It runs engineering tasks on your machine against local files and your shell, with deep Devin Cloud integration for handoff and first-party MCP support for external tools. It is not the same product as cloud Devin, which runs in a virtual machine with Playbooks, Secrets, and Knowledge.
How do I install Devin CLI?
On macOS, Linux, or WSL run `curl -fsSL https://cli.devin.ai/install.sh | bash`, or on macOS use `brew install --cask devin-cli`. On Windows download the official installer or run `irm https://static.devin.ai/cli/setup.ps1 | iex` in PowerShell only. Restart the terminal so the `devin` command is on PATH, then enter a project directory and run `devin`.
Does Devin CLI support MCP?
Yes. Official docs describe first-party Model Context Protocol support for CLI tool servers. Configure stdio or remote HTTP servers with `devin mcp add`, or edit `.devin/config.local.json` / `.devin/config.json`. MCP tools appear as `mcp__server__tool` and honor the same allow/deny/ask permissions as built-in tools. OAuth servers need `devin mcp login <name>` per client.
How is Devin CLI different from Devin Cloud?
Devin CLI is a local terminal agent for interactive work on your machine. Cloud Devin is Cognition's AI software engineer that runs in a VM with browser, shell, and platform features such as Playbooks, Secrets, and Knowledge. The CLI does not yet support Knowledge, Playbooks, or Secrets from your Devin account. Use `/handoff` when a local task should continue in a cloud session.
How do I hand off a CLI session to cloud Devin?
In an active Devin CLI session, run `/handoff` with an optional task description. The CLI packages conversation context, the current git branch, and uncommitted changes, then creates a cloud Devin session on a fresh VM. Track progress from the terminal or app.devin.ai. Commit or stash anything you do not want included in the handoff.
Where should I store Devin CLI artifacts for team review?
Git remotes, local disks, and object storage all work for code and binaries. For multi-person review with version history, semantic search, and controlled shares, use a shared intelligent workspace such as Fast.io (MCP at mcp.fast.io, Intelligence Mode for RAG, ownership transfer for agent-to-human handoff). Start an organization with the 14-day free trial on a paid subscription (credit card required).
Related Resources
Keep Devin CLI outputs in a shared workspace
Upload patches, notes, and review bundles to a Fast.io workspace your agents can reach over MCP. Version history, Intelligence Mode search, and ownership transfer turn local agent runs into team-ready handoffs. Every org starts with a 14-day free trial.