Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
113 changes: 82 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ SystemLink CLI (`slcli`) is a cross-platform Python CLI for SystemLink integrato
- **Test Plan Templates**: Complete management (list, export, import, delete, init) with JSON and table output formats
- **Jupyter Notebooks**: Full lifecycle management (list, download, create, update, delete) with workspace filtering
- **Workflows**: Full workflow management (list, export, import, delete, init, update) with comprehensive state and action definitions
- **Workspace Management**: Essential workspace administration (list, info, disable) with comprehensive resource details
- **Cross-Platform**: Windows, macOS, and Linux support with standalone binaries
- **Professional CLI**: Consistent error handling, colored output, and comprehensive help system
- **Output Formats**: JSON and table output options for programmatic integration and human-readable display
Expand Down Expand Up @@ -79,10 +80,10 @@ For development or if Homebrew isn't available:

```bash
# View test plan templates
slcli templates list
slcli template list

# View workflows
slcli workflows list
slcli workflow list

# View notebooks
slcli notebook list
Expand All @@ -92,17 +93,17 @@ For development or if Homebrew isn't available:

```bash
# Create a new template
slcli templates init --name "My Test Template" --template-group "Production"
slcli template init --name "My Test Template" --template-group "Production"

# Create a new workflow
slcli workflows init --name "My Workflow" --description "Custom workflow"
slcli workflow init --name "My Workflow" --description "Custom workflow"
```

4. **Get help for any command:**
```bash
slcli --help
slcli templates --help
slcli workflows --help
slcli template --help
slcli workflow --help
slcli notebook --help
```

Expand Down Expand Up @@ -133,21 +134,21 @@ slcli logout

## Test Plan Template Management

The `templates` command group allows you to manage test plan templates in SystemLink.
The `template` command group allows you to manage test plan templates in SystemLink.

### Initialize a new template

Create a new test plan template JSON file with the complete schema structure:

```bash
# Interactive mode (prompts for required fields)
slcli templates init
slcli template init

# Specify required fields directly
slcli templates init --name "Battery Test Template" --template-group "Production Tests"
slcli template init --name "Battery Test Template" --template-group "Production Tests"

# Custom output file
slcli templates init --name "My Template" --template-group "Development" --output custom-template.json
slcli template init --name "My Template" --template-group "Development" --output custom-template.json
```

The `init` command creates a JSON file with:
Expand All @@ -161,52 +162,52 @@ The `init` command creates a JSON file with:

```bash
# Table format (default)
slcli templates list
slcli template list

# JSON format for programmatic use
slcli templates list --format json
slcli template list --format json

# Filter by workspace
slcli templates list --workspace "Production Workspace"
slcli template list --workspace "Production Workspace"
```

### Export a template to a local JSON file

```bash
slcli templates export --id <template_id> --output template.json
slcli template export --id <template_id> --output template.json
```

### Import a template from a local JSON file

```bash
slcli templates import --file template.json
slcli template import --file template.json
```

The import command provides detailed error reporting for partial failures, including specific error types like `WorkspaceNotFoundOrNoAccess`.

### Delete a template

```bash
slcli templates delete --id <template_id>
slcli template delete --id <template_id>
```

## Workflow Management

The `workflows` command group allows you to manage workflows in SystemLink. All workflow commands use the beta feature flag automatically.
The `workflow` command group allows you to manage workflows in SystemLink. All workflow commands use the beta feature flag automatically.

### Initialize a new workflow

Create a new workflow JSON file with a complete state machine structure:

```bash
# Interactive mode (prompts for required fields)
slcli workflows init
slcli workflow init

# Specify fields directly
slcli workflows init --name "Battery Test Workflow" --description "Workflow for battery testing procedures"
slcli workflow init --name "Battery Test Workflow" --description "Workflow for battery testing procedures"

# Custom output file
slcli workflows init --name "My Workflow" --description "Custom workflow" --output custom-workflow.json
slcli workflow init --name "My Workflow" --description "Custom workflow" --output custom-workflow.json
```

The `init` command creates a JSON file with:
Expand All @@ -220,37 +221,37 @@ The `init` command creates a JSON file with:

```bash
# Table format (default)
slcli workflows list
slcli workflow list

# JSON format for programmatic use
slcli workflows list --format json
slcli workflow list --format json

# Filter by workspace
slcli workflows list --workspace "Production Workspace"
slcli workflow list --workspace "Production Workspace"
```

### Export a workflow to a local JSON file

```bash
slcli workflows export --id <workflow_id> --output workflow.json
slcli workflow export --id <workflow_id> --output workflow.json
```

### Import a workflow from a local JSON file

```bash
slcli workflows import --file workflow.json
slcli workflow import --file workflow.json
```

### Update an existing workflow

```bash
slcli workflows update --id <workflow_id> --file updated-workflow.json
slcli workflow update --id <workflow_id> --file updated-workflow.json
```

### Delete a workflow

```bash
slcli workflows delete --id <workflow_id>
slcli workflow delete --id <workflow_id>
```

## Notebook Management
Expand Down Expand Up @@ -320,6 +321,56 @@ slcli notebook update --id <notebook_id> --metadata metadata.json --content myno
slcli notebook delete --id <notebook_id>
```

## Workspace Management

SystemLink CLI provides essential workspace management capabilities for viewing and administering workspaces in your SystemLink environment.

### List workspaces

```bash
# List all enabled workspaces
slcli workspace list

# Include disabled workspaces
slcli workspace list --include-disabled

# Filter by workspace name
slcli workspace list --name "Production"

# JSON output for programmatic use
slcli workspace list --format json
```

### Get detailed workspace information

```bash
# Get workspace details by ID
slcli workspace info --id <workspace_id>

# Get workspace details by name
slcli workspace info --name "Production Workspace"

# JSON output with full workspace contents
slcli workspace info --name "Production Workspace" --format json
```

The info command provides comprehensive workspace details including:

- Workspace properties (ID, name, enabled status, default status)
- Test plan templates in the workspace
- Workflows in the workspace
- Notebooks in the workspace
- Summary counts of all resources

### Disable a workspace

```bash
# Disable a workspace (requires confirmation)
slcli workspace disable --id <workspace_id>
```

**Note**: Workspace creation and duplication are managed through the SystemLink web interface. This CLI provides read-only access and workspace disabling capabilities for administrative purposes.

## Output Formats

SystemLink CLI supports both human-readable table output and machine-readable JSON output for list commands:
Expand All @@ -339,13 +390,13 @@ SystemLink CLI supports both human-readable table output and machine-readable JS

```bash
# Human-readable table
slcli templates list
slcli workflows list
slcli template list
slcli workflow list
slcli notebook list

# Machine-readable JSON
slcli templates list --format json
slcli workflows list --format json
slcli template list --format json
slcli workflow list --format json
slcli notebook list --format json
```

Expand Down
2 changes: 2 additions & 0 deletions slcli/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from .notebook_click import register_notebook_commands
from .templates_click import register_templates_commands
from .workflows_click import register_workflows_commands
from .workspace_click import register_workspace_commands


CONTEXT_SETTINGS = dict(help_option_names=["-h", "--help"])
Expand Down Expand Up @@ -74,3 +75,4 @@ def logout():
register_templates_commands(cli)
register_notebook_commands(cli)
register_workflows_commands(cli)
register_workspace_commands(cli)
Loading