# platphormctl - Full Documentation > The command-line control plane for the PlatPhormNews network. ## Overview platphormctl (binary aliases: phormctl, pctl) is a production-grade CLI that discovers, validates, exercises, orchestrates, tests, traces, documents, and integrates every public-safe PlatPhormNews tool, API, MCP server, discovery file, content pipeline, developer utility, and agent-facing capability. The CLI uses https://platphormnews.com/api/network/graph as the canonical network discovery source. ## Installation ```bash # npm npm install -g platphormctl # pnpm pnpm add -g platphormctl # yarn yarn global add platphormctl ``` After installation, the CLI is available as: - `platphormctl` - `phormctl` - `pctl` ## Core Principles 1. **Discover first** - Always start by discovering what's available 2. **Validate second** - Validate schemas, contracts, and configurations 3. **Exercise third** - Test and exercise discovered capabilities 4. **Trace everything** - W3C trace propagation for observability 5. **Report honestly** - Never fake success or hide failures 6. **Never mock in production** - Mocks only in tests and fixtures ## Global Options Every command supports: ``` --json Machine-readable JSON output --ndjson Newline-delimited JSON output --yaml YAML output --pretty Pretty-printed output --quiet Suppress non-essential output --verbose Verbose output --debug Debug output --dry-run Preview without executing --profile Use named profile --env Target environment (development|preview|production) --base-url Override base URL --api-key API key (or env:VAR_NAME) --trace Enable tracing --traceparent W3C traceparent header --timeout Request timeout in ms --retries Number of retries --concurrency Concurrent operations --output Output file path --cache Use cached data --no-cache Bypass cache --refresh Force refresh cache --redact Redact sensitive data --no-color Disable colored output --ci CI mode --fail-fast Stop on first failure --best-effort Continue on errors --include Include filter (glob|service) --exclude Exclude filter (glob|service) ``` ## Environment Variables ``` PLATPHORM_API_KEY API key for protected operations PLATPHORM_BASE_URL Base URL (default: https://platphormnews.com) PLATPHORM_NETWORK_GRAPH Network graph URL PLATPHORM_TRACE_URL Trace service URL PLATPHORM_MCP_URL MCP service URL PLATPHORM_PROFILE Default profile name PLATPHORMCTL_HOME CLI home directory ``` ## Command Groups ### network Discover and inspect the PlatPhormNews network. ```bash pctl network discover # Fetch and cache network graph pctl network refresh # Force refresh all cached data pctl network status # Query all site health endpoints pctl network graph # Output graph as json/dot/mermaid pctl network sites # List all discovered sites pctl network edges # List graph edges pctl network capabilities # Aggregate all capabilities pctl network validate # Validate required routes pctl network compliance # Generate compliance table pctl network diff # Diff two snapshots pctl network report # Generate network report ``` ### site Inspect individual sites. ```bash pctl site inspect # Full site inspection pctl site health # Health endpoint check pctl site routes # Discover routes pctl site discovery # Validate discovery artifacts pctl site openapi # Fetch/validate OpenAPI pctl site mcp # MCP capability check pctl site llms # Fetch llms.txt/llms-index.json pctl site sitemap # Validate sitemap pctl site rss # Validate RSS/Atom feeds pctl site robots # Inspect robots.txt pctl site policies # Fetch .well-known policies pctl site smoke # Run smoke test suite pctl site report # Generate site report ``` ### mcp MCP (Model Context Protocol) operations. ```bash pctl mcp initialize # Initialize MCP session pctl mcp ping # Ping MCP endpoint pctl mcp tools # List available tools pctl mcp resources # List resources pctl mcp prompts # List prompts pctl mcp call # Call a tool pctl mcp schema # Get tool schema pctl mcp smoke # Run MCP smoke test pctl mcp network-smoke # MCP smoke across network pctl mcp diff # Diff MCP capabilities pctl mcp export # Export MCP manifest pctl mcp validate # Validate MCP behavior pctl mcp registry # Query MCP registry ``` ### harness Test harness operations. ```bash pctl harness list # List available harnesses pctl harness run # Run a harness pctl harness run-all # Run all harnesses pctl harness result # Get harness result pctl harness report # Generate harness report ``` ### llm LLM-assisted operations. ```bash pctl llm providers # List LLM providers pctl llm prompt # Execute prompt pctl llm template # Use prompt template pctl llm chain # Run prompt chain pctl llm embed # Generate embeddings ``` ### api Direct API operations. ```bash pctl api get # GET request pctl api post # POST request pctl api call # Call site API ``` ### trace Trace management. ```bash pctl trace start # Generate new trace ID pctl trace headers # Output trace headers pctl trace run -- # Run command with tracing pctl trace inspect # Inspect trace pctl trace report # Generate trace report ``` ### report Report generation. ```bash pctl report network # Network compliance report pctl report site # Site report pctl report run # Harness run report pctl report export # Export all reports ``` ### config Configuration management. ```bash pctl config show # Show current config pctl config set # Set config value pctl config profiles # List profiles pctl config use # Switch profile ``` ### cache Cache management. ```bash pctl cache status # Show cache status pctl cache clear # Clear all cache pctl cache clear # Clear specific cache pctl cache list # List cached items ``` ## Configuration Files Config discovery order: 1. CLI flags 2. Environment variables 3. ./platphormctl.config.json 4. ./platphormctl.config.yaml 5. ./.platphormctl/config.json 6. ~/.config/platphormctl/config.json 7. ~/.platphormctl/config.json 8. Defaults ## Local State The CLI stores local state in `.platphormctl/`: ``` .platphormctl/ ├── cache/ │ ├── network/ │ ├── sites/ │ ├── openapi/ │ ├── mcp/ │ ├── llms/ │ ├── sitemaps/ │ ├── feeds/ │ └── policies/ ├── profiles/ ├── reports/ ├── traces/ ├── snapshots/ ├── artifacts/ ├── runs/ └── logs/ ``` ## Target Audience - **Developers**: Build and test against PlatPhormNews APIs - **Agents/LLMs**: Discover and invoke tools programmatically - **CI/CD**: Automated testing and validation pipelines - **Operators**: Network health monitoring and compliance - **Security**: Policy validation and audit trails - **MCP Clients**: Test MCP server implementations ## Links - Website: https://cli.platphormnews.com - npm: https://www.npmjs.com/package/@platphormnews/platphormctl - Network: https://platphormnews.com - API Docs: https://platphormnews.com/api/docs - MCP Hub: https://mcp.platphormnews.com - Network Graph: https://platphormnews.com/api/network/graph ## Contact - Email: michael@barbineworldwide.com - X/Twitter: @platphormnews