The Pi coding agent runs on your phone through Cosyra for iPhone or Cosyra for Android. Cosyra gives the phone a cloud Linux workspace with Node and npm already in it. Pi is not pre-installed, but one npm command puts it there, and it stays.
We ran every step below on 7 October 2026 in the Cosyra 2.8.5 iPhone app with Pi 1.0.4. The screenshots are from that run. The flow is the same on Android.
What you need
- The Cosyra app. Core is $20 a month and Pro is $30. Eligible new users can start a 7-day free trial in the App Store app. Pricing has the details.
- A model account. Pi has no model of its own. Bring a Claude, ChatGPT or GitHub Copilot account, or an API key.
Install Pi from a mobile device
Step 1
Open a new terminal in Cosyra
On Terminals, tap New and choose New terminal. The workspace wakes up and you get a shell in your home folder.
Step 2
Install Pi with npm
Paste this and press return:
npm install -g --ignore-scripts @earendil-works/pi-coding-agent
No sudo is needed. Global npm packages go into your home folder,
which is already on the path. Our install added 121 packages in 26 seconds.
The --ignore-scripts flag is the one Pi's own install instructions
use.
Step 3
Run pi
Type the command and press return:
pi
On first run Pi downloads fd, the file search tool it uses.
Then it warns that no models are available. That is expected: you have not
signed in to a provider yet.
Step 4
Sign in with /login
Type /login and press return. Pi asks how you want to sign in:
- Sign in with an account, to use a plan you already pay for.
- Sign in with an API key, to pay per use.
Move with the arrow keys in the toolbar above the keyboard and press return. Then pick the provider.
Step 5
Save Pi as a shortcut
Go back to Terminals and tap the plus next to Your shortcuts. Fill in the sheet:
- Name: Pi
- Folder: your home folder, or tap Browse to pick a project
- Command:
pi
Tap Save. From now on one tap opens a terminal in that folder and starts Pi.
Using Pi from a phone
Pi's first screen lists its controls. They map onto Cosyra's toolbar above the keyboard, which adds Esc, Tab, Ctrl, Alt and the arrow keys. The docs list every toolbar key.
- Esc interrupts Pi while it is working.
/opens Pi's commands.!runs a shell command without leaving Pi.- Ctrl then O shows the full help.
Start Pi inside a repository so it has code to read. The terminal lives in the workspace, so a long task carries on when you lock the phone, and Pi stays installed between sessions.
Questions
Can you run the Pi coding agent on a phone?
Yes. Pi is a Node command-line tool, so it needs a terminal with Node. Cosyra gives your phone a cloud Linux workspace with Node and npm already installed. You install Pi there with one command and run it from the app's terminal.
How long does the install take?
About half a minute. On 7 October 2026 the install of version 1.0.4 added 121 packages in 26 seconds in a Cosyra workspace.
Do I have to reinstall Pi every time?
No. Pi installs into your workspace home folder, which is kept between sessions. Install it once and it is there the next time you open a terminal.
Which models can Pi use?
Pi brings no model of its own. Its /login menu lists Anthropic, GitHub Copilot, Kimi For Coding, Meta, OpenAI, OpenRouter and others, by account sign-in or by API key.
Why not Termux on Android?
Pi documents a Termux install, and it works for some people. A cloud workspace is a standard Linux machine, so the stock npm install runs unchanged, and the same setup works from an iPhone, where Termux does not exist.
What does it cost?
Pi is free and open source. Cosyra is a subscription: Core is $20 a month and Pro is $30 a month. Eligible new users can start a 7-day free trial in the App Store app. Model usage is billed by the provider you sign in to.
Related guides
- Claude Code on your phone and Codex CLI on your phone, both pre-installed.
- OpenCode on your phone, which starts on a free model.
- Cursor CLI on your phone, another agent you start from a terminal.
- AI coding agents on mobile, the overview of all of them.