Unified CLI for Ploston - Bridge, Runner, and Management Commands
Project description
Ploston CLI
Command-line interface and local runner for Ploston - Deterministic Agent Execution Layer
Overview
The Ploston CLI provides two main capabilities:
- CLI Client - A thin HTTP client for interacting with Ploston servers
- Local Runner - An edge runner for executing MCP tools locally while connected to a remote Control Plane
Key Design Principle: The CLI client does not embed any server components. It communicates exclusively via HTTP with a running Ploston server. The runner connects via WebSocket to the Control Plane and executes MCP tools locally.
Installation
From PyPI
pip install ploston-cli
From Source
git clone https://github.com/ostanlabs/ploston-cli.git
cd ploston-cli
make install
Verify Installation
ploston version
Quick Start
# Configure server URL (one-time setup)
ploston config set server http://localhost:8080
# Or use environment variable
export PLOSTON_SERVER=http://localhost:8080
# List available workflows
ploston workflows list
# Run a workflow
ploston run my-workflow -i key=value
# Validate a workflow file (local validation)
ploston validate workflow.yaml
Server Connection
The CLI connects to a Ploston server via HTTP. Configure the server URL using:
- CLI flag:
--server http://localhost:8080 - Environment variable:
PLOSTON_SERVER=http://localhost:8080 - Config file:
~/.ploston/config.yaml
# Set server URL in config
ploston config set server http://localhost:8080
# Check current configuration
ploston config show --local
Commands
Global Options
| Option | Description |
|---|---|
--server URL |
Ploston server URL |
-v, --verbose |
Increase verbosity (can be repeated) |
-q, --quiet |
Suppress output |
--json |
Output as JSON |
ploston run
Execute a workflow on the server.
# Run with inline inputs
ploston run my-workflow -i name=John -i age=30
# Run with input file
ploston run my-workflow --input-file inputs.yaml
# Run with timeout
ploston run my-workflow -t 60
# Get JSON output
ploston --json run my-workflow
| Option | Description |
|---|---|
-i, --input KEY=VALUE |
Input parameter (can be repeated) |
--input-file PATH |
YAML/JSON file with inputs |
-t, --timeout SECONDS |
Execution timeout |
ploston validate
Validate a workflow YAML file locally.
# Basic validation (local only, no server needed)
ploston validate workflow.yaml
# Strict mode (warnings as errors)
ploston validate --strict workflow.yaml
# Check that tools exist on server
ploston validate --check-tools workflow.yaml
| Option | Description |
|---|---|
--strict |
Treat warnings as errors |
--check-tools |
Verify tools exist on server |
ploston workflows
Manage workflows on the server.
# List all workflows
ploston workflows list
# Show workflow details
ploston workflows show my-workflow
# JSON output
ploston --json workflows list
ploston tools
Manage tools on the server.
# List all tools
ploston tools list
# Show tool details
ploston tools show read_file
# Refresh tool schemas from MCP servers
ploston tools refresh
ploston config
Manage CLI and server configuration.
# Show local CLI config
ploston config show --local
# Show server config
ploston config show
# Show specific section
ploston config show --section mcp
# Set CLI config values
ploston config set server http://localhost:8080
ploston config set timeout 60
# Unset CLI config values
ploston config unset timeout
Valid sections: server, mcp, tools, workflows, execution, python_exec, logging, plugins, security, telemetry
ploston version
Show version information.
ploston version
Shows both CLI version and connected server version.
ploston bridge
Start MCP bridge for Claude Desktop, Cursor, and other MCP clients.
# Basic usage
ploston bridge --url http://localhost:8080
# With authentication
ploston bridge --url https://cp.example.com --token plt_xxx
# With custom timeout and logging
ploston bridge --url http://localhost:8080 --timeout 60 --log-level debug
| Option | Environment Variable | Description |
|---|---|---|
--url |
PLOSTON_URL |
Control Plane URL (required) |
--token |
PLOSTON_TOKEN |
Bearer token for authentication |
--timeout |
PLOSTON_TIMEOUT |
Request timeout in seconds (default: 30) |
--log-level |
PLOSTON_LOG_LEVEL |
Log level: debug, info, warning, error |
--log-file |
PLOSTON_LOG_FILE |
Log file path (default: ~/.ploston/bridge.log) |
--retry-attempts |
PLOSTON_RETRY_ATTEMPTS |
Startup retry attempts (default: 3) |
--retry-delay |
PLOSTON_RETRY_DELAY |
Delay between retries (default: 1.0s) |
Claude Desktop Configuration
Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS)
or %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"ploston": {
"command": "ploston",
"args": ["bridge", "--url", "http://localhost:8080"],
"env": {
"PLOSTON_TOKEN": "your-token-here"
}
}
}
}
Cursor Configuration
Add to .cursor/mcp.json in your project:
{
"mcpServers": {
"ploston": {
"command": "ploston",
"args": ["bridge", "--url", "http://localhost:8080"],
"env": {
"PLOSTON_TOKEN": "your-token-here"
}
}
}
}
Troubleshooting
Bridge won't start:
- Check that the CP URL is correct and reachable
- Verify the token is valid (if authentication is required)
- Check
~/.ploston/bridge.logfor detailed error messages
Connection drops:
- The bridge auto-reconnects on connection loss
- Check network connectivity to the CP
- Increase
--timeoutfor slow networks
Tools not appearing:
- Ensure the CP has tools configured
- Check that your token has permission to access tools
- Run
ploston tools listto verify tools are available
ploston runner
Start a local runner that connects to a Ploston Control Plane and executes MCP tools locally.
# Start runner with config file
ploston runner start --config runner-config.yaml
# Start runner with inline MCP servers
ploston runner start --url http://localhost:8080 --mcps filesystem,memory
# Start runner with custom name
ploston runner start --url http://localhost:8080 --name my-runner --mcps filesystem
| Option | Environment Variable | Description |
|---|---|---|
--url |
PLOSTON_URL |
Control Plane URL (required) |
--token |
PLOSTON_TOKEN |
Bearer token for authentication |
--name |
PLOSTON_RUNNER_NAME |
Runner name (default: hostname) |
--config |
- | Path to runner config YAML file |
--mcps |
- | Comma-separated list of MCP servers to enable |
--log-level |
PLOSTON_LOG_LEVEL |
Log level: debug, info, warning, error |
Runner Configuration File
# runner-config.yaml
name: my-local-runner
control_plane:
url: http://localhost:8080
token: plt_xxx # Optional
mcps:
filesystem:
command: npx
args: ["-y", "@anthropic/mcp-server-filesystem", "/path/to/allowed"]
memory:
command: npx
args: ["-y", "@anthropic/mcp-server-memory"]
How It Works
- Runner connects to the Control Plane via WebSocket
- Runner registers its available MCP tools with the CP
- When a workflow needs a local tool, CP routes the request to the runner
- Runner executes the tool via MCP and returns the result
- If connection is lost, runner exits (code 1) for process supervisor restart
Use Cases
- Local file access: Execute filesystem tools on your machine
- Private APIs: Connect to internal services not accessible from the CP
- GPU workloads: Run ML inference tools on local hardware
- Development: Test MCP servers before deploying to production
Configuration
CLI Configuration
The CLI stores its configuration in ~/.ploston/config.yaml:
# ~/.ploston/config.yaml
server: http://localhost:8080
timeout: 30
output_format: text
Configuration precedence (highest to lowest):
- CLI flags (
--server) - Environment variables (
PLOSTON_SERVER) - Config file (
~/.ploston/config.yaml) - Default values
Environment Variables
| Variable | Description | Default |
|---|---|---|
PLOSTON_SERVER |
Server URL | http://localhost:8080 |
PLOSTON_TIMEOUT |
Request timeout (seconds) | 30 |
PLOSTON_OUTPUT_FORMAT |
Output format (text or json) |
text |
JSON Output
All commands support --json for machine-readable output:
# List workflows as JSON
ploston --json workflows list
# Run workflow with JSON output
ploston --json run my-workflow -i key=value
# Validate with JSON output
ploston --json validate workflow.yaml
Starting a Server
The CLI is a client only. To start a Ploston server, use the ploston package:
# Install the server package
pip install ploston
# Start the server
ploston-server --port 8080
Or use Docker:
docker run -p 8080:8080 ostanlabs/ploston:latest
Development
Prerequisites
- Python 3.12+
- uv package manager
Setup
make install
Commands
make help # Show all commands
make test # Run all tests
make test-unit # Run unit tests only
make lint # Run linter
make format # Format code
make check # Run lint + tests
make build # Build package
Testing
Tests are organized across two locations:
| Test Type | Location | Run Command |
|---|---|---|
| Unit tests | packages/ploston-cli/tests/unit/ |
make test-unit (in package) |
| Integration tests | packages/ploston-cli/tests/integration/ |
make test (in package) |
| E2E tests | tests/e2e/docker_compose/ (meta-repo) |
make test-e2e-docker-compose (in meta-repo) |
E2E tests live in the meta-repo because they require:
- Docker Compose infrastructure (CP running)
- Installed CLI (from test-pypi or local build)
- Coordination between multiple components (CLI, CP, Runner)
To run E2E tests:
# From meta-repo root
make test-e2e-docker-compose
Features
- HTTP-only client: No server dependencies, works with any Ploston server
- Tier detection: Automatically detects community vs enterprise features from server
- Rich output: Beautiful terminal output with colors and formatting
- JSON mode: Machine-readable output for scripting
- Local validation: Validate workflow YAML without server connection
License
Apache-2.0
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
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 ploston_cli-1.5.0-py3-none-any.whl.
File metadata
- Download URL: ploston_cli-1.5.0-py3-none-any.whl
- Upload date:
- Size: 172.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
66d5552e3b267cb1de059bcd1e29f4be7e750db473e1cf6386de638073f9581a
|
|
| MD5 |
473814cc846f6b0f9d7b5641ad411937
|
|
| BLAKE2b-256 |
3146befa3429396074e8a1000186ed90067ccc52ea5ee9d0e61bed31c2a9bdb3
|