Skip to content

Conversation

@maheshbhatiya73
Copy link
Member

Implement sandcrate-cli with full plugin management capabilities:

Commands Added:

  • list: List plugins from database with pagination and multiple formats
  • get: Get detailed plugin information by UUID
  • run: Execute plugins from database by ID with parameters
  • execute: Execute plugin files directly with parameters

Key Features:

  • Dynamic database connectivity using PostgreSQL
  • Multiple output formats (table, JSON, simple)
  • Command-line argument parsing with clap
  • Async/await support for database operations
  • Comprehensive error handling and user feedback
  • Support for JSON parameters in plugin execution
  • Pagination support for plugin listing

Technical Implementation:

  • Added clap, tokio, serde_json, dotenv, uuid dependencies
  • Made database and services modules public in backend
  • Implemented proper error handling and exit codes
  • Added comprehensive help system for all commands
  • Support for environment variable configuration

Usage Examples:

  • cargo run -- list --format json --limit 10
  • cargo run -- get --format table
  • cargo run -- run --params '{"key": "value"}'
  • cargo run -- execute ../assets/plugins/plugin_hello.wasm

The CLI provides a powerful command-line interface for managing the Sandcrate plugin system with full database integration.

Implement sandcrate-cli with full plugin management capabilities:

Commands Added:
- list: List plugins from database with pagination and multiple formats
- get: Get detailed plugin information by UUID
- run: Execute plugins from database by ID with parameters
- execute: Execute plugin files directly with parameters

Key Features:
- Dynamic database connectivity using PostgreSQL
- Multiple output formats (table, JSON, simple)
- Command-line argument parsing with clap
- Async/await support for database operations
- Comprehensive error handling and user feedback
- Support for JSON parameters in plugin execution
- Pagination support for plugin listing

Technical Implementation:
- Added clap, tokio, serde_json, dotenv, uuid dependencies
- Made database and services modules public in backend
- Implemented proper error handling and exit codes
- Added comprehensive help system for all commands
- Support for environment variable configuration

Usage Examples:
- cargo run -- list --format json --limit 10
- cargo run -- get <plugin-uuid> --format table
- cargo run -- run <plugin-uuid> --params '{"key": "value"}'
- cargo run -- execute ../assets/plugins/plugin_hello.wasm

The CLI provides a powerful command-line interface for managing
the Sandcrate plugin system with full database integration.
@maheshbhatiya73 maheshbhatiya73 merged commit b176e85 into main Aug 2, 2025
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants