PMX
A simple CLI tool to manage and switch between AI agent profiles across different platforms.
What is PMX?
PMX helps you organize and quickly switch between different AI agent configurations. Instead of manually editing configuration files or copying profile text, PMX lets you store multiple profiles and apply them with a single command.
Think of it like switching between different "personas" or instruction sets for your AI agents - whether you're doing code reviews, writing documentation, or working on specific projects.
Why Use PMX?
- Quick Profile Switching: Change your AI agent's behavior instantly
- Multi-Platform: Works with Claude Code, OpenAI Codex, and more
- Profile Library: Store and organize multiple profiles in one place
- Easy Sharing: Copy profiles to clipboard for quick sharing
- Zero Setup: Auto-discovers configuration directories
✨ Features
- Profile Management: Create, edit, delete, and show profiles with full CRUD operations
- Editor Integration: Edit profiles using your preferred
$EDITOR - Append Mode: Add profiles to existing configurations without overwriting
- Nested Organization: Organize profiles in directories for better structure
- Smart Display: Tree-style output in terminal, simple list when piped
- Clipboard Support: Copy profile contents directly to clipboard
- Shell Completions: Tab completion for Zsh (more shells coming soon)
- Configuration Control: Enable/disable specific agents via
config.toml
🚀 Installation
From crates.io
Once published, you can install pmx directly from crates.io:
This will install the pmx binary to your Cargo bin directory (typically ~/.cargo/bin/). Make sure this directory is in your PATH.
Prerequisites: Rust and Cargo must be installed. You can install them from rustup.rs.
From Source
Or install to a specific location:
Building from Source
The binary will be available at target/release/pmx
📋 How to Use
Basic Workflow
- Store your profiles as
.mdfiles in~/.config/pmx/repo/ - List available profiles to see what you have
- Apply a profile to your AI agent
- Reset when needed to clear the current profile
Commands
See what profiles you have:
Apply a profile to Claude Code:
Append to existing Claude profile:
Apply a profile to OpenAI Codex:
Append to existing Codex profile:
Remove the current profile:
Profile Management Commands
Create a new profile:
Edit an existing profile:
Show profile contents:
Copy a profile to your clipboard:
Delete a profile (with confirmation):
Example Use Cases
Code Review Profile:
# Now Claude will focus on security, performance, and best practices
Documentation Writer:
# Now Claude will write clear, user-friendly documentation
Project-Specific Instructions:
# Now Claude knows your company's coding standards and domain
Development Profiles in Nested Directories:
# Apply backend-specific development guidelines
# Add security-focused instructions to existing profile
📁 Profile Organization
PMX stores profiles in ~/.config/pmx/repo/ as Markdown files. You can organize profiles in nested directories:
~/.config/pmx/
├── config.toml # Settings
└── repo/ # Your profiles
├── code-reviewer.md # Focuses on code quality
├── tech-writer.md # Great at documentation
├── development/ # Development profiles
│ ├── backend.md # Backend-specific instructions
│ └── frontend.md # Frontend guidelines
└── projects/ # Project-specific profiles
├── startup.md # Startup context
└── enterprise.md # Enterprise standards
Each profile is just a .md file containing the instructions you want your AI agent to follow. Use directories to organize related profiles together.
⚙️ Setup
PMX works out of the box! It automatically:
- Creates the config directory at
~/.config/pmx/ - Sets up the profile repository in
repo/ - Configures agent settings in
config.toml
Custom Configuration Location
You can override the default configuration directory in two ways:
Using command-line option:
Using environment variable:
The priority order is:
--configcommand-line option$PMX_CONFIG_FILEenvironment variable$XDG_CONFIG_HOME/pmx(if XDG_CONFIG_HOME is set)~/.config/pmx(default)
🔧 Shell Completions
Make typing commands faster with auto-completion:
# For Zsh
📚 Documentation
Man pages are available in assets/manual/. To install:
# System-wide installation
# User installation
Then view with: man pmx
🏗️ How It Works
PMX is built in Rust with a modular architecture:
- Storage System: Auto-discovers config directories and manages profiles
- CLI Interface: Clean command parsing with clap
- Agent Modules: Separate handlers for Claude Code (
~/.claude/CLAUDE.md) and Codex (~/.codex/AGENTS.md) - Profile Management: Full CRUD operations with editor integration and clipboard support
- Smart Output: Tree-style display in terminal, simple list when piped (using
is-terminal) - Append Mode: Add profiles to existing configurations without overwriting
- Interactive Features: Confirmation dialogs for destructive operations (using
dialoguer)
The tool follows a configuration-first approach where agent support can be conditionally enabled/disabled via config.toml.
Key Dependencies
clap- Command-line argument parsinganyhow- Error handlingserde/toml- Configuration managementarboard- Clipboard integrationdialoguer- Interactive promptsis-terminal- Terminal detection for smart outputtempfile- Safe temporary file handling
🤝 Contributing
- Fork the repository
- Create a feature branch
- Test with
cargo test - Format with
cargo fmt - Submit a pull request