CLI
CLI implements capabilities of the Cryton's REST API and can be automated by using custom scripts.
Usage: cryton-cli [OPTIONS] COMMAND [ARGS]...
A CLI wrapper for Cryton API.
Options:
-H, --host TEXT Set Cryton's address (default is localhost).
-p, --port INTEGER Set Cryton's address (default is 8000).
--secure Set if HTTPS will be used.
--debug Show non formatted output.
--version Show the version and exit.
--help Show this message and exit.
Commands:
execution-variables Manage Execution variables from here.
logs Manage Workers from here.
plan-executions Manage Plan's executions from here.
plan-templates Manage Plan templates from here.
plans Manage Plans from here.
runs Manage Runs from here.
stage-executions Manage Stage's executions from here.
stages Manage Stages from here.
step-executions Manage Step's executions from here.
steps Manage Steps from here.
workers Manage Workers from here.
execution-variables¶
Manage Execution variables from here.
Options:
- help (--help
) - Show this message and exit.
create¶
Create new execution variable(s) for PLAN_EXECUTION_ID from FILE.
PLAN_EXECUTION_ID IS ID of the desired PlanExecution.
FILE is path (can be multiple) to file(s) containing execution variables.
Arguments:
- PLAN_EXECUTION_ID
- FILE
Options:
- help (--help
) - Show this message and exit.
delete¶
Delete Execution variable with EXECUTION_VARIABLE_ID saved in Cryton.
EXECUTION_VARIABLE_ID is ID of the Execution_variable you want to delete.
Arguments:
- EXECUTION_VARIABLE_ID
Options:
- help (--help
) - Show this message and exit.
list¶
List existing Execution variables in Cryton.
Options:
- less (--less
) - Show less like output.
- offset (-o
, --offset
) - The initial index from which to return the results.
- limit (-l
, --limit
) - Number of results to return per page.
- localize (--localize
) - Convert UTC datetime to local timezone.
- parent (-p
, --parent
) - Filter Execution variables using Plan execution ID.
- parameter_filters (-f
, --filter
) - Filter results using returned parameters (for example id=1
, name=test
, etc.).
- help (--help
) - Show this message and exit.
show¶
Show Execution variable with EXECUTION_VARIABLE_ID saved in Cryton.
EXECUTION_VARIABLE_ID is ID of the Execution variable you want to see.
Arguments:
- EXECUTION_VARIABLE_ID
Options:
- less (--less
) - Show less like output.
- localize (--localize
) - Convert UTC datetime to local timezone.
- help (--help
) - Show this message and exit.
generate-docs¶
Generate Markdown documentation for CLI.
FILE is path/to/your/file where you want to save the generated documentation.
Arguments:
- FILE
Options:
- layer (-l
, --layer
) - Highest header level.
- help (--help
) - Show this message and exit.
logs¶
Manage logs from here.
Options:
- help (--help
) - Show this message and exit.
list¶
List existing Logs in Cryton.
Options:
- less (--less
) - Show less like output.
- offset (-o
, --offset
) - The initial index from which to return the results.
- limit (-l
, --limit
) - Number of results to return per page.
- parameter_filters (-f
, --filter
) - Filter results using substrings (for example warning
, 2023-08-11T13:26
, etc.).
- localize (--localize
) - Convert UTC datetime to local timezone.
- help (--help
) - Show this message and exit.
plan-executions¶
Manage Plan's executions from here.
Options:
- help (--help
) - Show this message and exit.
delete¶
Delete Plan's execution with EXECUTION_ID saved in Cryton.
EXECUTION_ID is ID of the Plan's execution you want to delete.
Arguments:
- EXECUTION_ID
Options:
- help (--help
) - Show this message and exit.
kill¶
Kill Plan's execution with EXECUTION_ID saved in Cryton.
EXECUTION_ID is ID of the Plan's execution you want to kill.
Arguments:
- EXECUTION_ID
Options:
- help (--help
) - Show this message and exit.
list¶
List existing Plan's executions in Cryton.
Options:
- less (--less
) - Show less like output.
- offset (-o
, --offset
) - The initial index from which to return the results.
- limit (-l
, --limit
) - Number of results to return per page.
- localize (--localize
) - Convert UTC datetime to local timezone.
- parent (-p
, --parent
) - Filter Plan executions using Run ID.
- parameter_filters (-f
, --filter
) - Filter results using returned parameters (for example id=1
, name=test
, etc.).
- help (--help
) - Show this message and exit.
pause¶
Pause Plan's execution with EXECUTION_ID saved in Cryton.
EXECUTION_ID is ID of the Plan's execution you want to pause.
Arguments:
- EXECUTION_ID
Options:
- help (--help
) - Show this message and exit.
report¶
Create report for Plan's execution with EXECUTION_ID saved in Cryton.
EXECUTION_ID is ID of the Plan's execution you want to create report for.
Arguments:
- EXECUTION_ID
Options:
- file (-f
, --file
) - File to save the report to (default is /tmp).
- less (--less
) - Show less like output.
- localize (--localize
) - Convert UTC datetime to local timezone.
- help (--help
) - Show this message and exit.
resume¶
Resume Plan's execution with EXECUTION_ID saved in Cryton.
EXECUTION_ID is ID of the Plan's execution you want to resume.
Arguments:
- EXECUTION_ID
Options:
- help (--help
) - Show this message and exit.
show¶
Show Plan's execution with EXECUTION_ID saved in Cryton.
EXECUTION_ID is ID of the Plan's execution you want to see.
Arguments:
- EXECUTION_ID
Options:
- less (--less
) - Show less like output.
- localize (--localize
) - Convert UTC datetime to local timezone.
- help (--help
) - Show this message and exit.
validate-modules¶
Validate modules for Plan's execution with EXECUTION_ID saved in Cryton.
EXECUTION_ID is ID of the Plan's execution you want to validate modules for.
Arguments:
- EXECUTION_ID
Options:
- help (--help
) - Show this message and exit.
plan-templates¶
Manage Plan templates from here.
Options:
- help (--help
) - Show this message and exit.
create¶
Store Plan Template into Cryton.
FILE is path/to/your/file that you want to upload to Cryton.
Arguments:
- FILE
Options:
- help (--help
) - Show this message and exit.
delete¶
Delete Template with TEMPLATE_ID saved in Cryton.
TEMPLATE_ID is ID of the Template you want to delete.
Arguments:
- TEMPLATE_ID
Options:
- help (--help
) - Show this message and exit.
get-template¶
Get Template with TEMPLATE_ID saved in Cryton.
TEMPLATE_ID is ID of the Template you want to get.
Arguments:
- TEMPLATE_ID
Options:
- file (-f
, --file
) - File to save the template to (default is /tmp).
- less (--less
) - Show less like output.
- localize (--localize
) - Convert UTC datetime to local timezone.
- help (--help
) - Show this message and exit.
list¶
List existing Plan templates in Cryton.
Options:
- less (--less
) - Show less like output.
- offset (-o
, --offset
) - The initial index from which to return the results.
- limit (-l
, --limit
) - Number of results to return per page.
- localize (--localize
) - Convert UTC datetime to local timezone.
- parameter_filters (-f
, --filter
) - Filter results using returned parameters (for example id=1
, name=test
, etc.).
- help (--help
) - Show this message and exit.
show¶
Show Template with TEMPLATE_ID saved in Cryton.
TEMPLATE_ID is ID of the Template you want to see.
Arguments:
- TEMPLATE_ID
Options:
- less (--less
) - Show less like output.
- localize (--localize
) - Convert UTC datetime to local timezone.
- help (--help
) - Show this message and exit.
plans¶
Manage Plans from here.
Options:
- help (--help
) - Show this message and exit.
create¶
Fill template PLAN_TEMPLATE_ID with inventory file(s) and save it to Cryton.
PLAN_TEMPLATE_ID is ID of the template you want to fill.
Arguments:
- TEMPLATE_ID
Options:
- inventory_files (-i
, --inventory-file
) - Inventory file used to fill the template. Can be used multiple times.
- help (--help
) - Show this message and exit.
delete¶
Delete Plan with PLAN_ID saved in Cryton.
PLAN_ID is ID of the Plan you want to delete.
Arguments:
- PLAN_ID
Options:
- help (--help
) - Show this message and exit.
execute¶
Execute Plan saved in Cryton with PLAN_ID on Worker with WORKER_ID and attach it to Run with RUN_ID.
PLAN_ID is ID of the Plan you want to execute.
WORKER_ID is ID of the Plan you want to execute.
RUN_ID is ID of the Run you want to attach this execution to.
Arguments:
- PLAN_ID
- WORKER_ID
- RUN_ID
Options:
- help (--help
) - Show this message and exit.
get-plan¶
Get Plan with PLAN_ID saved in Cryton.
PLAN_ID is ID of the Plan you want to get.
Arguments:
- PLAN_ID
Options:
- file (-f
, --file
) - File to save the plan to (default is /tmp).
- less (--less
) - Show less like output.
- localize (--localize
) - Convert UTC datetime to local timezone.
- help (--help
) - Show this message and exit.
list¶
List existing Plans in Cryton.
Options:
- less (--less
) - Show less like output.
- offset (-o
, --offset
) - The initial index from which to return the results.
- limit (-l
, --limit
) - Number of results to return per page.
- localize (--localize
) - Convert UTC datetime to local timezone.
- parameter_filters (-f
, --filter
) - Filter results using returned parameters (for example id=1
, name=test
, etc.).
- help (--help
) - Show this message and exit.
show¶
Show Plan with PLAN_ID saved in Cryton.
PLAN_ID is ID of the Plan you want to see.
Arguments:
- PLAN_ID
Options:
- less (--less
) - Show less like output.
- localize (--localize
) - Convert UTC datetime to local timezone.
- help (--help
) - Show this message and exit.
validate¶
Validate (syntax check) your FILE with Plan.
FILE is path/to/your/file that you want to validate.
Arguments:
- FILE
Options:
- inventory_files (-i
, --inventory-file
) - Inventory file used to fill the template. Can be used multiple times.
- help (--help
) - Show this message and exit.
runs¶
Manage Runs from here.
Options:
- help (--help
) - Show this message and exit.
create¶
Create new Run with PLAN_ID and WORKER_IDS.
PLAN_ID is ID of the Plan you want to create Run for. (for example 1)
WORKER_IDS is list of IDs you want to use for Run. (1 2 3)
Arguments:
- PLAN_ID
- WORKER_IDS
Options:
- help (--help
) - Show this message and exit.
delete¶
Delete Run with RUN_ID saved in Cryton.
RUN_ID is ID of the Run you want to delete.
Arguments:
- RUN_ID
Options:
- help (--help
) - Show this message and exit.
execute¶
Execute Run saved in Cryton with RUN_ID.
RUN_ID is ID of the Run you want to execute.
Arguments:
- RUN_ID
Options:
- skip_checks (-S
, --skip-checks
) - Skip health-checks and modules validation.
- help (--help
) - Show this message and exit.
get-plan¶
Get plan from Run with RUN_ID saved in Cryton.
RUN_ID is ID of the Run you want to get plan from.
Arguments:
- RUN_ID
Options:
- file (-f
, --file
) - File to save the plan to (default is /tmp).
- less (--less
) - Show less like output.
- localize (--localize
) - Convert UTC datetime to local timezone.
- help (--help
) - Show this message and exit.
health-check-workers¶
Check Workers for Run with RUN_ID saved in Cryton.
RUN_ID is ID of the Run you want to check Workers for.
Arguments:
- RUN_ID
Options:
- help (--help
) - Show this message and exit.
kill¶
Kill Run saved in Cryton with RUN_ID.
RUN_ID is ID of the Run you want to kill.
Arguments:
- RUN_ID
Options:
- help (--help
) - Show this message and exit.
list¶
List existing Runs in Cryton.
Options:
- less (--less
) - Show 'less' like output.
- offset (-o
, --offset
) - The initial index from which to return the results.
- limit (-l
, --limit
) - Number of results to return per page.
- localize (--localize
) - Convert UTC datetime to local timezone.
- parameter_filters (-f
, --filter
) - Filter results using returned parameters (for example id=1
, name=test
, etc.).
- help (--help
) - Show this message and exit.
pause¶
Pause Run saved in Cryton with RUN_ID.
RUN_ID is ID of the Run you want to pause.
Arguments:
- RUN_ID
Options:
- help (--help
) - Show this message and exit.
postpone¶
Postpone Run saved in Cryton with RUN_ID by TIME (hhss).
RUN_ID is ID of the Run you want to postpone.
TIME is time that will be added to the Run's start time (hhss).
Arguments:
- RUN_ID
- TO_POSTPONE
Options:
- help (--help
) - Show this message and exit.
report¶
Create report for Run with RUN_ID saved in Cryton.
RUN_ID is ID of the Run you want to create report for.
Arguments:
- RUN_ID
Options:
- file (-f
, --file
) - File to save the report to (default is /tmp).
- less (--less
) - Show less like output.
- localize (--localize
) - Convert UTC datetime to local timezone.
- help (--help
) - Show this message and exit.
reschedule¶
Reschedule Run saved in Cryton with RUN_ID to specified DATE and TIME.
RUN_ID is ID of the Run you want to reschedule.
DATE in format year-month-day (Y-m-d).
TIME in format hours:minutes:seconds (H:M:S).
Arguments:
- RUN_ID
- TO_DATE
- TO_TIME
Options:
- utc_timezone (--utc-timezone
) - Input time in UTC timezone.
- help (--help
) - Show this message and exit.
resume¶
Resume Run saved in Cryton with RUN_ID.
RUN_ID is ID of the Run you want to resume.
Arguments:
- RUN_ID
Options:
- help (--help
) - Show this message and exit.
schedule¶
Schedule Run saved in Cryton with RUN_ID to specified DATE and TIME.
RUN_ID is ID of the Run you want to schedule.
DATE in format year-month-day (Y-m-d).
TIME in format hours:minutes:seconds (H:M:S).
Arguments:
- RUN_ID
- TO_DATE
- TO_TIME
Options:
- utc_timezone (--utc-timezone
) - Input time in UTC timezone.
- help (--help
) - Show this message and exit.
show¶
Show Run with RUN_ID saved in Cryton.
RUN_ID is ID of the Run you want to see.
Arguments:
- RUN_ID
Options:
- less (--less
) - Show less like output.
- localize (--localize
) - Convert UTC datetime to local timezone.
- help (--help
) - Show this message and exit.
unschedule¶
Unschedule Run saved in Cryton with RUN_ID.
RUN_ID is ID of the Run you want to unschedule.
Arguments:
- RUN_ID
Options:
- help (--help
) - Show this message and exit.
validate-modules¶
Validate modules for Run with RUN_ID saved in Cryton.
RUN_ID is ID of the Run you want to validate modules for.
Arguments:
- RUN_ID
Options:
- help (--help
) - Show this message and exit.
stage-executions¶
Manage Stage's executions from here.
Options:
- help (--help
) - Show this message and exit.
delete¶
Delete Stage's execution with EXECUTION_ID saved in Cryton.
EXECUTION_ID is ID of the Stage's execution you want to delete.
Arguments:
- EXECUTION_ID
Options:
- help (--help
) - Show this message and exit.
kill¶
Kill Stage's execution with EXECUTION_ID saved in Cryton.
EXECUTION_ID is ID of the Stage's execution you want to kill.
Arguments:
- EXECUTION_ID
Options:
- help (--help
) - Show this message and exit.
list¶
List existing Stage's executions in Cryton.
Options:
- less (--less
) - Show less like output.
- offset (-o
, --offset
) - The initial index from which to return the results.
- limit (-l
, --limit
) - Number of results to return per page.
- localize (--localize
) - Convert UTC datetime to local timezone.
- parent (-p
, --parent
) - Filter Stage executions using Plan execution ID.
- parameter_filters (-f
, --filter
) - Filter results using returned parameters (for example id=1
, name=test
, etc.).
- help (--help
) - Show this message and exit.
re-execute¶
Re-execute Stage's execution with EXECUTION_ID saved in Cryton.
EXECUTION_ID is ID of the Stage's execution you want to kill.
Arguments:
- EXECUTION_ID
Options:
- immediately (--immediately
) - Re-execute StageExecution immediately without starting its Trigger.
- help (--help
) - Show this message and exit.
report¶
Create report for Stage's execution with EXECUTION_ID saved in Cryton.
EXECUTION_ID is ID of the Stage's execution you want to create report for.
Arguments:
- EXECUTION_ID
Options:
- file (-f
, --file
) - File to save the report to (default is /tmp).
- less (--less
) - Show less like output.
- localize (--localize
) - Convert UTC datetime to local timezone.
- help (--help
) - Show this message and exit.
show¶
Show Stage's execution with EXECUTION_ID saved in Cryton.
EXECUTION_ID is ID of the Stage's execution you want to see.
Arguments:
- EXECUTION_ID
Options:
- less (--less
) - Show less like output.
- localize (--localize
) - Convert UTC datetime to local timezone.
- help (--help
) - Show this message and exit.
stages¶
Manage Stages from here.
Options:
- help (--help
) - Show this message and exit.
create¶
Create Stage from FILE and add it to Plan with PLAN_ID.
PLAN_ID is an ID of the Plan you want to add the Stage to.
FILE is a path to the file containing the Stage template.
Arguments:
- PLAN_ID
- FILE
Options:
- inventory_files (-i
, --inventory-file
) - Inventory file used to fill the template. Can be used multiple times.
- help (--help
) - Show this message and exit.
delete¶
Delete Stage with STAGE_ID saved in Cryton.
STAGE_ID is ID of the Stage you want to delete.
Arguments:
- STAGE_ID
Options:
- help (--help
) - Show this message and exit.
list¶
List existing Stages in Cryton.
Options:
- less (--less
) - Show less like output.
- offset (-o
, --offset
) - The initial index from which to return the results.
- limit (-l
, --limit
) - Number of results to return per page.
- localize (--localize
) - Convert UTC datetime to local timezone.
- parent (-p
, --parent
) - Filter Stages using Plan ID.
- parameter_filters (-f
, --filter
) - Filter results using returned parameters (for example id=1
, name=test
, etc.).
- help (--help
) - Show this message and exit.
show¶
Show Stage with STAGE_ID saved in Cryton.
STAGE_ID is ID of the Stage you want to see.
Arguments:
- STAGE_ID
Options:
- less (--less
) - Show less like output.
- localize (--localize
) - Convert UTC datetime to local timezone.
- help (--help
) - Show this message and exit.
start-trigger¶
Start Stage's trigger with STAGE_ID under Plan execution with PLAN_EXECUTION_ID.
STAGE_ID is an ID of the Stage you want to start.
PLAN_EXECUTION_ID is an ID of the Plan execution you want to set as a parent of the Stage execution.
Arguments:
- STAGE_ID
- PLAN_EXECUTION_ID
Options:
- help (--help
) - Show this message and exit.
validate¶
Validate (syntax check) your FILE with Stage.
FILE is path/to/your/file that you want to validate.
Arguments:
- FILE
Options:
- inventory_files (-i
, --inventory-file
) - Inventory file used to fill the template. Can be used multiple times.
- dynamic (-D
, --dynamic
) - If Stage will be used with a dynamic Plan.
- help (--help
) - Show this message and exit.
step-executions¶
Manage Step's executions from here.
Options:
- help (--help
) - Show this message and exit.
delete¶
Delete Step's execution with EXECUTION_ID saved in Cryton.
EXECUTION_ID is ID of the Step's execution you want to delete.
Arguments:
- EXECUTION_ID
Options:
- help (--help
) - Show this message and exit.
kill¶
Kill Step's execution with EXECUTION_ID saved in Cryton.
EXECUTION_ID is ID of the Step's execution you want to kill.
Arguments:
- EXECUTION_ID
Options:
- help (--help
) - Show this message and exit.
list¶
List existing Step's executions in Cryton.
Options:
- less (--less
) - Show less like output.
- offset (-o
, --offset
) - The initial index from which to return the results.
- limit (-l
, --limit
) - Number of results to return per page.
- localize (--localize
) - Convert UTC datetime to local timezone.
- parent (-p
, --parent
) - Filter Step executions using Stage execution ID.
- parameter_filters (-f
, --filter
) - Filter results using returned parameters (for example id=1
, name=test
, etc.).
- help (--help
) - Show this message and exit.
re-execute¶
Re-execute Step's execution with EXECUTION_ID saved in Cryton.
EXECUTION_ID is ID of the Step's execution you want to kill.
Arguments:
- EXECUTION_ID
Options:
- help (--help
) - Show this message and exit.
report¶
Create report for Step's execution with EXECUTION_ID saved in Cryton.
EXECUTION_ID is ID of the Step's execution you want to create report for.
Arguments:
- EXECUTION_ID
Options:
- file (-f
, --file
) - File to save the report to (default is /tmp).
- less (--less
) - Show less like output.
- localize (--localize
) - Convert UTC datetime to local timezone.
- help (--help
) - Show this message and exit.
show¶
Show Step's execution with EXECUTION_ID saved in Cryton.
EXECUTION_ID is ID of the Step's execution you want to see.
Arguments:
- EXECUTION_ID
Options:
- less (--less
) - Show less like output.
- localize (--localize
) - Convert UTC datetime to local timezone.
- help (--help
) - Show this message and exit.
steps¶
Manage Steps from here.
Options:
- help (--help
) - Show this message and exit.
create¶
Create Step from FILE and add it to Stage with STAGE_ID.
STAGE_ID is an ID of the Stage you want to add the Stage to.
FILE is a path to the file containing the Step template.
Arguments:
- STAGE_ID
- FILE
Options:
- inventory_files (-i
, --inventory-file
) - Inventory file used to fill the template. Can be used multiple times.
- help (--help
) - Show this message and exit.
delete¶
Delete Step with STEP_ID saved in Cryton.
STEP_ID is ID of the Step you want to delete.
Arguments:
- STEP_ID
Options:
- help (--help
) - Show this message and exit.
execute¶
Execute Step with STEP_ID under Stage execution with STAGE_EXECUTION_ID.
STEP_ID is ID of the Step you want to execute.
STAGE_EXECUTION_ID is an ID of the Stage execution you want to set as a parent of the Step execution.
Arguments:
- STEP_ID
- STAGE_EXECUTION_ID
Options:
- help (--help
) - Show this message and exit.
list¶
List existing Steps in Cryton.
Options:
- less (--less
) - Show less like output.
- offset (-o
, --offset
) - The initial index from which to return the results.
- limit (-l
, --limit
) - Number of results to return per page.
- localize (--localize
) - Convert UTC datetime to local timezone.
- parent (-p
, --parent
) - Filter Steps using Stage ID.
- parameter_filters (-f
, --filter
) - Filter results using returned parameters (for example id=1
, name=test
, etc.).
- help (--help
) - Show this message and exit.
show¶
Show Step with STEP_ID saved in Cryton.
STEP_ID is ID of the Step you want to see.
Arguments:
- STEP_ID
Options:
- less (--less
) - Show less like output.
- localize (--localize
) - Convert UTC datetime to local timezone.
- help (--help
) - Show this message and exit.
validate¶
Validate (syntax check) your FILE with Step.
FILE is path/to/your/file that you want to validate.
Arguments:
- FILE
Options:
- inventory_files (-i
, --inventory-file
) - Inventory file used to fill the template. Can be used multiple times.
- help (--help
) - Show this message and exit.
workers¶
Manage Workers from here.
Options:
- help (--help
) - Show this message and exit.
create¶
Create new Worker with NAME and save it into Cryton.
NAME of your Worker (will be used to match your Worker). For example: "MyCustomName".
Arguments:
- NAME
Options:
- description (-d
, --description
) - Description of your Worker (wrap in "").
- force (-f
, --force
) - Ignore, if Worker with the same parameter 'name' exists.
- help (--help
) - Show this message and exit.
delete¶
Delete Worker with WORKER_ID saved in Cryton.
WORKER_ID is ID of the Worker you want to delete.
Arguments:
- WORKER_ID
Options:
- help (--help
) - Show this message and exit.
health-check¶
Check if Worker with WORKER_ID saved in Cryton is online.
WORKER_ID is ID of the Worker you want to check.
Arguments:
- WORKER_ID
Options:
- help (--help
) - Show this message and exit.
list¶
List existing Workers in Cryton.
Options:
- less (--less
) - Show less like output.
- offset (-o
, --offset
) - The initial index from which to return the results.
- limit (-l
, --limit
) - Number of results to return per page.
- localize (--localize
) - Convert UTC datetime to local timezone.
- parameter_filters (-f
, --filter
) - Filter results using returned parameters (for example id=1
, name=test
, etc.).
- help (--help
) - Show this message and exit.
show¶
Show Worker with WORKER_ID saved in Cryton.
WORKER_ID is ID of the Worker you want to see.
Arguments:
- WORKER_ID
Options:
- less (--less
) - Show less like output.
- localize (--localize
) - Convert UTC datetime to local timezone.
- help (--help
) - Show this message and exit.