Skip to content

// documentation

Run Claude Code and Codex CLI from your phone

Cosyra gives you a per-user Ubuntu 24.04 container on iPhone, Android, or web, with Claude Code, Codex CLI, OpenCode, and Gemini CLI pre-installed. Connect GitHub, preview localhost, and log into an AI agent, usually in under a minute.

Quick Start

From a clean install to a working Claude Code session takes about a minute on a phone with good network. Cosyra ships the Linux side ready, so you only sign in to the app and sign in to the AI provider.

1

Install the app

Get Cosyra from the App Store or Google Play. Sign in with Apple, Google, or email. Your first hour of compute is free, no credit card.

2

Open the terminal

You land on a real Ubuntu 24.04 prompt. Node.js, Python, Git, tmux, and vim are already there. Files in your home directory persist across sessions. Close the app, get on the train, open it again on the other side, your container resumes.

3

Run an AI agent

Type claude, codex, opencode, or gemini and follow the browser sign-in. After that, you are coding with the same CLI tools you use on a laptop. For end-to-end walkthroughs, see our Claude Code on phone guide, the Codex CLI on phone guide, the OpenCode on phone guide, or the Gemini CLI on phone guide.

If you want to know how this slots in against local options like Termux, iSH, or Blink Shell, the mobile coding terminal pillar page lays out the trade-offs.

Connecting Your GitHub Account and Cloning Repositories

Overview

Connect your GitHub account in Cosyra to access and work with your repositories directly from a mobile device. Once connected, you can browse your repositories inside the app and clone them into your Cosyra workspace to start working immediately.

This integration enables you to manage and modify your projects without needing a desktop or laptop environment.

When You Would Use This Feature

You should connect your GitHub account when you want to:

  • Access your existing repositories inside Cosyra
  • Clone projects to work on while away from your computer
  • Use AI agents to assist with development inside your codebase
  • Review and modify project files on the go

Once your GitHub account is connected, Cosyra can load your repositories and allow you to clone them directly into your terminal workspace.

Prerequisites

Before connecting GitHub, ensure that:

  • You have an active GitHub account
  • You are signed in to Cosyra
  • You have a stable internet connection

Connecting Your GitHub Account

1

Open the Sidebar

Tap the hamburger menu icon in the top-left corner of the Cosyra interface. This will open the sidebar navigation menu.

2

Open Your Profile

At the bottom of the sidebar, you will see your profile section. Tap your profile to open the Settings screen.

3

Select GitHub Integration

Inside the Settings screen, locate and tap GitHub Integration. Cosyra will redirect you to GitHub.com to begin the authorization process.

Authorizing Cosyra on GitHub

1

Sign In to GitHub

If you are not already logged in, GitHub will prompt you to enter your username/email and password.

2

Choose Repository Access

GitHub will ask you to choose how Cosyra can access your repositories. Options include:

  • All repositories, Cosyra can access every repository in your account.
  • Only select repositories, Choose specific repositories to grant Cosyra access.
3

Install the Integration

After choosing your repository permissions, tap Install. This completes the GitHub authorization process.

Returning to Cosyra

Return to the Cosyra app and navigate to Settings → GitHub Integration. This will open the My Repos screen.

Viewing Your Repositories

The My Repos screen shows repositories you granted access to. Each repository includes a Clone Now option.

Cloning a Repository

1

Locate a Repository

Find the repository on the My Repos screen.

2

Tap Clone Now

Tap Clone Now to clone the repository into the current working directory.

3

Wait for Confirmation

A message will confirm the repository was successfully cloned.

Accessing the Project

Navigate into the project using:

bash
cd project-name

You can now work on the project inside Cosyra.

Terminal Toolbar

Overview

The Cosyra Terminal Toolbar sits above the mobile keyboard and provides quick access to important terminal controls that are normally only available on physical keyboards.

ESC

ESC

Cancel operations, exit prompts, or close terminal interfaces.

TAB

TAB

Auto-complete commands and file paths in the terminal.

CTRL

CTRL

Access common control shortcuts like copy, paste, and interrupt.

ALT

ALT

Alternate terminal shortcuts used by some CLI tools.

↑↓←→

Arrow Keys

Navigate within commands and scroll through command history.

Microphone

Dictate commands using voice input directly into the terminal.

TAB Auto-Complete

Example:

bash
# Type partial command:
git clo

# Press TAB to auto-complete:
git clone

CTRL Shortcuts

Shortcut Action
CopyCopy terminal output
PastePaste clipboard contents
Ctrl + CInterrupt a running process
Ctrl + DEnd the terminal session
Shift + TabToggle Claude Plan Mode
F12Toggle debug or console panels
Ctrl + AJump to start of line
Ctrl + EJump to end of line

Arrow Keys

  • Up Arrow, view previous command
  • Down Arrow, move forward in history
  • Left Arrow, move cursor left
  • Right Arrow, move cursor right

Microphone (Voice Dictation)

When first used, Cosyra will download the speech model required for voice input. This is a one-time setup. The device may request microphone permissions.

1

Tap the microphone button

Begin voice recording.

2

Speak your command

Dictate the terminal command you want to run.

3

Tap the microphone button again

Stop recording. The spoken text will appear in the terminal input field.

Keyboard Close Button

