devnomads-cli 0.5.4__tar.gz → 0.5.5__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.
Files changed (20) hide show
  1. {devnomads_cli-0.5.4 → devnomads_cli-0.5.5}/PKG-INFO +8 -3
  2. {devnomads_cli-0.5.4 → devnomads_cli-0.5.5}/README.md +7 -2
  3. {devnomads_cli-0.5.4 → devnomads_cli-0.5.5}/devnomads_cli.egg-info/PKG-INFO +8 -3
  4. {devnomads_cli-0.5.4 → devnomads_cli-0.5.5}/dncli.py +127 -105
  5. {devnomads_cli-0.5.4 → devnomads_cli-0.5.5}/pyproject.toml +1 -1
  6. {devnomads_cli-0.5.4 → devnomads_cli-0.5.5}/tests/test_cert.py +1 -1
  7. {devnomads_cli-0.5.4 → devnomads_cli-0.5.5}/tests/test_cli.py +14 -24
  8. {devnomads_cli-0.5.4 → devnomads_cli-0.5.5}/tests/test_generated_cli.py +8 -9
  9. {devnomads_cli-0.5.4 → devnomads_cli-0.5.5}/tests/test_transfer.py +1 -2
  10. {devnomads_cli-0.5.4 → devnomads_cli-0.5.5}/LICENSE +0 -0
  11. {devnomads_cli-0.5.4 → devnomads_cli-0.5.5}/devnomads_cli.egg-info/SOURCES.txt +0 -0
  12. {devnomads_cli-0.5.4 → devnomads_cli-0.5.5}/devnomads_cli.egg-info/dependency_links.txt +0 -0
  13. {devnomads_cli-0.5.4 → devnomads_cli-0.5.5}/devnomads_cli.egg-info/entry_points.txt +0 -0
  14. {devnomads_cli-0.5.4 → devnomads_cli-0.5.5}/devnomads_cli.egg-info/requires.txt +0 -0
  15. {devnomads_cli-0.5.4 → devnomads_cli-0.5.5}/devnomads_cli.egg-info/top_level.txt +0 -0
  16. {devnomads_cli-0.5.4 → devnomads_cli-0.5.5}/setup.cfg +0 -0
  17. {devnomads_cli-0.5.4 → devnomads_cli-0.5.5}/tests/test_config.py +0 -0
  18. {devnomads_cli-0.5.4 → devnomads_cli-0.5.5}/tests/test_generate.py +0 -0
  19. {devnomads_cli-0.5.4 → devnomads_cli-0.5.5}/tests/test_helpers.py +0 -0
  20. {devnomads_cli-0.5.4 → devnomads_cli-0.5.5}/tests/test_hook.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: devnomads-cli
3
- Version: 0.5.4
3
+ Version: 0.5.5
4
4
  Summary: Manage your DevNomads services from the command line
5
5
  Author-email: DevNomads <support@devnomads.nl>
6
6
  License: MIT
@@ -111,11 +111,16 @@ export DN_PROFILE=acme
111
111
  ## Scripting
112
112
 
113
113
  Output is a human-readable table on a terminal and JSON when piped,
114
- so pipelines get parseable output without any flags; `--output
115
- json|table` forces either. Data goes to stdout, everything else
114
+ so pipelines get parseable output without any flags; `--json` and
115
+ `--table` force either. Data goes to stdout, everything else
116
116
  (warnings, prompts, status messages) to stderr, so `dncli ... | jq .`
117
117
  is always safe.
118
118
 
119
+ List tables show a focused set of columns: fields that are empty for
120
+ every row, and nested collections (a server's IPs, a container's
121
+ instances, a mailbox list) are left out of the overview. Use `<group>
122
+ show <id>` or `--json` for the complete record.
123
+
119
124
  In CI and pipelines, skip the credentials file and pass the key via
120
125
  the environment:
121
126
 
@@ -95,11 +95,16 @@ export DN_PROFILE=acme
95
95
  ## Scripting
96
96
 
97
97
  Output is a human-readable table on a terminal and JSON when piped,
98
- so pipelines get parseable output without any flags; `--output
99
- json|table` forces either. Data goes to stdout, everything else
98
+ so pipelines get parseable output without any flags; `--json` and
99
+ `--table` force either. Data goes to stdout, everything else
100
100
  (warnings, prompts, status messages) to stderr, so `dncli ... | jq .`
101
101
  is always safe.
102
102
 
103
+ List tables show a focused set of columns: fields that are empty for
104
+ every row, and nested collections (a server's IPs, a container's
105
+ instances, a mailbox list) are left out of the overview. Use `<group>
106
+ show <id>` or `--json` for the complete record.
107
+
103
108
  In CI and pipelines, skip the credentials file and pass the key via
104
109
  the environment:
105
110
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: devnomads-cli
3
- Version: 0.5.4
3
+ Version: 0.5.5
4
4
  Summary: Manage your DevNomads services from the command line
5
5
  Author-email: DevNomads <support@devnomads.nl>
6
6
  License: MIT
@@ -111,11 +111,16 @@ export DN_PROFILE=acme
111
111
  ## Scripting
112
112
 
113
113
  Output is a human-readable table on a terminal and JSON when piped,
114
- so pipelines get parseable output without any flags; `--output
115
- json|table` forces either. Data goes to stdout, everything else
114
+ so pipelines get parseable output without any flags; `--json` and
115
+ `--table` force either. Data goes to stdout, everything else
116
116
  (warnings, prompts, status messages) to stderr, so `dncli ... | jq .`
117
117
  is always safe.
118
118
 
119
+ List tables show a focused set of columns: fields that are empty for
120
+ every row, and nested collections (a server's IPs, a container's
121
+ instances, a mailbox list) are left out of the overview. Use `<group>
122
+ show <id>` or `--json` for the complete record.
123
+
119
124
  In CI and pipelines, skip the credentials file and pass the key via
120
125
  the environment:
121
126
 
@@ -176,13 +176,25 @@ class AppState:
176
176
  client: DevNomadsClient | None = None
177
177
 
178
178
 
179
- def state_from(ctx: typer.Context, output: OutputFormat | None = None) -> AppState:
179
+ def _format_flag(as_json: bool | None) -> OutputFormat | None:
180
+ """Map the ``--json``/``--table`` flag to a format: True is JSON, False is
181
+ table, None means "not given - decide from the terminal"."""
182
+
183
+ if as_json is True:
184
+ return OutputFormat.json
185
+ if as_json is False:
186
+ return OutputFormat.table
187
+ return None
188
+
189
+
190
+ def state_from(ctx: typer.Context, output: bool | None = None) -> AppState:
180
191
  state = ctx.obj
181
192
  if not isinstance(state, AppState): # direct invocation in tests
182
193
  state = AppState()
183
194
  ctx.obj = state
184
- if output is not None: # per-command --output overrides the global one
185
- state.output = output
195
+ fmt = _format_flag(output)
196
+ if fmt is not None: # per-command --json/--table overrides the global one
197
+ state.output = fmt
186
198
  return state
187
199
 
188
200
 
@@ -995,8 +1007,11 @@ SortOption = Annotated[
995
1007
  ),
996
1008
  ]
997
1009
  OutputOption = Annotated[
998
- OutputFormat | None,
999
- typer.Option("--output", "-o", help="Output format (table or json)."),
1010
+ bool | None,
1011
+ typer.Option(
1012
+ "--json/--table",
1013
+ help="Force JSON or table output (default: table on a TTY, JSON piped).",
1014
+ ),
1000
1015
  ]
1001
1016
 
1002
1017
 
@@ -1022,11 +1037,11 @@ def main(
1022
1037
  ),
1023
1038
  ] = None,
1024
1039
  output: Annotated[
1025
- OutputFormat | None,
1040
+ bool | None,
1026
1041
  typer.Option(
1027
- "--output",
1028
- "-o",
1029
- help="Output format; default: table on a TTY, json when piped.",
1042
+ "--json/--table",
1043
+ help="Force JSON or table output; default: table on a TTY, "
1044
+ "JSON when piped.",
1030
1045
  ),
1031
1046
  ] = None,
1032
1047
  debug: Annotated[
@@ -1042,7 +1057,12 @@ def main(
1042
1057
  ),
1043
1058
  ] = False,
1044
1059
  ) -> None:
1045
- ctx.obj = AppState(profile=profile, api_key=api_key, output=output, debug=debug)
1060
+ ctx.obj = AppState(
1061
+ profile=profile,
1062
+ api_key=api_key,
1063
+ output=_format_flag(output),
1064
+ debug=debug,
1065
+ )
1046
1066
 
1047
1067
 
1048
1068
  # --- configure -------------------------------------------------------------
@@ -2061,7 +2081,9 @@ _SORT_OPT = typer.Option(
2061
2081
  )
2062
2082
  _YES_OPT = typer.Option(False, "--yes", "-y", help="Do not ask for confirmation.")
2063
2083
  _OUTPUT_OPT = typer.Option(
2064
- None, "--output", "-o", help="Output format (table or json)."
2084
+ None,
2085
+ "--json/--table",
2086
+ help="Force JSON or table output (default: table on a TTY, JSON piped).",
2065
2087
  )
2066
2088
 
2067
2089
 
@@ -2076,7 +2098,7 @@ def _generated_call(
2076
2098
  columns: list[str] | None = None,
2077
2099
  confirm: str | None = None,
2078
2100
  yes: bool = False,
2079
- output: OutputFormat | None = None,
2101
+ output: bool | None = None,
2080
2102
  ) -> None:
2081
2103
  """Shared runtime for generated commands: build the path, confirm if
2082
2104
  needed, call the API, render the result."""
@@ -2233,7 +2255,7 @@ def gen_handles_create(
2233
2255
  city: str | None = typer.Option(None),
2234
2256
  region: str | None = typer.Option(None),
2235
2257
  country: str | None = typer.Option(None),
2236
- output: OutputFormat | None = _OUTPUT_OPT,
2258
+ output: bool | None = _OUTPUT_OPT,
2237
2259
  ) -> None:
2238
2260
  """Create a contact handle."""
2239
2261
 
