dhis2w-cli 0.20.0__tar.gz → 0.22.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,82 @@
1
+ Metadata-Version: 2.3
2
+ Name: dhis2w-cli
3
+ Version: 0.22.0
4
+ Summary: d2w command-line interface (Typer) — mounts plugins from dhis2w-core.
5
+ Author: Morten Hansen
6
+ Author-email: Morten Hansen <morten@winterop.com>
7
+ Requires-Dist: dhis2w-core>=0.22.0,<0.23
8
+ Requires-Dist: typer>=0.26
9
+ Requires-Dist: rich>=15
10
+ Requires-Dist: dhis2w-browser>=0.22.0,<0.23 ; extra == 'browser'
11
+ Requires-Python: >=3.13
12
+ Provides-Extra: browser
13
+ Description-Content-Type: text/markdown
14
+
15
+ # dhis2w-cli
16
+
17
+ Typer console script `d2w` for working with DHIS2 instances from the shell. Discovers plugins from `dhis2w-core` — sixteen top-level domains covering metadata, data, analytics, tracker, users, routes, files, messaging, apps, doctor, and developer tools.
18
+
19
+ ## Install
20
+
21
+ ```bash
22
+ # Drops `d2w` on $PATH
23
+ uv tool install dhis2w-cli
24
+
25
+ # With Playwright UI automation (browser screenshots, OIDC login, PAT minting)
26
+ uv tool install 'dhis2w-cli[browser]'
27
+ playwright install chromium # one-time, after the install above
28
+
29
+ # Update later
30
+ uv tool upgrade dhis2w-cli
31
+ ```
32
+
33
+ Or run on demand without installing:
34
+
35
+ ```bash
36
+ uvx --from dhis2w-cli d2w --help
37
+ ```
38
+
39
+ ## Configure
40
+
41
+ The CLI reads a profile from `.dhis2/profiles.toml` (project) or `~/.config/dhis2/profiles.toml` (user). One-shot bootstrap:
42
+
43
+ ```bash
44
+ d2w profile bootstrap mywork
45
+ ```
46
+
47
+ Or set env vars and skip the profile system entirely:
48
+
49
+ ```bash
50
+ export DHIS2_URL=https://dhis2.example.org
51
+ export DHIS2_PAT=d2p_...
52
+ d2w system info
53
+ ```
54
+
55
+ ## Surface
56
+
57
+ ```
58
+ d2w analytics DHIS2 analytics queries.
59
+ d2w apps DHIS2 apps — /api/apps + /api/appHub.
60
+ d2w browser Playwright UI automation (only with [browser] extra).
61
+ d2w data DHIS2 data values (aggregate + tracker).
62
+ d2w dev Developer/operator tools.
63
+ d2w doctor Probe a DHIS2 instance for known gotchas + requirements.
64
+ d2w files Manage DHIS2 documents + file resources.
65
+ d2w maintenance DHIS2 maintenance (tasks, cache, integrity, cleanup, refresh).
66
+ d2w messaging DHIS2 internal messaging.
67
+ d2w metadata DHIS2 metadata inspection.
68
+ d2w profile Manage DHIS2 profiles.
69
+ d2w route DHIS2 integration routes.
70
+ d2w system DHIS2 system info.
71
+ d2w user DHIS2 user administration.
72
+ d2w user-group DHIS2 user-group administration.
73
+ d2w user-role DHIS2 user-role administration.
74
+ ```
75
+
76
+ `d2w --help` for the full tree; `d2w <group> --help` for each.
77
+
78
+ ## Documentation
79
+
80
+ Full CLI reference: https://winterop-com.github.io/dhis2w-utils/cli-reference/.
81
+
82
+ `dhis2w-cli` is one member of the [`dhis2w-utils`](https://github.com/winterop-com/dhis2w-utils) workspace. The MCP server (`dhis2w-mcp`) exposes the same plugin surface as MCP tools.
@@ -0,0 +1,68 @@
1
+ # dhis2w-cli
2
+
3
+ Typer console script `d2w` for working with DHIS2 instances from the shell. Discovers plugins from `dhis2w-core` — sixteen top-level domains covering metadata, data, analytics, tracker, users, routes, files, messaging, apps, doctor, and developer tools.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ # Drops `d2w` on $PATH
9
+ uv tool install dhis2w-cli
10
+
11
+ # With Playwright UI automation (browser screenshots, OIDC login, PAT minting)
12
+ uv tool install 'dhis2w-cli[browser]'
13
+ playwright install chromium # one-time, after the install above
14
+
15
+ # Update later
16
+ uv tool upgrade dhis2w-cli
17
+ ```
18
+
19
+ Or run on demand without installing:
20
+
21
+ ```bash
22
+ uvx --from dhis2w-cli d2w --help
23
+ ```
24
+
25
+ ## Configure
26
+
27
+ The CLI reads a profile from `.dhis2/profiles.toml` (project) or `~/.config/dhis2/profiles.toml` (user). One-shot bootstrap:
28
+
29
+ ```bash
30
+ d2w profile bootstrap mywork
31
+ ```
32
+
33
+ Or set env vars and skip the profile system entirely:
34
+
35
+ ```bash
36
+ export DHIS2_URL=https://dhis2.example.org
37
+ export DHIS2_PAT=d2p_...
38
+ d2w system info
39
+ ```
40
+
41
+ ## Surface
42
+
43
+ ```
44
+ d2w analytics DHIS2 analytics queries.
45
+ d2w apps DHIS2 apps — /api/apps + /api/appHub.
46
+ d2w browser Playwright UI automation (only with [browser] extra).
47
+ d2w data DHIS2 data values (aggregate + tracker).
48
+ d2w dev Developer/operator tools.
49
+ d2w doctor Probe a DHIS2 instance for known gotchas + requirements.
50
+ d2w files Manage DHIS2 documents + file resources.
51
+ d2w maintenance DHIS2 maintenance (tasks, cache, integrity, cleanup, refresh).
52
+ d2w messaging DHIS2 internal messaging.
53
+ d2w metadata DHIS2 metadata inspection.
54
+ d2w profile Manage DHIS2 profiles.
55
+ d2w route DHIS2 integration routes.
56
+ d2w system DHIS2 system info.
57
+ d2w user DHIS2 user administration.
58
+ d2w user-group DHIS2 user-group administration.
59
+ d2w user-role DHIS2 user-role administration.
60
+ ```
61
+
62
+ `d2w --help` for the full tree; `d2w <group> --help` for each.
63
+
64
+ ## Documentation
65
+
66
+ Full CLI reference: https://winterop-com.github.io/dhis2w-utils/cli-reference/.
67
+
68
+ `dhis2w-cli` is one member of the [`dhis2w-utils`](https://github.com/winterop-com/dhis2w-utils) workspace. The MCP server (`dhis2w-mcp`) exposes the same plugin surface as MCP tools.
@@ -1,21 +1,21 @@
1
1
  [project]
2
2
  name = "dhis2w-cli"
3
- version = "0.20.0"
4
- description = "dhis2 command-line interface (Typer) — mounts plugins from dhis2w-core."
3
+ version = "0.22.0"
4
+ description = "d2w command-line interface (Typer) — mounts plugins from dhis2w-core."
5
5
  readme = "README.md"
6
6
  authors = [{ name = "Morten Hansen", email = "morten@winterop.com" }]
7
7
  requires-python = ">=3.13"
8
8
  dependencies = [
9
- "dhis2w-core>=0.20.0,<0.21",
9
+ "dhis2w-core>=0.22.0,<0.23",
10
10
  "typer>=0.26",
11
11
  "rich>=15",
12
12
  ]
13
13
 
14
14
  [project.optional-dependencies]
15
- browser = ["dhis2w-browser>=0.20.0,<0.21"]
15
+ browser = ["dhis2w-browser>=0.22.0,<0.23"]
16
16
 
17
17
  [project.scripts]
18
- dhis2 = "dhis2w_cli.main:main"
18
+ d2w = "dhis2w_cli.main:main"
19
19
 
20
20
  [build-system]
21
21
  requires = ["uv_build>=0.11.7,<0.12.0"]
@@ -1,4 +1,4 @@
1
- """Typer root for the `dhis2` CLI — discovers plugins and mounts them."""
1
+ """Typer root for the `d2w` CLI — discovers plugins and mounts them."""
2
2
 
3
3
  from __future__ import annotations
4
4
 
@@ -46,7 +46,7 @@ def _extract_profile_from_argv(argv: list[str]) -> str | None:
46
46
 
47
47
 
48
48
  def _version_banner() -> str:
49
- """Multi-line banner shown for `dhis2 --version` — package version + active plugin tree.
49
+ """Multi-line banner shown for `d2w --version` — package version + active plugin tree.
50
50
 
51
51
  Surfaces which plugin tree (`v41` / `v42` / `v43`) the CLI booted with
52
52
  and where that came from in the resolution chain (`profile.version` →
@@ -70,7 +70,7 @@ def _version_banner() -> str:
70
70
  source = "default (no profile.version, no DHIS2_VERSION env)"
71
71
  else:
72
72
  source = "profile.version"
73
- return f"dhis2 {pkg_version} (plugin tree: {active} — {source})"
73
+ return f"d2w {pkg_version} (plugin tree: {active} — {source})"
74
74
 
75
75
 
76
76
  def _version_callback(value: bool) -> None:
@@ -124,7 +124,7 @@ def build_app() -> typer.Typer:
124
124
  `main()` below) sees uncaught exceptions and can render them cleanly.
125
125
  """
126
126
  app = typer.Typer(
127
- help="dhis2 — command-line interface for DHIS2 (discovers plugins from dhis2w-core).",
127
+ help="d2w — command-line interface for DHIS2 (discovers plugins from dhis2w-core).",
128
128
  no_args_is_help=True,
129
129
  add_completion=False,
130
130
  pretty_exceptions_enable=False,
@@ -187,7 +187,7 @@ def main() -> None:
187
187
 
188
188
  Resolves `--profile` from argv *before* mounting plugins so the
189
189
  correct `v{41,42,43}` plugin tree gets discovered. Without this
190
- pre-pass, `dhis2 --profile v43p ...` would freeze the plugin tree
190
+ pre-pass, `d2w --profile v43p ...` would freeze the plugin tree
191
191
  at whatever the default profile pinned (typically v42), hiding
192
192
  v43-only commands and making `--version`'s banner disagree with
193
193
  the actual mounted command tree.
@@ -1,82 +0,0 @@
1
- Metadata-Version: 2.3
2
- Name: dhis2w-cli
3
- Version: 0.20.0
4
- Summary: dhis2 command-line interface (Typer) — mounts plugins from dhis2w-core.
5
- Author: Morten Hansen
6
- Author-email: Morten Hansen <morten@winterop.com>
7
- Requires-Dist: dhis2w-core>=0.20.0,<0.21
8
- Requires-Dist: typer>=0.26
9
- Requires-Dist: rich>=15
10
- Requires-Dist: dhis2w-browser>=0.20.0,<0.21 ; extra == 'browser'
11
- Requires-Python: >=3.13
12
- Provides-Extra: browser
13
- Description-Content-Type: text/markdown
14
-
15
- # dhis2w-cli
16
-
17
- Typer console script `dhis2` for working with DHIS2 instances from the shell. Discovers plugins from `dhis2w-core` — sixteen top-level domains covering metadata, data, analytics, tracker, users, routes, files, messaging, apps, doctor, and developer tools.
18
-
19
- ## Install
20
-
21
- ```bash
22
- # Drops `dhis2` on $PATH
23
- uv tool install dhis2w-cli
24
-
25
- # With Playwright UI automation (browser screenshots, OIDC login, PAT minting)
26
- uv tool install 'dhis2w-cli[browser]'
27
- playwright install chromium # one-time, after the install above
28
-
29
- # Update later
30
- uv tool upgrade dhis2w-cli
31
- ```
32
-
33
- Or run on demand without installing:
34
-
35
- ```bash
36
- uvx --from dhis2w-cli dhis2 --help
37
- ```
38
-
39
- ## Configure
40
-
41
- The CLI reads a profile from `.dhis2/profiles.toml` (project) or `~/.config/dhis2/profiles.toml` (user). One-shot bootstrap:
42
-
43
- ```bash
44
- dhis2 profile bootstrap mywork
45
- ```
46
-
47
- Or set env vars and skip the profile system entirely:
48
-
49
- ```bash
50
- export DHIS2_URL=https://dhis2.example.org
51
- export DHIS2_PAT=d2p_...
52
- dhis2 system info
53
- ```
54
-
55
- ## Surface
56
-
57
- ```
58
- dhis2 analytics DHIS2 analytics queries.
59
- dhis2 apps DHIS2 apps — /api/apps + /api/appHub.
60
- dhis2 browser Playwright UI automation (only with [browser] extra).
61
- dhis2 data DHIS2 data values (aggregate + tracker).
62
- dhis2 dev Developer/operator tools.
63
- dhis2 doctor Probe a DHIS2 instance for known gotchas + requirements.
64
- dhis2 files Manage DHIS2 documents + file resources.
65
- dhis2 maintenance DHIS2 maintenance (tasks, cache, integrity, cleanup, refresh).
66
- dhis2 messaging DHIS2 internal messaging.
67
- dhis2 metadata DHIS2 metadata inspection.
68
- dhis2 profile Manage DHIS2 profiles.
69
- dhis2 route DHIS2 integration routes.
70
- dhis2 system DHIS2 system info.
71
- dhis2 user DHIS2 user administration.
72
- dhis2 user-group DHIS2 user-group administration.
73
- dhis2 user-role DHIS2 user-role administration.
74
- ```
75
-
76
- `dhis2 --help` for the full tree; `dhis2 <group> --help` for each.
77
-
78
- ## Documentation
79
-
80
- Full CLI reference: https://winterop-com.github.io/dhis2w-utils/cli-reference/.
81
-
82
- `dhis2w-cli` is one member of the [`dhis2w-utils`](https://github.com/winterop-com/dhis2w-utils) workspace. The MCP server (`dhis2w-mcp`) exposes the same plugin surface as MCP tools.
@@ -1,68 +0,0 @@
1
- # dhis2w-cli
2
-
3
- Typer console script `dhis2` for working with DHIS2 instances from the shell. Discovers plugins from `dhis2w-core` — sixteen top-level domains covering metadata, data, analytics, tracker, users, routes, files, messaging, apps, doctor, and developer tools.
4
-
5
- ## Install
6
-
7
- ```bash
8
- # Drops `dhis2` on $PATH
9
- uv tool install dhis2w-cli
10
-
11
- # With Playwright UI automation (browser screenshots, OIDC login, PAT minting)
12
- uv tool install 'dhis2w-cli[browser]'
13
- playwright install chromium # one-time, after the install above
14
-
15
- # Update later
16
- uv tool upgrade dhis2w-cli
17
- ```
18
-
19
- Or run on demand without installing:
20
-
21
- ```bash
22
- uvx --from dhis2w-cli dhis2 --help
23
- ```
24
-
25
- ## Configure
26
-
27
- The CLI reads a profile from `.dhis2/profiles.toml` (project) or `~/.config/dhis2/profiles.toml` (user). One-shot bootstrap:
28
-
29
- ```bash
30
- dhis2 profile bootstrap mywork
31
- ```
32
-
33
- Or set env vars and skip the profile system entirely:
34
-
35
- ```bash
36
- export DHIS2_URL=https://dhis2.example.org
37
- export DHIS2_PAT=d2p_...
38
- dhis2 system info
39
- ```
40
-
41
- ## Surface
42
-
43
- ```
44
- dhis2 analytics DHIS2 analytics queries.
45
- dhis2 apps DHIS2 apps — /api/apps + /api/appHub.
46
- dhis2 browser Playwright UI automation (only with [browser] extra).
47
- dhis2 data DHIS2 data values (aggregate + tracker).
48
- dhis2 dev Developer/operator tools.
49
- dhis2 doctor Probe a DHIS2 instance for known gotchas + requirements.
50
- dhis2 files Manage DHIS2 documents + file resources.
51
- dhis2 maintenance DHIS2 maintenance (tasks, cache, integrity, cleanup, refresh).
52
- dhis2 messaging DHIS2 internal messaging.
53
- dhis2 metadata DHIS2 metadata inspection.
54
- dhis2 profile Manage DHIS2 profiles.
55
- dhis2 route DHIS2 integration routes.
56
- dhis2 system DHIS2 system info.
57
- dhis2 user DHIS2 user administration.
58
- dhis2 user-group DHIS2 user-group administration.
59
- dhis2 user-role DHIS2 user-role administration.
60
- ```
61
-
62
- `dhis2 --help` for the full tree; `dhis2 <group> --help` for each.
63
-
64
- ## Documentation
65
-
66
- Full CLI reference: https://winterop-com.github.io/dhis2w-utils/cli-reference/.
67
-
68
- `dhis2w-cli` is one member of the [`dhis2w-utils`](https://github.com/winterop-com/dhis2w-utils) workspace. The MCP server (`dhis2w-mcp`) exposes the same plugin surface as MCP tools.