dirigent-cli 0.9.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.
Files changed (32) hide show
  1. dirigent_cli-0.9.0/LICENSE +18 -0
  2. dirigent_cli-0.9.0/PKG-INFO +24 -0
  3. dirigent_cli-0.9.0/README.md +3 -0
  4. dirigent_cli-0.9.0/pyproject.toml +45 -0
  5. dirigent_cli-0.9.0/pyproject.toml.orig +37 -0
  6. dirigent_cli-0.9.0/src/dirigent_cli/__init__.py +5 -0
  7. dirigent_cli-0.9.0/src/dirigent_cli/aliases.py +41 -0
  8. dirigent_cli-0.9.0/src/dirigent_cli/commands.py +2525 -0
  9. dirigent_cli-0.9.0/src/dirigent_cli/context.py +136 -0
  10. dirigent_cli-0.9.0/src/dirigent_cli/formatters.py +158 -0
  11. dirigent_cli-0.9.0/src/dirigent_cli/graph.py +109 -0
  12. dirigent_cli-0.9.0/src/dirigent_cli/health.py +294 -0
  13. dirigent_cli-0.9.0/src/dirigent_cli/local.py +790 -0
  14. dirigent_cli-0.9.0/src/dirigent_cli/main.py +1169 -0
  15. dirigent_cli-0.9.0/src/dirigent_cli/output.py +543 -0
  16. dirigent_cli-0.9.0/src/dirigent_cli/params.py +389 -0
  17. dirigent_cli-0.9.0/src/dirigent_cli/profiles.py +221 -0
  18. dirigent_cli-0.9.0/src/dirigent_cli/project.py +643 -0
  19. dirigent_cli-0.9.0/src/dirigent_cli/py.typed +0 -0
  20. dirigent_cli-0.9.0/src/dirigent_cli/reaper.py +115 -0
  21. dirigent_cli-0.9.0/src/dirigent_cli/scaffold.py +63 -0
  22. dirigent_cli-0.9.0/src/dirigent_cli/schemas.py +85 -0
  23. dirigent_cli-0.9.0/src/dirigent_cli/sources.py +76 -0
  24. dirigent_cli-0.9.0/src/dirigent_cli/stream.py +180 -0
  25. dirigent_cli-0.9.0/src/dirigent_cli/summaries.py +420 -0
  26. dirigent_cli-0.9.0/src/dirigent_cli/templates/pack/README.md.tmpl +23 -0
  27. dirigent_cli-0.9.0/src/dirigent_cli/templates/pack/__init__.py.tmpl +24 -0
  28. dirigent_cli-0.9.0/src/dirigent_cli/templates/pack/operator.py.tmpl +34 -0
  29. dirigent_cli-0.9.0/src/dirigent_cli/templates/pack/pyproject.toml.tmpl +21 -0
  30. dirigent_cli-0.9.0/src/dirigent_cli/templates/pack/test_plugin.py.tmpl +21 -0
  31. dirigent_cli-0.9.0/src/dirigent_cli/timing.py +322 -0
  32. dirigent_cli-0.9.0/src/dirigent_cli/triggers.py +631 -0
