LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

mobilecode

Open-source AI coding agent with iOS and Android device previews

TLDR

Launch the interactive TUI
$ mobilecode
copy
Open a specific project directory
$ mobilecode [path/to/project]
copy
Run a prompt non-interactively
$ mobilecode run "[fix the crash in MainActivity]"
copy
Use a specific model
$ mobilecode --model [anthropic/claude-sonnet-4]
copy
Continue the last session
$ mobilecode --continue
copy
Log in to an AI provider
$ mobilecode auth login
copy
List available models
$ mobilecode models
copy
Start a headless server
$ mobilecode serve --port [4096]
copy
Open the web interface
$ mobilecode web
copy

SYNOPSIS

mobilecode [command] [options] [project]

DESCRIPTION

mobilecode is a fork of opencode aimed at mobile apps. It keeps OpenCode's terminal UI, desktop app, web UI, model providers, MCP, plugins, and skills. When it finds an iOS or Android project it can start a simulator or emulator preview and show the live device next to the session.iOS detection covers Xcode projects and workspaces, CocoaPods, and Expo apps, then runs serve-sim. Android detection covers Gradle projects and Expo apps, then runs serve-avd. Projects are searched up to two directories below the session root.The device pane starts with the session. A titlebar run control builds, installs, and launches the app: xcodebuild plus simctl on iOS, ./gradlew :module:assembleDebug plus adb on Android. The same operations are exposed over HTTP as /api/device-preview.The default command with no subcommand starts the TUI in the current directory (or in project if given).

PARAMETERS

--model, -m PROVIDER/MODEL

Model to use, in provider/model form (for example anthropic/claude-sonnet-4).
--continue, -c
Resume the last session.
--session, -s ID
Continue a specific session by ID.
--fork
Fork the session before continuing (requires --continue or --session).
--prompt TEXT
Initial prompt when launching the TUI.
--agent NAME
Agent to use (build, plan, or a custom agent).
--auto
Auto-approve permissions that are not explicitly denied.
--mini
Start the minimal interactive interface instead of the full TUI.
--print-logs
Print logs to stderr.
--log-level LEVEL
DEBUG, INFO, WARN, or ERROR.
--pure
Run without external plugins.
-h, --help
Show help.
-v, --version
Show version.

CONFIGURATION

~/.config/opencode

Config directory, including opencode.json. Existing OpenCode provider credentials, plugins, and skills apply unchanged.
~/.local/share/opencode
Data directory (sessions, auth.json, and related state).
OPENCODE_*
Environment variables keep the OpenCode prefix, including OPENCODE_SERVER_PASSWORD and OPENCODE_SERVER_USERNAME for serve / web.
The install script places the binary in ~/.mobilecode/bin and prepends that directory to PATH.

COMMANDS

run [message...]

Send a prompt non-interactively and exit. --format default|json, --file path, --dir path, --attach url.
serve
Start a headless MobileCode server.
web
Start the server and open the web interface.
attach url
Connect the TUI to a running server (for example http://localhost:4096).
auth, providers
Manage AI provider credentials. login, logout, list.
models [provider]
List models. --verbose, --refresh.
session list
List saved sessions. session delete ID removes one.
stats
Token usage and cost.
mcp
Register and manage MCP servers.
console login
Log in to the OpenCode console.

CAVEATS

iOS preview needs macOS with Xcode (serve-sim wants Node 20 or newer). Android preview needs the SDK platform-tools, at least one AVD, a JDK that the project's Gradle version supports, and aapt2 from the SDK build-tools to read the package name from a built APK.The curl installer downloads a GitHub release tarball or zip into ~/.mobilecode/bin. From source, clone the repo and run bun run --cwd packages/opencode src/index.ts. Cloud models need provider credentials (mobilecode auth login). The TUI needs a capable terminal.

HISTORY

MobileCode is an MIT-licensed fork of OpenCode (anomalyco/opencode) by hsandhu. OpenCode is the SST team's open-source coding agent. This fork adds simulator and emulator previews via serve-sim and serve-avd while keeping OpenCode's CLI shape, config paths, and license.

SEE ALSO

opencode(1), claude(1), aider(1), xcodebuild(1), adb(1)

RESOURCES

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
278 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid