Skip to content

// guides

Claude Code on iPhone: 3 Ways to Run It

You can run Claude Code on iPhone today, but not the way you run it on a laptop. Claude Code needs an x86_64 (or arm64) Linux host, and iOS does not give you one — there is no Termux for iPhone, and the local terminals that do exist cannot run a modern Node.js. So on an iPhone the agent always runs somewhere else and your phone drives it. The fastest path is Cosyra on the App Store: a cloud Ubuntu container with Claude Code pre-installed that you reach from a native iOS app. Paste your Anthropic API key, type claude, and you are in. Sign up gets you 1 hour free, no credit card. The two other real paths are SSH from Blink Shell into your own machine, and Anthropic's Claude Code on the Web.

This is the iPhone-specific companion to our Claude Code on your phone walkthrough, which covers iPhone and Android together. The iPhone deserves its own page because iOS changes the answer in one big way: Android has Termux, so on a Pixel or Galaxy you can install Claude Code on the phone itself (we cover that in Claude Code on Android). iOS has no equivalent. That single difference is why the iPhone story is all about reaching a host, never about running the agent on the device. If you want the bigger tablet form factor, see Claude Code on iPad; for the full picture of every agent on mobile, start at our AI coding agents on mobile pillar.

Quick decision. Jump to what matches your situation:

  • Just give me the setup. Three-minute path: install Cosyra, paste an ANTHROPIC_API_KEY, type claude. Cosyra iPhone setup ↓
  • I already keep a Mac or VPS awake. SSH in from Blink Shell, run tmux, start the agent there. Three options compared ↓
  • I pay for Claude Pro/Max — can I use claude.ai/code in Safari? Yes, with GitHub-only and plan-gated trade-offs. Three options compared ↓
  • Why can't I just use iSH like on a normal Linux box? Because modern Node crashes under iSH's i386 emulation. Why nothing runs locally ↓

Why won't Claude Code run locally on an iPhone?

Claude Code will not run locally on an iPhone because iOS has no Linux userland and the on-device terminals cannot run a modern Node.js. On Android this is a solved problem: Termux gives you a real package manager and Claude Code runs on the phone via npm plus a shell alias. Apple does not allow anything like Termux on iOS — apps cannot ship a general-purpose Linux environment that installs and runs arbitrary native binaries. So the two well-known iOS terminals each hit a wall:

We have an opinion the "just use a real laptop" crowd would push back on: the iPhone is a fine coding client precisely because you stop trying to make it the host. Once you accept that the phone's job is to drive a Linux box that lives elsewhere, every "you can't develop on a phone" complaint stops applying — the box does the work, and the phone is the window you open on the train. For deeper coverage of the local-terminal limits see Termux for iPhone and Cosyra vs iSH.

What are the three ways to run Claude Code on iPhone?

There are three real ways to run Claude Code from an iPhone as of 2026-06-28: a cloud terminal with Claude Code pre-installed (Cosyra, native iOS app), SSH from a terminal app into your own always-on machine, or Anthropic's Claude Code on the Web in Safari. All three share the same shape — the agent runs on a Linux host and the iPhone is the remote. They differ in who owns and babysits that host.

1. Cosyra (cloud terminal, native iOS app)

This is what we build. The Cosyra iOS app gives you a persistent Ubuntu 24.04 container with Claude Code, Codex CLI, OpenCode, and Gemini CLI already installed, 30 GB of storage, and hibernation that resumes exactly where you left off. We pre-install the four agents because setup friction is the thing that actually kills agent-driven mobile coding; nobody wants to debug an npm install on a phone keyboard. There is no SSH tunnel to keep alive and no laptop that has to stay awake. The same container is reachable from iPhone, Android, and web, so you can start on the couch and pick it up in a waiting room.

2. SSH from Blink Shell into your own machine

The classic remote-into-your-own-box path. Blink Shell is a paid iOS terminal (Blink+ is $19.99/year as of 2026-06-28 per the App Store listing) built around SSH and Mosh. Mosh matters on a phone: it keeps the session alive across the cellular handoffs and IP changes that drop plain SSH the moment you walk between cell towers. You SSH into a Mac, Linux box, or VPS that already runs Claude Code, start tmux so the session survives app switching, and drive the agent from there.

