Skill: guunergooner/luban-cli (version 1.0.0)

--- name: luban-cli description: Development and management of the Luban CLI for MLOps. Use this skill when building or using the Luban CLI to manage experiment environments, training tasks, and online services. --- # Luban CLI Skill This skill provides a structured framework for developing and using the **Luban CLI**, a specialized tool for MLOps management. ## Core Functionality The Luban CLI focuses on three primary MLOps pillars: 1. **Experiment Environments (`env`)**: Management of development workspaces. 2. **Training Tasks (`job`)**: Orchestration of model training workloads. 3. **Online Services (`svc`)**: Deployment and scaling of inference services. ## Development Workflow When developing or extending the Luban CLI, follow these steps: 1. **Initialize Project**: Use the boilerplate in `templates/cli_boilerplate.py` as a starting point for the CLI structure. 2. **Define Commands**: Refer to `references/mlops_guide.md` for the standard command patterns and required attributes for each entity. 3. **Implement CRUD**: Ensure every entity (`env`, `job`, `svc`) supports the full lifecycle: - **Create**: Provisioning new resources. - **Read**: Listing and describing existing resources. - **Update**: Modifying configurations or scaling. - **Delete**: Cleaning up resources. ## Usage Patterns ### Managing Environments ```bash luban env list luban env create --name research-v1 --image pytorch:2.0 ``` ### Managing Training Jobs ```bash luban job create --script train.py --gpu 1 luban job status --id job_001 ``` ### Managing Online Services ```bash luban svc create --model-path ./models/v1 --replicas 3 luban svc scale --id my-service --replicas 5 ``` ## Resources - `templates/cli_boilerplate.py`: A Python-based CLI structure using `argparse`. - `references/mlops_guide.md`: Detailed specifications for MLOps entities and operations.

path: templates/cli_boilerplate.py
content: import argparse
import sys

def main():
    parser = argparse.ArgumentParser(description="Luban CLI - MLOps Management Tool")
    subparsers = parser.add_subparsers(dest="command", help="Available commands")

    # Experiment Environment (env)
    env_parser = subparsers.add_parser("env", help="Manage experiment environments")
    env_sub = env_parser.add_subparsers(dest="action")
    env_sub.add_parser("list", help="List environments")
    env_create = env_sub.add_parser("create", help="Create environment")
    env_create.add_parser("name", help="Environment name")
    env_sub.add_parser("delete", help="Delete environment")
    env_sub.add_parser("update", help="Update environment")

    # Training Task (job)
    job_parser = subparsers.add_parser("job", help="Manage training tasks")
    job_sub = job_parser.add_subparsers(dest="action")
    job_sub.add_parser("list", help="List jobs")
    job_create = job_sub.add_parser("create", help="Create job")
    job_sub.add_parser("delete", help="Delete job")
    job_sub.add_parser("update", help="Update job")

    # Online Service (svc)
    svc_parser = subparsers.add_parser("svc", help="Manage online services")
    svc_sub = svc_parser.add_subparsers(dest="action")
    svc_sub.add_parser("list", help="List services")
    svc_create = svc_sub.add_parser("create", help="Create service")
    svc_sub.add_parser("delete", help="Delete service")
    svc_sub.add_parser("update", help="Update service")

    args = parser.parse_args()

    if not args.command:
        parser.print_help()
        sys.exit(1)

    print(f"Executing {args.command} {args.action if hasattr(args, 'action') else ''}...")

if __name__ == "__main__":
    main()


path: references/mlops_guide.md
content: # Luban CLI MLOps Management Guide

This guide outlines the core entities and operations for the Luban CLI.

## Core Entities

### 1. Experiment Environment (`env`)
Used for managing development and experimentation environments (e.g., Jupyter notebooks, dev containers).
- **Operations**: `list`, `create`, `delete`, `update`, `get`.
- **Key Attributes**: `name`, `image`, `resource_config` (CPU/GPU/Mem).

### 2. Training Task (`job`)
Used for managing asynchronous model training workloads.
- **Operations**: `list`, `create`, `delete`, `update`, `stop`, `logs`.
- **Key Attributes**: `job_id`, `script_path`, `hyperparameters`, `output_path`.

### 3. Online Service (`svc`)
Used for managing model inference services.
- **Operations**: `list`, `create`, `delete`, `update`, `scale`, `status`.
- **Key Attributes**: `service_name`, `model_version`, `endpoint`, `replicas`.

## Command Structure Pattern
The CLI follows a `<entity> <action> [args]` pattern:
- `luban env create --name my-env`
- `luban job list`
- `luban svc delete --id svc-123`


Security scan verdicts — ClawScan: clean | static analysis: clean | VirusTotal: clean | SkillSpector: clean (LOW)