phonepi-cli
v1.0.3
Published
AI-powered CLI client for PhonePi MCP - Control your phone from the command line
Maintainers
Readme
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-cliPrerequisites
- 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 chatSingle 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-cliInstall dependencies:
npm installBuild the project:
npm run buildLink 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
