Command-line interface for running CodeMie Plugins toolkits
Project description
EPAM AI/Run CodeMie Plugins CLI
A command-line interface for running AI/Run CodeMie Plugins toolkits.
Table of Contents
- Overview
- Installation
- Configuration
- Commands
- Code Command
- Custom MCP Servers
- Graceful Shutdown
- Troubleshooting
- Contributing
- License
Overview
The CodeMie Plugins CLI provides a convenient way to interact with CodeMie toolkits and MCP (Model Context Protocol) servers. It offers a unified interface for:
- Running development toolkits on repositories
- Managing and running MCP servers
- Configuring plugin settings
- Listing available commands and toolkits
This CLI is designed to be cross-platform and easy to use, with a focus on developer experience.
Installation
Using uvx (Recommended)
Recommended option to install cli is to use uvx(For installation instructions for uvx, see the uv documentation):
# Install
uvx pip install codemie-plugins
# Run
uvx codemie-plugins
Using pip
Pip installation:
pip install codemie-plugins
From Source
To install from source:
# Clone the repository
git clone https://gitbud.epam.com/epm-cdme/codemie-plugins.git
cd codemie-plugins
# Install using pip
pip install -e .
# Or using poetry
poetry install
Configuration
Setting Up Your Plugin Key
Before using the CLI, you need to set up your plugin key:
-
Generate a plugin key using the built-in command:
codemie-plugins config generate-key
This will generate a random UUID and set it as your plugin key.
-
Alternatively, set a specific plugin key in your configuration:
codemie-plugins config set PLUGIN_KEY your-plugin-key
-
Or set it as an environment variable:
export PLUGIN_KEY=your-plugin-key
Configuration File
The CLI uses a configuration file located at $HOME/.codemie/config.json. You can manage this configuration using the config command:
# View current configuration
codemie-plugins config list
# Set a configuration value
codemie-plugins config set KEY VALUE
# Get a specific configuration value
codemie-plugins config get KEY
Environment Variables
The following environment variables can be used to configure the CLI:
PLUGIN_KEY: Authentication key for the plugin enginePLUGIN_ENGINE_URI: URI for the plugin engine (typically a NATS server)COMMAND_LINE_TOOL_TIMEOUT: Timeout for command line tools (in seconds)
Commands
Global Options
The following options are available for all commands:
--plugin-key TEXT Authentication key for the plugin engine
--plugin-engine-uri TEXT URI for the plugin engine (typically a NATS server)
--debug / --no-debug Enable debug mode
--version Show the version and exit
--help Show help message and exit
List Command
The list command displays available CLI commands:
codemie-plugins list [OPTIONS]
Options:
--verbose, -v: Display detailed information about each command
Example:
# List available commands
codemie-plugins list
# or with uvx
uvx codemie-plugins list
# List commands with detailed information
codemie-plugins list -v
# or with uvx
uvx codemie-plugins list -v
Config Command
The config command manages CLI configuration settings:
codemie-plugins config SUBCOMMAND [OPTIONS]
Subcommands:
list: List current configuration settings--all: Show all configuration including environment variables
set KEY VALUE: Set a configuration valueget KEY: Get a specific configuration valuegenerate-key: Generate a random UUID and set it as the plugin key
Examples:
# List current configuration
codemie-plugins config list
# or with uvx
uvx codemie-plugins config list
# Show all configuration
codemie-plugins config list --all
# or with uvx
uvx codemie-plugins config list --all
# Set a configuration value
codemie-plugins config set PLUGIN_KEY your-plugin-key
# or with uvx
uvx codemie-plugins config set PLUGIN_KEY your-plugin-key
# Get a specific configuration value
codemie-plugins config get PLUGIN_KEY
# or with uvx
uvx codemie-plugins config get PLUGIN_KEY
# Generate a random UUID and set it as the plugin key
codemie-plugins config generate-key
# or with uvx
uvx codemie-plugins config generate-key
MCP Command
The mcp command manages Model Context Protocol servers and connections:
codemie-plugins mcp SUBCOMMAND [OPTIONS]
Subcommands:
list: List available MCP serversrun: Run MCP with specified servers--servers, -s TEXT: Comma-separated list of server names to run (required)--env, -e TEXT: Server-specific environment variables (format: 'server_name=VAR1,VAR2')--timeout, -t INTEGER: Timeout in seconds
Examples:
# List available MCP servers
codemie-plugins mcp list
# or with uvx
uvx codemie-plugins mcp list
# Run a single server
codemie-plugins mcp run -s filesystem
# or with uvx
uvx codemie-plugins mcp run -s filesystem
# Run multiple servers
codemie-plugins mcp run -s filesystem,cli-mcp-server -e cli-mcp-server=ALLOWED_DIR
# or with uvx
uvx codemie-plugins mcp run -s filesystem,cli-mcp-server -e cli-mcp-server=ALLOWED_DIR
# Run with environment variables
codemie-plugins mcp run -s filesystem -e filesystem=FILE_PATHS
# or with uvx
uvx codemie-plugins mcp run -s filesystem -e filesystem=FILE_PATHS
Development Command
The development command provides development toolkit commands for working with repositories:
codemie-plugins development SUBCOMMAND [OPTIONS]
Subcommands:
run: Run development toolkit on a repository--repo-path PATH: Path to the repository directory--timeout, -t INTEGER: Timeout in seconds for command execution
Examples:
# Run development toolkit on current directory
codemie-plugins development run
# or with uvx
uvx codemie-plugins development run
# Run development toolkit on a specific repository
codemie-plugins development run --repo-path /path/to/repo
# or with uvx
uvx codemie-plugins development run --repo-path /path/to/repo
# Run with a custom timeout
codemie-plugins development run --timeout 600
# or with uvx
uvx codemie-plugins development run --timeout 600
Code Command
The code command launches an interactive AI-powered coding assistant that helps with various programming tasks:
codemie-plugins code [OPTIONS]
Options:
--model, -m TEXT: The model to use for the coding assistant (default: gpt-4o)--temperature, -t FLOAT: Temperature setting for the model (0.0-1.0) (default: 0.7)--allowed-dir, -d TEXT: Directories the agent is allowed to access (can specify multiple)--verbose, -v: Verbose mode to avoid logs truncation--recursion-limit, -r INTEGER: Maximum recursion limit for the agent (default: 50)--global-prompt, -g: Use the default global prompt even if a local prompt is configured--mcp-servers TEXT: Comma-separated list of MCP server names to include in the agent
Examples:
Start the interactive coding assistant
# Default run
codemie-plugins code
# or with uvx
uvx codemie-plugins code
Use a specific model
# gpt-4o example
codemie-plugins code --model gpt-4o
# or with uvx
uvx codemie-plugins code --model gpt-4o
# Claude Sonnet 3.7
codemie-plugins code --model anthropic.claude-3-7-sonnet-20250219-v1:0
# or with uvx
uvx codemie-plugins code --model anthropic.claude-3-7-sonnet-20250219-v1:0
Set a custom temperature
# Configure agent temperature
codemie-plugins code --temperature 0.2
# or with uvx
uvx codemie-plugins code --temperature 0.2
Specify allowed directories to access on local file system
# Specify allowed directories (Absolute path should be provided)
codemie-plugins code --allowed-dir /path/to/project
# or with uvx
uvx codemie-plugins code --allowed-dir /path/to/project
Use with specific LLM service configuration
# Pass api key and url
codemie-plugins code --llm-api-key your-api-key --llm-base-url https://your-llm-service.com
# or with uvx
uvx codemie-plugins code --llm-api-key your-api-key --llm-base-url https://your-llm-service.com
Overwrite default prompt
# Use with a local prompt (overrides default)
codemie-plugins config local-prompt "Your custom prompt"
codemie-plugins code
# or with uvx
uvx codemie-plugins config local-prompt "Your custom prompt"
uvx codemie-plugins code
Force usage of global prompt
# Force using the default global prompt
codemie-plugins code -g
# or with uvx
uvx codemie-plugins code -g
Use MCP servers (should be configured in advance). See Custom MCP Servers section
# Use with MCP servers
codemie-plugins code --mcp-servers jetbrains
# or with uvx
uvx codemie-plugins code --mcp-servers jetbrains
Interactive Mode Commands
Once in the interactive mode, you can use the following commands:
exit: Exit the interactive modereset: Reset the conversation history
Custom Prompts
You can customize the agent's behavior by providing a custom prompt:
- Create a file at
$HOME/.codemie/prompt.txtwith your custom instructions - Run the code command, and it will automatically use your custom prompt
- To force using the default prompt, use the
--global-promptflag
For Development
For local development it's recommended to use default agent with sonnet-3.5 or 3.7 models and point to specific
directory to work with.
As an example you are developing in $HOME/repos/EPMCDME/codemie and $HOME/repos/EPMCDME/codemie-ui directories.
Run the following commands to start codemie-plugins code with claude 3.7 model
codemie-plugins code --allowed-dir $HOME/repos/EPMCDME/codemie --allowed-dir $HOME/repos/EPMCDME/codemie-ui --model anthropic.claude-3-7-sonnet-20250219-v1:0
# or with uvx
uvx codemie-plugins code --allowed-dir $HOME/repos/EPMCDME/codemie --allowed-dir $HOME/repos/EPMCDME/codemie-ui --model anthropic.claude-3-7-sonnet-20250219-v1:0
Custom MCP Servers
You can define custom MCP servers in your global configuration file ($HOME/.codemie/config.json). These servers will be automatically recognized and can be used alongside the predefined servers.
Configuration Format:
{
"mcpServers": {
"my-custom-server": {
"command": "node",
"args": ["/path/to/server.js"],
"transport": "stdio"
}
}
}
Using Custom Servers:
# List all available servers including custom ones
codemie-plugins mcp list
# or with uvx
uvx codemie-plugins mcp list
# Run a custom server
codemie-plugins mcp run -s my-custom-server
# or with uvx
uvx codemie-plugins mcp run -s my-custom-server
Graceful Shutdown
The CLI implements graceful shutdown handling to ensure that all processes are properly terminated when the CLI is interrupted (e.g., with Ctrl+C). This includes:
- Cancelling running asyncio tasks
- Terminating subprocesses
- Closing connections
Troubleshooting
If you encounter issues with the CLI, try the following:
-
Enable debug mode:
codemie-plugins --debug COMMAND # or with uvx uvx codemie-plugins --debug COMMAND
-
Check your configuration:
codemie-plugins config list --all # or with uvx uvx codemie-plugins config list --all
-
Ensure your plugin key is correctly set:
codemie-plugins config get PLUGIN_KEY # or with uvx uvx codemie-plugins config get PLUGIN_KEY
-
Verify that required environment variables are set for specific servers.
Contributing
Contributions to the CodeMie Plugins CLI are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
License
This project is licensed under the MIT License - see the LICENSE file for details.
© 2025 EPAM AI/Run CodeMie Team
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file codemie_plugins-0.1.119.tar.gz.
File metadata
- Download URL: codemie_plugins-0.1.119.tar.gz
- Upload date:
- Size: 84.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
07468964d86f92f7d777b99e4a866f79d4e15114395e0318af166488b0989f20
|
|
| MD5 |
a505b9e649857c21fd6d7816407e3f42
|
|
| BLAKE2b-256 |
908fb00b5b40ac93d11a7b29bb5a788020ba57b1c55d367cc9af9883e88b6157
|
File details
Details for the file codemie_plugins-0.1.119-py3-none-any.whl.
File metadata
- Download URL: codemie_plugins-0.1.119-py3-none-any.whl
- Upload date:
- Size: 108.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e233151ea5f91f19b9fcd26ddf7f3a3ed6048a43ba10aee27749144c377f4638
|
|
| MD5 |
33596aaacbdb869e504aa6ee2b36d28c
|
|
| BLAKE2b-256 |
ee619190eb87cbad22fe88a3612bbf143f6350351e16540572b212d1e2dad86e
|