March 20, 20267 min read

How to Run Claude Code on Your iPhone

Claude Code is a terminal AI agent made by Anthropic. You run it in your terminal, point it at a codebase, and give it a task. It reads files, writes code, runs tests, edits things, and reports back. It's not a chat window. It's an agent that actually operates on your project.

The problem is that tasks take time. A real refactor, a new feature, a debugging session. These can run for ten, twenty minutes or more. During that time, Claude Code might pause and ask you to approve a file edit. It might hit an error and need direction. It might finish and be waiting for your next instruction.

If you're sitting at your Mac, that's fine. But most of the time, you're not sitting at your Mac.

The Problem with Just Leaving It Running

Claude Code runs in your terminal. You can start a task and walk away. The session stays alive on your Mac. But you're flying blind. You don't know if it finished, if it got stuck waiting for input, or if it went off in the wrong direction and spent ten minutes doing something you wouldn't have approved.

Tmux helps. You can run Claude Code inside a tmux session so the process survives disconnects. But you still need to be at your Mac to see what's happening or type anything. That's the missing piece.

What you actually want is a live terminal on your phone, connected to your Mac, so you can check in and interact from wherever you are.

How Macky Fixes This

Macky is a Mac and iPhone app that gives you a real terminal session on your Mac, accessible from your phone. Not a notification. Not a summary. A live terminal, showing exactly what Claude Code is printing, accepting input just like the terminal on your desk would.

The connection uses WebRTC, which means it punches through your home router's NAT automatically. You don't set up port forwarding or SSH. You install the Mac host app, install the iPhone app, sign into the same account, and you're connected. The whole setup takes about two minutes.

Once you're connected, you're controlling your Mac's terminal from your phone. Claude Code doesn't know the difference.

Getting Claude Code Running on Your Mac

Step 1: Install Claude Code

If you haven't already, install it with npm:

npm install -g @anthropic-ai/claude-code

You'll need an Anthropic API key. Add it to your shell profile so it's available in every session:

export ANTHROPIC_API_KEY=your_key_here

Step 2: Install Macky

Download the Mac host from macky.dev. It installs as a menu bar app. Then get the iPhone app from the App Store. Sign into the same account on both. Set a Master Password, which protects your terminal sessions separately from your account login.

Step 3: Start a session

On your Mac, navigate to your project. Open Macky on your iPhone and connect. Now in the terminal, type:

claude

Claude Code starts up in your Macky session. Give it a task just like you would from your desk. You can type directly on your iPhone.

Things That Come Up When You're Using This on Your Phone

Approving file edits

Claude Code regularly proposes changes to files and waits for your approval. In the terminal it shows a diff and asks for input. You see the same output in Macky. Type y to approve, n to skip. That's it.

If you're starting a long task and you trust the scope, you can skip the approval prompts entirely with a flag:

claude --dangerously-skip-permissions "refactor the auth module to use JWT"

That's useful when you want to kick something off and not babysit it.

Writing follow-up prompts

Claude Code is conversational. After it finishes a task you can type a follow-up and it continues from there. This works the same on your phone. The virtual keyboard is fine for short instructions. For longer prompts, writing them upfront before you walk away works better.

A prompt that gives Claude Code enough to run with for a while:

claude "add input validation to the signup form. email must be valid format, password at least 8 chars. show inline errors below each field. run the existing tests when done and report results."

That's enough detail that it won't need to stop and ask you things very often.

Monitoring progress

Claude Code prints what it's doing as it works. You'll see which files it's reading, what it's writing, any errors it hits, and the output of test runs. From Macky, you can glance at your phone and know immediately where it's at.

If it goes sideways, Macky has a Ctrl key in the keyboard toolbar. Hit Ctrl+C to interrupt and give it a correction.

Keeping sessions alive with tmux

For long tasks where you might disconnect and reconnect, run Claude Code inside a tmux session. If your phone disconnects from Macky, the tmux session keeps running. When you reconnect, attach to it and everything's still there.

tmux new-session -s claude
claude "your task here"

To reattach later:

tmux attach -t claude

When This Actually Matters

This setup isn't for everyone, but there are scenarios where it genuinely saves you.

  • Commuting. Start a Claude Code task before you leave. Monitor it from the train. By the time you arrive somewhere, the work might already be done.
  • On the couch. You want to make progress but you don't want to sit at a desk. Running Claude Code from your phone is a low-friction way to keep moving without opening a laptop.
  • Away from your desk during a long refactor. You can walk away, get coffee, come back, and check in. You're not tied to the screen.
  • Overnight tasks. Kick off a big job before bed, check on it in the morning from your phone without getting up.

A Few Practical Notes

Claude Code uses Anthropic API credits. Long tasks can use a meaningful amount. Keep an eye on usage if you're running it heavily.

Your Mac needs to stay awake. If it sleeps, the terminal session pauses. The simplest fix is to disable sleep in System Settings under Energy Saver while a task is running. Or use an app like Amphetamine to keep the Mac awake on a schedule.

Macky works on any network. Your phone can be on cellular, the Mac can be on WiFi, and the connection still works. WebRTC handles the NAT traversal without you having to think about it.

Try Macky

Connect to your Mac terminal from your iPhone. Free to start, no configuration required.