tovuk 0.1.48__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.
- tovuk-0.1.48/.gitignore +88 -0
- tovuk-0.1.48/PKG-INFO +96 -0
- tovuk-0.1.48/README.md +74 -0
- tovuk-0.1.48/pyproject.toml +35 -0
- tovuk-0.1.48/src/tovuk/__init__.py +4 -0
- tovuk-0.1.48/src/tovuk/__main__.py +4 -0
- tovuk-0.1.48/src/tovuk/cli.py +82 -0
tovuk-0.1.48/.gitignore
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
node_modules/
|
|
2
|
+
**/node_modules/
|
|
3
|
+
dist/
|
|
4
|
+
**/dist/
|
|
5
|
+
build/
|
|
6
|
+
**/build/
|
|
7
|
+
target/
|
|
8
|
+
**/target/
|
|
9
|
+
coverage/
|
|
10
|
+
htmlcov/
|
|
11
|
+
*.egg-info/
|
|
12
|
+
.eggs/
|
|
13
|
+
*.egg
|
|
14
|
+
*.whl
|
|
15
|
+
*.tar.gz
|
|
16
|
+
pip-wheel-metadata/
|
|
17
|
+
.pytest_cache/
|
|
18
|
+
**/.pytest_cache/
|
|
19
|
+
.ruff_cache/
|
|
20
|
+
**/.ruff_cache/
|
|
21
|
+
.mypy_cache/
|
|
22
|
+
**/.mypy_cache/
|
|
23
|
+
.tox/
|
|
24
|
+
.nox/
|
|
25
|
+
.venv/
|
|
26
|
+
.direnv/
|
|
27
|
+
.cache/
|
|
28
|
+
**/.cache/
|
|
29
|
+
.turbo/
|
|
30
|
+
**/.turbo/
|
|
31
|
+
.vite/
|
|
32
|
+
**/.vite/
|
|
33
|
+
.parcel-cache/
|
|
34
|
+
**/.parcel-cache/
|
|
35
|
+
.next/
|
|
36
|
+
**/.next/
|
|
37
|
+
.nuxt/
|
|
38
|
+
**/.nuxt/
|
|
39
|
+
.svelte-kit/
|
|
40
|
+
**/.svelte-kit/
|
|
41
|
+
.pnpm-store/
|
|
42
|
+
**/.pnpm-store/
|
|
43
|
+
playwright-report/
|
|
44
|
+
test-results/
|
|
45
|
+
.env
|
|
46
|
+
.env.*
|
|
47
|
+
!.env.example
|
|
48
|
+
.envrc
|
|
49
|
+
.npmrc
|
|
50
|
+
.pypirc
|
|
51
|
+
.cargo/credentials
|
|
52
|
+
.cargo/credentials.toml
|
|
53
|
+
.netrc
|
|
54
|
+
.DS_Store
|
|
55
|
+
**/.DS_Store
|
|
56
|
+
*.log
|
|
57
|
+
*.tgz
|
|
58
|
+
.tovuk/
|
|
59
|
+
.mintlify/
|
|
60
|
+
.agents/
|
|
61
|
+
.codex/
|
|
62
|
+
.claude/
|
|
63
|
+
.cursor/
|
|
64
|
+
.continue/
|
|
65
|
+
.roo/
|
|
66
|
+
.windsurf/
|
|
67
|
+
.aider*
|
|
68
|
+
.vscode/
|
|
69
|
+
.idea/
|
|
70
|
+
|
|
71
|
+
__pycache__/
|
|
72
|
+
**/__pycache__/
|
|
73
|
+
*.pyc
|
|
74
|
+
*.pyo
|
|
75
|
+
*.tsbuildinfo
|
|
76
|
+
|
|
77
|
+
[Aa][Gg][Ee][Nn][Tt][Ss].[Mm][Dd]
|
|
78
|
+
**/[Aa][Gg][Ee][Nn][Tt][Ss].[Mm][Dd]
|
|
79
|
+
[Aa][Gg][Ee][Nn][Tt][Ss].[Oo][Vv][Ee][Rr][Rr][Ii][Dd][Ee].[Mm][Dd]
|
|
80
|
+
**/[Aa][Gg][Ee][Nn][Tt][Ss].[Oo][Vv][Ee][Rr][Rr][Ii][Dd][Ee].[Mm][Dd]
|
|
81
|
+
CLAUDE.md
|
|
82
|
+
**/CLAUDE.md
|
|
83
|
+
GEMINI.md
|
|
84
|
+
**/GEMINI.md
|
|
85
|
+
PUBLISHING.md
|
|
86
|
+
npm-support-request.md
|
|
87
|
+
docs/README.md
|
|
88
|
+
sdks/
|
tovuk-0.1.48/PKG-INFO
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: tovuk
|
|
3
|
+
Version: 0.1.48
|
|
4
|
+
Summary: Deploy Rust backends, static frontends, and fullstack apps to Tovuk.
|
|
5
|
+
Project-URL: Homepage, https://tovuk.com
|
|
6
|
+
Project-URL: Repository, https://github.com/tovuk/tovuk
|
|
7
|
+
Project-URL: Issues, https://github.com/tovuk/tovuk/issues
|
|
8
|
+
Author: Tovuk
|
|
9
|
+
License-Expression: MIT
|
|
10
|
+
Keywords: backend,deploy,hosting,rust,tovuk
|
|
11
|
+
Classifier: Development Status :: 3 - Alpha
|
|
12
|
+
Classifier: Environment :: Console
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
19
|
+
Classifier: Topic :: Software Development :: Build Tools
|
|
20
|
+
Requires-Python: >=3.11
|
|
21
|
+
Description-Content-Type: text/markdown
|
|
22
|
+
|
|
23
|
+
# tovuk
|
|
24
|
+
|
|
25
|
+
Python CLI package for deploying Rust backends, static frontends, and fullstack
|
|
26
|
+
apps to Tovuk.
|
|
27
|
+
It delegates to the npm Tovuk CLI so PyPI stays aligned with the primary
|
|
28
|
+
agent command surface.
|
|
29
|
+
|
|
30
|
+
```sh
|
|
31
|
+
pipx install tovuk
|
|
32
|
+
tovuk init my-app --template fullstack-rust-tanstack
|
|
33
|
+
cd my-app/web && bun install && cd ..
|
|
34
|
+
tovuk doctor --json
|
|
35
|
+
tovuk preview
|
|
36
|
+
tovuk deploy --wait --json
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
From a fullstack repo root, `tovuk deploy` reads one root `tovuk.toml`, builds
|
|
40
|
+
the backend and frontend roots, and returns one app URL with `/api/*` routed to
|
|
41
|
+
the Rust backend.
|
|
42
|
+
|
|
43
|
+
Rust backend deploys require `cargo fmt --all --check`, locked `cargo check`,
|
|
44
|
+
and locked all-target, all-feature Clippy with `-D warnings`.
|
|
45
|
+
|
|
46
|
+
Static frontend deploys require TypeScript browser source, stable native
|
|
47
|
+
type-aware TypeScript checks, native linting such as `oxlint`, `biome check`,
|
|
48
|
+
or `deno lint`, and Fallow dead-code, semantic duplicate-code, and health
|
|
49
|
+
gates.
|
|
50
|
+
|
|
51
|
+
The npm package remains the primary first install path:
|
|
52
|
+
|
|
53
|
+
```sh
|
|
54
|
+
npx tovuk deploy
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Python installs require Node.js 18+ with `npx` available at runtime.
|
|
58
|
+
|
|
59
|
+
The Python package exposes the same agent command surface as npm:
|
|
60
|
+
|
|
61
|
+
```sh
|
|
62
|
+
tovuk capabilities
|
|
63
|
+
tovuk me
|
|
64
|
+
tovuk usage
|
|
65
|
+
tovuk activity --json
|
|
66
|
+
tovuk apps
|
|
67
|
+
tovuk overview --app app_1 --json
|
|
68
|
+
tovuk deploys --app app_1
|
|
69
|
+
tovuk builds
|
|
70
|
+
tovuk logs --deploy deploy_1 --limit 100 --json
|
|
71
|
+
tovuk env list --app app_1
|
|
72
|
+
tovuk env set --app app_1 API_KEY=value
|
|
73
|
+
tovuk env delete --app app_1 API_KEY
|
|
74
|
+
tovuk domains add --app app_1 api.example.com
|
|
75
|
+
tovuk domains verify --app app_1 api.example.com
|
|
76
|
+
tovuk billing checkout --json
|
|
77
|
+
tovuk billing portal
|
|
78
|
+
tovuk support create "Deploy failed" "Agent retried deploy after doctor." --app app_1 --build job_1 --deploy deploy_1 --failing-command "tovuk deploy --wait --json" --first-log-line "cargo check failed in src/main.rs" --json
|
|
79
|
+
tovuk support list --json
|
|
80
|
+
tovuk support resolve ticket_0123456789abcdef0123 --json
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Agent repair loop:
|
|
84
|
+
|
|
85
|
+
```sh
|
|
86
|
+
tovuk doctor --json
|
|
87
|
+
tovuk deploy --wait --json
|
|
88
|
+
tovuk logs --build job_1 --json
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Fix the first failed `agent_instruction`. If a build fails, inspect build logs,
|
|
92
|
+
fix the first actionable log error, rerun doctor, then redeploy.
|
|
93
|
+
|
|
94
|
+
On first deploy, the CLI opens browser login, waits for GitHub or Google, stores
|
|
95
|
+
the Tovuk session in the OS credential store when available, and continues the
|
|
96
|
+
deploy. Later commands reuse that session.
|
tovuk-0.1.48/README.md
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# tovuk
|
|
2
|
+
|
|
3
|
+
Python CLI package for deploying Rust backends, static frontends, and fullstack
|
|
4
|
+
apps to Tovuk.
|
|
5
|
+
It delegates to the npm Tovuk CLI so PyPI stays aligned with the primary
|
|
6
|
+
agent command surface.
|
|
7
|
+
|
|
8
|
+
```sh
|
|
9
|
+
pipx install tovuk
|
|
10
|
+
tovuk init my-app --template fullstack-rust-tanstack
|
|
11
|
+
cd my-app/web && bun install && cd ..
|
|
12
|
+
tovuk doctor --json
|
|
13
|
+
tovuk preview
|
|
14
|
+
tovuk deploy --wait --json
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
From a fullstack repo root, `tovuk deploy` reads one root `tovuk.toml`, builds
|
|
18
|
+
the backend and frontend roots, and returns one app URL with `/api/*` routed to
|
|
19
|
+
the Rust backend.
|
|
20
|
+
|
|
21
|
+
Rust backend deploys require `cargo fmt --all --check`, locked `cargo check`,
|
|
22
|
+
and locked all-target, all-feature Clippy with `-D warnings`.
|
|
23
|
+
|
|
24
|
+
Static frontend deploys require TypeScript browser source, stable native
|
|
25
|
+
type-aware TypeScript checks, native linting such as `oxlint`, `biome check`,
|
|
26
|
+
or `deno lint`, and Fallow dead-code, semantic duplicate-code, and health
|
|
27
|
+
gates.
|
|
28
|
+
|
|
29
|
+
The npm package remains the primary first install path:
|
|
30
|
+
|
|
31
|
+
```sh
|
|
32
|
+
npx tovuk deploy
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Python installs require Node.js 18+ with `npx` available at runtime.
|
|
36
|
+
|
|
37
|
+
The Python package exposes the same agent command surface as npm:
|
|
38
|
+
|
|
39
|
+
```sh
|
|
40
|
+
tovuk capabilities
|
|
41
|
+
tovuk me
|
|
42
|
+
tovuk usage
|
|
43
|
+
tovuk activity --json
|
|
44
|
+
tovuk apps
|
|
45
|
+
tovuk overview --app app_1 --json
|
|
46
|
+
tovuk deploys --app app_1
|
|
47
|
+
tovuk builds
|
|
48
|
+
tovuk logs --deploy deploy_1 --limit 100 --json
|
|
49
|
+
tovuk env list --app app_1
|
|
50
|
+
tovuk env set --app app_1 API_KEY=value
|
|
51
|
+
tovuk env delete --app app_1 API_KEY
|
|
52
|
+
tovuk domains add --app app_1 api.example.com
|
|
53
|
+
tovuk domains verify --app app_1 api.example.com
|
|
54
|
+
tovuk billing checkout --json
|
|
55
|
+
tovuk billing portal
|
|
56
|
+
tovuk support create "Deploy failed" "Agent retried deploy after doctor." --app app_1 --build job_1 --deploy deploy_1 --failing-command "tovuk deploy --wait --json" --first-log-line "cargo check failed in src/main.rs" --json
|
|
57
|
+
tovuk support list --json
|
|
58
|
+
tovuk support resolve ticket_0123456789abcdef0123 --json
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Agent repair loop:
|
|
62
|
+
|
|
63
|
+
```sh
|
|
64
|
+
tovuk doctor --json
|
|
65
|
+
tovuk deploy --wait --json
|
|
66
|
+
tovuk logs --build job_1 --json
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
Fix the first failed `agent_instruction`. If a build fails, inspect build logs,
|
|
70
|
+
fix the first actionable log error, rerun doctor, then redeploy.
|
|
71
|
+
|
|
72
|
+
On first deploy, the CLI opens browser login, waits for GitHub or Google, stores
|
|
73
|
+
the Tovuk session in the OS credential store when available, and continues the
|
|
74
|
+
deploy. Later commands reuse that session.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["hatchling==1.27.0"]
|
|
3
|
+
build-backend = "hatchling.build"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "tovuk"
|
|
7
|
+
version = "0.1.48"
|
|
8
|
+
description = "Deploy Rust backends, static frontends, and fullstack apps to Tovuk."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.11"
|
|
11
|
+
license = "MIT"
|
|
12
|
+
authors = [{ name = "Tovuk" }]
|
|
13
|
+
keywords = ["tovuk", "rust", "deploy", "backend", "hosting"]
|
|
14
|
+
classifiers = [
|
|
15
|
+
"Development Status :: 3 - Alpha",
|
|
16
|
+
"Environment :: Console",
|
|
17
|
+
"Intended Audience :: Developers",
|
|
18
|
+
"License :: OSI Approved :: MIT License",
|
|
19
|
+
"Programming Language :: Python :: 3",
|
|
20
|
+
"Programming Language :: Python :: 3.11",
|
|
21
|
+
"Programming Language :: Python :: 3.12",
|
|
22
|
+
"Programming Language :: Python :: 3.13",
|
|
23
|
+
"Topic :: Software Development :: Build Tools"
|
|
24
|
+
]
|
|
25
|
+
|
|
26
|
+
[project.urls]
|
|
27
|
+
Homepage = "https://tovuk.com"
|
|
28
|
+
Repository = "https://github.com/tovuk/tovuk"
|
|
29
|
+
Issues = "https://github.com/tovuk/tovuk/issues"
|
|
30
|
+
|
|
31
|
+
[project.scripts]
|
|
32
|
+
tovuk = "tovuk.cli:main"
|
|
33
|
+
|
|
34
|
+
[tool.hatch.build.targets.wheel]
|
|
35
|
+
packages = ["src/tovuk"]
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"""Thin Python entrypoint for the npm Tovuk CLI source of truth."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import json
|
|
6
|
+
import os
|
|
7
|
+
import pathlib
|
|
8
|
+
import shutil
|
|
9
|
+
import subprocess
|
|
10
|
+
import sys
|
|
11
|
+
|
|
12
|
+
from . import __version__
|
|
13
|
+
|
|
14
|
+
NPM_PACKAGE = "tovuk"
|
|
15
|
+
NPM_PACKAGE_VERSION = "0.1.48"
|
|
16
|
+
NPM_PACKAGE_SPEC = f"{NPM_PACKAGE}@{NPM_PACKAGE_VERSION}"
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
def main(argv: list[str] | None = None) -> None:
|
|
20
|
+
args = list(sys.argv[1:] if argv is None else argv)
|
|
21
|
+
if _wants_version(args):
|
|
22
|
+
print(__version__)
|
|
23
|
+
return
|
|
24
|
+
|
|
25
|
+
try:
|
|
26
|
+
command = _delegate_command()
|
|
27
|
+
except RuntimeError as error:
|
|
28
|
+
_print_agent_error(str(error), "--json" in args)
|
|
29
|
+
raise SystemExit(1) from error
|
|
30
|
+
|
|
31
|
+
completed = subprocess.run([*command, *args], check=False)
|
|
32
|
+
raise SystemExit(completed.returncode)
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
def _wants_version(args: list[str]) -> bool:
|
|
36
|
+
return len(args) == 1 and args[0] in {"--version", "-v", "-V"}
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
def _delegate_command() -> list[str]:
|
|
40
|
+
local_cli = os.environ.get("TOVUK_NPM_CLI", "").strip()
|
|
41
|
+
if local_cli:
|
|
42
|
+
path = pathlib.Path(local_cli).expanduser()
|
|
43
|
+
if not path.is_file():
|
|
44
|
+
raise RuntimeError(f"TOVUK_NPM_CLI does not point to a file: {path}")
|
|
45
|
+
return [_local_tsx(path), str(path)]
|
|
46
|
+
|
|
47
|
+
npx = shutil.which("npx")
|
|
48
|
+
if npx:
|
|
49
|
+
return [npx, "-y", NPM_PACKAGE_SPEC]
|
|
50
|
+
|
|
51
|
+
raise RuntimeError("Node.js npm tooling is required for the PyPI Tovuk CLI.")
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
def _required_executable(name: str) -> str:
|
|
55
|
+
executable = shutil.which(name)
|
|
56
|
+
if executable:
|
|
57
|
+
return executable
|
|
58
|
+
raise RuntimeError(f"{name} is required to run the local Tovuk npm CLI.")
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
def _local_tsx(cli_path: pathlib.Path) -> str:
|
|
62
|
+
package_root = cli_path.parent.parent
|
|
63
|
+
local_bin = package_root / "node_modules" / ".bin" / ("tsx.cmd" if os.name == "nt" else "tsx")
|
|
64
|
+
if local_bin.is_file():
|
|
65
|
+
return str(local_bin)
|
|
66
|
+
return _required_executable("tsx")
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
def _print_agent_error(message: str, json_output: bool) -> None:
|
|
70
|
+
payload = {
|
|
71
|
+
"code": "dependency_missing",
|
|
72
|
+
"message": message,
|
|
73
|
+
"agent_instruction": "Install Node.js 18+ with npx, or set TOVUK_NPM_CLI to packages/tovuk/src/tovuk.ts after running npm install in packages/tovuk.",
|
|
74
|
+
"docs_url": "https://docs.tovuk.com/reference/packages",
|
|
75
|
+
"checkout_url": None,
|
|
76
|
+
}
|
|
77
|
+
if json_output:
|
|
78
|
+
print(json.dumps(payload, indent=2), file=sys.stderr)
|
|
79
|
+
return
|
|
80
|
+
|
|
81
|
+
print(payload["message"], file=sys.stderr)
|
|
82
|
+
print(f"agent_instruction: {payload['agent_instruction']}", file=sys.stderr)
|