buildify-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.
- buildify_cli-1.0.0/PKG-INFO +95 -0
- buildify_cli-1.0.0/README.md +82 -0
- buildify_cli-1.0.0/pyproject.toml +28 -0
- buildify_cli-1.0.0/setup.cfg +4 -0
- buildify_cli-1.0.0/src/buildify_cli/__init__.py +1 -0
- buildify_cli-1.0.0/src/buildify_cli/__main__.py +4 -0
- buildify_cli-1.0.0/src/buildify_cli/cli.py +1206 -0
- buildify_cli-1.0.0/src/buildify_cli/client.py +288 -0
- buildify_cli-1.0.0/src/buildify_cli/config.py +593 -0
- buildify_cli-1.0.0/src/buildify_cli/credential_form.py +156 -0
- buildify_cli-1.0.0/src/buildify_cli/exit_codes.py +8 -0
- buildify_cli-1.0.0/src/buildify_cli/output.py +46 -0
- buildify_cli-1.0.0/src/buildify_cli/publish_view.py +122 -0
- buildify_cli-1.0.0/src/buildify_cli/usage.md +245 -0
- buildify_cli-1.0.0/src/buildify_cli.egg-info/PKG-INFO +95 -0
- buildify_cli-1.0.0/src/buildify_cli.egg-info/SOURCES.txt +20 -0
- buildify_cli-1.0.0/src/buildify_cli.egg-info/dependency_links.txt +1 -0
- buildify_cli-1.0.0/src/buildify_cli.egg-info/entry_points.txt +2 -0
- buildify_cli-1.0.0/src/buildify_cli.egg-info/requires.txt +9 -0
- buildify_cli-1.0.0/src/buildify_cli.egg-info/top_level.txt +1 -0
- buildify_cli-1.0.0/tests/test_auth_config.py +184 -0
- buildify_cli-1.0.0/tests/test_credential_form.py +58 -0
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: buildify-cli
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: CLI for the Buildify open API: discover bundle nodes, author and test workflows (machine Bearer auth)
|
|
5
|
+
Requires-Python: >=3.10
|
|
6
|
+
Description-Content-Type: text/markdown
|
|
7
|
+
Requires-Dist: httpx<1,>=0.27
|
|
8
|
+
Requires-Dist: typer<1,>=0.12
|
|
9
|
+
Requires-Dist: tomli>=2.0.1; python_version < "3.11"
|
|
10
|
+
Requires-Dist: tomli-w<2,>=1.0
|
|
11
|
+
Provides-Extra: dev
|
|
12
|
+
Requires-Dist: pytest>=8; extra == "dev"
|
|
13
|
+
|
|
14
|
+
# buildify-cli
|
|
15
|
+
|
|
16
|
+
CLI for the Buildify **open API** (`buildify-open-api-server`): discover installed bundle nodes,
|
|
17
|
+
read their form schemas and documentation, reference workspace credentials, and create, validate,
|
|
18
|
+
test run and deploy workflows — all with a machine API key, no browser session.
|
|
19
|
+
|
|
20
|
+
`workflow deploy` publishes a draft to workers that are already bound to the flow. It does not pick
|
|
21
|
+
servers. Credentials can be created with `project create-credential` after the user confirms
|
|
22
|
+
the project, name/label and form values.
|
|
23
|
+
|
|
24
|
+
For publishing bundle JARs see the sibling [buildify-publish-cli](../buildify-publish-cli).
|
|
25
|
+
|
|
26
|
+
## Install
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
pip install buildify-cli # or pipx / uv tool install
|
|
30
|
+
buildify help # full Markdown reference on stdout
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Requires Python 3.10+.
|
|
34
|
+
|
|
35
|
+
## Configure
|
|
36
|
+
|
|
37
|
+
Create a key in the console (workspace settings → Open API keys). The full `keyId.secret` is shown
|
|
38
|
+
**only once**. One key belongs to one workspace. Save each workspace under its own profile:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
printf '%s' 'keyId.secret' | buildify config add-profile acme
|
|
42
|
+
buildify config set-key base_url https://openapi.buildify.cn
|
|
43
|
+
buildify --json key test
|
|
44
|
+
buildify --json config profiles
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
`add-profile` does not change the default. `config use <name>` does, for a person at the terminal.
|
|
48
|
+
Agents should pass `--profile <name>` instead. A repo may commit `.buildify-workspace` with only the
|
|
49
|
+
public workspace id (`tenantId` from `key test`).
|
|
50
|
+
|
|
51
|
+
If a command runs with no key: a TTY prompts and saves locally; `--json` / non-TTY exits 2 with
|
|
52
|
+
`data.reason=missing_api_key`. Several saved keys and no selection exits 2 with
|
|
53
|
+
`data.reason=profile_required`.
|
|
54
|
+
|
|
55
|
+
Config lives in the `[openapi]` section of `~/.buildifyrc` (mode `600`). Do not pass `--api-key` on
|
|
56
|
+
the command line, and do not commit the rc file or paste the secret into the repo.
|
|
57
|
+
`BUILDIFY_OPENAPI_BASE_URL` and `BUILDIFY_OPENAPI_API_KEY` override the file at runtime.
|
|
58
|
+
`BUILDIFY_OPENAPI_PROFILE` selects a saved profile. `BUILDIFY_OPENAPI_NO_PROMPT=1` disables the
|
|
59
|
+
interactive prompt. `config set-key api_key` still updates the current profile, or the legacy single key.
|
|
60
|
+
|
|
61
|
+
## Commands
|
|
62
|
+
|
|
63
|
+
| Group | Commands |
|
|
64
|
+
|-------|----------|
|
|
65
|
+
| — | `health`, `version`, `help` |
|
|
66
|
+
| `key` | `test` |
|
|
67
|
+
| `bundle` | `list`, `nodes`, `node-properties`, `node-relations`, `doc`, `cred-types`, `cred-properties` |
|
|
68
|
+
| `project` | `list`, `create`, `get`, `credentials`, `create-credential`, `workers` |
|
|
69
|
+
| `workflow` | `list`, `create`, `get-draft`, `save-draft`, `validate`, `test-run`, `cancel-test`, `deploy`, `published`, `deployment` |
|
|
70
|
+
| `config` | `init`, `set-key`, `add-profile`, `use`, `profiles`, `remove-profile`, `show` |
|
|
71
|
+
|
|
72
|
+
Every command accepts `--json` for a single-line envelope
|
|
73
|
+
(`{ok, code, msg, http_status, data}`) and maps failures onto stable exit codes:
|
|
74
|
+
`0` ok, `1` generic, `2` auth/config, `3` local validation, `4` HTTP 4xx/5xx or validation errors,
|
|
75
|
+
`5` network.
|
|
76
|
+
|
|
77
|
+
## Example
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
buildify --json bundle nodes -b official/core
|
|
81
|
+
buildify --json bundle node-properties -b official/core -n HttpRequestNode
|
|
82
|
+
buildify --json workflow validate -p proj_xxx -f ./flow.json
|
|
83
|
+
buildify --json workflow test-run -p proj_xxx -f ./flow.json --worker wk_xxx
|
|
84
|
+
buildify --json workflow deploy -p proj_xxx -w wf_xxx --worker wk_xxx --wait
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## Development
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
uv venv && uv pip install -e '.[dev]'
|
|
91
|
+
python -m buildify_cli --help
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
`src/buildify_cli/usage.md` is the source of truth for `buildify help`; keep this README aligned
|
|
95
|
+
for humans.
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# buildify-cli
|
|
2
|
+
|
|
3
|
+
CLI for the Buildify **open API** (`buildify-open-api-server`): discover installed bundle nodes,
|
|
4
|
+
read their form schemas and documentation, reference workspace credentials, and create, validate,
|
|
5
|
+
test run and deploy workflows — all with a machine API key, no browser session.
|
|
6
|
+
|
|
7
|
+
`workflow deploy` publishes a draft to workers that are already bound to the flow. It does not pick
|
|
8
|
+
servers. Credentials can be created with `project create-credential` after the user confirms
|
|
9
|
+
the project, name/label and form values.
|
|
10
|
+
|
|
11
|
+
For publishing bundle JARs see the sibling [buildify-publish-cli](../buildify-publish-cli).
|
|
12
|
+
|
|
13
|
+
## Install
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
pip install buildify-cli # or pipx / uv tool install
|
|
17
|
+
buildify help # full Markdown reference on stdout
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Requires Python 3.10+.
|
|
21
|
+
|
|
22
|
+
## Configure
|
|
23
|
+
|
|
24
|
+
Create a key in the console (workspace settings → Open API keys). The full `keyId.secret` is shown
|
|
25
|
+
**only once**. One key belongs to one workspace. Save each workspace under its own profile:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
printf '%s' 'keyId.secret' | buildify config add-profile acme
|
|
29
|
+
buildify config set-key base_url https://openapi.buildify.cn
|
|
30
|
+
buildify --json key test
|
|
31
|
+
buildify --json config profiles
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
`add-profile` does not change the default. `config use <name>` does, for a person at the terminal.
|
|
35
|
+
Agents should pass `--profile <name>` instead. A repo may commit `.buildify-workspace` with only the
|
|
36
|
+
public workspace id (`tenantId` from `key test`).
|
|
37
|
+
|
|
38
|
+
If a command runs with no key: a TTY prompts and saves locally; `--json` / non-TTY exits 2 with
|
|
39
|
+
`data.reason=missing_api_key`. Several saved keys and no selection exits 2 with
|
|
40
|
+
`data.reason=profile_required`.
|
|
41
|
+
|
|
42
|
+
Config lives in the `[openapi]` section of `~/.buildifyrc` (mode `600`). Do not pass `--api-key` on
|
|
43
|
+
the command line, and do not commit the rc file or paste the secret into the repo.
|
|
44
|
+
`BUILDIFY_OPENAPI_BASE_URL` and `BUILDIFY_OPENAPI_API_KEY` override the file at runtime.
|
|
45
|
+
`BUILDIFY_OPENAPI_PROFILE` selects a saved profile. `BUILDIFY_OPENAPI_NO_PROMPT=1` disables the
|
|
46
|
+
interactive prompt. `config set-key api_key` still updates the current profile, or the legacy single key.
|
|
47
|
+
|
|
48
|
+
## Commands
|
|
49
|
+
|
|
50
|
+
| Group | Commands |
|
|
51
|
+
|-------|----------|
|
|
52
|
+
| — | `health`, `version`, `help` |
|
|
53
|
+
| `key` | `test` |
|
|
54
|
+
| `bundle` | `list`, `nodes`, `node-properties`, `node-relations`, `doc`, `cred-types`, `cred-properties` |
|
|
55
|
+
| `project` | `list`, `create`, `get`, `credentials`, `create-credential`, `workers` |
|
|
56
|
+
| `workflow` | `list`, `create`, `get-draft`, `save-draft`, `validate`, `test-run`, `cancel-test`, `deploy`, `published`, `deployment` |
|
|
57
|
+
| `config` | `init`, `set-key`, `add-profile`, `use`, `profiles`, `remove-profile`, `show` |
|
|
58
|
+
|
|
59
|
+
Every command accepts `--json` for a single-line envelope
|
|
60
|
+
(`{ok, code, msg, http_status, data}`) and maps failures onto stable exit codes:
|
|
61
|
+
`0` ok, `1` generic, `2` auth/config, `3` local validation, `4` HTTP 4xx/5xx or validation errors,
|
|
62
|
+
`5` network.
|
|
63
|
+
|
|
64
|
+
## Example
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
buildify --json bundle nodes -b official/core
|
|
68
|
+
buildify --json bundle node-properties -b official/core -n HttpRequestNode
|
|
69
|
+
buildify --json workflow validate -p proj_xxx -f ./flow.json
|
|
70
|
+
buildify --json workflow test-run -p proj_xxx -f ./flow.json --worker wk_xxx
|
|
71
|
+
buildify --json workflow deploy -p proj_xxx -w wf_xxx --worker wk_xxx --wait
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## Development
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
uv venv && uv pip install -e '.[dev]'
|
|
78
|
+
python -m buildify_cli --help
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
`src/buildify_cli/usage.md` is the source of truth for `buildify help`; keep this README aligned
|
|
82
|
+
for humans.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=61", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "buildify-cli"
|
|
7
|
+
version = "1.0.0"
|
|
8
|
+
description = "CLI for the Buildify open API: discover bundle nodes, author and test workflows (machine Bearer auth)"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.10"
|
|
11
|
+
dependencies = [
|
|
12
|
+
"httpx>=0.27,<1",
|
|
13
|
+
"typer>=0.12,<1",
|
|
14
|
+
"tomli>=2.0.1; python_version < '3.11'",
|
|
15
|
+
"tomli-w>=1.0,<2",
|
|
16
|
+
]
|
|
17
|
+
|
|
18
|
+
[project.optional-dependencies]
|
|
19
|
+
dev = ["pytest>=8"]
|
|
20
|
+
|
|
21
|
+
[project.scripts]
|
|
22
|
+
buildify = "buildify_cli.cli:app"
|
|
23
|
+
|
|
24
|
+
[tool.setuptools.packages.find]
|
|
25
|
+
where = ["src"]
|
|
26
|
+
|
|
27
|
+
[tool.setuptools.package-data]
|
|
28
|
+
buildify_cli = ["usage.md"]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "1.0.0"
|