Socket
Book a DemoInstallSign in
Socket

phonepi-cli

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

phonepi-cli

AI-powered CLI client for PhonePi MCP - Control your phone from the command line

latest
npmnpm
Version
1.0.3
Version published
Maintainers
1
Created
Source

PhonePi CLI

AI-powered command-line interface for controlling your phone through PhonePi MCP.

Features

  • 🤖 AI-powered natural language interface
  • 📱 Control your phone from the command line
  • 💬 Interactive chat mode
  • 🔄 Single query mode
  • 🎨 Beautiful terminal UI
  • 🔒 Secure API key management
  • 🚀 Automatic server management

Installation

npm install -g phonepi-cli

Prerequisites

  • An Anthropic API key (get one from Anthropic Console)
  • PhonePi app installed and running on your phone Installation Instructions

Configuration

You can configure PhonePi CLI in two ways:

  • Environment variables:

    export ANTHROPIC_API_KEY="your-api-key"
    
  • Command-line arguments:

    phonepi chat --key "your-api-key"
    

Usage

Interactive Chat Mode

Start an interactive chat session with your phone:

phonepi chat

Single Query Mode

Send a single command to your phone:

phonepi query "What's my battery level?"

Options

Both commands support the following options:

  • -k, --key <key>: Anthropic API key
  • -v, --verbose: Enable verbose logging
  • -h, --help: Display help information
  • -V, --version: Display version information

Examples

  • Check battery level:

    phonepi query "What's my phone's battery level?"
    
  • Send a text message:

    phonepi query "Send a text to John saying I'll be late"
    
  • Set a timer:

    phonepi query "Set a timer for 5 minutes"
    
  • Interactive chat:

    phonepi chat
    

How It Works

  • When you start the CLI, it automatically:

    • Starts the MCP server in the background
    • Connects to your phone
    • Sets up the AI interface
  • You can then:

    • Chat with your phone using natural language
    • Execute commands through AI
    • Get real-time responses
  • When you're done:

    • The CLI cleans up automatically
    • Stops the server
    • Closes all connections

Development

  • Clone the repository:

    git clone https://github.com/yourusername/phonepi-cli.git
    cd phonepi-cli
    
  • Install dependencies:

    npm install
    
  • Build the project:

    npm run build
    
  • Link for local development:

    npm link
    

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

MIT

Security

  • Never share your API keys
  • Store sensitive information in environment variables
  • Review the permissions you grant to the CLI

Keywords

phonepi

FAQs

Package last updated on 28 Mar 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts