Expand description
§cargo-x402
A fast and flexible project scaffolder for Rust applications using GitHub-hosted templates.
This library provides the core functionality for discovering, validating, and rendering x402 project templates stored as GitHub repositories. It supports:
- Template Discovery: Automatic discovery of public templates via GitHub’s
x402-templatetopic - Schema Validation: TOML-based template manifests with comprehensive validation
- Parameter Handling: Support for string, boolean, and enum parameters with validation
- Liquid Templating: Safe variable substitution and conditional rendering
- Interactive CLI: User-friendly prompts and progress feedback
§Architecture
The library is organized into distinct modules:
discovery: Finding and caching templates from GitHubschema: Template manifest parsing and validationtemplate: Downloading and rendering templatesinteractive: User interaction and promptscommands: High-level operations (list, create)error: Error types and handling
§Quick Example
ⓘ
use cargo_x402::discovery::github::GitHubDiscovery;
// See integration tests and CLI for actual usage examples
// The binary provides the primary interface for cargo-x402 operationsModules§
- commands
- High-level operations exposed via the CLI.
- discovery
- Template discovery and caching system.
- error
- Error types and handling for cargo-x402.
- interactive
- Interactive CLI prompts and user selection.
- schema
- Template schema definitions and validation.
- template
- Template downloading and rendering operations.
Constants§
- VERSION
- The version of cargo-x402 being used