Skip to content

API Reference

Welcome to the Plexr API reference documentation. This section provides detailed technical information about all aspects of Plexr.

Available References

CLI Commands

Complete reference for all command-line interface commands:

  • execute - Run execution plans
  • validate - Validate plan syntax
  • status - Check execution status
  • reset - Reset execution state
  • And more...

Configuration Schema

Detailed YAML configuration schema documentation:

  • Plan structure and fields
  • Step definitions
  • Executor configurations
  • Platform-specific settings
  • Validation rules

Executors API

Information about built-in and custom executors:

  • Shell executor
  • SQL executor (coming soon)
  • Creating custom executors
  • Executor interfaces

Command Line

Configuration

Development

Environment Variables

Plexr uses several environment variables for configuration:

VariableDescriptionDefault
PLEXR_STATE_FILEState file location.plexr_state.json
PLEXR_LOG_LEVELLogging levelinfo
PLEXR_NO_COLORDisable colorsfalse
PLEXR_PLATFORMOverride platformauto-detect

File Formats

State File Format

The state file (.plexr_state.json) tracks execution progress:

json
{
  "version": "1.0",
  "plan_name": "Development Environment Setup",
  "plan_version": "1.0.0",
  "started_at": "2023-12-15T10:00:00Z",
  "updated_at": "2023-12-15T10:30:00Z",
  "current_step": "configure_app",
  "completed_steps": [
    {
      "id": "install_tools",
      "completed_at": "2023-12-15T10:10:00Z"
    }
  ],
  "failed_steps": [],
  "installed_tools": {
    "node": "20.10.0",
    "docker": "24.0.7"
  }
}

Configuration File Format

See the Configuration Schema for complete YAML format documentation.

Error Codes

Plexr uses consistent error codes across all operations:

CodeCategoryDescription
0SuccessOperation completed successfully
1-99GeneralGeneral errors
100-199ValidationConfiguration validation errors
200-299ExecutionRuntime execution errors
300-399StateState management errors
400-499PlatformPlatform-specific errors

Versioning

Plexr follows semantic versioning:

  • Major: Breaking changes to CLI or configuration format
  • Minor: New features, backward compatible
  • Patch: Bug fixes and minor improvements

Support

For additional help:

Released under the MIT License.