botu-cli 0.1.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.
- botu_cli-0.1.0/.gitignore +8 -0
- botu_cli-0.1.0/PKG-INFO +95 -0
- botu_cli-0.1.0/README.md +67 -0
- botu_cli-0.1.0/pyproject.toml +50 -0
- botu_cli-0.1.0/src/botu_cli/__init__.py +1 -0
- botu_cli-0.1.0/src/botu_cli/__main__.py +535 -0
- botu_cli-0.1.0/src/botu_cli/client.py +96 -0
- botu_cli-0.1.0/src/botu_cli/config.py +134 -0
- botu_cli-0.1.0/src/botu_cli/device_flow.py +132 -0
- botu_cli-0.1.0/src/botu_cli/output.py +66 -0
- botu_cli-0.1.0/tests/__init__.py +0 -0
- botu_cli-0.1.0/tests/test_cli.py +464 -0
botu_cli-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: botu-cli
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Agent-first CLI for botu — embeddable AI agent for any website
|
|
5
|
+
Project-URL: Homepage, https://botu.io
|
|
6
|
+
Project-URL: Repository, https://github.com/jiangjin11/botu-web
|
|
7
|
+
Author: Paradigx Pte Ltd
|
|
8
|
+
License: MIT
|
|
9
|
+
Keywords: agent,ai,botu,cli,embed,widget
|
|
10
|
+
Classifier: Development Status :: 4 - Beta
|
|
11
|
+
Classifier: Environment :: Console
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
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 :: Libraries :: Python Modules
|
|
20
|
+
Requires-Python: >=3.10
|
|
21
|
+
Requires-Dist: httpx>=0.28
|
|
22
|
+
Requires-Dist: rich>=13.0
|
|
23
|
+
Requires-Dist: typer<1.0,>=0.15
|
|
24
|
+
Provides-Extra: dev
|
|
25
|
+
Requires-Dist: pytest-mock>=3.14; extra == 'dev'
|
|
26
|
+
Requires-Dist: pytest>=8.3; extra == 'dev'
|
|
27
|
+
Description-Content-Type: text/markdown
|
|
28
|
+
|
|
29
|
+
# botu (Python CLI)
|
|
30
|
+
|
|
31
|
+
Agent-first CLI for [botu](https://botu.io) — the embeddable AI agent for any website.
|
|
32
|
+
|
|
33
|
+
Register a site, get an embed key, verify your domain, and inject the
|
|
34
|
+
`<script>` snippet — all from the command line, no web console needed.
|
|
35
|
+
|
|
36
|
+
## Install
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
pip install botu-cli
|
|
40
|
+
# or, run once without installing:
|
|
41
|
+
uvx botu --help
|
|
42
|
+
pipx run botu --help
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Quickstart
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
botu login # OAuth device-flow, opens browser
|
|
49
|
+
botu sites create --name acme --domain acme.com # create a site + first embed key
|
|
50
|
+
botu embed --site <site-id> --new-key --write index.html # inject the <script>
|
|
51
|
+
botu sites verify <site-id> --domain acme.com # start domain verification
|
|
52
|
+
botu sites verify <site-id> --domain acme.com --check # confirm it
|
|
53
|
+
botu test --site <site-id> # check the embed key works
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
All commands accept `--json` (or env `BOTU_JSON=1`) for machine-parseable
|
|
57
|
+
output that's friendly to agents and CI.
|
|
58
|
+
|
|
59
|
+
## Commands
|
|
60
|
+
|
|
61
|
+
| Command | Purpose |
|
|
62
|
+
|---|---|
|
|
63
|
+
| `botu login` / `logout` / `whoami` | OAuth device-flow session |
|
|
64
|
+
| `botu sites create\|list\|get\|delete` | Manage sites |
|
|
65
|
+
| `botu sites verify <id> --domain <d> [--check]` | Domain ownership (DNS TXT) |
|
|
66
|
+
| `botu keys create\|list\|revoke --site <id>` | Manage embed API keys |
|
|
67
|
+
| `botu embed --site <id>` | Print / write the `<script>` embed snippet |
|
|
68
|
+
| `botu usage [--site <id>]` | Per-site quota and usage |
|
|
69
|
+
| `botu test --site <id>` | Verify an embed key via the loader auth exchange |
|
|
70
|
+
|
|
71
|
+
### About embed keys
|
|
72
|
+
|
|
73
|
+
The plaintext of an API key is shown **once** — at creation. `botu embed`
|
|
74
|
+
therefore can't retrieve the key of an existing site. Either pass
|
|
75
|
+
`--key pk_live_...`, or use `--new-key` to mint a fresh one and drop it
|
|
76
|
+
straight into the snippet.
|
|
77
|
+
|
|
78
|
+
## Configuration
|
|
79
|
+
|
|
80
|
+
| Env var | Default | Purpose |
|
|
81
|
+
|---|---|---|
|
|
82
|
+
| `BOTU_API_URL` | `https://botu.io` | Target deployment (set to `https://qa.botu.io` for QA) |
|
|
83
|
+
| `BOTU_JSON` | — | `1` forces JSON output globally |
|
|
84
|
+
|
|
85
|
+
Credentials are stored in `~/.paradigx/auth.json`, **shared** with other
|
|
86
|
+
Paradigx product CLIs (e.g. `tokenroute`) — they authenticate against the
|
|
87
|
+
same Logto, so logging in once is reused across them.
|
|
88
|
+
|
|
89
|
+
## Exit codes
|
|
90
|
+
|
|
91
|
+
`0` ok · `1` user error (4xx) · `2` network error · `3` server error (5xx)
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
© 2026 Paradigx. All Rights Reserved.
|
botu_cli-0.1.0/README.md
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# botu (Python CLI)
|
|
2
|
+
|
|
3
|
+
Agent-first CLI for [botu](https://botu.io) — the embeddable AI agent for any website.
|
|
4
|
+
|
|
5
|
+
Register a site, get an embed key, verify your domain, and inject the
|
|
6
|
+
`<script>` snippet — all from the command line, no web console needed.
|
|
7
|
+
|
|
8
|
+
## Install
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
pip install botu-cli
|
|
12
|
+
# or, run once without installing:
|
|
13
|
+
uvx botu --help
|
|
14
|
+
pipx run botu --help
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Quickstart
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
botu login # OAuth device-flow, opens browser
|
|
21
|
+
botu sites create --name acme --domain acme.com # create a site + first embed key
|
|
22
|
+
botu embed --site <site-id> --new-key --write index.html # inject the <script>
|
|
23
|
+
botu sites verify <site-id> --domain acme.com # start domain verification
|
|
24
|
+
botu sites verify <site-id> --domain acme.com --check # confirm it
|
|
25
|
+
botu test --site <site-id> # check the embed key works
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
All commands accept `--json` (or env `BOTU_JSON=1`) for machine-parseable
|
|
29
|
+
output that's friendly to agents and CI.
|
|
30
|
+
|
|
31
|
+
## Commands
|
|
32
|
+
|
|
33
|
+
| Command | Purpose |
|
|
34
|
+
|---|---|
|
|
35
|
+
| `botu login` / `logout` / `whoami` | OAuth device-flow session |
|
|
36
|
+
| `botu sites create\|list\|get\|delete` | Manage sites |
|
|
37
|
+
| `botu sites verify <id> --domain <d> [--check]` | Domain ownership (DNS TXT) |
|
|
38
|
+
| `botu keys create\|list\|revoke --site <id>` | Manage embed API keys |
|
|
39
|
+
| `botu embed --site <id>` | Print / write the `<script>` embed snippet |
|
|
40
|
+
| `botu usage [--site <id>]` | Per-site quota and usage |
|
|
41
|
+
| `botu test --site <id>` | Verify an embed key via the loader auth exchange |
|
|
42
|
+
|
|
43
|
+
### About embed keys
|
|
44
|
+
|
|
45
|
+
The plaintext of an API key is shown **once** — at creation. `botu embed`
|
|
46
|
+
therefore can't retrieve the key of an existing site. Either pass
|
|
47
|
+
`--key pk_live_...`, or use `--new-key` to mint a fresh one and drop it
|
|
48
|
+
straight into the snippet.
|
|
49
|
+
|
|
50
|
+
## Configuration
|
|
51
|
+
|
|
52
|
+
| Env var | Default | Purpose |
|
|
53
|
+
|---|---|---|
|
|
54
|
+
| `BOTU_API_URL` | `https://botu.io` | Target deployment (set to `https://qa.botu.io` for QA) |
|
|
55
|
+
| `BOTU_JSON` | — | `1` forces JSON output globally |
|
|
56
|
+
|
|
57
|
+
Credentials are stored in `~/.paradigx/auth.json`, **shared** with other
|
|
58
|
+
Paradigx product CLIs (e.g. `tokenroute`) — they authenticate against the
|
|
59
|
+
same Logto, so logging in once is reused across them.
|
|
60
|
+
|
|
61
|
+
## Exit codes
|
|
62
|
+
|
|
63
|
+
`0` ok · `1` user error (4xx) · `2` network error · `3` server error (5xx)
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
© 2026 Paradigx. All Rights Reserved.
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "botu-cli"
|
|
3
|
+
version = "0.1.0"
|
|
4
|
+
description = "Agent-first CLI for botu — embeddable AI agent for any website"
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
requires-python = ">=3.10"
|
|
7
|
+
license = { text = "MIT" }
|
|
8
|
+
authors = [{ name = "Paradigx Pte Ltd" }]
|
|
9
|
+
keywords = ["ai", "agent", "embed", "widget", "cli", "botu"]
|
|
10
|
+
classifiers = [
|
|
11
|
+
"Development Status :: 4 - Beta",
|
|
12
|
+
"Environment :: Console",
|
|
13
|
+
"Intended Audience :: Developers",
|
|
14
|
+
"License :: OSI Approved :: MIT License",
|
|
15
|
+
"Programming Language :: Python :: 3",
|
|
16
|
+
"Programming Language :: Python :: 3.10",
|
|
17
|
+
"Programming Language :: Python :: 3.11",
|
|
18
|
+
"Programming Language :: Python :: 3.12",
|
|
19
|
+
"Programming Language :: Python :: 3.13",
|
|
20
|
+
"Topic :: Software Development :: Libraries :: Python Modules",
|
|
21
|
+
]
|
|
22
|
+
|
|
23
|
+
dependencies = [
|
|
24
|
+
"typer>=0.15,<1.0",
|
|
25
|
+
"httpx>=0.28",
|
|
26
|
+
"rich>=13.0",
|
|
27
|
+
]
|
|
28
|
+
|
|
29
|
+
[project.optional-dependencies]
|
|
30
|
+
dev = [
|
|
31
|
+
"pytest>=8.3",
|
|
32
|
+
"pytest-mock>=3.14",
|
|
33
|
+
]
|
|
34
|
+
|
|
35
|
+
[project.urls]
|
|
36
|
+
Homepage = "https://botu.io"
|
|
37
|
+
Repository = "https://github.com/jiangjin11/botu-web"
|
|
38
|
+
|
|
39
|
+
[project.scripts]
|
|
40
|
+
botu = "botu_cli.__main__:app"
|
|
41
|
+
|
|
42
|
+
[build-system]
|
|
43
|
+
requires = ["hatchling>=1.25"]
|
|
44
|
+
build-backend = "hatchling.build"
|
|
45
|
+
|
|
46
|
+
[tool.hatch.build.targets.wheel]
|
|
47
|
+
packages = ["src/botu_cli"]
|
|
48
|
+
|
|
49
|
+
[tool.pytest.ini_options]
|
|
50
|
+
testpaths = ["tests"]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.1.0"
|