📄 Documentation for the get Command – Cuemby CLI
The get command retrieves detailed information about a specific resource within a given module, as part of the Cuemby CLI (cpctl).
🔧 General Usage
cpctl get <module> <name> [flags]
<module>: Resource module (projects,templates,integrations,environments,runtimes)<name>: Name or identifier of the resource--project, -p: Project name (required for some modules)--environment, -e: Environment name (only required forruntimes)--output, -o: Output format (table,json,yaml)
📦 Supported Modules
projects
cpctl get projects <project_name>
Output:
- Table (default)
- JSON
- YAML (file:
project-<id>.yaml)
templates
cpctl get templates <template_name> -p <project_name>
Requires: --project
Output:
- Table (default)
- JSON
- YAML (file:
template-<project_id>.yaml)
integrations
cpctl get integrations <integration_name> -p <project_name>
Requires: --project
Output:
- Table (default)
- JSON
- YAML (file:
integration-<id>.yaml)
environments
cpctl get environments <environment_name> -p <project_name>
Requires: --project
Output:
- Table (default)
- JSON
- YAML (file:
environment-<id>.yaml)
runtimes
cpctl get runtimes <runtime_name> -p <project_name> -e <environment_name>
Requires: --project, --environment
Output:
- Table (default)
- JSON
- YAML (file:
runtime-<id>.yaml)
⚠️ Validations and Errors
Each module checks that required flags are present:
templates,environments,integrationsrequire--projectruntimesrequires--projectand--environment
Example errors:
Please provide a project name with the -p flag
Please provide an environment name with the -e flag
Module '<module>' not supported for the get command
📤 Output Formats
table: Console table (default)json: Indented JSON outputyaml: YAML file generated locally
🛠️ Command Registration and Flags
rootCmd.AddCommand(getCmd)
getCmd.Flags().StringVarP(&projectNameGet, "project", "p", "", "Project name to find")
getCmd.Flags().StringVarP(&environmentNameGet, "environment", "e", "", "Environment name to templates")
getCmd.Flags().StringP("output", "o", "table", "Output format: table|yaml|json")
📚 Dependencies
github.com/spf13/cobra– CLI Frameworkgithub.com/cuemby/cli/pkg/api– API access logicgithub.com/cuemby/cli/pkg/ui– Table output renderinggopkg.in/yaml.v2– YAML serialization
✅ Full Example
cpctl get runtimes app-runtime -p myproject -e staging --output yaml
This will generate a file named runtime-<id>.yaml containing the details of the requested runtime.