On this page

Mobile & CLI Guide

Set up Mample for terminal commands and AI coding assistants. Browser extension instructions are on the separate Extension page.

Terminal (CLI) Tool

CLI Setup and Connection

Start with the Mample Android app; see the download section for availability. Install the CLI globally on your computer by running this command in your terminal:

Terminal
npm install -g mample

Once installed, open the Mample app on your phone and choose either connection method below:

Connect with QR

Run the command below in your terminal, then scan the displayed QR code with the Mample app’s QR scanner. Your app’s Secret Key is securely transferred to the terminal, so you don’t have to type it manually.

Terminal
mample auth qr

Connect with Secret Key

Find your Secret Key in the Terminal Tool section on the app’s Home Screen, then use your own key in the command below:

Terminal
mample auth "your-secret-key"

Send a notification

After connecting your phone, send a message directly or add Mample to the end of a command.

Write your message in double quotes. Use this command to send it immediately.

Terminal
mample "Done"

Your phone receives the message you enter.

Add Mample to the end of your command

Replace the grey part with your command and keep the green part at the end. Mample sends Done when your command finishes, even if it ends with an error.

Windows — PowerShell

Use this if your command line starts with PS. Works in PowerShell 5.1 and 7.

Terminal
Start-Sleep -Seconds 5; mample "Done"

Windows — Command Prompt (cmd)

Use this in Command Prompt (cmd), where the command line does not start with PS.

Terminal
timeout /t 5 /nobreak >nul & mample "Done"

macOS / Linux — Terminal (Bash or Zsh)

Terminal
sleep 5; mample "Done"

If a notification does not arrive

Check the phone and computer internet connections, the Android notification permission for Mample and the Connected Devices entry in the app. Send a direct test message before adding Mample to a long command. Battery saving and background restrictions can delay delivery.

If you send too frequently, the CLI reports a wait time. Wait before trying again. There is no monthly quota; short-term limits prevent spam.

Disconnecting

Terminal
mample disconnect

mample disconnect revokes this terminal connection on the server and removes local credentials. If the server cannot confirm the operation, credentials are kept for retry. Check mample help for support in your installed package. You can also remove the connection in the mobile app. Rotating the Secret Key invalidates all requests made with the old CLI key.

Uninstalling

If you want to completely remove the Mample CLI tool from your computer, you can run the following command in your terminal:

Terminal
npm uninstall -g mample

Terminal Help

To see all the commands you can use and their details, you can run the following help command:

Terminal
mample help

AI Assistants

Setup and Connection in Code Editors (IDE)

First pair your terminal with the mobile app using the CLI setup steps. An AI coding assistant that can execute terminal commands can then call Mample when its task finishes.

Required: Your assistant needs terminal access and permission to run Mample without waiting for a new “Request Review” approval each time. Configure “Always allow” or the equivalent command permission in your assistant. Rule files provide instructions; terminal permissions are configured separately.

Giving Instructions

At the end of your task, ask your assistant: “Send me a mobile notification using Mample.”

Add a Persistent Notification Instruction

Download setup.md, copy its entire contents and add it as a Mample rule to your assistant’s rule file or custom-instructions settings. For example, use CLAUDE.md for Claude Code, AGENTS.md for Codex or Cursor, GEMINI.md for Antigravity, or .github/copilot-instructions.md for GitHub Copilot. Keep your existing rules; configure terminal permission separately.

Detailed Information

Mample is designed with a privacy-first approach and a lightweight architecture. Here are the technical details of how the system works behind the scenes:

Terminal Architecture (CLI)

The CLI runs when invoked; it does not automatically watch terminal tasks in the background. It sends your message to Firebase over HTTPS.

QR and manual Secret Key entry create the same terminal connection. Pairing the same computer with a different mobile installation changes the destination for future messages. Multiple computers can pair with the same phone’s key.

The QR invitation is short-lived; the terminal connection has no automatic expiry. Remove it in the app or with mample disconnect. Rotating the Secret Key on your phone invalidates the old key; pair your terminals again.

IDE and AI Agents

Mample uses an AI assistant’s ability to run terminal commands. Ask it to run the global mample command after completing a task. Mample does not detect task completion itself; terminal access and command permissions depend on the assistant.

Cloud & Delivery (Firebase FCM)

Firebase Cloud Messaging delivers notifications to your phone. Firebase stores an anonymous user ID, an FCM token, a hash of the CLI Secret Key, connected devices and notification preferences. Notification messages are held temporarily in a delivery queue and removed after processing. The last 50 notification history entries are kept on the phone.

Free usage

Mample has no premium tier, subscription or monthly notification quota. Short-term rate limits protect the service from spam. Changing phones requires pairing the new mobile installation with your terminal again.