3. Claude Code on the Web in Safari

Anthropic's Claude Code on the Web runs tasks on Anthropic-managed VMs (4 vCPU / 16 GB / 30 GB, Ubuntu 24.04). You connect a GitHub repo at claude.ai/code, kick off a task, and the VM clones, runs, and pushes a branch. You can monitor and steer it from the Claude iOS app. On an iPhone it renders in Safari, though the layout is built for bigger screens, so it is more comfortable for kicking off and reviewing than for hands-on iteration.

How do you set up Claude Code on iPhone with Cosyra?

You set up Claude Code on iPhone in about three minutes: install Cosyra from the App Store, paste an Anthropic API key into the container, and type claude. No Node install, no SSH tunnel, no jailbreak. These are the exact steps we run on a fresh iPhone.

Step 1: Install Cosyra on iPhone

Open the App Store on your iPhone and search for Cosyra. Sign in with Apple, Google, or email and the app provisions a fresh Ubuntu container on first launch, about 15 seconds in our testing. The four agent CLIs are already inside, so you skip the part that breaks most on-phone setups.

Step 2: Add your Anthropic API key

Get an API key from console.anthropic.com. In the Cosyra terminal:

cosyra on iPhone, adding the Anthropic API key

$ # Set the key (persists across sessions)

$ echo 'export ANTHROPIC_API_KEY="sk-ant-your-key-here"' >> ~/.bashrc

$ source ~/.bashrc

 

$ claude --version

Claude Code (latest)

Step 3: Clone a repo and run claude

Clone a repo and start a session:

cosyra on iPhone, starting Claude Code

$ git clone https://github.com/your-org/your-project.git

Cloning into 'your-project'...

$ cd your-project

$ claude

Claude Code (latest)

Type your prompt, or type "/" for commands.

 

> Find the bug in the checkout flow and write a failing test first.

Claude Code indexes the repo and starts working. Approve or reject diffs inline with a tap. When you close the app to catch your stop, the container hibernates; reopen it and the session is exactly where you left it — no re-clone, no re-auth.

Try it free. 1 hour on signup, no credit card. Extend with a 10-hour, 7-day trial when you want more. App Store / Google Play / Pricing details

What does iPhone Claude Code look like in practice?

iPhone Claude Code in practice is short prompts, one hand, and dead time that used to be wasted. The phone is not where you do a four-hour refactor; it is where you keep a long task moving while you are away from the desk. Two patterns we run constantly:

The commute kickoff

Standing on the platform, you remember the failing CI job from last night. Open Cosyra, pull the branch, and hand Claude Code the whole problem in one dictated sentence — press and hold the mic key, say it, release:

cosyra on iPhone, one-handed on the platform

$ git fetch origin && git checkout fix/ci-flake

$ claude

 

> The auth integration test is flaky in CI. Reproduce it,

find the race, and propose a fix with a regression test.

By the time the train arrives you have a diff to skim. Approve it, let it push, and the rest of the commute is reading the result instead of starting from a cold terminal at your desk.

The waiting-room review

Fifteen minutes in a waiting room is enough to review a teammate's pull request. Pull the branch, ask for a structured review focused on what you care about, and post it with gh pr review --comment from the same terminal. The container holds your gh auth, so there is no login dance. This is the kind of work the phone is genuinely good at: bounded, reviewable, no deep window juggling required.

How do the iPhone options compare?

The iPhone options line up cleanly against what matters for an agent client: whether you maintain the host, whether state persists, and what happens when you switch apps or lose signal. The table covers the real paths as of 2026-06-28. For the wider field of editors and terminals beyond Claude Code, our coding on iPhone guide lines every option up the same way, and best terminal apps for iPhone covers the client side.

