verulla-cli 0.0.7__tar.gz → 0.0.8__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 (33) hide show
  1. verulla_cli-0.0.8/PKG-INFO +32 -0
  2. verulla_cli-0.0.8/README.md +13 -0
  3. verulla_cli-0.0.8/pyproject.toml +35 -0
  4. verulla_cli-0.0.8/tests/test_cli_import.py +6 -0
  5. {verulla_cli-0.0.7 → verulla_cli-0.0.8}/tests/test_main.py +49 -1
  6. {verulla_cli-0.0.7 → verulla_cli-0.0.8}/verulla_cli/__init__.py +1 -1
  7. {verulla_cli-0.0.7 → verulla_cli-0.0.8}/verulla_cli/apps_client.py +21 -0
  8. verulla_cli-0.0.8/verulla_cli/domains_client.py +40 -0
  9. {verulla_cli-0.0.7 → verulla_cli-0.0.8}/verulla_cli/main.py +121 -1
  10. verulla_cli-0.0.7/PKG-INFO +0 -8
  11. verulla_cli-0.0.7/pyproject.toml +0 -21
  12. verulla_cli-0.0.7/tests/test_cli_import.py +0 -6
  13. {verulla_cli-0.0.7 → verulla_cli-0.0.8}/.gitignore +0 -0
  14. {verulla_cli-0.0.7 → verulla_cli-0.0.8}/CHANGELOG.md +0 -0
  15. {verulla_cli-0.0.7 → verulla_cli-0.0.8}/tests/test_admin_cmd.py +0 -0
  16. {verulla_cli-0.0.7 → verulla_cli-0.0.8}/tests/test_apps_client.py +0 -0
  17. {verulla_cli-0.0.7 → verulla_cli-0.0.8}/tests/test_auth.py +0 -0
  18. {verulla_cli-0.0.7 → verulla_cli-0.0.8}/tests/test_buildkit.py +0 -0
  19. {verulla_cli-0.0.7 → verulla_cli-0.0.8}/tests/test_buildkit_real.py +0 -0
  20. {verulla_cli-0.0.7 → verulla_cli-0.0.8}/tests/test_deploy_client.py +0 -0
  21. {verulla_cli-0.0.7 → verulla_cli-0.0.8}/tests/test_dev_check.py +0 -0
  22. {verulla_cli-0.0.7 → verulla_cli-0.0.8}/tests/test_emulate.py +0 -0
  23. {verulla_cli-0.0.7 → verulla_cli-0.0.8}/tests/test_owner_commands.py +0 -0
  24. {verulla_cli-0.0.7 → verulla_cli-0.0.8}/tests/test_packaging.py +0 -0
  25. {verulla_cli-0.0.7 → verulla_cli-0.0.8}/tests/test_secrets_client.py +0 -0
  26. {verulla_cli-0.0.7 → verulla_cli-0.0.8}/tests/test_sketch_status.py +0 -0
  27. {verulla_cli-0.0.7 → verulla_cli-0.0.8}/verulla_cli/auth.py +0 -0
  28. {verulla_cli-0.0.7 → verulla_cli-0.0.8}/verulla_cli/buildkit.py +0 -0
  29. {verulla_cli-0.0.7 → verulla_cli-0.0.8}/verulla_cli/config.py +0 -0
  30. {verulla_cli-0.0.7 → verulla_cli-0.0.8}/verulla_cli/deploy_client.py +0 -0
  31. {verulla_cli-0.0.7 → verulla_cli-0.0.8}/verulla_cli/emulate.py +0 -0
  32. {verulla_cli-0.0.7 → verulla_cli-0.0.8}/verulla_cli/packaging.py +0 -0
  33. {verulla_cli-0.0.7 → verulla_cli-0.0.8}/verulla_cli/secrets_client.py +0 -0
