Skip to content

CLI Reference#

This page provides documentation for our command line tools.

acoupi#

Welcome to acoupi.

This is the main command line interface for acoupi and allows you to setup and run acoupi programs.

To get started run acoupi setup to setup your first program.

Usage:

acoupi [OPTIONS] COMMAND [ARGS]...

Options:

Name Type Description Default
--help boolean Show this message and exit. False

Subcommands

  • celery: Run a celery command.
  • check: Run the health checks of the current program and configurations.
  • config: Manage the acoupi configuration.
  • deployment: Manage acoupi deployments.
  • setup: Set up acoupi.
  • task: Manage acoupi tasks.
  • workers: Manage acoupi workers.

acoupi celery#

Run a celery command.

Usage:

acoupi celery [OPTIONS] [ARGS]...

Options:

Name Type Description Default
--help boolean Show this message and exit. False

acoupi check#

Run the health checks of the current program and configurations.

Usage:

acoupi check [OPTIONS]

Options:

Name Type Description Default
--help boolean Show this message and exit. False

acoupi config#

Manage the acoupi configuration.

This command group provides subcommands to view and modify the acoupi configuration settings.

Before using any subcommands, ensure that acoupi is properly set up by running acoupi setup.

Usage:

acoupi config [OPTIONS] COMMAND [ARGS]...

Options:

Name Type Description Default
--help boolean Show this message and exit. False

Subcommands

  • get: Display the full (or a specific field of the) acoupi configuration.
  • set: Set a specific field or the entire acoupi configuration to a new VALUE.

acoupi config get#

Display the full (or a specific field of the) acoupi configuration.

This command allows you to view the current configuration settings for acoupi. You can either retrieve the entire configuration or a specific field or nested field within the configuration.

Examples#

To display the entire configuration:

acoupi config get

To display the value of the username field:

acoupi config get --field username

To display the value of the nested field server.port:

acoupi config get --field server.port

To display the configuration without color highlighting:

acoupi config get --no-color

Usage:

acoupi config get [OPTIONS]

Options:

Name Type Description Default
--field text Retrieve a specific field or nested field from the configuration using dot notation (e.g., 'section.subsection.value'). If not provided, the entire configuration is displayed. None
--color / --no-color boolean Enable or disable syntax highlighting for improved readability. Default is enabled. True
--indent, -i integer Set the indentation level for the output JSON. Default is 2 spaces. 2
--help boolean Show this message and exit. False

acoupi config set#

Set a specific field or the entire acoupi configuration to a new VALUE.

This command allows you to update a configuration value by specifying its new value. You can:

  • Modify the entire configuration (if --field is not provided)

  • Modify a specific field

  • Modify nested fields using dot notation (e.g., 'section.subsection.value')

Note: Any configuration changes provided are validated against the original configuration schema to ensure data integrity.

Examples#

To change the username to "new_user":

acoupi config set username new_user

To change the nested field server.port to 8080:

acoupi config set server.port 8080

To replace the entire configuration with a new one (assuming 'new_config.json' contains valid JSON):

acoupi config set "$(cat new_config.json)"

Usage:

acoupi config set [OPTIONS] VALUE

Options:

Name Type Description Default
--field text Set a specific field of the configuration using dot notation (e.g., 'section.subsection.value'). If not provided, the entire configuration is modified. ``
--help boolean Show this message and exit. False

acoupi deployment#

Manage acoupi deployments.

Usage:

acoupi deployment [OPTIONS] COMMAND [ARGS]...

Options:

Name Type Description Default
--help boolean Show this message and exit. False

Subcommands

  • start: Start acoupi.
  • status: Check the status of acoupi services.
  • stop: Stop acoupi.

acoupi deployment start#

Start acoupi.

Usage:

acoupi deployment start [OPTIONS]

Options:

Name Type Description Default
--name text N/A None
--latitude float Latitude of the deployment None
--longitude float N/A None
--check / --no-check boolean Whether to run the health checks before starting the deployment. True
--help boolean Show this message and exit. False

acoupi deployment status#

Check the status of acoupi services.

Usage:

acoupi deployment status [OPTIONS]

Options:

Name Type Description Default
--help boolean Show this message and exit. False

acoupi deployment stop#

Stop acoupi.

Usage:

acoupi deployment stop [OPTIONS]

Options:

Name Type Description Default
--help boolean Show this message and exit. False

acoupi setup#

Set up acoupi.

Usage:

acoupi setup [OPTIONS] [ARGS]...

Options:

Name Type Description Default
--program text N/A acoupi.programs.test
--help boolean Show this message and exit. False

acoupi task#

Manage acoupi tasks.

Provides commands to list, run, and profile tasks within your configured acoupi program.

Usage:

acoupi task [OPTIONS] COMMAND [ARGS]...

Options:

Name Type Description Default
--help boolean Show this message and exit. False

Subcommands

  • list: List all available tasks in the current acoupi program.
  • profile: Profile a specified task.
  • run: Run a specified task.

acoupi task list#

List all available tasks in the current acoupi program.

Usage:

acoupi task list [OPTIONS]

Options:

Name Type Description Default
--help boolean Show this message and exit. False

acoupi task profile#

Profile a specified task.

Parameters#

task_name : str The name of the task to profile.

Usage:

acoupi task profile [OPTIONS] TASK_NAME

Options:

Name Type Description Default
--output Path Path to save profiling output. None
--quiet boolean Suppress printing profiling output to the console. False
--log-level choice (DEBUG | INFO | WARNING | ERROR | CRITICAL) Set the logging level. WARNING
--help boolean Show this message and exit. False

acoupi task run#

Run a specified task.

Parameters#

task_name : str The name of the task to run.

Usage:

acoupi task run [OPTIONS] TASK_NAME

Options:

Name Type Description Default
--help boolean Show this message and exit. False

acoupi workers#

Manage acoupi workers.

Provides subcommands to manually control the Celery workers responsible for executing program tasks.

Usage:

acoupi workers [OPTIONS] COMMAND [ARGS]...

Options:

Name Type Description Default
--help boolean Show this message and exit. False

Subcommands

  • purge: Purge all pending tasks from the Celery queue.
  • restart: Restart the Celery workers.
  • start: Start the Celery workers.
  • stop: Stop the Celery workers.

acoupi workers purge#

Purge all pending tasks from the Celery queue.

Usage:

acoupi workers purge [OPTIONS]

Options:

Name Type Description Default
--help boolean Show this message and exit. False

acoupi workers restart#

Restart the Celery workers.

Restarts the worker processes, which can be useful for applying configuration changes or resolving issues.

Usage:

acoupi workers restart [OPTIONS]

Options:

Name Type Description Default
--help boolean Show this message and exit. False

acoupi workers start#

Start the Celery workers.

Manually starts the worker processes that handle the execution of program tasks.

Usage:

acoupi workers start [OPTIONS]

Options:

Name Type Description Default
--help boolean Show this message and exit. False

acoupi workers stop#

Stop the Celery workers.

Manually stops the worker processes, gracefully shutting down the task execution environment.

Usage:

acoupi workers stop [OPTIONS]

Options:

Name Type Description Default
--help boolean Show this message and exit. False