solti-cli 0.1.4__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,3 @@
1
+ node_modules/
2
+ dist/
3
+ solti_cli/vendor/
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Solti
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,92 @@
1
+ Metadata-Version: 2.5
2
+ Name: solti-cli
3
+ Version: 0.1.4
4
+ Summary: Solti Platform CLI — schedule and run asynchronous workloads without managing infrastructure.
5
+ Project-URL: Homepage, https://solti.run
6
+ Project-URL: Documentation, https://docs.solti.run
7
+ Author-email: Solti <support@solti.run>
8
+ License-Expression: MIT
9
+ License-File: LICENSE
10
+ Classifier: Environment :: Console
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: Operating System :: OS Independent
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Topic :: Software Development
15
+ Requires-Python: >=3.10
16
+ Description-Content-Type: text/markdown
17
+
18
+ # Solti CLI
19
+
20
+ Command-line interface for the [Solti Platform](https://solti.run) — schedule and run asynchronous workloads without managing infrastructure.
21
+
22
+ **Packages:** `@solti/cli` (npm) · `solti-cli` (PyPI) · **License:** MIT
23
+
24
+ ## Installation
25
+
26
+ ```bash
27
+ brew install trysolti/tap/solti
28
+ ```
29
+
30
+ Or via Node.js (>= 20) with npm / pnpm:
31
+
32
+ ```bash
33
+ npm install -g @solti/cli
34
+ # or: pnpm add -g @solti/cli
35
+ ```
36
+
37
+ Or via pip / uv (requires Node.js >= 20 on your PATH):
38
+
39
+ ```bash
40
+ pip install solti-cli
41
+ # or: uv add solti-cli
42
+ ```
43
+
44
+ ## Quickstart
45
+
46
+ ```bash
47
+ solti account login # opens your browser — sign in once
48
+ solti organization list
49
+ solti project list
50
+ solti profile set default --project-id <your-project-id>
51
+ solti job run --image alpine:latest -- echo "Hello from Solti!"
52
+ ```
53
+
54
+ Headless / CI usage (no login required):
55
+
56
+ ```bash
57
+ export SOLTI_API_KEY=<your-api-key>
58
+ export SOLTI_PROJECT_ID=<your-project-id>
59
+ solti job list
60
+ ```
61
+
62
+ ## Configuration
63
+
64
+ State is stored under `~/.solti/`:
65
+
66
+ ```
67
+ ~/.solti/
68
+ ├── active.json # active account + active profile
69
+ └── accounts/
70
+ └── <email>/
71
+ ├── auth.json # OAuth tokens (0600)
72
+ └── profiles/
73
+ └── <profile>/config.json
74
+ ```
75
+
76
+ ## Development
77
+
78
+ ```bash
79
+ pnpm install
80
+ pnpm build
81
+ node dist/index.js --help
82
+ ```
83
+
84
+ ### PyPI packaging (Change 069)
85
+
86
+ The `solti-cli` Python package vendors a self-contained Node bundle. To
87
+ rebuild it after a code change:
88
+
89
+ ```bash
90
+ pnpm build && pnpm bundle:python
91
+ uv build
92
+ ```
@@ -0,0 +1,75 @@
1
+ # Solti CLI
2
+
3
+ Command-line interface for the [Solti Platform](https://solti.run) — schedule and run asynchronous workloads without managing infrastructure.
4
+
5
+ **Packages:** `@solti/cli` (npm) · `solti-cli` (PyPI) · **License:** MIT
6
+
7
+ ## Installation
8
+
9
+ ```bash
10
+ brew install trysolti/tap/solti
11
+ ```
12
+
13
+ Or via Node.js (>= 20) with npm / pnpm:
14
+
15
+ ```bash
16
+ npm install -g @solti/cli
17
+ # or: pnpm add -g @solti/cli
18
+ ```
19
+
20
+ Or via pip / uv (requires Node.js >= 20 on your PATH):
21
+
22
+ ```bash
23
+ pip install solti-cli
24
+ # or: uv add solti-cli
25
+ ```
26
+
27
+ ## Quickstart
28
+
29
+ ```bash
30
+ solti account login # opens your browser — sign in once
31
+ solti organization list
32
+ solti project list
33
+ solti profile set default --project-id <your-project-id>
34
+ solti job run --image alpine:latest -- echo "Hello from Solti!"
35
+ ```
36
+
37
+ Headless / CI usage (no login required):
38
+
39
+ ```bash
40
+ export SOLTI_API_KEY=<your-api-key>
41
+ export SOLTI_PROJECT_ID=<your-project-id>
42
+ solti job list
43
+ ```
44
+
45
+ ## Configuration
46
+
47
+ State is stored under `~/.solti/`:
48
+
49
+ ```
50
+ ~/.solti/
51
+ ├── active.json # active account + active profile
52
+ └── accounts/
53
+ └── <email>/
54
+ ├── auth.json # OAuth tokens (0600)
55
+ └── profiles/
56
+ └── <profile>/config.json
57
+ ```
58
+
59
+ ## Development
60
+
61
+ ```bash
62
+ pnpm install
63
+ pnpm build
64
+ node dist/index.js --help
65
+ ```
66
+
67
+ ### PyPI packaging (Change 069)
68
+
69
+ The `solti-cli` Python package vendors a self-contained Node bundle. To
70
+ rebuild it after a code change:
71
+
72
+ ```bash
73
+ pnpm build && pnpm bundle:python
74
+ uv build
75
+ ```
@@ -0,0 +1,33 @@
1
+ {
2
+ "name": "@solti/cli",
3
+ "version": "0.1.4",
4
+ "description": "Solti Platform CLI — schedule and run asynchronous workloads without managing infrastructure.",
5
+ "type": "module",
6
+ "license": "MIT",
7
+ "files": [
8
+ "dist",
9
+ "README.md",
10
+ "LICENSE"
11
+ ],
12
+ "bin": {
13
+ "solti": "dist/index.js"
14
+ },
15
+ "engines": {
16
+ "node": ">=20"
17
+ },
18
+ "scripts": {
19
+ "build": "tsc",
20
+ "dev": "tsc --watch",
21
+ "test": "bun test",
22
+ "bundle:python": "esbuild dist/index.js --bundle --platform=node --format=cjs --target=node20 --outfile=solti_cli/vendor/cli.cjs"
23
+ },
24
+ "dependencies": {
25
+ "commander": "^14.0.2",
26
+ "yaml": "^2.9.1"
27
+ },
28
+ "devDependencies": {
29
+ "@types/node": "^24.10.1",
30
+ "esbuild": "^0.28.2",
31
+ "typescript": "^5.9.3"
32
+ }
33
+ }
@@ -0,0 +1,38 @@
1
+ [project]
2
+ name = "solti-cli"
3
+ version = "0.1.4"
4
+ description = "Solti Platform CLI — schedule and run asynchronous workloads without managing infrastructure."
5
+ readme = "README.md"
6
+ license = "MIT"
7
+ license-files = ["LICENSE"]
8
+ authors = [{ name = "Solti", email = "support@solti.run" }]
9
+ requires-python = ">=3.10"
10
+ classifiers = [
11
+ "Environment :: Console",
12
+ "Intended Audience :: Developers",
13
+ "Operating System :: OS Independent",
14
+ "Programming Language :: Python :: 3",
15
+ "Topic :: Software Development",
16
+ ]
17
+
18
+ [project.urls]
19
+ Homepage = "https://solti.run"
20
+ Documentation = "https://docs.solti.run"
21
+
22
+ [project.scripts]
23
+ solti = "solti_cli.cli:main"
24
+
25
+ [build-system]
26
+ requires = ["hatchling"]
27
+ build-backend = "hatchling.build"
28
+
29
+ [tool.hatch.build.targets.wheel]
30
+ packages = ["solti_cli"]
31
+ # vendor/ is gitignored (build artifact) but must ship in the package.
32
+ artifacts = ["solti_cli/vendor/*.cjs"]
33
+
34
+ [tool.hatch.build.targets.sdist]
35
+ # Keep solti_cli/ (incl. the vendored bundle) so the wheel can be rebuilt
36
+ # from the sdist; everything else is Node-side build material.
37
+ exclude = ["node_modules", "dist", "src", "tests", "tsconfig.json", "pnpm-lock.yaml"]
38
+ artifacts = ["solti_cli/vendor/*.cjs"]
@@ -0,0 +1,8 @@
1
+ """Solti CLI — Python distribution of the Solti Platform CLI.
2
+
3
+ This PyPI package is a thin wrapper: it runs the same JavaScript CLI that
4
+ `@solti/cli` (npm) ships, via the Node.js runtime already on your PATH.
5
+ Requires Node.js >= 20.
6
+ """
7
+
8
+ __version__ = "0.1.4"
@@ -0,0 +1,49 @@
1
+ """Entry point for the `solti` console script.
2
+
3
+ Runs the vendored Node.js CLI bundle with the Node runtime on PATH.
4
+ """
5
+
6
+ import shutil
7
+ import subprocess
8
+ import sys
9
+ from pathlib import Path
10
+
11
+ VENDOR_SCRIPT = Path(__file__).parent / "vendor" / "cli.cjs"
12
+ MIN_NODE_MAJOR = 20
13
+
14
+
15
+ def _node_major_version(node: str) -> int:
16
+ try:
17
+ output = subprocess.run(
18
+ [node, "--version"], capture_output=True, text=True, check=True
19
+ ).stdout.strip()
20
+ return int(output.lstrip("v").split(".", 1)[0])
21
+ except (subprocess.CalledProcessError, ValueError):
22
+ return 0
23
+
24
+
25
+ def main() -> int:
26
+ node = shutil.which("node")
27
+ if node is None:
28
+ print(
29
+ "solti (PyPI package) requires Node.js >= 20 on your PATH.\n"
30
+ "Install Node from https://nodejs.org, or use the Homebrew or npm\n"
31
+ "install of the Solti CLI instead:\n"
32
+ " brew install trysolti/tap/solti\n"
33
+ " npm install -g @solti/cli",
34
+ file=sys.stderr,
35
+ )
36
+ return 1
37
+ if _node_major_version(node) < MIN_NODE_MAJOR:
38
+ print(
39
+ f"solti requires Node.js >= {MIN_NODE_MAJOR} "
40
+ f"(found: {node} with an incompatible version).",
41
+ file=sys.stderr,
42
+ )
43
+ return 1
44
+ completed = subprocess.run([node, str(VENDOR_SCRIPT), *sys.argv[1:]])
45
+ return completed.returncode
46
+
47
+
48
+ if __name__ == "__main__":
49
+ sys.exit(main())