Skip to content

Manina CLI (npm i -g manina)

The Manina CLI (manina) brings the hosted Manina phone-use loop (Manina-4B-Lite + Qwen 3.8 Flash planner) to your terminal on macOS and Linux:

  • Drive an Android phone over USB (adb) or a real iPhone through a paired ESP32 Agent board.
  • Share saved intents and schedules with the Manina AI Web App (Open Web App →), and keep scheduled tasks running in the background via launchd or systemd even with your browser closed.
  • Pay from the same account balance and $1 free starter credit as the Web App and Playground.

Which CLI do I need?

  • Use manina (npm i -g manina, this page) when you want Manina’s own phone-use model to plan and run tasks on Android or iPhone.
  • Use esp32agent (npm i -g esp32agent) when you want your own coding agent (Claude Code, Codex, DeepSeek Harness, or any MCP client) to see and control an iPhone with its own model.

Requires Node.js 18+ on macOS (arm64 / x64) or Linux (x64 / arm64).

Terminal window
npm i -g manina
manina version
manina login

manina login opens /cli/login in your browser so you can authorize this computer with one click. Check your active account, prepaid balance, and remaining free credit anytime with manina whoami, or sign out with manina logout.

  1. Install Android platform-tools (brew install --cask android-platform-tools on macOS, or apt / dnf / pacman on Linux) so adb version works.
  2. On the phone, enable Developer options and USB debugging (on Xiaomi/Redmi/POCO, also enable USB debugging (Security settings); on OPPO/OnePlus/realme, enable Disable permission monitoring).
  3. Plug in with a USB data cable, tap Allow USB debugging, and verify manina devices lists your phone.
  4. (Optional, for typing Chinese or emoji) Install and enable ADBKeyBoard:
    Terminal window
    adb install ADBKeyboard.apk
    adb shell ime enable com.android.adbkeyboard/.AdbIME

Full brand-by-brand menu paths: Android setup guide (/android-setup.md).

  1. Flash a XIAO ESP32S3 board once from manina.ai/install (see Hardware & buying).
  2. Plug the board into your iPhone (or power it in Bluetooth mode), join its Wi-Fi or your home Wi-Fi, enable Screen Mirroring → ESP32 Agent and AssistiveTouch, then pair from your computer:
    Terminal window
    manina iphone pair
    manina devices --iphone
Terminal window
# Run a multi-step task
manina run "Open Settings and go to Wi-Fi"
# Locate one UI element on screen right now (add --tap to tap it)
manina find "Settings app icon" --tap
# Save a recurring intent and install the background scheduler
manina intents add "Morning Wi-Fi check" "Open Settings and verify Wi-Fi is connected" --daily 08:30
manina schedule install
# Inspect local run history
manina history

Pass --json to any command for machine-readable JSON output. Only one run can execute per phone at a time.

Command Description
manina login [--env live|sandbox] [--no-browser] Sign in on this computer (--env sandbox targets the preview Sandbox).
manina whoami / manina logout Show the signed-in account, balance, and free credit, or remove the local session.
manina devices [--iphone] List connected Android phones via adb; add --iphone to include paired ESP32 Agent boards.
manina run "GOAL" [flags] Run a task. Flags: --steps FILE|- (use your own step list), --phone android[:SERIAL]|iphone[:BOARD], --yes (non-interactive), --max-steps N (default 100, 0 = unlimited), --save NAME (save as an intent).
manina find "WHAT" [--tap] [--phone P] Make one Manina-4B-Lite Locate call on the live screen; --tap taps the returned point when on_screen is true.
manina intents [list] List saved intents shared with /app.
manina intents add NAME "GOAL" [flags] Create an intent (--steps FILE, --every 30m, --daily 08:30, --weekly mon,wed@09:00, --off).
manina intents run NAME / rm NAME Run a saved intent now, or delete it.
manina schedule [list|install|uninstall|run] Inspect schedules or install/remove the background runner (launchd on macOS, systemd user service on Linux).
manina history [list|show ID|latest|export] Inspect or export run traces stored locally on this computer (--output FILE).
manina iphone <subcommand> Run any esp32agent board subcommand (pair, screenshot, calibrate, io, net, device info).
manina telemetry [status|on|off] Inspect or toggle anonymous CLI telemetry.

A manina run session finishes in one of five states (exiting 0 only on done):

Status Meaning
done Goal completed.
needs Manina handed a step back (ambiguous target, sensitive action, or step the device cannot finish alone; interactive terminals prompt you).
max_steps Reached --max-steps (default 100, ~10× a typical phone task) to stop runaway loops; pass --max-steps 0 to remove the limit.
stopped Interrupted by Ctrl-C.
error Device disconnected, authentication expired, or balance ran out.

Environment variables:

  • MANINA_CONFIG_DIR: custom directory for session.json, local history, and device locks.
  • MANINA_DEBUG=DIR: writes per-step history and the exact resized screenshot sent to the model into DIR for debugging.