@@ -2268,7 +2290,7 @@ def gen_handles_create(
2268
2290
  def gen_handles_index(
2269
2291
  ctx: typer.Context,
2270
2292
  sort: str | None = _SORT_OPT,
2271
- output: OutputFormat | None = _OUTPUT_OPT,
2293
+ output: bool | None = _OUTPUT_OPT,
2272
2294
  ) -> None:
2273
2295
  """List your contact handles."""
2274
2296
 
@@ -2286,7 +2308,7 @@ def gen_handles_index(
2286
2308
  def gen_handles_show(
2287
2309
  ctx: typer.Context,
2288
2310
  handle_id: int = typer.Argument(..., metavar="HANDLE_ID"),
2289
- output: OutputFormat | None = _OUTPUT_OPT,
2311
+ output: bool | None = _OUTPUT_OPT,
2290
2312
  ) -> None:
2291
2313
  """Show one contact handle."""
2292
2314
 
@@ -2303,7 +2325,7 @@ def gen_handles_show(
2303
2325
  def gen_services_apps_index(
2304
2326
  ctx: typer.Context,
2305
2327
  sort: str | None = _SORT_OPT,
2306
- output: OutputFormat | None = _OUTPUT_OPT,
2328
+ output: bool | None = _OUTPUT_OPT,
2307
2329
  ) -> None:
2308
2330
  """List apps."""
2309
2331
 
@@ -2321,7 +2343,7 @@ def gen_services_apps_index(
2321
2343
  def gen_services_apps_show(
2322
2344
  ctx: typer.Context,
2323
2345
  service_id: int = typer.Argument(..., metavar="SERVICE_ID"),
2324
- output: OutputFormat | None = _OUTPUT_OPT,
2346
+ output: bool | None = _OUTPUT_OPT,
2325
2347
  ) -> None:
2326
2348
  """Show apps details."""
2327
2349
 
@@ -2340,7 +2362,7 @@ def gen_services_apps_state(
2340
2362
  service_id: int = typer.Argument(..., metavar="SERVICE_ID"),
2341
2363
  state: str = typer.Argument(..., metavar="STATE"),
2342
2364
  yes: bool = _YES_OPT,
2343
- output: OutputFormat | None = _OUTPUT_OPT,
2365
+ output: bool | None = _OUTPUT_OPT,
2344
2366
  ) -> None:
2345
2367
  """Change the state of an app service."""
2346
2368
 
@@ -2359,7 +2381,7 @@ def gen_services_apps_state(
2359
2381
  def gen_services_buckets_index(
2360
2382
  ctx: typer.Context,
2361
2383
  sort: str | None = _SORT_OPT,
2362
- output: OutputFormat | None = _OUTPUT_OPT,
2384
+ output: bool | None = _OUTPUT_OPT,
2363
2385
  ) -> None:
2364
2386
  """List buckets."""
2365
2387
 
@@ -2377,7 +2399,7 @@ def gen_services_buckets_index(
2377
2399
  def gen_services_buckets_show(
2378
2400
  ctx: typer.Context,
2379
2401
  service_id: int = typer.Argument(..., metavar="SERVICE_ID"),
2380
- output: OutputFormat | None = _OUTPUT_OPT,
2402
+ output: bool | None = _OUTPUT_OPT,
2381
2403
  ) -> None:
2382
2404
  """Show buckets details."""
2383
2405
 
@@ -2395,7 +2417,7 @@ def gen_services_containers_deploy(
2395
2417
  ctx: typer.Context,
2396
2418
  service_id: int = typer.Argument(..., metavar="SERVICE_ID"),
2397
2419
  yes: bool = _YES_OPT,
2398
- output: OutputFormat | None = _OUTPUT_OPT,
2420
+ output: bool | None = _OUTPUT_OPT,
2399
2421
  ) -> None:
2400
2422
  """Deploy a container service."""
2401
2423
 
@@ -2414,7 +2436,7 @@ def gen_services_containers_deploy(
2414
2436
  def gen_services_containers_index(
2415
2437
  ctx: typer.Context,
2416
2438
  sort: str | None = _SORT_OPT,
2417
- output: OutputFormat | None = _OUTPUT_OPT,
2439
+ output: bool | None = _OUTPUT_OPT,
2418
2440
  ) -> None:
2419
2441
  """List containers."""
2420
2442
 
@@ -2434,7 +2456,7 @@ def gen_services_containers_instances_deploy(
2434
2456
  service_id: int = typer.Argument(..., metavar="SERVICE_ID"),
2435
2457
  instance_id: int = typer.Argument(..., metavar="INSTANCE_ID"),
2436
2458
  yes: bool = _YES_OPT,
2437
- output: OutputFormat | None = _OUTPUT_OPT,
2459
+ output: bool | None = _OUTPUT_OPT,
2438
2460
  ) -> None:
2439
2461
  """Deploy a container instance."""
2440
2462
 
@@ -2454,7 +2476,7 @@ def gen_services_containers_instances_index(
2454
2476
  ctx: typer.Context,
2455
2477
  service_id: str = typer.Argument(..., metavar="SERVICE_ID"),
2456
2478
  sort: str | None = _SORT_OPT,
2457
- output: OutputFormat | None = _OUTPUT_OPT,
2479
+ output: bool | None = _OUTPUT_OPT,
2458
2480
  ) -> None:
2459
2481
  """List containers instances."""
2460
2482
 
@@ -2473,7 +2495,7 @@ def gen_services_containers_instances_logs(
2473
2495
  ctx: typer.Context,
2474
2496
  service_id: int = typer.Argument(..., metavar="SERVICE_ID"),
2475
2497
  instance_id: int = typer.Argument(..., metavar="INSTANCE_ID"),
2476
- output: OutputFormat | None = _OUTPUT_OPT,
2498
+ output: bool | None = _OUTPUT_OPT,
2477
2499
  ) -> None:
2478
2500
  """Show the logs of a container instance."""
2479
2501
 
@@ -2491,7 +2513,7 @@ def gen_services_containers_instances_show(
2491
2513
  ctx: typer.Context,
2492
2514
  service_id: int = typer.Argument(..., metavar="SERVICE_ID"),
2493
2515
  instance_id: int = typer.Argument(..., metavar="INSTANCE_ID"),
2494
- output: OutputFormat | None = _OUTPUT_OPT,
2516
+ output: bool | None = _OUTPUT_OPT,
2495
2517
  ) -> None:
2496
2518
  """Show containers instances details."""
2497
2519
 
@@ -2511,7 +2533,7 @@ def gen_services_containers_instances_state(
2511
2533
  instance_id: int = typer.Argument(..., metavar="INSTANCE_ID"),
2512
2534
  state: str = typer.Argument(..., metavar="STATE"),
2513
2535
  yes: bool = _YES_OPT,
2514
- output: OutputFormat | None = _OUTPUT_OPT,
2536
+ output: bool | None = _OUTPUT_OPT,
2515
2537
  ) -> None:
2516
2538
  """Change the state of a container instance."""
2517
2539
 
@@ -2532,7 +2554,7 @@ def gen_services_containers_instances_update(
2532
2554
  service_id: int = typer.Argument(..., metavar="SERVICE_ID"),
2533
2555
  instance_id: int = typer.Argument(..., metavar="INSTANCE_ID"),
2534
2556
  image: str | None = typer.Option(None),
2535
- output: OutputFormat | None = _OUTPUT_OPT,
2557
+ output: bool | None = _OUTPUT_OPT,
2536
2558
  ) -> None:
2537
2559
  """Update containers instances."""
2538
2560
 
@@ -2552,7 +2574,7 @@ def gen_services_containers_instances_volumes_index(
2552
2574
  service_id: int = typer.Argument(..., metavar="SERVICE_ID"),
2553
2575
  instance_id: int = typer.Argument(..., metavar="INSTANCE_ID"),
2554
2576
  sort: str | None = _SORT_OPT,
2555
- output: OutputFormat | None = _OUTPUT_OPT,
2577
+ output: bool | None = _OUTPUT_OPT,
2556
2578
  ) -> None:
2557
2579
  """List containers instances volumes."""
2558
2580
 
@@ -2572,7 +2594,7 @@ def gen_services_containers_instances_volumes_show(
2572
2594
  service_id: int = typer.Argument(..., metavar="SERVICE_ID"),
2573
2595
  instance_id: int = typer.Argument(..., metavar="INSTANCE_ID"),
2574
2596
  volume_id: int = typer.Argument(..., metavar="VOLUME_ID"),
2575
- output: OutputFormat | None = _OUTPUT_OPT,
2597
+ output: bool | None = _OUTPUT_OPT,
2576
2598
  ) -> None:
2577
2599
  """Show containers instances volumes details."""
2578
2600
 
@@ -2593,7 +2615,7 @@ def gen_services_containers_instances_volumes_update(
2593
2615
  volume_id: int = typer.Argument(..., metavar="VOLUME_ID"),
2594
2616
  path: str | None = typer.Option(None),
2595
2617
  uid: str | None = typer.Option(None),
2596
- output: OutputFormat | None = _OUTPUT_OPT,
2618
+ output: bool | None = _OUTPUT_OPT,
2597
2619
  ) -> None:
2598
2620
  """Update containers instances volumes."""
2599
2621
 
@@ -2611,7 +2633,7 @@ def gen_services_containers_instances_volumes_update(
2611
2633
  def gen_services_containers_show(
2612
2634
  ctx: typer.Context,
2613
2635
  service_id: int = typer.Argument(..., metavar="SERVICE_ID"),
2614
- output: OutputFormat | None = _OUTPUT_OPT,
2636
+ output: bool | None = _OUTPUT_OPT,
2615
2637
  ) -> None:
2616
2638
  """Show containers details."""
2617
2639
 
@@ -2631,7 +2653,7 @@ def gen_services_containers_update(
2631
2653
  registry_url: str | None = typer.Option(None),
2632
2654
  description: str | None = typer.Option(None),
2633
2655
  port: int | None = typer.Option(None),
2634
- output: OutputFormat | None = _OUTPUT_OPT,
2656
+ output: bool | None = _OUTPUT_OPT,
2635
2657
  ) -> None:
2636
2658
  """Update containers."""
2637
2659
 
@@ -2649,7 +2671,7 @@ def gen_services_containers_update(
2649
2671
  def gen_services_databases_clusters_index(
2650
2672
  ctx: typer.Context,
2651
2673
  sort: str | None = _SORT_OPT,
2652
- output: OutputFormat | None = _OUTPUT_OPT,
2674
+ output: bool | None = _OUTPUT_OPT,
2653
2675
  ) -> None:
2654
2676
  """List databases clusters."""
2655
2677
 
@@ -2667,7 +2689,7 @@ def gen_services_databases_clusters_index(
2667
2689
  def gen_services_databases_clusters_show(
2668
2690
  ctx: typer.Context,
2669
2691
  cluster_id: int = typer.Argument(..., metavar="CLUSTER_ID"),
2670
- output: OutputFormat | None = _OUTPUT_OPT,
2692
+ output: bool | None = _OUTPUT_OPT,
2671
2693
  ) -> None:
2672
2694
  """Show databases clusters details."""
2673
2695
 
@@ -2685,7 +2707,7 @@ def gen_services_databases_clusters_users_index(
2685
2707
  ctx: typer.Context,
2686
2708
  cluster_id: int = typer.Argument(..., metavar="CLUSTER_ID"),
2687
2709
  sort: str | None = _SORT_OPT,
2688
- output: OutputFormat | None = _OUTPUT_OPT,
2710
+ output: bool | None = _OUTPUT_OPT,
2689
2711
  ) -> None:
2690
2712
  """List databases clusters users."""
2691
2713
 
@@ -2704,7 +2726,7 @@ def gen_services_databases_clusters_users_show(
2704
2726
  ctx: typer.Context,
2705
2727
  cluster_id: int = typer.Argument(..., metavar="CLUSTER_ID"),
2706
2728
  user_id: int = typer.Argument(..., metavar="USER_ID"),
2707
- output: OutputFormat | None = _OUTPUT_OPT,
2729
+ output: bool | None = _OUTPUT_OPT,
2708
2730
  ) -> None:
2709
2731
  """Show databases clusters users details."""
2710
2732
 
@@ -2721,7 +2743,7 @@ def gen_services_databases_clusters_users_show(
2721
2743
  def gen_services_databases_index(
2722
2744
  ctx: typer.Context,
2723
2745
  sort: str | None = _SORT_OPT,
2724
- output: OutputFormat | None = _OUTPUT_OPT,
2746
+ output: bool | None = _OUTPUT_OPT,
2725
2747
  ) -> None:
2726
2748
  """List databases."""
2727
2749
 
@@ -2741,7 +2763,7 @@ def gen_services_databases_permissions_create(
2741
2763
  service_id: str = typer.Argument(..., metavar="SERVICE_ID"),
2742
2764
  user_id: str | None = typer.Option(None),
2743
2765
  permissions: list[str] | None = typer.Option(None),
2744
- output: OutputFormat | None = _OUTPUT_OPT,
2766
+ output: bool | None = _OUTPUT_OPT,
2745
2767
  ) -> None:
2746
2768
  """Create databases permissions."""
2747
2769
 
@@ -2759,7 +2781,7 @@ def gen_services_databases_permissions_create(
2759
2781
  def gen_services_databases_show(
2760
2782
  ctx: typer.Context,
2761
2783
  service_id: int = typer.Argument(..., metavar="SERVICE_ID"),
2762
- output: OutputFormat | None = _OUTPUT_OPT,
2784
+ output: bool | None = _OUTPUT_OPT,
2763
2785
  ) -> None:
2764
2786
  """Show databases details."""
2765
2787
 
@@ -2778,7 +2800,7 @@ def gen_services_databases_store(
2778
2800
  name: str | None = typer.Option(None),
2779
2801
  client_id: int | None = typer.Option(None),
2780
2802
  cluster_id: int | None = typer.Option(None),
2781
- output: OutputFormat | None = _OUTPUT_OPT,
2803
+ output: bool | None = _OUTPUT_OPT,
2782
2804
  ) -> None:
2783
2805
  """Create databases."""
2784
2806
 
@@ -2799,7 +2821,7 @@ def gen_services_databases_users_store(
2799
2821
  username: str | None = typer.Option(None),
2800
2822
  password: str | None = typer.Option(None),
2801
2823
  client_id: int | None = typer.Option(None),
2802
- output: OutputFormat | None = _OUTPUT_OPT,
2824
+ output: bool | None = _OUTPUT_OPT,
2803
2825
  ) -> None:
2804
2826
  """Create databases users."""
2805
2827
 
@@ -2819,7 +2841,7 @@ def gen_services_databases_users_update(
2819
2841
  cluster_id: str = typer.Argument(..., metavar="CLUSTER_ID"),
2820
2842
  user_id: str = typer.Argument(..., metavar="USER_ID"),
2821
2843
  password: str | None = typer.Option(None),
2822
- output: OutputFormat | None = _OUTPUT_OPT,
2844
+ output: bool | None = _OUTPUT_OPT,
2823
2845
  ) -> None:
2824
2846
  """Update databases users."""
2825
2847
 
@@ -2844,7 +2866,7 @@ def gen_services_domains_create(
2844
2866
  handle_id_owner: int | None = typer.Option(None),
2845
2867
  handle_id_administrative: int | None = typer.Option(None),
2846
2868
  handle_id_technical: int | None = typer.Option(None),
2847
- output: OutputFormat | None = _OUTPUT_OPT,
2869
+ output: bool | None = _OUTPUT_OPT,
2848
2870
  ) -> None:
2849
2871
  """Create domains."""
2850
2872
 
@@ -2871,7 +2893,7 @@ def gen_services_domains_create(
2871
2893
  def gen_services_domains_index(
2872
2894
  ctx: typer.Context,
2873
2895
  sort: str | None = _SORT_OPT,
2874
- output: OutputFormat | None = _OUTPUT_OPT,
2896
+ output: bool | None = _OUTPUT_OPT,
2875
2897
  ) -> None:
2876
2898
  """List domains."""
2877
2899
 
@@ -2889,7 +2911,7 @@ def gen_services_domains_index(
2889
2911
  def gen_services_domains_show(
2890
2912
  ctx: typer.Context,
2891
2913
  service_id: int = typer.Argument(..., metavar="SERVICE_ID"),
2892
- output: OutputFormat | None = _OUTPUT_OPT,
2914
+ output: bool | None = _OUTPUT_OPT,
2893
2915
  ) -> None:
2894
2916
  """Show domains details."""
2895
2917
 
@@ -2908,7 +2930,7 @@ def gen_services_emails_aliases_create(
2908
2930
  service_id: str = typer.Argument(..., metavar="SERVICE_ID"),
2909
2931
  emailaddress: str | None = typer.Option(None),
2910
2932
  alias: str | None = typer.Option(None),
2911
- output: OutputFormat | None = _OUTPUT_OPT,
2933
+ output: bool | None = _OUTPUT_OPT,
2912
2934
  ) -> None:
2913
2935
  """Create emails aliases."""
2914
2936
 
@@ -2928,7 +2950,7 @@ def gen_services_emails_aliases_delete(
2928
2950
  service_id: int = typer.Argument(..., metavar="SERVICE_ID"),
2929
2951
  alias_id: int = typer.Argument(..., metavar="ALIAS_ID"),
2930
2952
  yes: bool = _YES_OPT,
2931
- output: OutputFormat | None = _OUTPUT_OPT,
2953
+ output: bool | None = _OUTPUT_OPT,
2932
2954
  ) -> None:
2933
2955
  """Delete emails aliases."""
2934
2956
 
@@ -2948,7 +2970,7 @@ def gen_services_emails_aliases_index(
2948
2970
  ctx: typer.Context,
2949
2971
  service_id: int = typer.Argument(..., metavar="SERVICE_ID"),
2950
2972
  sort: str | None = _SORT_OPT,
2951
- output: OutputFormat | None = _OUTPUT_OPT,
2973
+ output: bool | None = _OUTPUT_OPT,
2952
2974
  ) -> None:
2953
2975
  """List emails aliases."""
2954
2976
 
@@ -2967,7 +2989,7 @@ def gen_services_emails_aliases_show(
2967
2989
  ctx: typer.Context,
2968
2990
  service_id: int = typer.Argument(..., metavar="SERVICE_ID"),
2969
2991
  alias_id: int = typer.Argument(..., metavar="ALIAS_ID"),
2970
- output: OutputFormat | None = _OUTPUT_OPT,
2992
+ output: bool | None = _OUTPUT_OPT,
2971
2993
  ) -> None:
2972
2994
  """Show emails aliases details."""
2973
2995
 
@@ -2989,7 +3011,7 @@ def gen_services_emails_create(
2989
3011
  return_path_domain: str | None = typer.Option(None),
2990
3012
  relay_hosts: list[str] | None = typer.Option(None),
2991
3013
  delivery_rate: int | None = typer.Option(None),
2992
- output: OutputFormat | None = _OUTPUT_OPT,
3014
+ output: bool | None = _OUTPUT_OPT,
2993
3015
  ) -> None:
2994
3016
  """Create emails."""
2995
3017
 
@@ -3015,7 +3037,7 @@ def gen_services_emails_delete(
3015
3037
  ctx: typer.Context,
3016
3038
  service_id: int = typer.Argument(..., metavar="SERVICE_ID"),
3017
3039
  yes: bool = _YES_OPT,
3018
- output: OutputFormat | None = _OUTPUT_OPT,
3040
+ output: bool | None = _OUTPUT_OPT,
3019
3041
  ) -> None:
3020
3042
  """Delete emails."""
3021
3043
 
@@ -3034,7 +3056,7 @@ def gen_services_emails_delete(
3034
3056
  def gen_services_emails_dkim_show(
3035
3057
  ctx: typer.Context,
3036
3058
  service_id: int = typer.Argument(..., metavar="SERVICE_ID"),
3037
- output: OutputFormat | None = _OUTPUT_OPT,
3059
+ output: bool | None = _OUTPUT_OPT,
3038
3060
  ) -> None:
3039
3061
  """Show the DKIM configuration of an email service."""
3040
3062
 
@@ -3053,7 +3075,7 @@ def gen_services_emails_forwardings_create(
3053
3075
  service_id: int = typer.Argument(..., metavar="SERVICE_ID"),
3054
3076
  emailaddress: str | None = typer.Option(None),
3055
3077
  target: str | None = typer.Option(None),
3056
- output: OutputFormat | None = _OUTPUT_OPT,
3078
+ output: bool | None = _OUTPUT_OPT,
3057
3079
  ) -> None:
3058
3080
  """Create emails forwardings."""
3059
3081
 
@@ -3073,7 +3095,7 @@ def gen_services_emails_forwardings_delete(
3073
3095
  service_id: int = typer.Argument(..., metavar="SERVICE_ID"),
3074
3096
  forwarding_id: int = typer.Argument(..., metavar="FORWARDING_ID"),
3075
3097
  yes: bool = _YES_OPT,
3076
- output: OutputFormat | None = _OUTPUT_OPT,
3098
+ output: bool | None = _OUTPUT_OPT,
3077
3099
  ) -> None:
3078
3100
  """Delete emails forwardings."""
3079
3101
 
@@ -3093,7 +3115,7 @@ def gen_services_emails_forwardings_index(
3093
3115
  ctx: typer.Context,
3094
3116
  service_id: int = typer.Argument(..., metavar="SERVICE_ID"),
3095
3117
  sort: str | None = _SORT_OPT,
3096
- output: OutputFormat | None = _OUTPUT_OPT,
3118
+ output: bool | None = _OUTPUT_OPT,
3097
3119
  ) -> None:
3098
3120
  """List emails forwardings."""
3099
3121
 
@@ -3112,7 +3134,7 @@ def gen_services_emails_forwardings_show(
3112
3134
  ctx: typer.Context,
3113
3135
  service_id: int = typer.Argument(..., metavar="SERVICE_ID"),
3114
3136
  forwarding_id: int = typer.Argument(..., metavar="FORWARDING_ID"),
3115
- output: OutputFormat | None = _OUTPUT_OPT,
3137
+ output: bool | None = _OUTPUT_OPT,
3116
3138
  ) -> None:
3117
3139
  """Show emails forwardings details."""
3118
3140
 
@@ -3129,7 +3151,7 @@ def gen_services_emails_forwardings_show(
3129
3151
  def gen_services_emails_index(
3130
3152
  ctx: typer.Context,
3131
3153
  sort: str | None = _SORT_OPT,
3132
- output: OutputFormat | None = _OUTPUT_OPT,
3154
+ output: bool | None = _OUTPUT_OPT,
3133
3155
  ) -> None:
3134
3156
  """List emails."""
3135
3157
 
@@ -3149,7 +3171,7 @@ def gen_services_emails_mailboxes_create(
3149
3171
  service_id: int = typer.Argument(..., metavar="SERVICE_ID"),
3150
3172
  emailaddress: str | None = typer.Option(None),
3151
3173
  password: str | None = typer.Option(None),
3152
- output: OutputFormat | None = _OUTPUT_OPT,
3174
+ output: bool | None = _OUTPUT_OPT,
3153
3175
  ) -> None:
3154
3176
  """Create emails mailboxes."""
3155
3177
 
@@ -3169,7 +3191,7 @@ def gen_services_emails_mailboxes_delete(
3169
3191
  service_id: int = typer.Argument(..., metavar="SERVICE_ID"),
3170
3192
  emailaddress: str = typer.Argument(..., metavar="EMAILADDRESS"),
3171
3193
  yes: bool = _YES_OPT,
3172
- output: OutputFormat | None = _OUTPUT_OPT,
3194
+ output: bool | None = _OUTPUT_OPT,
3173
3195
  ) -> None:
3174
3196
  """Delete emails mailboxes."""
3175
3197
 
@@ -3189,7 +3211,7 @@ def gen_services_emails_mailboxes_index(
3189
3211
  ctx: typer.Context,
3190
3212
  service_id: int = typer.Argument(..., metavar="SERVICE_ID"),
3191
3213
  sort: str | None = _SORT_OPT,
3192
- output: OutputFormat | None = _OUTPUT_OPT,
3214
+ output: bool | None = _OUTPUT_OPT,
3193
3215
  ) -> None:
3194
3216
  """List emails mailboxes."""
3195
3217
 
@@ -3208,7 +3230,7 @@ def gen_services_emails_mailboxes_show(
3208
3230
  ctx: typer.Context,
3209
3231
  service_id: int = typer.Argument(..., metavar="SERVICE_ID"),
3210
3232
  emailaddress: str = typer.Argument(..., metavar="EMAILADDRESS"),
3211
- output: OutputFormat | None = _OUTPUT_OPT,
3233
+ output: bool | None = _OUTPUT_OPT,
3212
3234
  ) -> None:
3213
3235
  """Show emails mailboxes details."""
3214
3236
 
@@ -3227,7 +3249,7 @@ def gen_services_emails_mailboxes_update(
3227
3249
  service_id: int = typer.Argument(..., metavar="SERVICE_ID"),
3228
3250
  emailaddress: str = typer.Argument(..., metavar="EMAILADDRESS"),
3229
3251
  password: str | None = typer.Option(None),
3230
- output: OutputFormat | None = _OUTPUT_OPT,
3252
+ output: bool | None = _OUTPUT_OPT,
3231
3253
  ) -> None:
3232
3254
  """Update emails mailboxes."""
3233
3255
 
@@ -3246,7 +3268,7 @@ def gen_services_emails_records_index(
3246
3268
  ctx: typer.Context,
3247
3269
  service_id: int = typer.Argument(..., metavar="SERVICE_ID"),
3248
3270
  sort: str | None = _SORT_OPT,
3249
- output: OutputFormat | None = _OUTPUT_OPT,
3271
+ output: bool | None = _OUTPUT_OPT,
3250
3272
  ) -> None:
3251
3273
  """List the DNS records an email service needs."""
3252
3274
 
@@ -3264,7 +3286,7 @@ def gen_services_emails_records_index(
3264
3286
  def gen_services_emails_show(
3265
3287
  ctx: typer.Context,
3266
3288
  service_id: int = typer.Argument(..., metavar="SERVICE_ID"),
3267
- output: OutputFormat | None = _OUTPUT_OPT,
3289
+ output: bool | None = _OUTPUT_OPT,
3268
3290
  ) -> None:
3269
3291
  """Show emails details."""
3270
3292
 
@@ -3282,7 +3304,7 @@ def gen_services_emails_transactional_aliases_create(
3282
3304
  ctx: typer.Context,
3283
3305
  service_id: int = typer.Argument(..., metavar="SERVICE_ID"),
3284
3306
  domain: str | None = typer.Option(None),
3285
- output: OutputFormat | None = _OUTPUT_OPT,
3307
+ output: bool | None = _OUTPUT_OPT,
3286
3308
  ) -> None:
3287
3309
  """Create emails transactional aliases."""
3288
3310
 
@@ -3302,7 +3324,7 @@ def gen_services_emails_transactional_aliases_delete(
3302
3324
  service_id: int = typer.Argument(..., metavar="SERVICE_ID"),
3303
3325
  alias_id: int = typer.Argument(..., metavar="ALIAS_ID"),
3304
3326
  yes: bool = _YES_OPT,
3305
- output: OutputFormat | None = _OUTPUT_OPT,
3327
+ output: bool | None = _OUTPUT_OPT,
3306
3328
  ) -> None:
3307
3329
  """Delete emails transactional aliases."""
3308
3330
 
@@ -3322,7 +3344,7 @@ def gen_services_emails_transactional_aliases_index(
3322
3344
  ctx: typer.Context,
3323
3345
  service_id: int = typer.Argument(..., metavar="SERVICE_ID"),
3324
3346
  sort: str | None = _SORT_OPT,
3325
- output: OutputFormat | None = _OUTPUT_OPT,
3347
+ output: bool | None = _OUTPUT_OPT,
3326
3348
  ) -> None:
3327
3349
  """List emails transactional aliases."""
3328
3350
 
@@ -3343,7 +3365,7 @@ def gen_services_emails_transactional_keys_create(
3343
3365
  name: str | None = typer.Option(None),
3344
3366
  key: str | None = typer.Option(None),
3345
3367
  active: bool | None = typer.Option(None),
3346
- output: OutputFormat | None = _OUTPUT_OPT,
3368
+ output: bool | None = _OUTPUT_OPT,
3347
3369
  ) -> None:
3348
3370
  """Create emails transactional keys."""
3349
3371
 
@@ -3363,7 +3385,7 @@ def gen_services_emails_transactional_keys_delete(
3363
3385
  service_id: int = typer.Argument(..., metavar="SERVICE_ID"),
3364
3386
  key_id: int = typer.Argument(..., metavar="KEY_ID"),
3365
3387
  yes: bool = _YES_OPT,
3366
- output: OutputFormat | None = _OUTPUT_OPT,
3388
+ output: bool | None = _OUTPUT_OPT,
3367
3389
  ) -> None:
3368
3390
  """Delete emails transactional keys."""
3369
3391
 
@@ -3383,7 +3405,7 @@ def gen_services_emails_transactional_keys_index(
3383
3405
  ctx: typer.Context,
3384
3406
  service_id: int = typer.Argument(..., metavar="SERVICE_ID"),
3385
3407
  sort: str | None = _SORT_OPT,
3386
- output: OutputFormat | None = _OUTPUT_OPT,
3408
+ output: bool | None = _OUTPUT_OPT,
3387
3409
  ) -> None:
3388
3410
  """List emails transactional keys."""
3389
3411
 
@@ -3402,7 +3424,7 @@ def gen_services_emails_transactional_keys_show(
3402
3424
  ctx: typer.Context,
3403
3425
  service_id: int = typer.Argument(..., metavar="SERVICE_ID"),
3404
3426
  key_id: int = typer.Argument(..., metavar="KEY_ID"),
3405
- output: OutputFormat | None = _OUTPUT_OPT,
3427
+ output: bool | None = _OUTPUT_OPT,
3406
3428
  ) -> None:
3407
3429
  """Show emails transactional keys details."""
3408
3430
 
@@ -3423,7 +3445,7 @@ def gen_services_emails_transactional_keys_update(
3423
3445
  name: str | None = typer.Option(None),
3424
3446
  key: str | None = typer.Option(None),
3425
3447
  active: bool | None = typer.Option(None),
3426
- output: OutputFormat | None = _OUTPUT_OPT,
3448
+ output: bool | None = _OUTPUT_OPT,
3427
3449
  ) -> None:
3428
3450
  """Update emails transactional keys."""
3429
3451
 
@@ -3444,7 +3466,7 @@ def gen_services_emails_transactional_users_create(
3444
3466
  emailaddress: str | None = typer.Option(None),
3445
3467
  password: str | None = typer.Option(None),
3446
3468
  delivery_mode: str | None = typer.Option(None),
3447
- output: OutputFormat | None = _OUTPUT_OPT,
3469
+ output: bool | None = _OUTPUT_OPT,
3448
3470
  ) -> None:
3449
3471
  """Create emails transactional users."""
3450
3472
 
@@ -3468,7 +3490,7 @@ def gen_services_emails_transactional_users_delete(
3468
3490
  service_id: int = typer.Argument(..., metavar="SERVICE_ID"),
3469
3491
  user_id: int = typer.Argument(..., metavar="USER_ID"),
3470
3492
  yes: bool = _YES_OPT,
3471
- output: OutputFormat | None = _OUTPUT_OPT,
3493
+ output: bool | None = _OUTPUT_OPT,
3472
3494
  ) -> None:
3473
3495
  """Delete emails transactional users."""
3474
3496
 
@@ -3488,7 +3510,7 @@ def gen_services_emails_transactional_users_index(
3488
3510
  ctx: typer.Context,
3489
3511
  service_id: int = typer.Argument(..., metavar="SERVICE_ID"),
3490
3512
  sort: str | None = _SORT_OPT,
3491
- output: OutputFormat | None = _OUTPUT_OPT,
3513
+ output: bool | None = _OUTPUT_OPT,
3492
3514
  ) -> None:
3493
3515
  """List emails transactional users."""
3494
3516
 
@@ -3507,7 +3529,7 @@ def gen_services_emails_transactional_users_show(
3507
3529
  ctx: typer.Context,
3508
3530
  service_id: int = typer.Argument(..., metavar="SERVICE_ID"),
3509
3531
  user_id: int = typer.Argument(..., metavar="USER_ID"),
3510
- output: OutputFormat | None = _OUTPUT_OPT,
3532
+ output: bool | None = _OUTPUT_OPT,
3511
3533
  ) -> None:
3512
3534
  """Show emails transactional users details."""
3513
3535
 
@@ -3527,7 +3549,7 @@ def gen_services_emails_transactional_users_update(
3527
3549
  user_id: int = typer.Argument(..., metavar="USER_ID"),
3528
3550
  password: str | None = typer.Option(None),
3529
3551
  delivery_mode: str | None = typer.Option(None),
3530
- output: OutputFormat | None = _OUTPUT_OPT,
3552
+ output: bool | None = _OUTPUT_OPT,
3531
3553
  ) -> None:
3532
3554
  """Update emails transactional users."""
3533
3555
 
@@ -3545,7 +3567,7 @@ def gen_services_emails_transactional_users_update(
3545
3567
  def gen_services_forwards_index(
3546
3568
  ctx: typer.Context,
3547
3569
  sort: str | None = _SORT_OPT,
3548
- output: OutputFormat | None = _OUTPUT_OPT,
3570
+ output: bool | None = _OUTPUT_OPT,
3549
3571
  ) -> None:
3550
3572
  """List forwards."""
3551
3573
 
@@ -3563,7 +3585,7 @@ def gen_services_forwards_index(
3563
3585
  def gen_services_forwards_show(
3564
3586
  ctx: typer.Context,
3565
3587
  service_id: int = typer.Argument(..., metavar="SERVICE_ID"),
3566
- output: OutputFormat | None = _OUTPUT_OPT,
3588
+ output: bool | None = _OUTPUT_OPT,
3567
3589
  ) -> None:
3568
3590
  """Show forwards details."""
3569
3591
 
@@ -3581,7 +3603,7 @@ def gen_services_proxies_down(
3581
3603
  ctx: typer.Context,
3582
3604
  service_id: int = typer.Argument(..., metavar="SERVICE_ID"),
3583
3605
  yes: bool = _YES_OPT,
3584
- output: OutputFormat | None = _OUTPUT_OPT,
3606
+ output: bool | None = _OUTPUT_OPT,
3585
3607
  ) -> None:
3586
3608
  """Bring a proxy down."""
3587
3609
 
@@ -3600,7 +3622,7 @@ def gen_services_proxies_down(
3600
3622
  def gen_services_proxies_index(
3601
3623
  ctx: typer.Context,
3602
3624
  sort: str | None = _SORT_OPT,
3603
- output: OutputFormat | None = _OUTPUT_OPT,
3625
+ output: bool | None = _OUTPUT_OPT,
3604
3626
  ) -> None:
3605
3627
  """List proxies."""
3606
3628
 
@@ -3618,7 +3640,7 @@ def gen_services_proxies_index(
3618
3640
  def gen_services_proxies_show(
3619
3641
  ctx: typer.Context,
3620
3642
  service_id: int = typer.Argument(..., metavar="SERVICE_ID"),
3621
- output: OutputFormat | None = _OUTPUT_OPT,
3643
+ output: bool | None = _OUTPUT_OPT,
3622
3644
  ) -> None:
3623
3645
  """Show proxies details."""
3624
3646
 
@@ -3636,7 +3658,7 @@ def gen_services_proxies_up(
3636
3658
  ctx: typer.Context,
3637
3659
  service_id: int = typer.Argument(..., metavar="SERVICE_ID"),
3638
3660
  yes: bool = _YES_OPT,
3639
- output: OutputFormat | None = _OUTPUT_OPT,
3661
+ output: bool | None = _OUTPUT_OPT,
3640
3662
  ) -> None:
3641
3663
  """Bring a proxy up."""
3642
3664
 
@@ -3655,7 +3677,7 @@ def gen_services_proxies_up(
3655
3677
  def gen_services_searches_index(
3656
3678
  ctx: typer.Context,
3657
3679
  sort: str | None = _SORT_OPT,
3658
- output: OutputFormat | None = _OUTPUT_OPT,
3680
+ output: bool | None = _OUTPUT_OPT,
3659
3681
  ) -> None:
3660
3682
  """List searches."""
3661
3683
 
@@ -3673,7 +3695,7 @@ def gen_services_searches_index(
3673
3695
  def gen_services_searches_show(
3674
3696
  ctx: typer.Context,
3675
3697
  service_id: int = typer.Argument(..., metavar="SERVICE_ID"),
3676
- output: OutputFormat | None = _OUTPUT_OPT,
3698
+ output: bool | None = _OUTPUT_OPT,
3677
3699
  ) -> None:
3678
3700
  """Show searches details."""
3679
3701
 
@@ -3690,7 +3712,7 @@ def gen_services_searches_show(
3690
3712
  def gen_services_servers_index(
3691
3713
  ctx: typer.Context,
3692
3714
  sort: str | None = _SORT_OPT,
3693
- output: OutputFormat | None = _OUTPUT_OPT,
3715
+ output: bool | None = _OUTPUT_OPT,
3694
3716
  ) -> None:
3695
3717
  """List servers."""
3696
3718
 
@@ -3708,7 +3730,7 @@ def gen_services_servers_index(
3708
3730
  def gen_services_servers_show(
3709
3731
  ctx: typer.Context,
3710
3732
  service_id: int = typer.Argument(..., metavar="SERVICE_ID"),
3711
- output: OutputFormat | None = _OUTPUT_OPT,
3733
+ output: bool | None = _OUTPUT_OPT,
3712
3734
  ) -> None:
3713
3735
  """Show servers details."""
3714
3736
 
@@ -3727,7 +3749,7 @@ def gen_services_servers_state(
3727
3749
  service_id: int = typer.Argument(..., metavar="SERVICE_ID"),
3728
3750
  state: str = typer.Argument(..., metavar="STATE"),
3729
3751
  yes: bool = _YES_OPT,
3730
- output: OutputFormat | None = _OUTPUT_OPT,
3752
+ output: bool | None = _OUTPUT_OPT,
3731
3753
  ) -> None:
3732
3754
  """Change the state of a server."""
3733
3755
 
@@ -3746,7 +3768,7 @@ def gen_services_servers_state(
3746
3768
  def gen_services_sites_index(
3747
3769
  ctx: typer.Context,
3748
3770
  sort: str | None = _SORT_OPT,
3749
- output: OutputFormat | None = _OUTPUT_OPT,
3771
+ output: bool | None = _OUTPUT_OPT,
3750
3772
  ) -> None:
3751
3773
  """List sites."""
3752
3774
 
@@ -3764,7 +3786,7 @@ def gen_services_sites_index(
3764
3786
  def gen_services_sites_show(
3765
3787
  ctx: typer.Context,
3766
3788
  service_id: int = typer.Argument(..., metavar="SERVICE_ID"),
3767
- output: OutputFormat | None = _OUTPUT_OPT,
3789
+ output: bool | None = _OUTPUT_OPT,
3768
3790
  ) -> None:
3769
3791
  """Show sites details."""
3770
3792
 
@@ -3781,7 +3803,7 @@ def gen_services_sites_show(
3781
3803
  def gen_services_spams_clusters_index(
3782
3804
  ctx: typer.Context,
3783
3805
  sort: str | None = _SORT_OPT,
3784
- output: OutputFormat | None = _OUTPUT_OPT,
3806
+ output: bool | None = _OUTPUT_OPT,
3785
3807
  ) -> None:
3786
3808
  """List spams clusters."""
3787
3809
 
@@ -3799,7 +3821,7 @@ def gen_services_spams_clusters_index(
3799
3821
  def gen_services_spams_clusters_show(
3800
3822
  ctx: typer.Context,
3801
3823
  cluster_id: int = typer.Argument(..., metavar="CLUSTER_ID"),
3802
- output: OutputFormat | None = _OUTPUT_OPT,
3824
+ output: bool | None = _OUTPUT_OPT,
3803
3825
  ) -> None:
3804
3826
  """Show spams clusters details."""
3805
3827
 
@@ -3817,7 +3839,7 @@ def gen_services_spams_domain_create(
3817
3839
  ctx: typer.Context,
3818
3840
  service_id: int = typer.Argument(..., metavar="SERVICE_ID"),
3819
3841
  domain: str | None = typer.Option(None),
3820
- output: OutputFormat | None = _OUTPUT_OPT,
3842
+ output: bool | None = _OUTPUT_OPT,
3821
3843
  ) -> None:
3822
3844
  """Create spams domain."""
3823
3845
 
@@ -3837,7 +3859,7 @@ def gen_services_spams_domain_delete(
3837
3859
  service_id: int = typer.Argument(..., metavar="SERVICE_ID"),
3838
3860
  domain: str = typer.Argument(..., metavar="DOMAIN"),
3839
3861
  yes: bool = _YES_OPT,
3840
- output: OutputFormat | None = _OUTPUT_OPT,
3862
+ output: bool | None = _OUTPUT_OPT,
3841
3863
  ) -> None:
3842
3864
  """Delete spams domain."""
3843
3865
 
@@ -3858,7 +3880,7 @@ def gen_services_spams_domain_dkim_disable(
3858
3880
  service_id: int = typer.Argument(..., metavar="SERVICE_ID"),
3859
3881
  domain: str = typer.Argument(..., metavar="DOMAIN"),
3860
3882
  yes: bool = _YES_OPT,
3861
- output: OutputFormat | None = _OUTPUT_OPT,
3883
+ output: bool | None = _OUTPUT_OPT,
3862
3884
  ) -> None:
3863
3885
  """Disable DKIM for a spam filter domain."""
3864
3886
 
@@ -3879,7 +3901,7 @@ def gen_services_spams_domain_dkim_enable(
3879
3901
  service_id: int = typer.Argument(..., metavar="SERVICE_ID"),
3880
3902
  domain: str = typer.Argument(..., metavar="DOMAIN"),
3881
3903
  yes: bool = _YES_OPT,
3882
- output: OutputFormat | None = _OUTPUT_OPT,
3904
+ output: bool | None = _OUTPUT_OPT,
3883
3905
  ) -> None:
3884
3906
  """Enable DKIM for a spam filter domain."""
3885
3907
 
@@ -3899,7 +3921,7 @@ def gen_services_spams_domain_index(
3899
3921
  ctx: typer.Context,
3900
3922
  service_id: int = typer.Argument(..., metavar="SERVICE_ID"),
3901
3923
  sort: str | None = _SORT_OPT,
3902
- output: OutputFormat | None = _OUTPUT_OPT,
3924
+ output: bool | None = _OUTPUT_OPT,
3903
3925
  ) -> None:
3904
3926
  """List spams domain."""
3905
3927
 
@@ -3918,7 +3940,7 @@ def gen_services_spams_domain_show(
3918
3940
  ctx: typer.Context,
3919
3941
  service_id: int = typer.Argument(..., metavar="SERVICE_ID"),
3920
3942
  domain: str = typer.Argument(..., metavar="DOMAIN"),
3921
- output: OutputFormat | None = _OUTPUT_OPT,
3943
+ output: bool | None = _OUTPUT_OPT,
3922
3944
  ) -> None:
3923
3945
  """Show spams domain details."""
3924
3946
 
@@ -3935,7 +3957,7 @@ def gen_services_spams_domain_show(
3935
3957
  def gen_services_spams_index(
3936
3958
  ctx: typer.Context,
3937
3959
  sort: str | None = _SORT_OPT,
3938
- output: OutputFormat | None = _OUTPUT_OPT,
3960
+ output: bool | None = _OUTPUT_OPT,
3939
3961
  ) -> None:
3940
3962
  """List spams."""
3941
3963
 
@@ -3953,7 +3975,7 @@ def gen_services_spams_index(
3953
3975
  def gen_services_spams_show(
3954
3976
  ctx: typer.Context,
3955
3977
  service_id: int = typer.Argument(..., metavar="SERVICE_ID"),
3956
- output: OutputFormat | None = _OUTPUT_OPT,
3978
+ output: bool | None = _OUTPUT_OPT,
3957
3979
  ) -> None:
3958
3980
  """Show spams details."""
3959
3981
 
@@ -3973,7 +3995,7 @@ def gen_services_spams_transports_create(
3973
3995
  domain: str | None = typer.Option(None),
3974
3996
  host: str | None = typer.Option(None),
3975
3997
  port: int | None = typer.Option(None),
3976
- output: OutputFormat | None = _OUTPUT_OPT,
3998
+ output: bool | None = _OUTPUT_OPT,
3977
3999
  ) -> None:
3978
4000
  """Create spams transports."""
3979
4001
 
@@ -3993,7 +4015,7 @@ def gen_services_spams_transports_delete(
3993
4015
  service_id: int = typer.Argument(..., metavar="SERVICE_ID"),
3994
4016
  domain: str = typer.Argument(..., metavar="DOMAIN"),
3995
4017
  yes: bool = _YES_OPT,
3996
- output: OutputFormat | None = _OUTPUT_OPT,
4018
+ output: bool | None = _OUTPUT_OPT,
3997
4019
  ) -> None:
3998
4020
  """Delete spams transports."""
3999
4021
 
@@ -4013,7 +4035,7 @@ def gen_services_spams_transports_index(
4013
4035
  ctx: typer.Context,
4014
4036
  service_id: int = typer.Argument(..., metavar="SERVICE_ID"),
4015
4037
  sort: str | None = _SORT_OPT,
4016
- output: OutputFormat | None = _OUTPUT_OPT,
4038
+ output: bool | None = _OUTPUT_OPT,
4017
4039
  ) -> None:
4018
4040
  """List spams transports."""
4019
4041
 
@@ -4032,7 +4054,7 @@ def gen_services_spams_transports_show(
4032
4054
  ctx: typer.Context,
4033
4055
  service_id: int = typer.Argument(..., metavar="SERVICE_ID"),
4034
4056
  domain: str = typer.Argument(..., metavar="DOMAIN"),
4035
- output: OutputFormat | None = _OUTPUT_OPT,
4057
+ output: bool | None = _OUTPUT_OPT,
4036
4058
  ) -> None:
4037
4059
  """Show spams transports details."""
4038
4060
 
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "devnomads-cli"
3
- version = "0.5.4"
3
+ version = "0.5.5"
4
4
  description = "Manage your DevNomads services from the command line"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.10"
@@ -386,7 +386,7 @@ def test_cert_list_shows_issued(configured, isolated_config):
386
386
  import json
387
387
 
388
388
  _write_cert(dncli.config_dir() / "certs" / "example.com", days=45)
389
- result = runner.invoke(app, ["cert", "list", "-o", "json"])
389
+ result = runner.invoke(app, ["cert", "list", "--json"])
390
390
  assert result.exit_code == 0, result.output
391
391
  rows = json.loads(result.output)
392
392
  assert rows[0]["domain"] == "example.com"
@@ -45,7 +45,7 @@ def test_services_list_emits_json_and_bearer_header(configured):
45
45
  }
46
46
  ]
47
47
  route = respx.get(f"{API}/services").mock(return_value=Response(200, json=services))
48
- result = runner.invoke(app, ["--output", "json", "services", "list"])
48
+ result = runner.invoke(app, ["--json", "services", "list"])
49
49
  assert result.exit_code == 0
50
50
  assert json.loads(result.output) == services
51
51
  request = route.calls.last.request
@@ -57,11 +57,9 @@ def test_services_list_emits_json_and_bearer_header(configured):
57
57
  def test_trailing_output_option_beats_global(configured):
58
58
  services = [{"service_id": 1}]
59
59
  respx.get(f"{API}/services").mock(return_value=Response(200, json=services))
60
- # per-command --output works after the subcommand and wins over the
61
- # global one
62
- result = runner.invoke(
63
- app, ["--output", "table", "services", "list", "--output", "json"]
64
- )
60
+ # per-command --json works after the subcommand and wins over the
61
+ # global --table
62
+ result = runner.invoke(app, ["--table", "services", "list", "--json"])
65
63
  assert result.exit_code == 0
66
64
  assert json.loads(result.stdout) == services
67
65
 
@@ -72,7 +70,7 @@ def test_services_list_unwraps_laravel_envelope(configured):
72
70
  respx.get(f"{API}/services").mock(
73
71
  return_value=Response(200, json={"data": services})
74
72
  )
75
- result = runner.invoke(app, ["--output", "json", "services", "list"])
73
+ result = runner.invoke(app, ["--json", "services", "list"])
76
74
  assert result.exit_code == 0
77
75
  assert json.loads(result.output) == services
78
76
 
@@ -84,9 +82,7 @@ def test_services_list_sort_option(configured):
84
82
  {"service_id": 1, "entity": "geleijn.net"},
85
83
  ]
86
84
  respx.get(f"{API}/services").mock(return_value=Response(200, json=services))
87
- result = runner.invoke(
88
- app, ["--output", "json", "services", "list", "--sort", "entity"]
89
- )
85
+ result = runner.invoke(app, ["--json", "services", "list", "--sort", "entity"])
90
86
  assert result.exit_code == 0
91
87
  assert [s["entity"] for s in json.loads(result.output)] == [
92
88
  "geleijn.net",
@@ -116,7 +112,7 @@ def test_records_list_sort_descending(configured):
116
112
  )
117
113
  result = runner.invoke(
118
114
  app,
119
- ["--output", "json", "dns", "records", "list", "example.com", "--sort", "-ttl"],
115
+ ["--json", "dns", "records", "list", "example.com", "--sort", "-ttl"],
120
116
  )
121
117
  assert result.exit_code == 0
122
118
  assert [r["ttl"] for r in json.loads(result.output)] == [3600, 60]
@@ -137,7 +133,7 @@ def test_services_show(configured):
137
133
  respx.get(f"{API}/services/42").mock(
138
134
  return_value=Response(200, json={"service_id": 42, "type": "email"})
139
135
  )
140
- result = runner.invoke(app, ["--output", "json", "services", "show", "42"])
136
+ result = runner.invoke(app, ["--json", "services", "show", "42"])
141
137
  assert result.exit_code == 0
142
138
  assert json.loads(result.output)["service_id"] == 42
143
139
 
@@ -146,7 +142,7 @@ def test_services_show(configured):
146
142
  def test_zones_list(configured):
147
143
  zones = [{"id": "example.com.", "name": "example.com.", "kind": "Master"}]
148
144
  respx.get(f"{API}/services/dns/zones").mock(return_value=Response(200, json=zones))
149
- result = runner.invoke(app, ["--output", "json", "dns", "zones", "list"])
145
+ result = runner.invoke(app, ["--json", "dns", "zones", "list"])
150
146
  assert result.exit_code == 0
151
147
  assert json.loads(result.output) == zones
152
148
 
@@ -172,9 +168,7 @@ def test_zones_show_table_mode(configured):
172
168
  respx.get(f"{API}/services/dns/zones/example.com.").mock(
173
169
  return_value=Response(200, json=ZONE)
174
170
  )
175
- result = runner.invoke(
176
- app, ["--output", "table", "dns", "zones", "show", "example.com"]
177
- )
171
+ result = runner.invoke(app, ["--table", "dns", "zones", "show", "example.com"])
178
172
  assert result.exit_code == 0
179
173
  assert "www.example.com." in result.output
180
174
  assert "192.0.2.1" in result.output
@@ -187,9 +181,7 @@ def test_zones_show_accepts_trailing_dot_form_too(configured):
187
181
  )
188
182
  # both spellings resolve to the canonical PowerDNS zone id
189
183
  for zone_arg in ("example.com", "example.com."):
190
- result = runner.invoke(
191
- app, ["--output", "json", "dns", "zones", "show", zone_arg]
192
- )
184
+ result = runner.invoke(app, ["--json", "dns", "zones", "show", zone_arg])
193
185
  assert result.exit_code == 0, result.output
194
186
  assert route.call_count == 2
195
187
 
@@ -199,9 +191,7 @@ def test_records_list_flattens_rrsets(configured):
199
191
  respx.get(f"{API}/services/dns/zones/example.com.").mock(
200
192
  return_value=Response(200, json=ZONE)
201
193
  )
202
- result = runner.invoke(
203
- app, ["--output", "json", "dns", "records", "list", "example.com"]
204
- )
194
+ result = runner.invoke(app, ["--json", "dns", "records", "list", "example.com"])
205
195
  assert result.exit_code == 0
206
196
  rows = json.loads(result.output)
207
197
  assert rows == [
@@ -318,7 +308,7 @@ def test_retry_on_429_honors_retry_after(configured, monkeypatch):
318
308
  Response(429, headers={"Retry-After": "3"}),
319
309
  Response(200, json=[]),
320
310
  ]
321
- result = runner.invoke(app, ["--output", "json", "services", "list"])
311
+ result = runner.invoke(app, ["--json", "services", "list"])
322
312
  assert result.exit_code == 0
323
313
  assert route.call_count == 2
324
314
  assert sleeps == [3.0]
@@ -397,7 +387,7 @@ def test_configure_unknown_provider(isolated_config):
397
387
  def test_configure_list_masks_secrets(write_profile):
398
388
  write_profile(api_key="dn_abcdefghijklmnop")
399
389
  write_profile("transip:personal", login="loek", private_key_file="/x.pem")
400
- result = runner.invoke(app, ["--output", "json", "configure", "list"])
390
+ result = runner.invoke(app, ["--json", "configure", "list"])
401
391
  assert result.exit_code == 0
402
392
  rows = {row["profile"]: row for row in json.loads(result.output)}
403
393
  assert rows["default"]["type"] == "devnomads"
@@ -22,7 +22,7 @@ def configured(write_profile):
22
22
  def test_handles_list(configured):
23
23
  handles = [{"handle_id": 7, "firstname": "Loek"}]
24
24
  respx.get(f"{API}/handles").mock(return_value=Response(200, json={"data": handles}))
25
- result = runner.invoke(app, ["--output", "json", "handles", "list"])
25
+ result = runner.invoke(app, ["--json", "handles", "list"])
26
26
  assert result.exit_code == 0
27
27
  assert json.loads(result.output) == handles
28
28
 
@@ -35,8 +35,7 @@ def test_nested_path_params(configured):
35
35
  result = runner.invoke(
36
36
  app,
37
37
  [
38
- "--output",
39
- "json",
38
+ "--json",
40
39
  "containers",
41
40
  "instances",
42
41
  "volumes",
@@ -138,7 +137,7 @@ def test_table_mode_flattens_nested_detail_objects(configured):
138
137
  )
139
138
  result = runner.invoke(
140
139
  app,
141
- ["--output", "table", "proxies", "list"],
140
+ ["--table", "proxies", "list"],
142
141
  env={"COLUMNS": "200"}, # wide terminal so rich does not truncate
143
142
  )
144
143
  assert result.exit_code == 0
@@ -153,7 +152,7 @@ def test_json_mode_keeps_raw_nested_shape(configured):
153
152
  respx.get(f"{API}/services/proxies").mock(
154
153
  return_value=Response(200, json={"data": PROXIES})
155
154
  )
156
- result = runner.invoke(app, ["--output", "json", "proxies", "list"])
155
+ result = runner.invoke(app, ["--json", "proxies", "list"])
157
156
  assert result.exit_code == 0
158
157
  assert json.loads(result.output) == PROXIES
159
158
 
@@ -163,7 +162,7 @@ def test_trailing_output_option_on_generated_command(configured):
163
162
  respx.get(f"{API}/services/forwards/2493").mock(
164
163
  return_value=Response(200, json={"data": {"service_id": 2493}})
165
164
  )
166
- result = runner.invoke(app, ["forwards", "show", "2493", "--output", "json"])
165
+ result = runner.invoke(app, ["forwards", "show", "2493", "--json"])
167
166
  assert result.exit_code == 0, result.output
168
167
  assert json.loads(result.stdout)["service_id"] == 2493
169
168
 
@@ -172,7 +171,7 @@ def test_trailing_output_option_on_generated_command(configured):
172
171
  def test_unique_command_prefixes_resolve(configured):
173
172
  respx.get(f"{API}/services/emails").mock(return_value=Response(200, json=[]))
174
173
  # `dncli e l` -> `dncli emails list`
175
- result = runner.invoke(app, ["e", "l", "--output", "json"])
174
+ result = runner.invoke(app, ["e", "l", "--json"])
176
175
  assert result.exit_code == 0, result.output
177
176
  assert json.loads(result.stdout) == []
178
177
 
@@ -196,7 +195,7 @@ def test_exact_command_name_always_wins(configured):
196
195
  @respx.mock
197
196
  def test_plain_get_does_not_confirm(configured):
198
197
  respx.get(f"{API}/services/servers").mock(return_value=Response(200, json=[]))
199
- result = runner.invoke(app, ["--output", "json", "servers", "list"])
198
+ result = runner.invoke(app, ["--json", "servers", "list"])
200
199
  assert result.exit_code == 0
201
200
 
202
201
 
@@ -206,7 +205,7 @@ def test_generated_list_supports_sort(configured):
206
205
  respx.get(f"{API}/services/servers").mock(return_value=Response(200, json=servers))
207
206
  result = runner.invoke(
208
207
  app,
209
- ["--output", "json", "servers", "list", "--sort", "service_id"],
208
+ ["--json", "servers", "list", "--sort", "service_id"],
210
209
  )
211
210
  assert result.exit_code == 0
212
211
  assert [s["service_id"] for s in json.loads(result.output)] == [1, 2]
@@ -370,8 +370,7 @@ def test_transfer_dry_run_does_not_patch(transfer_setup):
370
370
  result = runner.invoke(
371
371
  app,
372
372
  [
373
- "--output",
374
- "json",
373
+ "--json",
375
374
  "dns",
376
375
  "transfer",
377
376
  "--from",
File without changes
File without changes