Closes the mobile keyboard to allow more space to view terminal output.

Localhost Preview

Overview

Run a development server inside the container and preview it inside the Cosyra app. When a project starts listening on localhost, the app detects the port and shows the task under the Localhost section in the sidebar.

When You Would Use This Feature

Use this feature when running development servers such as:

bash
npm run dev
npm start
python -m http.server
uvicorn main:app

Running a Project Using an AI Agent

You can also ask AI agents (Claude, Codex, Gemini) to run the project. Example prompt:

"Run this project on localhost"

The AI agent will determine the correct command to start the server.

Opening the Localhost Preview

1

Run your development server

Start the server using the appropriate command for your project.

2

Open the sidebar

Tap the hamburger menu icon.

3

Locate the Localhost section

Find and tap the running task under the Localhost section.

Closing the Preview

Tap the X icon in the top-right corner. You will return to the terminal.

No Local Apps Detected

If nothing is running on localhost, the sidebar will display:

No local apps detected.

Deploy to the Internet

Overview

Your Cosyra workspace is a full Ubuntu machine, so shipping a project works the same way it does on a laptop: with the deployment provider's own CLI. The Connectors screen handles the part that is painful on a phone, authentication. You paste a token once, and Cosyra keeps the provider CLI signed in inside your workspace.

Supported Providers

Cosyra ships deploy connectors for six providers. Connecting one stores your token securely, exports it as the environment variable the provider's CLI expects, and installs the CLI in your workspace:

  • Vercel: VERCEL_TOKEN, installs the vercel CLI
  • Netlify: NETLIFY_AUTH_TOKEN, installs netlify-cli
  • Render: RENDER_API_KEY, installs the render CLI
  • Fly.io: FLY_API_TOKEN, installs flyctl
  • Railway: RAILWAY_API_TOKEN, installs the railway CLI
  • Cloudflare: CLOUDFLARE_API_TOKEN, installs wrangler

Connecting a Provider

1

Create a token in the provider's dashboard

For Vercel: Account Settings → Tokens. For Render: Account Settings → API Keys. Every provider has an equivalent page.

2

Open Connectors in the app

Go to Settings → Connectors and pick the provider.

3

Paste the token

Cosyra stores it in a secure vault. It is exported into your workspace shell as the provider's environment variable and never shown again in the app.

4

Wait for the CLI install

The provider's CLI is installed in the background. The connector row shows the install state, and you can retry the install from the same screen if your workspace was asleep.

Deploying with Vercel

From the terminal, in your project directory:

bash
# First deploy links the project, then ships a preview
vercel --token "$VERCEL_TOKEN"

# Production deploy
vercel --prod --token "$VERCEL_TOKEN"

The full walkthrough, including custom domains and environment variables, is in the Deploy to Vercel from your phone guide.

Deploying with Render

Render deploys are driven by Git: pushing to the branch connected to your Render service triggers a deploy. The CLI reads RENDER_API_KEY automatically, so you can trigger and watch deploys without leaving the terminal:

bash
# Push to deploy (service connected to this repo)
git push origin main

# Or trigger and watch from the CLI
render services
render deploys create <service-id> --wait

See the Deploy to Render from your phone guide for the end-to-end setup.

Deploying with an AI Agent

Once a provider is connected, the agents can drive the deploy. Example prompt:

"Deploy this project to Vercel"

The agent runs the provider CLI with the token that is already in the environment, and reports the deploy URL back in the chat.

Disconnecting

Disconnecting a provider from the Connectors screen deletes the stored token and removes the environment variable from your workspace. The CLI stays installed but is signed out.

Manual Setup

Connectors are a convenience, not a requirement. You can always install a provider CLI yourself (for example npm install -g vercel) and export the token in your shell. The Deploy a website from your phone guide compares every path.

Connecting and Logging In to AI Agents

Overview

We ship four AI coding agents pre-installed in the container so you can run them directly from the terminal, no Node or Python setup first:

Claude Code

by Anthropic

Codex CLI

by OpenAI

OpenCode

open source

Gemini CLI

by Google

Before using an agent, you authenticate with that provider's account. Cosyra is BYOK. You pay Anthropic, OpenAI, or Google directly for model usage; we do not proxy or meter that bill.

Starting an AI Agent

Run the agent command:

bash
claude
# or
codex
# or
opencode
# or
gemini

Logging In

If not logged in, the CLI will display login options.

1

Choose Login Method

Select login with an existing account. The CLI will generate an authorization link.

2

Open Authorization Link

Tap the link to open a browser.

3

Sign In

Log in to your AI platform account and approve authorization.

4

Copy Verification Code

A code will be generated after authorization. Copy the code.

5

Return to Cosyra

Go back to the terminal.

6

Paste the Code

Tap CTRL → Paste.

7

Submit

Press Enter. If successful, the CLI confirms authentication.

Using the AI Agent

Once logged in, you can interact with the agent directly in the terminal:

  • Generate code
  • Debug issues
  • Run commands
  • Analyze projects

// recap

Summary

Cosyra is the mobile development environment we wanted on the train and never had. The pieces above cover the parts you touch every day:

  • GitHub integration
  • AI coding agents
  • Localhost project previews
  • A powerful mobile terminal toolbar

Build, test, and manage real projects from the phone in your hand, waiting room, couch, commute.