Feature Cosyra (iOS app) SSH via Blink Shell Claude.ai/code (Safari) iSH / a-Shell (local)
Runs the agent on-device No (cloud host) No (your host) No (Anthropic VM) No realistic path
Claude Code pre-installed Yes You install on host Yes (managed) No
Persistent Ubuntu container Yes (30 GB) Depends on host Session-scoped VM Local sandbox
Requires another machine No Yes (always-on) No No
Survives network handoff Yes (reconnects) Yes (Mosh) Yes (task runs server-side) N/A
Plan dependency Cosyra plan only No plan, host cost Claude Pro/Max/Team None
Setup time ~3 min 15–30 min ~3 min Hours (and still no Node)
Cost on iPhone $29.99/mo after trial $19.99/yr + host Bundled with plan Free

Which path should you pick?

Choose Cosyra if you want no host to maintain and the same container across iPhone, Android, and web. Choose Blink + SSH if you already keep an always-on machine and want the agent running on hardware you control. Choose claude.ai/code if you live in GitHub and already pay for Claude Pro. Skip iSH and a-Shell for agent work — they are good terminals, but the iPhone's job here is to be a client, and neither runs the Node-based CLI. If you are on Android instead, the calculus changes because Termux lets the phone be the host; that is the whole point of our Claude Code on Android guide.

Frequently asked questions

Can you actually run Claude Code on an iPhone?

Not locally — and that is the key thing to understand. Claude Code is a Node.js CLI that Anthropic supports on macOS, Linux, WSL, and Windows only. iOS has no real Linux userland (there is no Termux for iPhone), so the agent always runs somewhere else: a cloud Ubuntu container you drive from the Cosyra app, your own machine over SSH, or Anthropic's Claude Code on the Web. The iPhone is the screen and keyboard, not the host.

Why can't iSH or a-Shell run Claude Code locally on iPhone?

Both are real on-device terminals, but neither runs a modern Node.js. iSH emulates 32-bit i386 Alpine Linux, and current Node crashes there with Illegal instruction, which blocks every Node-based AI CLI. a-Shell ships curated WebAssembly binaries with no global npm install path. They are great for shell scripting on the go; they are not a path to Claude Code.

What's the best iPhone terminal for driving a coding agent?

If you are going the SSH route, a native SSH/Mosh client like Blink Shell holds a session better than a web terminal — Mosh survives the cellular handoffs that kill plain SSH when you walk between cells. The catch is that SSH still needs a machine on the other end. If you do not already keep a server awake, a cloud container removes the SSH client and the host in one step.

Can I SSH into my own Mac from my iPhone instead?

Yes, and it is a legitimate setup if you already keep a Mac or Linux box on all the time. SSH in (Tailscale handles networking without opening ports), run tmux so the session survives app switching, and start claude there. The trade-off is the always-on machine: if it sleeps or the home connection drops, your iPhone has nothing to talk to. A cloud container is the version of this where you do not babysit the host.

Is the iPhone's on-screen keyboard good enough for agent coding?

For agent-driven work, more than people expect. You are mostly writing natural-language prompts and approving diffs, not typing hundreds of lines of code, so the phone keyboard is fine. Press-and-hold the mic key to dictate longer prompts. A Bluetooth keyboard helps for heavier git work, but it is optional on a phone.

Do I need a paid Claude plan to run Claude Code on iPhone?

You need model access, paid one of two ways: a paid Claude subscription (Pro is $17/mo billed annually as of 2026-06-28) or an Anthropic API key billed per token. The CLI download is free, but it will not run a model on the Free plan. On Cosyra you bring your own key — you set ANTHROPIC_API_KEY and Anthropic bills you directly; we do not resell or meter tokens.

tl;dr

Claude Code does not run locally on an iPhone — iOS has no Termux and the on-device terminals cannot run modern Node. Three real ways to reach it as of 2026-06-28: Cosyra (cloud terminal, native iOS app, Claude Code pre-installed, persistent container, no other machine required), SSH from Blink Shell into your own always-on box ($19.99/yr + host), or Anthropic's Claude Code on the Web at claude.ai/code (GitHub-native, Claude Pro/Max/Team). The phone is the remote; the Linux host does the work.

App Store / Google Play. Sign up — 1 hour free, no credit card. Extend with a 10-hour, 7-day trial when you want more.

Run Claude Code from your iPhone in 3 minutes. Install Cosyra, paste an Anthropic API key, type claude.

See pricing