@@ -0,0 +1,18 @@
1
+ Copyright (c) 2026 Morten Olav Hansen <morten@winterop.com>. All rights reserved.
2
+
3
+ This source code and accompanying documentation are the property of
4
+ Morten Olav Hansen. No license, express or implied, is granted to use, copy,
5
+ modify, merge, publish, distribute, sublicense, or sell copies of this
6
+ software or its derivatives.
7
+
8
+ The source is published for reference only. Any use beyond reading
9
+ requires written permission from the copyright holder.
10
+
11
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
12
+ OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
13
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT.
14
+ IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES,
15
+ OR OTHER LIABILITY ARISING FROM THE USE OF THE SOFTWARE.
16
+
17
+ Third-party components redistributed with this software, and the licences they
18
+ carry, are listed in THIRD_PARTY_NOTICES.md.
@@ -0,0 +1,24 @@
1
+ Metadata-Version: 2.4
2
+ Name: dirigent-cli
3
+ Version: 0.9.0
4
+ Summary: The dirigent command line interface (dirigent / dg).
5
+ License-Expression: LicenseRef-Proprietary
6
+ License-File: LICENSE
7
+ Requires-Dist: dirigent-blocks
8
+ Requires-Dist: dirigent-client
9
+ Requires-Dist: dirigent-common
10
+ Requires-Dist: dirigent-core
11
+ Requires-Dist: dirigent-plugin
12
+ Requires-Dist: dirigent-server
13
+ Requires-Dist: httpx2>=2.12.0
14
+ Requires-Dist: pyyaml>=6.0.3
15
+ Requires-Dist: rich>=15.0.0
16
+ Requires-Dist: tomli-w>=1.2.0
17
+ Requires-Dist: typer>=0.27.2
18
+ Requires-Dist: uvicorn>=0.52.4
19
+ Requires-Python: >=3.13
20
+ Description-Content-Type: text/markdown
21
+
22
+ # dirigent-cli
23
+
24
+ The dirigent command line interface (dirigent / dg).
@@ -0,0 +1,3 @@
1
+ # dirigent-cli
2
+
3
+ The dirigent command line interface (dirigent / dg).
@@ -0,0 +1,45 @@
1
+ [project]
2
+ name = "dirigent-cli"
3
+ version = "0.9.0"
4
+ description = "The dirigent command line interface (dirigent / dg)."
5
+ readme = "README.md"
6
+ requires-python = ">=3.13"
7
+ license = "LicenseRef-Proprietary"
8
+ license-files = ["LICENSE"]
9
+ dependencies = [
10
+ "dirigent-blocks",
11
+ "dirigent-client",
12
+ "dirigent-common",
13
+ "dirigent-core",
14
+ "dirigent-plugin",
15
+ "dirigent-server",
16
+ "httpx2>=2.12.0",
17
+ "pyyaml>=6.0.3",
18
+ "rich>=15.0.0",
19
+ "tomli-w>=1.2.0",
20
+ "typer>=0.27.2",
21
+ "uvicorn>=0.52.4",
22
+ ]
23
+
24
+ [project.scripts]
25
+ dirigent = "dirigent_cli.main:run"
26
+ dg = "dirigent_cli.main:run"
27
+
28
+ [build-system]
29
+ requires = ["uv_build>=0.12.0,<0.13.0"]
30
+ build-backend = "uv_build"
31
+
32
+ [tool.uv.sources.dirigent-blocks]
33
+ workspace = true
34
+
35
+ [tool.uv.sources.dirigent-client]
36
+ workspace = true
37
+
38
+ [tool.uv.sources.dirigent-core]
39
+ workspace = true
40
+
41
+ [tool.uv.sources.dirigent-plugin]
42
+ workspace = true
43
+
44
+ [tool.uv.sources.dirigent-server]
45
+ workspace = true
@@ -0,0 +1,37 @@
1
+ [project]
2
+ name = "dirigent-cli"
3
+ version = "0.9.0"
4
+ description = "The dirigent command line interface (dirigent / dg)."
5
+ readme = "README.md"
6
+ requires-python = ">=3.13"
7
+ license = "LicenseRef-Proprietary"
8
+ license-files = ["LICENSE"]
9
+ dependencies = [
10
+ "dirigent-blocks",
11
+ "dirigent-client",
12
+ "dirigent-common",
13
+ "dirigent-core",
14
+ "dirigent-plugin",
15
+ "dirigent-server",
16
+ "httpx2>=2.12.0",
17
+ "pyyaml>=6.0.3",
18
+ "rich>=15.0.0",
19
+ "tomli-w>=1.2.0",
20
+ "typer>=0.27.2",
21
+ "uvicorn>=0.52.4",
22
+ ]
23
+
24
+ [project.scripts]
25
+ dirigent = "dirigent_cli.main:run"
26
+ dg = "dirigent_cli.main:run"
27
+
28
+ [build-system]
29
+ requires = ["uv_build>=0.12.0,<0.13.0"]
30
+ build-backend = "uv_build"
31
+
32
+ [tool.uv.sources]
33
+ dirigent-blocks = { workspace = true }
34
+ dirigent-client = { workspace = true }
35
+ dirigent-core = { workspace = true }
36
+ dirigent-plugin = { workspace = true }
37
+ dirigent-server = { workspace = true }
@@ -0,0 +1,5 @@
1
+ """The dirigent command line interface, installed as `dirigent` and `dg`."""
2
+
3
+ from dirigent_cli.main import app, run
4
+
5
+ __all__ = ["app", "run"]
@@ -0,0 +1,41 @@
1
+ """Hidden aliases: ``ls`` for every ``list`` in the tree, and one for a single command."""
2
+
3
+ from typing import Final
4
+
5
+ import typer
6
+
7
+ LIST_COMMAND: Final = "list"
8
+ LIST_ALIAS: Final = "ls"
9
+
10
+
11
+ def add_list_aliases(app: typer.Typer, *, alias: str = LIST_ALIAS) -> list[str]:
12
+ """Register a hidden ``ls`` beside every ``list`` in an app and its groups.
13
+
14
+ Call after the whole tree is assembled; commands registered later are not walked.
15
+ """
16
+ aliased: list[str] = []
17
+ for group in app.registered_groups:
18
+ inner = group.typer_instance
19
+ if inner is not None:
20
+ aliased.extend(
21
+ f"{group.name or inner.info.name or '?'} {name}" for name in add_list_aliases(inner, alias=alias)
22
+ )
23
+ if any(command.name == alias for command in app.registered_commands):
24
+ return aliased
25
+ for command in list(app.registered_commands):
26
+ if command.name != LIST_COMMAND or command.callback is None:
27
+ continue
28
+ app.command(alias, hidden=True, help=command.help)(command.callback)
29
+ aliased.append(alias)
30
+ return aliased
31
+
32
+
33
+ def add_alias(app: typer.Typer, name: str, alias: str, *, hidden: bool = True) -> None:
34
+ """Register a second name for one command, so muscle memory from another tool still lands."""
35
+ for command in list(app.registered_commands):
36
+ # A command registered without a name is named after its function, as typer does it.
37
+ called = command.callback
38
+ if called is not None and name in (command.name, called.__name__):
39
+ app.command(alias, hidden=hidden, help=command.help)(called)
40
+ return
41
+ raise LookupError(f"no command named {name!r} to alias")