CLI Documentation#

atk#

The root entrypoint for the ATK CLI is atk. This the first command you need to access the CLI. All subsequent subcommands succeed atk.

usage: atk [-h] [--version] [-v] [--dry-run] {dev} ...

Named Arguments#

--version

Show the Autonomy Toolkit version information

Default: False

-v, --verbose

Level of verbosity

Default: 0

--dry-run

Test run that will print out the commands it would run but not actually run them

Default: False

Sub-commands#

Subcommands immediately succeed the atk command. They implement additional logic. Having subcommands rather than arguments directly to atk increases expandability as it will allow for additional features to be implemented without convoluting the help menu of the base atk command.

dev#

usage: atk dev [-h] -s SERVICES [SERVICES ...] [-b] [-u] [-d] [-a]
               [-c COMMAND] [--filename-override FILENAME_OVERRIDE]
               [-o OPTIONALS [OPTIONALS ...]] [--compose-arg COMPOSE_ARGS]
               [--compose-opt COMPOSE_OPTS]

Named Arguments#

-s, --services

The services to use. Can be passed as -s service1 service2 or -s service1 -s service2. This is a required argument to promote explicitness.

Default: []

-b, --build

Build the image(s).

Default: False

-u, --up

Spin up the container(s).

Default: False

-d, --down

Tear down the container(s).

Default: False

-a, --attach

Attach to the container. Only one service may be provided.

Default: False

-c, --cmd

A tool to circumvent the atk interface and directly run a docker compose command. Example: atk dev -c config -s dev is equivalent to docker compose -f <path-in-parent>/atk.yml config dev.

--filename-override

Override the default ATK config filename. Will search upwards for file. Defaults to ‘atk.yml’

Default: “atk.yml”

-o, --optionals

Custom CLI arguments that are cross referenced with the ‘x-optionals’ field in the ATK config file.

Default: []

--compose-arg

Additional arguments that are passed to the compose command. If the arg has a , you must use an =. Example: atk dev -s dev -r –compose-arg=ls will evaluate to docker compose run dev ls. You may use –compose-arg multiple times to append multiple options. Will be passed to _all_ selected subcommands (i.e. build, up, etc.).

Default: []

--compose-opt

NOTE: unknown flags passed to atk dev are directly passed to docker compose as options, this is merely an explicit alias for that functionality. Additional options that are passed to the compose command. If the arg has a , you must use an =. Example: atk dev -s dev -b –compose-opt=–no-cache will evaluate to docker compose build –no-cache dev. You may use –compose-opt multiple times to append multiple options. Will be passed to _all_ selected subcommands (i.e. build, up, etc.).

Default: []