mammoth-cli 1.0.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.
- mammoth_cli-1.0.0/LICENSE +23 -0
- mammoth_cli-1.0.0/PKG-INFO +92 -0
- mammoth_cli-1.0.0/README.md +61 -0
- mammoth_cli-1.0.0/mammoth_cli/__init__.py +14 -0
- mammoth_cli-1.0.0/mammoth_cli/__main__.py +27 -0
- mammoth_cli-1.0.0/mammoth_cli/app.py +565 -0
- mammoth_cli-1.0.0/mammoth_cli/bundled_skill/mammoth-cli/SKILL.md +109 -0
- mammoth_cli-1.0.0/mammoth_cli/bundled_skill/mammoth-cli/references/auth.md +27 -0
- mammoth_cli-1.0.0/mammoth_cli/bundled_skill/mammoth-cli/references/input.md +24 -0
- mammoth_cli-1.0.0/mammoth_cli/bundled_skill/mammoth-cli/references/jobs-drafts.md +35 -0
- mammoth_cli-1.0.0/mammoth_cli/bundled_skill/mammoth-cli/references/machine-output.md +30 -0
- mammoth_cli-1.0.0/mammoth_cli/bundled_skill/mammoth-cli/references/recovery.md +28 -0
- mammoth_cli-1.0.0/mammoth_cli/bundled_skill/mammoth-cli/references/safety.md +26 -0
- mammoth_cli-1.0.0/mammoth_cli/commands/__init__.py +29 -0
- mammoth_cli-1.0.0/mammoth_cli/commands/activity.py +123 -0
- mammoth_cli-1.0.0/mammoth_cli/commands/addon.py +173 -0
- mammoth_cli-1.0.0/mammoth_cli/commands/agent.py +199 -0
- mammoth_cli-1.0.0/mammoth_cli/commands/ai.py +274 -0
- mammoth_cli-1.0.0/mammoth_cli/commands/annotation.py +166 -0
- mammoth_cli-1.0.0/mammoth_cli/commands/auth.py +567 -0
- mammoth_cli-1.0.0/mammoth_cli/commands/automation.py +245 -0
- mammoth_cli-1.0.0/mammoth_cli/commands/batch.py +204 -0
- mammoth_cli-1.0.0/mammoth_cli/commands/billing.py +462 -0
- mammoth_cli-1.0.0/mammoth_cli/commands/browse.py +151 -0
- mammoth_cli-1.0.0/mammoth_cli/commands/capability.py +43 -0
- mammoth_cli-1.0.0/mammoth_cli/commands/client_app.py +233 -0
- mammoth_cli-1.0.0/mammoth_cli/commands/completion.py +82 -0
- mammoth_cli-1.0.0/mammoth_cli/commands/config.py +309 -0
- mammoth_cli-1.0.0/mammoth_cli/commands/connector.py +464 -0
- mammoth_cli-1.0.0/mammoth_cli/commands/context.py +205 -0
- mammoth_cli-1.0.0/mammoth_cli/commands/dashboard.py +419 -0
- mammoth_cli-1.0.0/mammoth_cli/commands/data_app.py +239 -0
- mammoth_cli-1.0.0/mammoth_cli/commands/dataset.py +332 -0
- mammoth_cli-1.0.0/mammoth_cli/commands/doctor.py +90 -0
- mammoth_cli-1.0.0/mammoth_cli/commands/external_key.py +163 -0
- mammoth_cli-1.0.0/mammoth_cli/commands/file.py +243 -0
- mammoth_cli-1.0.0/mammoth_cli/commands/folder.py +224 -0
- mammoth_cli-1.0.0/mammoth_cli/commands/job.py +147 -0
- mammoth_cli-1.0.0/mammoth_cli/commands/notification.py +201 -0
- mammoth_cli-1.0.0/mammoth_cli/commands/parameter.py +284 -0
- mammoth_cli-1.0.0/mammoth_cli/commands/project.py +327 -0
- mammoth_cli-1.0.0/mammoth_cli/commands/registry.py +587 -0
- mammoth_cli-1.0.0/mammoth_cli/commands/report.py +61 -0
- mammoth_cli-1.0.0/mammoth_cli/commands/schedule.py +214 -0
- mammoth_cli-1.0.0/mammoth_cli/commands/schema.py +271 -0
- mammoth_cli-1.0.0/mammoth_cli/commands/skill.py +59 -0
- mammoth_cli-1.0.0/mammoth_cli/commands/snippet.py +200 -0
- mammoth_cli-1.0.0/mammoth_cli/commands/support.py +800 -0
- mammoth_cli-1.0.0/mammoth_cli/commands/template.py +134 -0
- mammoth_cli-1.0.0/mammoth_cli/commands/trash.py +115 -0
- mammoth_cli-1.0.0/mammoth_cli/commands/user.py +190 -0
- mammoth_cli-1.0.0/mammoth_cli/commands/view.py +1143 -0
- mammoth_cli-1.0.0/mammoth_cli/commands/view_ops.py +596 -0
- mammoth_cli-1.0.0/mammoth_cli/commands/webhook.py +235 -0
- mammoth_cli-1.0.0/mammoth_cli/commands/workflow.py +340 -0
- mammoth_cli-1.0.0/mammoth_cli/commands/workspace.py +359 -0
- mammoth_cli-1.0.0/mammoth_cli/context/__init__.py +1 -0
- mammoth_cli-1.0.0/mammoth_cli/context/credentials.py +223 -0
- mammoth_cli-1.0.0/mammoth_cli/context/endpoint.py +57 -0
- mammoth_cli-1.0.0/mammoth_cli/context/profiles.py +370 -0
- mammoth_cli-1.0.0/mammoth_cli/context/resolver.py +240 -0
- mammoth_cli-1.0.0/mammoth_cli/contracts/__init__.py +1 -0
- mammoth_cli-1.0.0/mammoth_cli/contracts/auth.py +32 -0
- mammoth_cli-1.0.0/mammoth_cli/errors/__init__.py +1 -0
- mammoth_cli-1.0.0/mammoth_cli/errors/envelope.py +144 -0
- mammoth_cli-1.0.0/mammoth_cli/manifest/__init__.py +1 -0
- mammoth_cli-1.0.0/mammoth_cli/manifest/loader.py +96 -0
- mammoth_cli-1.0.0/mammoth_cli/messages/__init__.py +1 -0
- mammoth_cli-1.0.0/mammoth_cli/output/__init__.py +1 -0
- mammoth_cli-1.0.0/mammoth_cli/output/envelope.py +42 -0
- mammoth_cli-1.0.0/mammoth_cli/output/normalize.py +84 -0
- mammoth_cli-1.0.0/mammoth_cli/output/policy.py +71 -0
- mammoth_cli-1.0.0/mammoth_cli/output/render.py +83 -0
- mammoth_cli-1.0.0/mammoth_cli/py.typed +0 -0
- mammoth_cli-1.0.0/mammoth_cli/runtime/__init__.py +0 -0
- mammoth_cli-1.0.0/mammoth_cli/runtime/confirm.py +124 -0
- mammoth_cli-1.0.0/mammoth_cli/runtime/executor.py +126 -0
- mammoth_cli-1.0.0/mammoth_cli/runtime/input_loader.py +140 -0
- mammoth_cli-1.0.0/mammoth_cli/runtime/invocation.py +87 -0
- mammoth_cli-1.0.0/mammoth_cli/runtime/options.py +172 -0
- mammoth_cli-1.0.0/mammoth_cli/runtime/session.py +82 -0
- mammoth_cli-1.0.0/mammoth_cli/runtime/strict.py +240 -0
- mammoth_cli-1.0.0/mammoth_cli/runtime/validate.py +120 -0
- mammoth_cli-1.0.0/mammoth_cli/services/__init__.py +1 -0
- mammoth_cli-1.0.0/mammoth_cli/services/argspec.py +301 -0
- mammoth_cli-1.0.0/mammoth_cli/services/coerce.py +172 -0
- mammoth_cli-1.0.0/mammoth_cli/services/conditions.py +85 -0
- mammoth_cli-1.0.0/mammoth_cli/services/dispatch.py +63 -0
- mammoth_cli-1.0.0/mammoth_cli/services/factory.py +45 -0
- mammoth_cli-1.0.0/mammoth_cli/services/input_fields.py +44 -0
- mammoth_cli-1.0.0/mammoth_cli/services/mapping.py +74 -0
- mammoth_cli-1.0.0/mammoth_cli/services/openapi_types.py +166 -0
- mammoth_cli-1.0.0/mammoth_cli/services/positionals.py +408 -0
- mammoth_cli-1.0.0/mammoth_cli/services/protocol.py +123 -0
- mammoth_cli-1.0.0/mammoth_cli/services/sdk_service.py +274 -0
- mammoth_cli-1.0.0/mammoth_cli/services/testing.py +153 -0
- mammoth_cli-1.0.0/mammoth_cli/services/type_system.py +427 -0
- mammoth_cli-1.0.0/mammoth_cli/skills/__init__.py +1 -0
- mammoth_cli-1.0.0/mammoth_cli/skills/installer.py +321 -0
- mammoth_cli-1.0.0/mammoth_cli/testing.py +55 -0
- mammoth_cli-1.0.0/pyproject.toml +92 -0
- mammoth_cli-1.0.0/spec/manifests/_sdk_introspection.json +1459 -0
- mammoth_cli-1.0.0/spec/manifests/commands/activity.yaml +72 -0
- mammoth_cli-1.0.0/spec/manifests/commands/addon.yaml +239 -0
- mammoth_cli-1.0.0/spec/manifests/commands/agent.yaml +192 -0
- mammoth_cli-1.0.0/spec/manifests/commands/ai.yaml +152 -0
- mammoth_cli-1.0.0/spec/manifests/commands/annotation.yaml +191 -0
- mammoth_cli-1.0.0/spec/manifests/commands/auth.yaml +101 -0
- mammoth_cli-1.0.0/spec/manifests/commands/automation.yaml +273 -0
- mammoth_cli-1.0.0/spec/manifests/commands/batch.yaml +262 -0
- mammoth_cli-1.0.0/spec/manifests/commands/billing.yaml +813 -0
- mammoth_cli-1.0.0/spec/manifests/commands/browse.yaml +145 -0
- mammoth_cli-1.0.0/spec/manifests/commands/capability.yaml +74 -0
- mammoth_cli-1.0.0/spec/manifests/commands/client-app.yaml +193 -0
- mammoth_cli-1.0.0/spec/manifests/commands/completion.yaml +68 -0
- mammoth_cli-1.0.0/spec/manifests/commands/config.yaml +134 -0
- mammoth_cli-1.0.0/spec/manifests/commands/connector.yaml +944 -0
- mammoth_cli-1.0.0/spec/manifests/commands/context.yaml +101 -0
- mammoth_cli-1.0.0/spec/manifests/commands/dashboard.yaml +3595 -0
- mammoth_cli-1.0.0/spec/manifests/commands/data-app.yaml +485 -0
- mammoth_cli-1.0.0/spec/manifests/commands/dataset.yaml +580 -0
- mammoth_cli-1.0.0/spec/manifests/commands/doctor.yaml +35 -0
- mammoth_cli-1.0.0/spec/manifests/commands/external-key.yaml +151 -0
- mammoth_cli-1.0.0/spec/manifests/commands/file.yaml +341 -0
- mammoth_cli-1.0.0/spec/manifests/commands/folder.yaml +334 -0
- mammoth_cli-1.0.0/spec/manifests/commands/job.yaml +151 -0
- mammoth_cli-1.0.0/spec/manifests/commands/notification.yaml +188 -0
- mammoth_cli-1.0.0/spec/manifests/commands/parameter.yaml +527 -0
- mammoth_cli-1.0.0/spec/manifests/commands/project.yaml +669 -0
- mammoth_cli-1.0.0/spec/manifests/commands/report.yaml +36 -0
- mammoth_cli-1.0.0/spec/manifests/commands/schedule.yaml +194 -0
- mammoth_cli-1.0.0/spec/manifests/commands/schema.yaml +74 -0
- mammoth_cli-1.0.0/spec/manifests/commands/skill.yaml +167 -0
- mammoth_cli-1.0.0/spec/manifests/commands/snippet.yaml +311 -0
- mammoth_cli-1.0.0/spec/manifests/commands/support.yaml +1805 -0
- mammoth_cli-1.0.0/spec/manifests/commands/template.yaml +191 -0
- mammoth_cli-1.0.0/spec/manifests/commands/trash.yaml +105 -0
- mammoth_cli-1.0.0/spec/manifests/commands/user.yaml +280 -0
- mammoth_cli-1.0.0/spec/manifests/commands/version.yaml +35 -0
- mammoth_cli-1.0.0/spec/manifests/commands/view.yaml +4232 -0
- mammoth_cli-1.0.0/spec/manifests/commands/webhook.yaml +261 -0
- mammoth_cli-1.0.0/spec/manifests/commands/workflow.yaml +622 -0
- mammoth_cli-1.0.0/spec/manifests/commands/workspace.yaml +705 -0
- mammoth_cli-1.0.0/spec/manifests/openapi-operations.yaml +8853 -0
- mammoth_cli-1.0.0/spec/manifests/schema-v1.json +212 -0
- mammoth_cli-1.0.0/spec/manifests/sdk-catalog.source.yaml +4069 -0
- mammoth_cli-1.0.0/spec/manifests/sdk-methods.yaml +6971 -0
- mammoth_cli-1.0.0/spec/openapi/metadata.json +10 -0
- mammoth_cli-1.0.0/spec/openapi/openapi.json +1 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
Mammoth Analytics Proprietary License
|
|
2
|
+
|
|
3
|
+
Copyright (c) Mammoth Analytics, Inc. All rights reserved.
|
|
4
|
+
|
|
5
|
+
This software and its accompanying documentation ("the Software") are the
|
|
6
|
+
proprietary and confidential property of Mammoth Analytics, Inc. ("Mammoth").
|
|
7
|
+
The Software is licensed, not sold.
|
|
8
|
+
|
|
9
|
+
Subject to the terms of a separate written agreement with Mammoth, or the terms
|
|
10
|
+
under which the Software is distributed on the Python Package Index, you are
|
|
11
|
+
granted a non-exclusive, non-transferable right to install and use the Software
|
|
12
|
+
to interact with the Mammoth Analytics platform.
|
|
13
|
+
|
|
14
|
+
You may not copy, modify, merge, publish, distribute, sublicense, or sell copies
|
|
15
|
+
of the Software, or remove or alter any proprietary notices, except as expressly
|
|
16
|
+
permitted by Mammoth in writing.
|
|
17
|
+
|
|
18
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
19
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
20
|
+
FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT. IN NO EVENT SHALL MAMMOTH BE
|
|
21
|
+
LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER IN AN ACTION OF
|
|
22
|
+
CONTRACT, TORT, OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION WITH THE
|
|
23
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: mammoth-cli
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: Command-line interface for the Mammoth Analytics platform
|
|
5
|
+
License: Proprietary
|
|
6
|
+
License-File: LICENSE
|
|
7
|
+
Author: Mammoth Analytics
|
|
8
|
+
Author-email: support@mammoth.io
|
|
9
|
+
Requires-Python: >=3.12,<3.15
|
|
10
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
11
|
+
Classifier: Environment :: Console
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: License :: Other/Proprietary License
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
18
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
19
|
+
Requires-Dist: PyYAML (>=6,<7)
|
|
20
|
+
Requires-Dist: keyring (>=25.7,<26)
|
|
21
|
+
Requires-Dist: mammoth-io (>=0.6.0,<0.7)
|
|
22
|
+
Requires-Dist: platformdirs (>=4.10,<5)
|
|
23
|
+
Requires-Dist: pydantic (>=2.13,<3)
|
|
24
|
+
Requires-Dist: rich (>=15,<16)
|
|
25
|
+
Requires-Dist: tomlkit (>=0.15.1,<0.16)
|
|
26
|
+
Requires-Dist: typer (>=0.27,<0.28)
|
|
27
|
+
Project-URL: Homepage, https://mammoth.io
|
|
28
|
+
Project-URL: Repository, https://github.com/EdgeMetric/mm-pysdk
|
|
29
|
+
Description-Content-Type: text/markdown
|
|
30
|
+
|
|
31
|
+
# mammoth-cli
|
|
32
|
+
|
|
33
|
+
A typed command-line interface for the [Mammoth Analytics](https://mammoth.io)
|
|
34
|
+
platform. The executable is `mammoth`.
|
|
35
|
+
|
|
36
|
+
The CLI uses the public `mammoth-io` SDK for all Mammoth requests. It does not
|
|
37
|
+
build a second HTTP client and does not call private SDK members.
|
|
38
|
+
|
|
39
|
+
## Status
|
|
40
|
+
|
|
41
|
+
Stable. `mammoth-cli` 1.0.0 is a production release; the command surface and the
|
|
42
|
+
machine-output contract are covered by the compatibility policy below.
|
|
43
|
+
|
|
44
|
+
## Versioning & support
|
|
45
|
+
|
|
46
|
+
`mammoth-cli` follows [Semantic Versioning](https://semver.org) for the 1.x
|
|
47
|
+
series. Within the 1.x major line:
|
|
48
|
+
|
|
49
|
+
- The machine-output and error-envelope contract is stable. `SCHEMA_VERSION`
|
|
50
|
+
(see `mammoth_cli/__init__.py`) identifies that contract and does not change
|
|
51
|
+
incompatibly within a major version; new fields may be added, but existing
|
|
52
|
+
fields and their meanings are preserved.
|
|
53
|
+
- The CLI surface is stable: command names, subcommands, flags, and exit codes
|
|
54
|
+
are not removed or repurposed. New commands, flags, and output fields may be
|
|
55
|
+
added in minor releases.
|
|
56
|
+
- Bug fixes ship in patch releases; additive, backward-compatible changes ship
|
|
57
|
+
in minor releases.
|
|
58
|
+
|
|
59
|
+
Any breaking change to the machine-output contract or the CLI surface bumps the
|
|
60
|
+
major version (2.0.0).
|
|
61
|
+
|
|
62
|
+
## Layout
|
|
63
|
+
|
|
64
|
+
| Path | Purpose |
|
|
65
|
+
|---|---|
|
|
66
|
+
| `mammoth_cli/` | CLI package (`app`, `commands`, `contracts`, `services`, `context`, `output`, `errors`, `manifest`, `skills`, `messages`). |
|
|
67
|
+
| `spec/openapi/` | Pinned production OpenAPI snapshot and metadata. |
|
|
68
|
+
| `spec/manifests/` | Reviewed parity manifests: operations, SDK methods, commands, and the schema. |
|
|
69
|
+
| `spec/reports/` | Generated parity report and expected red-first baseline. |
|
|
70
|
+
| `scripts/` | Deterministic build scripts (offline, no login). |
|
|
71
|
+
| `tests/` | Contract, unit, subprocess, and guarded live tests. |
|
|
72
|
+
|
|
73
|
+
## Reproducing the manifests
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
python scripts/sync_openapi.py --check # verify the pinned snapshot digest
|
|
77
|
+
python scripts/build_manifests.py # regenerate the three manifests
|
|
78
|
+
python scripts/build_parity_report.py # regenerate spec/reports/parity.md
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Refreshing the pinned snapshot from the network is an explicit maintenance
|
|
82
|
+
operation (`python scripts/sync_openapi.py`); ordinary CI never fetches it.
|
|
83
|
+
|
|
84
|
+
## Development
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
pytest tests/ -q # unit + contract tests (live tests deselected)
|
|
88
|
+
ruff check mammoth_cli scripts tests
|
|
89
|
+
black mammoth_cli scripts tests
|
|
90
|
+
mypy mammoth_cli
|
|
91
|
+
```
|
|
92
|
+
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# mammoth-cli
|
|
2
|
+
|
|
3
|
+
A typed command-line interface for the [Mammoth Analytics](https://mammoth.io)
|
|
4
|
+
platform. The executable is `mammoth`.
|
|
5
|
+
|
|
6
|
+
The CLI uses the public `mammoth-io` SDK for all Mammoth requests. It does not
|
|
7
|
+
build a second HTTP client and does not call private SDK members.
|
|
8
|
+
|
|
9
|
+
## Status
|
|
10
|
+
|
|
11
|
+
Stable. `mammoth-cli` 1.0.0 is a production release; the command surface and the
|
|
12
|
+
machine-output contract are covered by the compatibility policy below.
|
|
13
|
+
|
|
14
|
+
## Versioning & support
|
|
15
|
+
|
|
16
|
+
`mammoth-cli` follows [Semantic Versioning](https://semver.org) for the 1.x
|
|
17
|
+
series. Within the 1.x major line:
|
|
18
|
+
|
|
19
|
+
- The machine-output and error-envelope contract is stable. `SCHEMA_VERSION`
|
|
20
|
+
(see `mammoth_cli/__init__.py`) identifies that contract and does not change
|
|
21
|
+
incompatibly within a major version; new fields may be added, but existing
|
|
22
|
+
fields and their meanings are preserved.
|
|
23
|
+
- The CLI surface is stable: command names, subcommands, flags, and exit codes
|
|
24
|
+
are not removed or repurposed. New commands, flags, and output fields may be
|
|
25
|
+
added in minor releases.
|
|
26
|
+
- Bug fixes ship in patch releases; additive, backward-compatible changes ship
|
|
27
|
+
in minor releases.
|
|
28
|
+
|
|
29
|
+
Any breaking change to the machine-output contract or the CLI surface bumps the
|
|
30
|
+
major version (2.0.0).
|
|
31
|
+
|
|
32
|
+
## Layout
|
|
33
|
+
|
|
34
|
+
| Path | Purpose |
|
|
35
|
+
|---|---|
|
|
36
|
+
| `mammoth_cli/` | CLI package (`app`, `commands`, `contracts`, `services`, `context`, `output`, `errors`, `manifest`, `skills`, `messages`). |
|
|
37
|
+
| `spec/openapi/` | Pinned production OpenAPI snapshot and metadata. |
|
|
38
|
+
| `spec/manifests/` | Reviewed parity manifests: operations, SDK methods, commands, and the schema. |
|
|
39
|
+
| `spec/reports/` | Generated parity report and expected red-first baseline. |
|
|
40
|
+
| `scripts/` | Deterministic build scripts (offline, no login). |
|
|
41
|
+
| `tests/` | Contract, unit, subprocess, and guarded live tests. |
|
|
42
|
+
|
|
43
|
+
## Reproducing the manifests
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
python scripts/sync_openapi.py --check # verify the pinned snapshot digest
|
|
47
|
+
python scripts/build_manifests.py # regenerate the three manifests
|
|
48
|
+
python scripts/build_parity_report.py # regenerate spec/reports/parity.md
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Refreshing the pinned snapshot from the network is an explicit maintenance
|
|
52
|
+
operation (`python scripts/sync_openapi.py`); ordinary CI never fetches it.
|
|
53
|
+
|
|
54
|
+
## Development
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
pytest tests/ -q # unit + contract tests (live tests deselected)
|
|
58
|
+
ruff check mammoth_cli scripts tests
|
|
59
|
+
black mammoth_cli scripts tests
|
|
60
|
+
mypy mammoth_cli
|
|
61
|
+
```
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"""Mammoth CLI — a typed command-line interface for the Mammoth Analytics platform.
|
|
2
|
+
|
|
3
|
+
All Mammoth transport goes through the public ``mammoth-io`` SDK. The CLI does
|
|
4
|
+
not implement a second HTTP client and does not call private SDK members.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from __future__ import annotations
|
|
8
|
+
|
|
9
|
+
__version__ = "1.0.0"
|
|
10
|
+
|
|
11
|
+
# The versioned machine output envelope contract.
|
|
12
|
+
SCHEMA_VERSION = 1
|
|
13
|
+
|
|
14
|
+
__all__ = ["__version__", "SCHEMA_VERSION"]
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"""Module and console entry point for the Mammoth CLI.
|
|
2
|
+
|
|
3
|
+
This module exposes ``main`` so that both the ``mammoth`` console script and
|
|
4
|
+
``python -m mammoth_cli`` start the same Typer application. Keeping the entry
|
|
5
|
+
point here (rather than in ``app``) gives the package a stable, importable
|
|
6
|
+
launch symbol that does not change when the application wiring moves.
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
from __future__ import annotations
|
|
10
|
+
|
|
11
|
+
from typing import Any
|
|
12
|
+
|
|
13
|
+
from mammoth_cli.app import app
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def main() -> Any:
|
|
17
|
+
"""Run the Mammoth CLI application.
|
|
18
|
+
|
|
19
|
+
Returns:
|
|
20
|
+
The value returned by the Typer application, which the runtime uses as
|
|
21
|
+
the process exit code.
|
|
22
|
+
"""
|
|
23
|
+
return app()
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
if __name__ == "__main__": # pragma: no cover
|
|
27
|
+
main()
|