https://github.com/dhis2/cli
Unified CLI for DHIS 2 development workflows
https://github.com/dhis2/cli
cli synced-settings team-extensibility
Last synced: 4 months ago
JSON representation
Unified CLI for DHIS 2 development workflows
- Host: GitHub
- URL: https://github.com/dhis2/cli
- Owner: dhis2
- License: bsd-3-clause
- Created: 2019-01-08T10:35:27.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2026-01-27T11:57:26.000Z (5 months ago)
- Last Synced: 2026-01-27T23:40:18.254Z (5 months ago)
- Topics: cli, synced-settings, team-extensibility
- Language: JavaScript
- Homepage: https://cli.dhis2.nu
- Size: 7.96 MB
- Stars: 14
- Watchers: 22
- Forks: 6
- Open Issues: 35
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# D2 CLI
A unified CLI for DHIS2 development workflows.
[](https://github.com/dhis2/cli)
[](https://travis-ci.com/dhis2/cli)
[](https://conventionalcommits.org)
## Installation and Usage
See the [documentation site](https://cli.dhis2.nu) for end-user installation and usage instructions
## Conventions
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` namespace
- `d2 style js apply` performs the **apply** action in the **js** sub-namespace of the **d2 style** namespace
Anything 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 git
- `d2 cluster restart dev gateway` passes the arguments `dev` and `gateway` to the `restart` action, which tells the action which service to restart.
## CLI Modules
| Alias | Executable | Package | Source | Version |
| ----------------- | ----------------- | --------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
| d2 | d2 | @dhis2/cli | [./packages/main](packages/main) | [](https://www.npmjs.com/package/@dhis2/cli) |
| d2 app | d2-app | @dhis2/cli-app | [./packages/app](./packages/app) | [](https://www.npmjs.com/package/@dhis2/cli-app) |
| d2 app scripts | d2-app-scripts | @dhis2/cli-app-scripts | [dhis2/app-platform](https://github.com/dhis2/app-platform/tree/master/cli) | [](https://www.npmjs.com/package/@dhis2/cli-app-scripts) |
| d2 cluster | d2-cluster | @dhis2/cli-cluster | [./packages/cluster](./packages/cluster) | [](https://www.npmjs.com/package/@dhis2/cli-cluster) |
| d2 create | d2-create | @dhis2/cli-create | [./packages/create](./packages/create) | [](https://www.npmjs.com/package/@dhis2/cli-create) |
| d2 create app | d2-create-app | @dhis2/create-app | [./packages/create-app](./packages/create-app) | [](https://www.npmjs.com/package/@dhis2/create-app) |
| d2 style | d2-style | @dhis2/cli-style | [dhis2/cli-style](https://github.com/dhis2/cli-style) | [](https://www.npmjs.com/package/@dhis2/cli-style) |
| d2 utils | d2-utils | @dhis2/cli-utils | [./packages/utils](./packages/utils) | [](https://www.npmjs.com/package/@dhis2/cli-utils) |
| d2 utils docsite | d2-utils-docsite | @dhis2/cli-utils-docsite | [dhis2/cli-utils-docsite](https://github.com/dhis2/cli-utils-docsite) | [](https://www.npmjs.com/package/@dhis2/cli-utils-docsite) |
| d2 utils cypress | d2-utils-cypress | @dhis2/cli-utils-cypress | [dhis2/cli-utils-cypress](https://github.com/dhis2/cli-utils-cypress) | [](https://www.npmjs.com/package/@dhis2/cli-utils-cypress) |
| d2 utils codemods | d2-utils-codemods | @dhis2/cli-utils-codemods | [dhis2/cli-utils-codemods](https://github.com/dhis2/cli-utils-codemods) | [](https://www.npmjs.com/package/@dhis2/cli-utils-codemods) |
| | | @dhis2/cli-helpers-engine | [dhis2/cli-helpers-engine](https://github.com/dhis2/cli-helpers-engine) | [](https://www.npmjs.com/package/@dhis2/cli-helpers-engine) |
| | | @dhis2/cli-helpers-template | [dhis2/cli-helpers-template](https://github.com/dhis2/cli-helpers-template) | [](https://www.npmjs.com/package/@dhis2/cli-helpers-template) |
## Report an issue
The issue tracker can be found in [DHIS2 JIRA](https://jira.dhis2.org)
under the [CLI](https://jira.dhis2.org/projects/CLI) project.
Deep links:
- [Bug](https://jira.dhis2.org/secure/CreateIssueDetails!init.jspa?pid=10703&issuetype=10006&components=11021)
- [Feature](https://jira.dhis2.org/secure/CreateIssueDetails!init.jspa?pid=10703&issuetype=10300&components=11021)
- [Task](https://jira.dhis2.org/secure/CreateIssueDetails!init.jspa?pid=10703&issuetype=10003&components=11021)