Skip to content

Pi Coding Agent on Your Phone: Install and First Run

One npm command installs Pi in a cloud terminal. Then sign in to a model and save a shortcut.

Updated 5 min read Cosyra team

npm install of the Pi coding agent finishing in a Cosyra terminal on a phone: added 121 packages in 26 seconds
Pi coding agent 1.0.4 running in a Cosyra terminal on a phone
Pi provider list on a phone: Anthropic, GitHub Copilot, Kimi For Coding, Meta, OpenAI, OpenRouter

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

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.

Cosyra Terminals screen with the New button pressed, offering New terminal and Open 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.

Terminal output of the Pi npm install: added 121 packages in 26s

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.

Pi 1.0.4 first run: fd downloaded, then a warning that no models are available and to use /login

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.

Pi Select authentication method: Sign in with an account, Sign in with an API key, Sign in with Radius
Pi Select provider to configure list: Anthropic, GitHub Copilot, Kimi For Coding, Meta, OpenAI, OpenAI Codex (legacy), OpenRouter, Radius
The account providers Pi 1.0.4 offers. Type to filter the list.

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.

Cosyra Add shortcut sheet with Name set to Pi and Command set to pi
Cosyra Terminals screen with a Pi shortcut card in the Your shortcuts row
Saved shortcuts sit at the start of the row.

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.

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.