App Commands
The Camber CLI provides comprehensive commands to create and manage applications efficiently, combining the command-line interface with the backend API capabilities.
Command Overview
The main app creation command is:
camber app create --file <path-to-app-definition.json>Available Flags
--file(required): Path to JSON file containing app definition (local path orstash://path)--output: Output format (jsonfor structured output)
Creating Your First App
Step 1: Create an App Definition File
Create a JSON file (e.g., my-app.json) with the following structure:
{
"name": "my-first-app",
"title": "My First Application",
"description": "A simple application to get started",
"content": "This app demonstrates basic functionality",
"engineType": "MPI",
"command": "python main.py"
}Step 2: Create the App
camber app create --file my-app.jsonStep 3: Verify Creation
# List all apps
camber app list
# Get detailed information about your app
camber app describe my-first-appApp Definition File Structure
Required Fields
| Field | Type | Description | Example |
|---|---|---|---|
name | string | Unique app identifier (lowercase, numbers, hyphens only) | "data-processor-v2" |
engineType | string | Type of compute engine | "NEXTFLOW", "MPI" |
command | string | Command to execute when launching | "python main.py" |
Optional Fields
| Field | Type | Default | Description |
|---|---|---|---|
title | string | Auto-generated from name | Human-readable app title |
description | string | "Description" | Detailed app description |
content | string | "Content" | App content/instructions |
imageUrl | string | - | URL to app’s Docker image |
spec | array | [] | App specification for user inputs |
jobConfig | array | [] | Job configuration options |
tags | array | [] | Tags for categorizing the app |
Complete Example
{
"name": "mpi-hello-world",
"title": "MPI Hello World",
"description": "Simple MPI Hello World",
"content": "<p class=\"text-node\">Simple MPI Hello World</p>",
"engineType": "MPI",
"command": "echo \"Hello world\"",
"spec": [
{
"type": "Stash File",
"label": "Sample File",
"name": "input",
"description": "A sample file",
"defaultValue": "",
"hidden": false,
"required": true,
"disabled": false
}
],
"jobConfig": [
{
"type": "Select",
"label": "System Size",
"name": "system_size",
"hidden": true,
"description": "Select the configuration for the job",
"options": [
{
"label": "Small",
"value": "small",
"mapValue": {
"nodeSize": "XXSMALL",
"numNodes": 1,
"withGpu": false
}
}
],
"defaultValue": "small"
}
],
"tags": [
{
"name": "data-processing",
"type": "field"
},
{
"name": "analytics",
"type": "subfield"
}
]
}Advanced Configuration
Supported Engine Types
The CLI supports various engine types for different computational needs: MPI, NEXTFLOW, GROMACS, LAMMPS, OPENFOAM
Input Specification (Spec)
Define user inputs when launching the app:
Supported Input Types
| Type | Description | Use Case |
|---|---|---|
Input | Single-line text input | File paths, parameters |
Textarea | Multi-line text input | Scripts, configurations |
Select | Dropdown selection | Predefined options |
Radio | Radio button selection | Single choice from options |
Switch | Boolean toggle | Enable/disable features |
Checkbox | Boolean checkbox | Multiple selections |
Stash File | File upload from stash | Single file input |
Multi Stash File | Multiple file uploads | Batch file processing |
Spec Example
{
"spec": [
{
"type": "Stash File",
"label": "Sample File",
"name": "input",
"description": "A sample file",
"defaultValue": "",
"hidden": false,
"required": true,
"disabled": false
}
]
}Job Configuration
Define available compute resources:
{
"jobConfig": [
{
"type": "Select",
"label": "System Size",
"name": "system_size",
"hidden": true,
"description": "Select the configuration for the job",
"options": [
{
"label": "Small",
"value": "small",
"mapValue": {
"nodeSize": "XXSMALL",
"numNodes": 1,
"withGpu": false
}
}
],
"defaultValue": "small"
}
]
}Tags
Categorize your app for better organization:
{
"tags": [
{
"name": "machine-learning",
"type": "field"
},
{
"name": "data-analysis",
"type": "subfield"
},
{
"name": "image-processing",
"type": "task"
}
]
}Tag Types:
field: Broad category (e.g., “machine-learning”, “physics”)subfield: Specific area (e.g., “data-analysis”, “simulation”)task: Specific task (e.g., “image-processing”, “optimization”)
Managing Apps
List Apps
# List all apps
camber app list
# Filter by tags
camber app list --tags analytics,data-processing
# JSON output
camber app list --output jsonDescribe App
# Get detailed app information
camber app describe my-app
# JSON output
camber app describe my-app --output jsonDelete App
# Delete an app
camber app delete my-appFile Sources
The CLI supports multiple file sources for app definitions:
Local Files
camber app create --file ./my-app.json
camber app create --file /absolute/path/to/app.jsonStash Files
camber app create --file stash://path/to/app.json