@@ -0,0 +1,32 @@
1
+ Metadata-Version: 2.5
2
+ Name: verulla-cli
3
+ Version: 0.0.8
4
+ Summary: Verulla's CLI helps non-technical small-business owners using AI coding agents deploy apps while Verulla handles hosting and day-to-day operations.
5
+ Project-URL: Homepage, https://verulla.com
6
+ Project-URL: Documentation, https://verulla.com/install
7
+ Keywords: AI coding agents,deployment,small business
8
+ Classifier: Development Status :: 3 - Alpha
9
+ Classifier: Environment :: Console
10
+ Classifier: Intended Audience :: Developers
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Topic :: Internet :: WWW/HTTP
13
+ Requires-Python: >=3.12
14
+ Requires-Dist: docker>=7
15
+ Requires-Dist: httpx>=0.27
16
+ Requires-Dist: typer>=0.12
17
+ Requires-Dist: verulla-manifest==0.0.4
18
+ Description-Content-Type: text/markdown
19
+
20
+ Verulla's CLI helps non-technical small-business owners using AI coding agents deploy apps while Verulla handles hosting and day-to-day operations.
21
+
22
+ [Verulla](https://verulla.com)
23
+
24
+ ## Install
25
+
26
+ ```sh
27
+ uvx --no-cache --isolated --from 'verulla-cli==0.0.8' verulla --help
28
+ ```
29
+
30
+ The CLI provides commands for checking and deploying apps to Verulla, with manifest validation supplied by the exact `verulla-manifest==0.0.4` dependency. Verulla handles hosting and day-to-day operations after deployment.
31
+
32
+ See the [install guide](https://verulla.com/install) for setup and the supported workflow.
@@ -0,0 +1,13 @@
1
+ Verulla's CLI helps non-technical small-business owners using AI coding agents deploy apps while Verulla handles hosting and day-to-day operations.
2
+
3
+ [Verulla](https://verulla.com)
4
+
5
+ ## Install
6
+
7
+ ```sh
8
+ uvx --no-cache --isolated --from 'verulla-cli==0.0.8' verulla --help
9
+ ```
10
+
11
+ The CLI provides commands for checking and deploying apps to Verulla, with manifest validation supplied by the exact `verulla-manifest==0.0.4` dependency. Verulla handles hosting and day-to-day operations after deployment.
12
+
13
+ See the [install guide](https://verulla.com/install) for setup and the supported workflow.
@@ -0,0 +1,35 @@
1
+ [project]
2
+ name = "verulla-cli"
3
+ version = "0.0.8"
4
+ requires-python = ">=3.12"
5
+ description = "Verulla's CLI helps non-technical small-business owners using AI coding agents deploy apps while Verulla handles hosting and day-to-day operations."
6
+ readme = { file = "README.md", content-type = "text/markdown" }
7
+ keywords = ["deployment", "AI coding agents", "small business"]
8
+ classifiers = [
9
+ "Development Status :: 3 - Alpha",
10
+ "Environment :: Console",
11
+ "Intended Audience :: Developers",
12
+ "Programming Language :: Python :: 3",
13
+ "Topic :: Internet :: WWW/HTTP",
14
+ ]
15
+ dependencies = [
16
+ "verulla-manifest==0.0.4",
17
+ "typer>=0.12",
18
+ "httpx>=0.27",
19
+ "docker>=7",
20
+ ]
21
+
22
+ [project.urls]
23
+ Homepage = "https://verulla.com"
24
+ Documentation = "https://verulla.com/install"
25
+
26
+ [project.scripts]
27
+ verulla = "verulla_cli.main:app"
28
+
29
+ [build-system]
30
+ requires = ["hatchling"]
31
+ build-backend = "hatchling.build"
32
+
33
+ [tool.deptry]
34
+ known_first_party = ["verulla_cli"]
35
+ extend_exclude = ["tests"]
@@ -0,0 +1,6 @@
1
+ def test_import():
2
+ import verulla_cli
3
+ import verulla_manifest
4
+
5
+ assert verulla_cli.__version__ == "0.0.8"
6
+ assert verulla_manifest.__version__ == "0.0.4"
@@ -1,10 +1,12 @@
1
1
  from __future__ import annotations
2
2
 
3
3
  import json
4
+ import httpx
4
5
 
5
6
  from typer.testing import CliRunner
6
7
 
7
8
  from verulla_cli.auth import DeviceLoginError
9
+ from verulla_cli.apps_client import AppsError, _request
8
10
  from verulla_cli.main import _secret_scope, app
9
11
 
10
12
  runner = CliRunner()
@@ -14,7 +16,7 @@ def test_cli_reports_installed_version() -> None:
14
16
  result = runner.invoke(app, ["--version"])
15
17
 
16
18
  assert result.exit_code == 0
17
- assert result.output.strip() == "verulla 0.0.7"
19
+ assert result.output.strip() == "verulla 0.0.8"
18
20
 
19
21
 
20
22
  def test_auth_and_customer_commands_are_registered() -> None:
@@ -27,6 +29,12 @@ def test_auth_and_customer_commands_are_registered() -> None:
27
29
  assert "live" not in result.output.lower()
28
30
  for command in ("wallet", "spend", "usage", "pricing", "topup"):
29
31
  assert command in result.output
32
+ for command in ("mandate", "pay"):
33
+ assert command in result.output
34
+ for command in ("status",):
35
+ assert command in runner.invoke(app, ["mandate", "--help"]).output
36
+ for command in ("quote", "status", "execute"):
37
+ assert command in runner.invoke(app, ["pay", "--help"]).output
30
38
  for command in ("show", "set"):
31
39
  assert command in runner.invoke(app, ["auth", "--help"]).output
32
40
  for command in ("list", "lock", "unlock", "delete", "export", "invite"):
@@ -37,6 +45,46 @@ def test_auth_and_customer_commands_are_registered() -> None:
37
45
  assert command in domains_help.output
38
46
 
39
47
 
48
+ def test_pay_execute_requires_explicit_matching_price_confirmation(tmp_path, monkeypatch):
49
+ quote = {
50
+ "quote_id": "quote-123",
51
+ "price_confirmation": {"quote_hash": "hash", "gross_cents": 500, "currency": "USD",
52
+ "purchase_type": "wallet_topup", "target_id": "wallet-id",
53
+ "wallet_credit_cents": 500, "wallet_debit_cents": 0, "tax_cents": 0},
54
+ }
55
+ confirmation_file = tmp_path / "quote.json"
56
+ confirmation_file.write_text(json.dumps(quote))
57
+ calls = []
58
+ monkeypatch.setattr("verulla_cli.main._agent_token", lambda: "agent-token")
59
+ monkeypatch.setattr("verulla_cli.main.execute_agent_payment", lambda *args: calls.append(args) or {"status": "succeeded"})
60
+
61
+ mismatch = runner.invoke(app, ["pay", "execute", "quote-123", "--price-confirmation", str(confirmation_file),
62
+ "--confirm-price-cents", "500", "--currency", "CAD",
63
+ "--idempotency-key", "stable-key"])
64
+ assert mismatch.exit_code == 2
65
+ assert calls == []
66
+ result = runner.invoke(app, ["pay", "execute", "quote-123", "--price-confirmation", str(confirmation_file),
67
+ "--confirm-price-cents", "500", "--currency", "USD",
68
+ "--idempotency-key", "stable-key"])
69
+ assert result.exit_code == 0, result.output
70
+ assert calls[0][3]["gross_cents"] == 500
71
+ assert calls[0][4] == "stable-key"
72
+
73
+
74
+ def test_cli_payment_error_copy_preserves_cancelled_owner_code():
75
+ client = httpx.Client(transport=httpx.MockTransport(lambda _: httpx.Response(
76
+ 403, json={"detail": {"code": "owner_account_cancelled"}},
77
+ )))
78
+ try:
79
+ _request("https://api.example", "token", "GET",
80
+ "/v1/agent-payment-mandates/current", client)
81
+ except AppsError as exc:
82
+ assert "owner cancelled payments" in str(exc)
83
+ assert "owner_account_cancelled" in str(exc)
84
+ else:
85
+ raise AssertionError("cancelled owner must stop agent payment access")
86
+
87
+
40
88
  def test_trial_status_and_legacy_sketch_alias_share_the_lifecycle_receipt(monkeypatch) -> None:
41
89
  monkeypatch.setattr("verulla_cli.main.get_token", lambda: "token")
42
90
  monkeypatch.setattr("verulla_cli.main.get_sketch_status", lambda *args: {
@@ -4,4 +4,4 @@ Human + agent entry point: login (OIDC device flow), dev (local Docker
4
4
  emulation via verulla_manifest), deploy, secrets, logs.
5
5
  """
6
6
 
7
- __version__ = "0.0.7"
7
+ __version__ = "0.0.8"
@@ -40,6 +40,8 @@ def _request(api_url: str, token: str, method: str, path: str, client=None, *, e
40
40
  "spend_cap_exceeded": "This would exceed your spending limit. Ask the account owner to raise the limit, then try again.",
41
41
  "spend_cap_required": "Set a monthly spending limit in the account console, then retry `verulla pro APP`.",
42
42
  "live_activation_disabled": "Pro upgrades are not available right now. Your app's data is kept for 14 days after the free trial ends.",
43
+ "owner_account_cancelled": "The owner cancelled payments; the owner must reactivate this themselves.",
44
+ "live_reactivation_unsupported": "The owner must reactivate this themselves.",
43
45
  }.get(code_text, detail.get("message") or str(detail))
44
46
  detail = f"{message} (code: {code_text})" if code_text else message
45
47
  else:
@@ -90,6 +92,25 @@ def create_signup(api_url: str, slug: str, display_name: str, owner_email: str,
90
92
  http.close()
91
93
 
92
94
 
95
+ def get_mandate_status(api_url: str, token: str, client=None) -> dict:
96
+ return _request(api_url, token, "GET", "/v1/agent-payment-mandates/current", client)
97
+
98
+
99
+ def create_agent_payment_quote(api_url: str, token: str, quote: dict, client=None) -> dict:
100
+ return _request(api_url, token, "POST", "/v1/agent-payments/quotes", client, json_body=quote)
101
+
102
+
103
+ def get_agent_payment_status(api_url: str, token: str, attempt_id: str, client=None) -> dict:
104
+ return _request(api_url, token, "GET", f"/v1/agent-payments/attempts/{quote(attempt_id, safe='')}", client)
105
+
106
+
107
+ def execute_agent_payment(api_url: str, token: str, quote_id: str, price_confirmation: dict,
108
+ idempotency_key: str, client=None) -> dict:
109
+ return _request(api_url, token, "POST", "/v1/agent-payments/charges", client,
110
+ extra_headers={"Idempotency-Key": idempotency_key},
111
+ json_body={"quote_id": quote_id, "price_confirmation": price_confirmation})
112
+
113
+
93
114
  def list_apps(api_url: str, token: str, client=None) -> list[dict]:
94
115
  return _request(api_url, token, "GET", "/v1/apps", client)["apps"]
95
116
 
@@ -0,0 +1,40 @@
1
+ from __future__ import annotations
2
+
3
+ from urllib.parse import quote
4
+
5
+ from verulla_cli.apps_client import AppsError, _request
6
+
7
+
8
+ def list_domains(api_url: str, token: str, app: str) -> dict:
9
+ return _request(api_url, token, "GET", f"/v1/apps/{quote(app, safe='')}/domains")
10
+
11
+
12
+ def add_domain(api_url: str, token: str, app: str, host: str) -> dict:
13
+ return _request(api_url, token, "POST", f"/v1/apps/{quote(app, safe='')}/domains", json_body={"host": host})
14
+
15
+
16
+ def verify_domain(api_url: str, token: str, app: str, host: str) -> dict:
17
+ return _request(api_url, token, "POST", f"/v1/apps/{quote(app, safe='')}/domains/{quote(host, safe='')}/verify")
18
+
19
+
20
+ def remove_domain(api_url: str, token: str, app: str, host: str) -> None:
21
+ _request(api_url, token, "DELETE", f"/v1/apps/{quote(app, safe='')}/domains/{quote(host, safe='')}")
22
+
23
+
24
+ def quote_domain_enable(api_url: str, token: str, app: str, host: str) -> dict:
25
+ return _request(api_url, token, "POST", f"/v1/apps/{quote(app, safe='')}/domains/{quote(host, safe='')}/enable-quote")
26
+
27
+
28
+ def enable_domain(api_url: str, token: str, app: str, host: str, quote_id: str, idempotency_key: str) -> dict:
29
+ return _request(api_url, token, "POST", f"/v1/apps/{quote(app, safe='')}/domains/{quote(host, safe='')}/enable", extra_headers={"Idempotency-Key": idempotency_key}, json_body={"quote_id": quote_id})
30
+
31
+
32
+ def disable_domain(api_url: str, token: str, app: str, host: str) -> dict:
33
+ return _request(api_url, token, "POST", f"/v1/apps/{quote(app, safe='')}/domains/{quote(host, safe='')}/disable")
34
+
35
+
36
+ def domain_error_message(exc: AppsError) -> str:
37
+ message = str(exc)
38
+ if "custom_domains_disabled" in message:
39
+ return "Custom domains are not yet available."
40
+ return message
@@ -40,6 +40,10 @@ from verulla_cli.apps_client import (
40
40
  get_term_usage,
41
41
  get_wallet_summary,
42
42
  create_topup,
43
+ get_mandate_status,
44
+ create_agent_payment_quote,
45
+ get_agent_payment_status,
46
+ execute_agent_payment,
43
47
  get_auth_policy,
44
48
  invite_customer as api_invite_customer,
45
49
  issue_owner_claim,
@@ -711,6 +715,81 @@ def topup(
711
715
  typer.echo(json.dumps(result, indent=2))
712
716
 
713
717
 
718
+ mandate_app = typer.Typer(help="Inspect the agent payment mandate.", no_args_is_help=True)
719
+ pay_app = typer.Typer(help="Request and execute explicitly confirmed agent-payment quotes.", no_args_is_help=True)
720
+ app.add_typer(mandate_app, name="mandate")
721
+ app.add_typer(pay_app, name="pay")
722
+
723
+
724
+ @mandate_app.command("status")
725
+ def mandate_status(api_url: str = typer.Option(DEFAULT_API_URL, "--api-url", envvar="VERULLA_API_URL")) -> None:
726
+ result = _auth_api_call(get_mandate_status, api_url.rstrip("/"), _agent_token())
727
+ typer.echo(json.dumps(result, indent=2))
728
+
729
+
730
+ @pay_app.command("quote")
731
+ def pay_quote(purchase_type: str = typer.Option("wallet_topup", "--purchase-type"),
732
+ requested_topup_cents: int | None = typer.Option(None, "--amount-cents", min=1),
733
+ currency: str | None = typer.Option(None, "--currency"),
734
+ target_id: str | None = typer.Option(None, "--target-id"),
735
+ product_quote_id: str | None = typer.Option(None, "--product-quote-id"),
736
+ api_url: str = typer.Option(DEFAULT_API_URL, "--api-url", envvar="VERULLA_API_URL")) -> None:
737
+ if purchase_type not in {"wallet_topup", "live_activation", "renewal", "domain_addon"}:
738
+ typer.echo("Unsupported purchase type.", err=True)
739
+ raise typer.Exit(code=2)
740
+ if currency is not None and currency not in {"USD", "CAD"}:
741
+ typer.echo("Currency must be USD or CAD.", err=True)
742
+ raise typer.Exit(code=2)
743
+ quote: dict[str, str | int] = {"purchase_type": purchase_type}
744
+ if requested_topup_cents is not None:
745
+ quote["requested_topup_cents"] = requested_topup_cents
746
+ if currency is not None:
747
+ quote["currency"] = currency
748
+ if target_id is not None:
749
+ quote["target_id"] = target_id
750
+ if product_quote_id is not None:
751
+ quote["product_quote_id"] = product_quote_id
752
+ result = _auth_api_call(create_agent_payment_quote, api_url.rstrip("/"), _agent_token(), quote)
753
+ typer.echo(json.dumps(result, indent=2))
754
+
755
+
756
+ @pay_app.command("status")
757
+ def pay_status(attempt_id: str = typer.Argument(...),
758
+ api_url: str = typer.Option(DEFAULT_API_URL, "--api-url", envvar="VERULLA_API_URL")) -> None:
759
+ result = _auth_api_call(get_agent_payment_status, api_url.rstrip("/"), _agent_token(), attempt_id)
760
+ typer.echo(json.dumps(result, indent=2))
761
+
762
+
763
+ @pay_app.command("execute")
764
+ def pay_execute(quote_id: str = typer.Argument(...),
765
+ price_confirmation_file: Path = typer.Option(..., "--price-confirmation", exists=True, readable=True),
766
+ confirm_price_cents: int = typer.Option(..., "--confirm-price-cents", min=1),
767
+ currency: str = typer.Option(..., "--currency"),
768
+ idempotency_key: str = typer.Option(..., "--idempotency-key"),
769
+ api_url: str = typer.Option(DEFAULT_API_URL, "--api-url", envvar="VERULLA_API_URL")) -> None:
770
+ try:
771
+ confirmation = json.loads(price_confirmation_file.read_text(encoding="utf-8"))
772
+ if (isinstance(confirmation, dict) and confirmation.get("quote_id") is not None
773
+ and confirmation["quote_id"] != quote_id):
774
+ typer.echo("QUOTE_ID does not match the saved quote response.", err=True)
775
+ raise typer.Exit(code=2)
776
+ if isinstance(confirmation, dict) and isinstance(confirmation.get("price_confirmation"), dict):
777
+ confirmation = confirmation["price_confirmation"]
778
+ except (OSError, ValueError) as exc:
779
+ typer.echo("Price confirmation must be a JSON object from the exact quote response.", err=True)
780
+ raise typer.Exit(code=2) from exc
781
+ if not 1 <= len(idempotency_key) <= 128:
782
+ typer.echo("--idempotency-key must contain 1 to 128 characters.", err=True)
783
+ raise typer.Exit(code=2)
784
+ if (not isinstance(confirmation, dict) or confirmation.get("gross_cents") != confirm_price_cents
785
+ or confirmation.get("currency") != currency or currency not in {"USD", "CAD"}):
786
+ typer.echo("Price confirmation differs from --confirm-price-cents or --currency.", err=True)
787
+ raise typer.Exit(code=2)
788
+ result = _auth_api_call(execute_agent_payment, api_url.rstrip("/"), _agent_token(), quote_id,
789
+ confirmation, idempotency_key)
790
+ typer.echo(json.dumps(result, indent=2))
791
+
792
+
714
793
  @app.command()
715
794
  def pro(
716
795
  app_name: str = typer.Argument(..., metavar="APP", help="App to move from its free trial to paid Pro."),
@@ -1092,7 +1171,7 @@ def _auth_api_call(fn, *args, **kwargs):
1092
1171
  try:
1093
1172
  return fn(*args, **kwargs)
1094
1173
  except AppsError as exc:
1095
- typer.echo(f"Error: {exc}", err=True)
1174
+ typer.echo(f"Error: {domain_error_message(exc)}", err=True)
1096
1175
  raise typer.Exit(code=1) from exc
1097
1176
 
1098
1177
 
@@ -1109,6 +1188,15 @@ def _print_dns_instructions(records: list[dict]) -> None:
1109
1188
  typer.echo(f" {record.get('purpose', '')}")
1110
1189
 
1111
1190
 
1191
+ from verulla_cli.domains_client import (
1192
+ domain_error_message,
1193
+ quote_domain_enable,
1194
+ enable_domain as api_enable_domain,
1195
+ disable_domain as api_disable_domain,
1196
+ remove_domain as api_remove_domain,
1197
+ )
1198
+
1199
+
1112
1200
  @domains_app.command("add")
1113
1201
  def domains_add(
1114
1202
  app_name: str = typer.Argument(..., metavar="APP"),
@@ -1271,6 +1359,38 @@ def admin_whoami(
1271
1359
  typer.echo(f"scopes: {', '.join(data.get('scopes') or []) or '(none)'}")
1272
1360
 
1273
1361
 
1362
+ @domains_app.command("enable")
1363
+ def domains_enable(app_name: str, host: str, api_url: str = typer.Option(DEFAULT_API_URL, "--api-url", envvar="VERULLA_API_URL", show_default=True)) -> None:
1364
+ """Enable a verified custom domain after explicit price confirmation."""
1365
+ base_url, token = api_url.rstrip("/"), _agent_token()
1366
+ quoted = _auth_api_call(quote_domain_enable, base_url, token, app_name, host)
1367
+ amount, currency, quote_id = quoted.get("amount_cents"), quoted.get("currency"), quoted.get("quote_id")
1368
+ if (not isinstance(amount, int) or isinstance(amount, bool) or amount < 0
1369
+ or currency not in {"USD", "CAD"} or not isinstance(quote_id, str) or not quote_id):
1370
+ typer.echo("Error: invalid custom-domain enable quote; no change was made.", err=True)
1371
+ raise typer.Exit(code=1)
1372
+ symbol = "US$" if currency == "USD" else "C$"
1373
+ price_text = f"{symbol}{amount // 100:,}.{amount % 100:02d}"
1374
+ typer.echo(f"Custom domains cost US$12.00 per 30-day term. Current quote: {price_text} ({currency}).")
1375
+ typer.confirm(f"Enable {host!r} for the quoted {price_text}?", abort=True)
1376
+ result = _auth_api_call(api_enable_domain, base_url, token, app_name, host, quote_id, str(uuid.uuid4()))
1377
+ typer.echo(json.dumps(result, indent=2))
1378
+
1379
+
1380
+ @domains_app.command("disable")
1381
+ def domains_disable(app_name: str, host: str, api_url: str = typer.Option(DEFAULT_API_URL, "--api-url", envvar="VERULLA_API_URL", show_default=True)) -> None:
1382
+ """Disable a paid custom domain without removing its claim."""
1383
+ result = _auth_api_call(api_disable_domain, api_url.rstrip("/"), _agent_token(), app_name, host)
1384
+ typer.echo(json.dumps(result, indent=2))
1385
+
1386
+
1387
+ @domains_app.command("remove")
1388
+ def domains_remove(app_name: str, host: str, api_url: str = typer.Option(DEFAULT_API_URL, "--api-url", envvar="VERULLA_API_URL", show_default=True)) -> None:
1389
+ """Remove a pending or verified custom-domain claim."""
1390
+ _auth_api_call(api_remove_domain, api_url.rstrip("/"), _agent_token(), app_name, host)
1391
+ typer.echo("Custom domain removed.")
1392
+
1393
+
1274
1394
  def main() -> None:
1275
1395
  app()
1276
1396
 
@@ -1,8 +0,0 @@
1
- Metadata-Version: 2.5
2
- Name: verulla-cli
3
- Version: 0.0.7
4
- Requires-Python: >=3.12
5
- Requires-Dist: docker>=7
6
- Requires-Dist: httpx>=0.27
7
- Requires-Dist: typer>=0.12
8
- Requires-Dist: verulla-manifest==0.0.3
@@ -1,21 +0,0 @@
1
- [project]
2
- name = "verulla-cli"
3
- version = "0.0.7"
4
- requires-python = ">=3.12"
5
- dependencies = [
6
- "verulla-manifest==0.0.3",
7
- "typer>=0.12",
8
- "httpx>=0.27",
9
- "docker>=7",
10
- ]
11
-
12
- [project.scripts]
13
- verulla = "verulla_cli.main:app"
14
-
15
- [build-system]
16
- requires = ["hatchling"]
17
- build-backend = "hatchling.build"
18
-
19
- [tool.deptry]
20
- known_first_party = ["verulla_cli"]
21
- extend_exclude = ["tests"]
@@ -1,6 +0,0 @@
1
- def test_import():
2
- import verulla_cli
3
- import verulla_manifest
4
-
5
- assert verulla_cli.__version__ == "0.0.7"
6
- assert verulla_manifest.__version__ == "0.0.3"
File without changes
File without changes