Run Claude Code on your phone in 5 minutes

@mattyp
ENGLISH6 months ago · Jan 20, 2026
541K
1.8K
136
103
4.1K

TL;DR

This tutorial explains how to use Replit to host a cloud-based environment for Claude Code, allowing developers to access the CLI tool from their mobile phones.

This guide will walk through running Claude Code on your phone in under 5 minutes and 500 words. To get started, you'll need:

  • An Anthropic subscription or API key
  • A Replit account

It's easiest to start on your laptop. First, head to this template and click Remix

matt palmer - inline image

Matt's Claude template

You'll see a prompt that secrets are missing in the bottom right, click it and you'll be taken to the Secrets pane.

matt palmer - inline image

Paste in \/home/runner/workspace/.claude-user\ (no quotes) as the value for CLAUDE_CONFIG_DIR - don't forget to click "Add Secret"

matt palmer - inline image

Now, click the plus icon next to the "Secrets" tab and search for "Shell"

matt palmer - inline image

Search for the shell in tools

Open the Shell and type in "claude" - voila! Claude Code is running

matt palmer - inline image

Login with Anthropic - do not authorize at the clicked link, instead copy / paste the URL

Follow the authorization prompts, when a new window is opened and you're prompted to authorize, do not - instead, go back to the terminal and there will be a URL.

Copy / paste the URL, get the resulting code, and paste that in your terminal

matt palmer - inline image

Now the fun part.

Install the Replit mobile app on your phone.

Open it up and sign in. You will see your app from before - select it.

Click the "three rectangles" icon in the bottom right to open the tools

matt palmer - inline image

Search for "Shell" - tap it!

matt palmer - inline image

Now that you're logged in, we can open your phone!

Tap the Shell selector in the top left - you'll see our "claude" command from before

matt palmer - inline image

Open the shell on mobile

Boom! Claude Code is running on your phone... You might notice it's sync with the version on your desktop! (more on that below)

matt palmer - inline image

Claude on mobile!

From here on out, you can simply open up the Shell in the app on your phone and type "claude" to run Claude Code.

IMPORTANT: this app has your credentials in the \.claude-user\ directory. It will be ignored by git, but you should not share this app with anyone or make it public without first deleting that directory

What we just did:

  • We created a "sandbox:" every Replit app is it's own isolated environment, running in the cloud. You might also hear this called a container or a virtual environment.
  • Replit apps allow you to write and execute code, we normally do that with our own agent - Replit Agent. You can see it on the left hand side of the app.
  • Claude Code was already configured in this template, so you started the package in our Shell, which is just a terminal
  • Authorizing Claude wrote credentials to the \.claude-user\ directory, which is necessary to persist through Replit environment restarts.
  • Opening Replit on your phone loaded the same virtual environment as the one running on your laptop. That's because the environment is running on a remote server in the cloud.
  • Replit can display the same environment in real time on multiple devices, what we call "multiplayer" - this is thanks to some amazing engineering by the team.
  • Now, you can control Claude from both your phone & your computer. The same is true of Replit Agent and any other project on Replit.

You can follow the same process in any Replit app that has Claude Code installed, which may be done from the command line. You can also install Skills, plugins, MCP servers, and Hooks as you would normally.

Happy building ✌️

One-click save

Use YouMind for AI deep reading of viral articles

Save the source, ask focused questions, summarize the argument, and turn a viral article into reusable notes in one AI workspace.

Explore YouMind
For creators

Turn your Markdown into a clean 𝕏 article

When you publish your own long-form writing, images, tables, and code blocks make 𝕏 formatting painful. YouMind turns a full Markdown draft into a clean, ready-to-post 𝕏 article.

Try Markdown to 𝕏

More patterns to decode

Recent viral articles

Explore more viral articles