A unified CLI for DHIS2 development workflows.
See the documentation site for end-user installation and usage instructions
The d2
command-line tool is structured as a collection of namespaces, each of which may include sub-namespaces and sub-commands. This hierarchy should follow one simple rule:
namespaces are nouns, commands are verbs
Each subsequent namespace should narrow the context in which a command (an action) will be performed. For example:
d2 cluster restart
performs the action restart
in the d2 cluster
namespaced2 style js apply
performs the apply action in the js sub-namespace of the d2 style namespaceAnything following the action verb is either a positional argument or a flag (if preceded by -
or --
), i.e.:
d2 style js apply --all --no-stage
tells the apply
action to run on all files and not to stage the changes in gitd2 cluster restart dev gateway
passes the arguments dev
and gateway
to the restart
action, which tells the action which service to restart.Alias | Executable | Package | Source | Version |
---|---|---|---|---|
d2 | d2 | @dhis2/cli | ./packages/main | |
d2 app | d2-app | @dhis2/cli-app | ./packages/app | |
d2 app scripts | d2-app-scripts | @dhis2/cli-app-scripts | dhis2/app-platform | |
d2 cluster | d2-cluster | @dhis2/cli-cluster | ./packages/cluster | |
d2 create | d2-create | @dhis2/cli-create | ./packages/create | |
d2 create app | d2-create-app | @dhis2/create-app | ./packages/create-app | |
d2 style | d2-style | @dhis2/cli-style | dhis2/cli-style | |
d2 utils | d2-utils | @dhis2/cli-utils | ./packages/utils | |
d2 utils docsite | d2-utils-docsite | @dhis2/cli-utils-docsite | dhis2/cli-utils-docsite | |
d2 utils cypress | d2-utils-cypress | @dhis2/cli-utils-cypress | dhis2/cli-utils-cypress | |
d2 utils codemods | d2-utils-codemods | @dhis2/cli-utils-codemods | dhis2/cli-utils-codemods | |
@dhis2/cli-helpers-engine | dhis2/cli-helpers-engine | |||
@dhis2/cli-helpers-template | dhis2/cli-helpers-template |
The issue tracker can be found in DHIS2 JIRA under the CLI project.
Deep links: