ktui 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.
- ktui-0.1.0/.github/workflows/ci.yml +33 -0
- ktui-0.1.0/.github/workflows/release.yml +205 -0
- ktui-0.1.0/.gitignore +40 -0
- ktui-0.1.0/LICENSE +131 -0
- ktui-0.1.0/PKG-INFO +223 -0
- ktui-0.1.0/README.md +75 -0
- ktui-0.1.0/build.sh +41 -0
- ktui-0.1.0/ktui/__init__.py +1 -0
- ktui-0.1.0/ktui/app.py +49 -0
- ktui-0.1.0/ktui/data/k8s_schema.json +48620 -0
- ktui-0.1.0/ktui/generator/__init__.py +5 -0
- ktui-0.1.0/ktui/generator/yaml_emitter.py +124 -0
- ktui-0.1.0/ktui/kubernetes/__init__.py +0 -0
- ktui-0.1.0/ktui/kubernetes/client.py +100 -0
- ktui-0.1.0/ktui/models/__init__.py +25 -0
- ktui-0.1.0/ktui/models/core.py +28 -0
- ktui-0.1.0/ktui/models/kubernetes/__init__.py +8 -0
- ktui-0.1.0/ktui/models/kubernetes/configmap.py +41 -0
- ktui-0.1.0/ktui/models/kubernetes/deployment.py +113 -0
- ktui-0.1.0/ktui/models/kubernetes/pod.py +39 -0
- ktui-0.1.0/ktui/models/kubernetes/service.py +86 -0
- ktui-0.1.0/ktui/models/openshift/__init__.py +5 -0
- ktui-0.1.0/ktui/models/openshift/route.py +105 -0
- ktui-0.1.0/ktui/models/shared/__init__.py +207 -0
- ktui-0.1.0/ktui/registry.py +122 -0
- ktui-0.1.0/ktui/schema/__init__.py +1 -0
- ktui-0.1.0/ktui/schema/emitter.py +28 -0
- ktui-0.1.0/ktui/schema/loader.py +103 -0
- ktui-0.1.0/ktui/ui/__init__.py +0 -0
- ktui-0.1.0/ktui/ui/engine/__init__.py +0 -0
- ktui-0.1.0/ktui/ui/engine/form_builder.py +266 -0
- ktui-0.1.0/ktui/ui/engine/schema_form_builder.py +450 -0
- ktui-0.1.0/ktui/ui/engine/state.py +56 -0
- ktui-0.1.0/ktui/ui/screens/__init__.py +0 -0
- ktui-0.1.0/ktui/ui/screens/cluster_import.py +124 -0
- ktui-0.1.0/ktui/ui/screens/directory_picker.py +112 -0
- ktui-0.1.0/ktui/ui/screens/field_picker.py +195 -0
- ktui-0.1.0/ktui/ui/screens/main_screen.py +377 -0
- ktui-0.1.0/ktui/ui/screens/yaml_preview.py +129 -0
- ktui-0.1.0/ktui/ui/styles/.gitkeep +0 -0
- ktui-0.1.0/ktui/ui/styles/app.tcss +165 -0
- ktui-0.1.0/ktui/ui/widgets/__init__.py +0 -0
- ktui-0.1.0/ktui/ui/widgets/connection_panel.py +157 -0
- ktui-0.1.0/ktui/ui/widgets/list_editor.py +208 -0
- ktui-0.1.0/ktui/ui/widgets/map_editor.py +180 -0
- ktui-0.1.0/ktui.spec +89 -0
- ktui-0.1.0/npm-package/bin/ktui.js +58 -0
- ktui-0.1.0/npm-package/npm/ktui-darwin-arm64/package.json +12 -0
- ktui-0.1.0/npm-package/npm/ktui-linux-x64/package.json +12 -0
- ktui-0.1.0/npm-package/npm/ktui-win32-x64/package.json +12 -0
- ktui-0.1.0/npm-package/package.json +26 -0
- ktui-0.1.0/npm-package/scripts/postinstall.js +17 -0
- ktui-0.1.0/pyproject.toml +35 -0
- ktui-0.1.0/test_full_suite.py +176 -0
- ktui-0.1.0/test_interaction.py +71 -0
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main, dev]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
test:
|
|
11
|
+
name: Tests (Python ${{ matrix.python-version }})
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
strategy:
|
|
14
|
+
matrix:
|
|
15
|
+
python-version: ["3.12", "3.13"]
|
|
16
|
+
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v4
|
|
19
|
+
|
|
20
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
21
|
+
uses: actions/setup-python@v5
|
|
22
|
+
with:
|
|
23
|
+
python-version: ${{ matrix.python-version }}
|
|
24
|
+
cache: pip
|
|
25
|
+
|
|
26
|
+
- name: Install dependencies
|
|
27
|
+
run: pip install -e ".[dev]"
|
|
28
|
+
|
|
29
|
+
- name: Run interaction tests
|
|
30
|
+
run: python test_interaction.py
|
|
31
|
+
|
|
32
|
+
- name: Run full suite
|
|
33
|
+
run: python test_full_suite.py
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- "v*.*.*"
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: write # to create GitHub Release + upload assets
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
# ─────────────────────────────────────────────────────────────────────────────
|
|
13
|
+
# 1. Run tests before doing anything
|
|
14
|
+
# ─────────────────────────────────────────────────────────────────────────────
|
|
15
|
+
test:
|
|
16
|
+
name: Tests
|
|
17
|
+
runs-on: ubuntu-latest
|
|
18
|
+
steps:
|
|
19
|
+
- uses: actions/checkout@v4
|
|
20
|
+
- uses: actions/setup-python@v5
|
|
21
|
+
with:
|
|
22
|
+
python-version: "3.12"
|
|
23
|
+
cache: pip
|
|
24
|
+
- run: pip install -e ".[dev]"
|
|
25
|
+
- run: python test_interaction.py
|
|
26
|
+
- run: python test_full_suite.py
|
|
27
|
+
|
|
28
|
+
# ─────────────────────────────────────────────────────────────────────────────
|
|
29
|
+
# 2. Build a self-contained binary on each platform
|
|
30
|
+
# ─────────────────────────────────────────────────────────────────────────────
|
|
31
|
+
build:
|
|
32
|
+
name: Build — ${{ matrix.target }}
|
|
33
|
+
needs: test
|
|
34
|
+
runs-on: ${{ matrix.os }}
|
|
35
|
+
strategy:
|
|
36
|
+
fail-fast: false
|
|
37
|
+
matrix:
|
|
38
|
+
include:
|
|
39
|
+
- os: ubuntu-latest
|
|
40
|
+
target: linux-x64
|
|
41
|
+
bin: ktui
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
- os: macos-latest # Apple Silicon (M1)
|
|
45
|
+
target: darwin-arm64
|
|
46
|
+
bin: ktui
|
|
47
|
+
|
|
48
|
+
- os: windows-latest
|
|
49
|
+
target: win32-x64
|
|
50
|
+
bin: ktui.exe
|
|
51
|
+
|
|
52
|
+
steps:
|
|
53
|
+
- uses: actions/checkout@v4
|
|
54
|
+
|
|
55
|
+
- uses: actions/setup-python@v5
|
|
56
|
+
with:
|
|
57
|
+
python-version: "3.12"
|
|
58
|
+
cache: pip
|
|
59
|
+
|
|
60
|
+
- name: Install dependencies + PyInstaller
|
|
61
|
+
run: |
|
|
62
|
+
pip install -e .
|
|
63
|
+
pip install pyinstaller
|
|
64
|
+
|
|
65
|
+
- name: Build binary
|
|
66
|
+
run: |
|
|
67
|
+
pyinstaller ktui.spec --distpath dist --workpath build/pyinstaller --clean -y
|
|
68
|
+
|
|
69
|
+
- name: Upload binary artifact
|
|
70
|
+
uses: actions/upload-artifact@v4
|
|
71
|
+
with:
|
|
72
|
+
name: ktui-${{ matrix.target }}
|
|
73
|
+
path: dist/${{ matrix.bin }}
|
|
74
|
+
if-no-files-found: error
|
|
75
|
+
retention-days: 1
|
|
76
|
+
|
|
77
|
+
# ─────────────────────────────────────────────────────────────────────────────
|
|
78
|
+
# 3. Create GitHub Release and attach all binaries
|
|
79
|
+
# ─────────────────────────────────────────────────────────────────────────────
|
|
80
|
+
github-release:
|
|
81
|
+
name: GitHub Release
|
|
82
|
+
needs: build
|
|
83
|
+
runs-on: ubuntu-latest
|
|
84
|
+
steps:
|
|
85
|
+
- uses: actions/checkout@v4
|
|
86
|
+
|
|
87
|
+
- name: Download all binaries
|
|
88
|
+
uses: actions/download-artifact@v4
|
|
89
|
+
with:
|
|
90
|
+
path: artifacts/
|
|
91
|
+
|
|
92
|
+
- name: Rename binaries for release assets
|
|
93
|
+
run: |
|
|
94
|
+
mkdir -p release
|
|
95
|
+
cp artifacts/ktui-linux-x64/ktui release/ktui-linux-x64
|
|
96
|
+
cp artifacts/ktui-darwin-arm64/ktui release/ktui-darwin-arm64
|
|
97
|
+
cp artifacts/ktui-win32-x64/ktui.exe release/ktui-win32-x64.exe
|
|
98
|
+
chmod +x release/ktui-linux-x64 release/ktui-darwin-arm64
|
|
99
|
+
|
|
100
|
+
- name: Create GitHub Release
|
|
101
|
+
uses: softprops/action-gh-release@v2
|
|
102
|
+
with:
|
|
103
|
+
generate_release_notes: true
|
|
104
|
+
files: release/*
|
|
105
|
+
|
|
106
|
+
# ─────────────────────────────────────────────────────────────────────────────
|
|
107
|
+
# 4. Publish to npm
|
|
108
|
+
# ─────────────────────────────────────────────────────────────────────────────
|
|
109
|
+
npm-publish:
|
|
110
|
+
name: Publish to npm
|
|
111
|
+
needs: build
|
|
112
|
+
runs-on: ubuntu-latest
|
|
113
|
+
env:
|
|
114
|
+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
115
|
+
|
|
116
|
+
steps:
|
|
117
|
+
- uses: actions/checkout@v4
|
|
118
|
+
|
|
119
|
+
- uses: actions/setup-node@v4
|
|
120
|
+
with:
|
|
121
|
+
node-version: "20"
|
|
122
|
+
registry-url: "https://registry.npmjs.org"
|
|
123
|
+
|
|
124
|
+
- name: Download all binaries
|
|
125
|
+
uses: actions/download-artifact@v4
|
|
126
|
+
with:
|
|
127
|
+
path: artifacts/
|
|
128
|
+
|
|
129
|
+
- name: Stage binaries into npm platform packages
|
|
130
|
+
run: |
|
|
131
|
+
VERSION="${GITHUB_REF_NAME#v}" # strip leading "v" from tag
|
|
132
|
+
|
|
133
|
+
stage() {
|
|
134
|
+
local target="$1" bin="$2"
|
|
135
|
+
local pkg_dir="npm-package/npm/ktui-${target}"
|
|
136
|
+
mkdir -p "${pkg_dir}/bin"
|
|
137
|
+
cp "artifacts/ktui-${target}/${bin}" "${pkg_dir}/bin/${bin}"
|
|
138
|
+
chmod +x "${pkg_dir}/bin/${bin}" 2>/dev/null || true
|
|
139
|
+
# Stamp version into the sub-package
|
|
140
|
+
node -e "
|
|
141
|
+
const fs = require('fs');
|
|
142
|
+
const p = '${pkg_dir}/package.json';
|
|
143
|
+
const j = JSON.parse(fs.readFileSync(p));
|
|
144
|
+
j.version = '${VERSION}';
|
|
145
|
+
fs.writeFileSync(p, JSON.stringify(j, null, 2) + '\n');
|
|
146
|
+
"
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
stage linux-x64 ktui
|
|
150
|
+
stage darwin-arm64 ktui
|
|
151
|
+
stage win32-x64 ktui.exe
|
|
152
|
+
|
|
153
|
+
# Stamp version into main package and optionalDependencies
|
|
154
|
+
node -e "
|
|
155
|
+
const fs = require('fs');
|
|
156
|
+
const p = 'npm-package/package.json';
|
|
157
|
+
const j = JSON.parse(fs.readFileSync(p));
|
|
158
|
+
j.version = '${VERSION}';
|
|
159
|
+
for (const k of Object.keys(j.optionalDependencies)) {
|
|
160
|
+
j.optionalDependencies[k] = '${VERSION}';
|
|
161
|
+
}
|
|
162
|
+
fs.writeFileSync(p, JSON.stringify(j, null, 2) + '\n');
|
|
163
|
+
"
|
|
164
|
+
|
|
165
|
+
- name: Publish platform packages
|
|
166
|
+
run: |
|
|
167
|
+
for pkg in npm-package/npm/ktui-*/; do
|
|
168
|
+
echo "Publishing $pkg …"
|
|
169
|
+
cd "$pkg"
|
|
170
|
+
npm publish --access public
|
|
171
|
+
cd "$GITHUB_WORKSPACE"
|
|
172
|
+
done
|
|
173
|
+
|
|
174
|
+
- name: Publish main package
|
|
175
|
+
run: |
|
|
176
|
+
cd npm-package
|
|
177
|
+
npm publish --access public
|
|
178
|
+
|
|
179
|
+
# ─────────────────────────────────────────────────────────────────────────────
|
|
180
|
+
# 5. Publish to PyPI
|
|
181
|
+
# ─────────────────────────────────────────────────────────────────────────────
|
|
182
|
+
pypi-publish:
|
|
183
|
+
name: Publish to PyPI
|
|
184
|
+
needs: test
|
|
185
|
+
runs-on: ubuntu-latest
|
|
186
|
+
permissions:
|
|
187
|
+
id-token: write # required for OIDC PyPI publishing
|
|
188
|
+
|
|
189
|
+
steps:
|
|
190
|
+
- uses: actions/checkout@v4
|
|
191
|
+
|
|
192
|
+
- name: Set up Python
|
|
193
|
+
uses: actions/setup-python@v5
|
|
194
|
+
with:
|
|
195
|
+
python-version: "3.12"
|
|
196
|
+
cache: pip
|
|
197
|
+
|
|
198
|
+
- name: Install build tool
|
|
199
|
+
run: pip install build
|
|
200
|
+
|
|
201
|
+
- name: Build sdist and wheel
|
|
202
|
+
run: python -m build
|
|
203
|
+
|
|
204
|
+
- name: Publish to PyPI
|
|
205
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
ktui-0.1.0/.gitignore
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*.pyo
|
|
5
|
+
*.pyd
|
|
6
|
+
.Python
|
|
7
|
+
*.egg-info/
|
|
8
|
+
dist/
|
|
9
|
+
build/
|
|
10
|
+
*.egg
|
|
11
|
+
|
|
12
|
+
# PyInstaller build artifacts
|
|
13
|
+
build/pyinstaller/
|
|
14
|
+
|
|
15
|
+
# npm binary artifacts (built by CI, not committed)
|
|
16
|
+
npm-package/npm/*/bin/
|
|
17
|
+
|
|
18
|
+
# Virtual environments
|
|
19
|
+
.venv/
|
|
20
|
+
venv/
|
|
21
|
+
env/
|
|
22
|
+
|
|
23
|
+
# Editor
|
|
24
|
+
.vscode/
|
|
25
|
+
.idea/
|
|
26
|
+
*.swp
|
|
27
|
+
*.swo
|
|
28
|
+
|
|
29
|
+
# OS
|
|
30
|
+
.DS_Store
|
|
31
|
+
Thumbs.db
|
|
32
|
+
|
|
33
|
+
# Test scratch files
|
|
34
|
+
test_debug*.py
|
|
35
|
+
test_add_field*.py
|
|
36
|
+
test_merge*.py
|
|
37
|
+
test_tree.py
|
|
38
|
+
test_quit.py
|
|
39
|
+
dom.txt
|
|
40
|
+
output.yaml
|
ktui-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
# PolyForm Noncommercial License 1.0.0
|
|
2
|
+
|
|
3
|
+
<https://polyformproject.org/licenses/noncommercial/1.0.0>
|
|
4
|
+
|
|
5
|
+
## Acceptance
|
|
6
|
+
|
|
7
|
+
In order to get any license under these terms, you must agree
|
|
8
|
+
to them as both strict obligations and conditions to all
|
|
9
|
+
your licenses.
|
|
10
|
+
|
|
11
|
+
## Copyright License
|
|
12
|
+
|
|
13
|
+
The licensor grants you a copyright license for the
|
|
14
|
+
software to do everything you might do with the software
|
|
15
|
+
that would otherwise infringe the licensor's copyright
|
|
16
|
+
in it for any permitted purpose. However, you may
|
|
17
|
+
only distribute the software according to [Distribution
|
|
18
|
+
License](#distribution-license) and make changes or new works
|
|
19
|
+
based on the software according to [Changes and New Works
|
|
20
|
+
License](#changes-and-new-works-license).
|
|
21
|
+
|
|
22
|
+
## Distribution License
|
|
23
|
+
|
|
24
|
+
The licensor grants you an additional copyright license
|
|
25
|
+
to distribute copies of the software. Your license
|
|
26
|
+
to distribute covers distributing the software with
|
|
27
|
+
changes and new works permitted by [Changes and New Works
|
|
28
|
+
License](#changes-and-new-works-license).
|
|
29
|
+
|
|
30
|
+
## Notices
|
|
31
|
+
|
|
32
|
+
You must ensure that anyone who gets a copy of any part of
|
|
33
|
+
the software from you also gets a copy of these terms or the
|
|
34
|
+
URL for them above, as well as copies of any plain-text lines
|
|
35
|
+
beginning with `Required Notice:` that the licensor provided
|
|
36
|
+
with the software. For example:
|
|
37
|
+
|
|
38
|
+
> Required Notice: Copyright Yoyodyne, Inc. (http://example.com)
|
|
39
|
+
|
|
40
|
+
## Changes and New Works License
|
|
41
|
+
|
|
42
|
+
The licensor grants you an additional copyright license to
|
|
43
|
+
make changes and new works based on the software for any
|
|
44
|
+
permitted purpose.
|
|
45
|
+
|
|
46
|
+
## Patent License
|
|
47
|
+
|
|
48
|
+
The licensor grants you a patent license for the software that
|
|
49
|
+
covers patent claims the licensor can license, or becomes able
|
|
50
|
+
to license, that you would infringe by using the software.
|
|
51
|
+
|
|
52
|
+
## Noncommercial Purposes
|
|
53
|
+
|
|
54
|
+
Any noncommercial purpose is a permitted purpose.
|
|
55
|
+
|
|
56
|
+
## Personal Uses
|
|
57
|
+
|
|
58
|
+
Personal use for research, experiment, and testing for
|
|
59
|
+
the benefit of public knowledge, personal study, private
|
|
60
|
+
entertainment, hobby projects, amateur pursuits, or religious
|
|
61
|
+
observance, without any anticipated commercial application,
|
|
62
|
+
is use for a permitted purpose.
|
|
63
|
+
|
|
64
|
+
## Noncommercial Organizations
|
|
65
|
+
|
|
66
|
+
Use by any charitable organization, educational institution,
|
|
67
|
+
public research organization, public safety or health
|
|
68
|
+
organization, environmental protection organization,
|
|
69
|
+
or government institution is use for a permitted purpose
|
|
70
|
+
regardless of the source of funding or obligations resulting
|
|
71
|
+
from the funding.
|
|
72
|
+
|
|
73
|
+
## Fair Use
|
|
74
|
+
|
|
75
|
+
You may have "fair use" rights for the software under the
|
|
76
|
+
law. These terms do not limit them.
|
|
77
|
+
|
|
78
|
+
## No Other Rights
|
|
79
|
+
|
|
80
|
+
These terms do not allow you to sublicense or transfer any of
|
|
81
|
+
your licenses to anyone else, or prevent the licensor from
|
|
82
|
+
granting licenses to anyone else. These terms do not imply
|
|
83
|
+
any other licenses.
|
|
84
|
+
|
|
85
|
+
## Patent Defense
|
|
86
|
+
|
|
87
|
+
If you make any written claim that the software infringes or
|
|
88
|
+
contributes to infringement of any patent, your patent license
|
|
89
|
+
for the software granted under these terms ends immediately. If
|
|
90
|
+
your company makes such a claim, your patent license ends
|
|
91
|
+
immediately for work on behalf of your company.
|
|
92
|
+
|
|
93
|
+
## Violations
|
|
94
|
+
|
|
95
|
+
The first time you are notified in writing that you have
|
|
96
|
+
violated any of these terms, or done anything with the software
|
|
97
|
+
not covered by your licenses, your licenses can nonetheless
|
|
98
|
+
continue if you come into full compliance with these terms,
|
|
99
|
+
and take practical steps to correct past violations, within
|
|
100
|
+
32 days of receiving notice. Otherwise, all your licenses
|
|
101
|
+
end immediately.
|
|
102
|
+
|
|
103
|
+
## No Liability
|
|
104
|
+
|
|
105
|
+
***As far as the law allows, the software comes as is, without
|
|
106
|
+
any warranty or condition, and the licensor will not be liable
|
|
107
|
+
to you for any damages arising out of these terms or the use
|
|
108
|
+
or nature of the software, under any kind of legal claim.***
|
|
109
|
+
|
|
110
|
+
## Definitions
|
|
111
|
+
|
|
112
|
+
The **licensor** is the individual or entity offering these
|
|
113
|
+
terms, and the **software** is the software the licensor makes
|
|
114
|
+
available under these terms.
|
|
115
|
+
|
|
116
|
+
**You** refers to the individual or entity agreeing to these
|
|
117
|
+
terms.
|
|
118
|
+
|
|
119
|
+
**Your company** is any legal entity, sole proprietorship,
|
|
120
|
+
or other kind of organization that you work for, plus all
|
|
121
|
+
organizations that have control over, are under the control of,
|
|
122
|
+
or are under common control with that organization. **Control**
|
|
123
|
+
means ownership of substantially all the assets of an entity,
|
|
124
|
+
or the power to direct its management and policies by vote,
|
|
125
|
+
contract, or otherwise. Control can be direct or indirect.
|
|
126
|
+
|
|
127
|
+
**Your licenses** are all the licenses granted to you for the
|
|
128
|
+
software under these terms.
|
|
129
|
+
|
|
130
|
+
**Use** means anything you do with the software requiring one
|
|
131
|
+
of your licenses.
|
ktui-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: ktui
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: ktui — an interactive Kubernetes TUI manifest builder
|
|
5
|
+
License: # PolyForm Noncommercial License 1.0.0
|
|
6
|
+
|
|
7
|
+
<https://polyformproject.org/licenses/noncommercial/1.0.0>
|
|
8
|
+
|
|
9
|
+
## Acceptance
|
|
10
|
+
|
|
11
|
+
In order to get any license under these terms, you must agree
|
|
12
|
+
to them as both strict obligations and conditions to all
|
|
13
|
+
your licenses.
|
|
14
|
+
|
|
15
|
+
## Copyright License
|
|
16
|
+
|
|
17
|
+
The licensor grants you a copyright license for the
|
|
18
|
+
software to do everything you might do with the software
|
|
19
|
+
that would otherwise infringe the licensor's copyright
|
|
20
|
+
in it for any permitted purpose. However, you may
|
|
21
|
+
only distribute the software according to [Distribution
|
|
22
|
+
License](#distribution-license) and make changes or new works
|
|
23
|
+
based on the software according to [Changes and New Works
|
|
24
|
+
License](#changes-and-new-works-license).
|
|
25
|
+
|
|
26
|
+
## Distribution License
|
|
27
|
+
|
|
28
|
+
The licensor grants you an additional copyright license
|
|
29
|
+
to distribute copies of the software. Your license
|
|
30
|
+
to distribute covers distributing the software with
|
|
31
|
+
changes and new works permitted by [Changes and New Works
|
|
32
|
+
License](#changes-and-new-works-license).
|
|
33
|
+
|
|
34
|
+
## Notices
|
|
35
|
+
|
|
36
|
+
You must ensure that anyone who gets a copy of any part of
|
|
37
|
+
the software from you also gets a copy of these terms or the
|
|
38
|
+
URL for them above, as well as copies of any plain-text lines
|
|
39
|
+
beginning with `Required Notice:` that the licensor provided
|
|
40
|
+
with the software. For example:
|
|
41
|
+
|
|
42
|
+
> Required Notice: Copyright Yoyodyne, Inc. (http://example.com)
|
|
43
|
+
|
|
44
|
+
## Changes and New Works License
|
|
45
|
+
|
|
46
|
+
The licensor grants you an additional copyright license to
|
|
47
|
+
make changes and new works based on the software for any
|
|
48
|
+
permitted purpose.
|
|
49
|
+
|
|
50
|
+
## Patent License
|
|
51
|
+
|
|
52
|
+
The licensor grants you a patent license for the software that
|
|
53
|
+
covers patent claims the licensor can license, or becomes able
|
|
54
|
+
to license, that you would infringe by using the software.
|
|
55
|
+
|
|
56
|
+
## Noncommercial Purposes
|
|
57
|
+
|
|
58
|
+
Any noncommercial purpose is a permitted purpose.
|
|
59
|
+
|
|
60
|
+
## Personal Uses
|
|
61
|
+
|
|
62
|
+
Personal use for research, experiment, and testing for
|
|
63
|
+
the benefit of public knowledge, personal study, private
|
|
64
|
+
entertainment, hobby projects, amateur pursuits, or religious
|
|
65
|
+
observance, without any anticipated commercial application,
|
|
66
|
+
is use for a permitted purpose.
|
|
67
|
+
|
|
68
|
+
## Noncommercial Organizations
|
|
69
|
+
|
|
70
|
+
Use by any charitable organization, educational institution,
|
|
71
|
+
public research organization, public safety or health
|
|
72
|
+
organization, environmental protection organization,
|
|
73
|
+
or government institution is use for a permitted purpose
|
|
74
|
+
regardless of the source of funding or obligations resulting
|
|
75
|
+
from the funding.
|
|
76
|
+
|
|
77
|
+
## Fair Use
|
|
78
|
+
|
|
79
|
+
You may have "fair use" rights for the software under the
|
|
80
|
+
law. These terms do not limit them.
|
|
81
|
+
|
|
82
|
+
## No Other Rights
|
|
83
|
+
|
|
84
|
+
These terms do not allow you to sublicense or transfer any of
|
|
85
|
+
your licenses to anyone else, or prevent the licensor from
|
|
86
|
+
granting licenses to anyone else. These terms do not imply
|
|
87
|
+
any other licenses.
|
|
88
|
+
|
|
89
|
+
## Patent Defense
|
|
90
|
+
|
|
91
|
+
If you make any written claim that the software infringes or
|
|
92
|
+
contributes to infringement of any patent, your patent license
|
|
93
|
+
for the software granted under these terms ends immediately. If
|
|
94
|
+
your company makes such a claim, your patent license ends
|
|
95
|
+
immediately for work on behalf of your company.
|
|
96
|
+
|
|
97
|
+
## Violations
|
|
98
|
+
|
|
99
|
+
The first time you are notified in writing that you have
|
|
100
|
+
violated any of these terms, or done anything with the software
|
|
101
|
+
not covered by your licenses, your licenses can nonetheless
|
|
102
|
+
continue if you come into full compliance with these terms,
|
|
103
|
+
and take practical steps to correct past violations, within
|
|
104
|
+
32 days of receiving notice. Otherwise, all your licenses
|
|
105
|
+
end immediately.
|
|
106
|
+
|
|
107
|
+
## No Liability
|
|
108
|
+
|
|
109
|
+
***As far as the law allows, the software comes as is, without
|
|
110
|
+
any warranty or condition, and the licensor will not be liable
|
|
111
|
+
to you for any damages arising out of these terms or the use
|
|
112
|
+
or nature of the software, under any kind of legal claim.***
|
|
113
|
+
|
|
114
|
+
## Definitions
|
|
115
|
+
|
|
116
|
+
The **licensor** is the individual or entity offering these
|
|
117
|
+
terms, and the **software** is the software the licensor makes
|
|
118
|
+
available under these terms.
|
|
119
|
+
|
|
120
|
+
**You** refers to the individual or entity agreeing to these
|
|
121
|
+
terms.
|
|
122
|
+
|
|
123
|
+
**Your company** is any legal entity, sole proprietorship,
|
|
124
|
+
or other kind of organization that you work for, plus all
|
|
125
|
+
organizations that have control over, are under the control of,
|
|
126
|
+
or are under common control with that organization. **Control**
|
|
127
|
+
means ownership of substantially all the assets of an entity,
|
|
128
|
+
or the power to direct its management and policies by vote,
|
|
129
|
+
contract, or otherwise. Control can be direct or indirect.
|
|
130
|
+
|
|
131
|
+
**Your licenses** are all the licenses granted to you for the
|
|
132
|
+
software under these terms.
|
|
133
|
+
|
|
134
|
+
**Use** means anything you do with the software requiring one
|
|
135
|
+
of your licenses.
|
|
136
|
+
License-File: LICENSE
|
|
137
|
+
Keywords: cli,k8s,kubernetes,terminal,tui,yaml
|
|
138
|
+
Requires-Python: >=3.12
|
|
139
|
+
Requires-Dist: pydantic>=2.0.0
|
|
140
|
+
Requires-Dist: pyyaml>=6.0.0
|
|
141
|
+
Requires-Dist: ruamel-yaml>=0.18.0
|
|
142
|
+
Requires-Dist: textual>=0.80.0
|
|
143
|
+
Provides-Extra: dev
|
|
144
|
+
Requires-Dist: pyinstaller>=6.0.0; extra == 'dev'
|
|
145
|
+
Requires-Dist: pytest-asyncio>=0.23.0; extra == 'dev'
|
|
146
|
+
Requires-Dist: pytest>=8.0.0; extra == 'dev'
|
|
147
|
+
Description-Content-Type: text/markdown
|
|
148
|
+
|
|
149
|
+
# ktui
|
|
150
|
+
|
|
151
|
+
> An interactive terminal UI for building Kubernetes YAML manifests — schema-driven forms, field picker, and live preview.
|
|
152
|
+
|
|
153
|
+
---
|
|
154
|
+
|
|
155
|
+
## What it does
|
|
156
|
+
|
|
157
|
+
`ktui` is a terminal application that lets you interactively build Kubernetes resource manifests without memorising YAML structure. Pick a resource type, fill in only the fields you need, add optional fields through a searchable picker, and preview or save the generated YAML — all from your terminal.
|
|
158
|
+
|
|
159
|
+
**Key features:**
|
|
160
|
+
- Schema-driven forms for common Kubernetes resources (Deployment, Service, ConfigMap, RBAC, …)
|
|
161
|
+
- Searchable field picker with grouped categories — select individual fields or entire groups at once
|
|
162
|
+
- Added fields are intelligently merged into the correct section (no duplicate categories)
|
|
163
|
+
- Live YAML preview
|
|
164
|
+
- Theme switching (`t` to cycle)
|
|
165
|
+
- Clean keyboard-first navigation
|
|
166
|
+
|
|
167
|
+
---
|
|
168
|
+
|
|
169
|
+
## Requirements
|
|
170
|
+
|
|
171
|
+
- Python ≥ 3.12
|
|
172
|
+
- A terminal with UTF-8 support (minimum 80×24)
|
|
173
|
+
- Truecolor recommended but not required
|
|
174
|
+
|
|
175
|
+
---
|
|
176
|
+
|
|
177
|
+
## Installation
|
|
178
|
+
|
|
179
|
+
```bash
|
|
180
|
+
# From source (development)
|
|
181
|
+
git clone <repo-url>
|
|
182
|
+
cd ktui
|
|
183
|
+
python -m venv .venv && source .venv/bin/activate
|
|
184
|
+
pip install -e .
|
|
185
|
+
|
|
186
|
+
# Run
|
|
187
|
+
ktui
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
---
|
|
191
|
+
|
|
192
|
+
## Keybindings
|
|
193
|
+
|
|
194
|
+
| Key | Action |
|
|
195
|
+
|-----|--------|
|
|
196
|
+
| `↑ / ↓` | Navigate list |
|
|
197
|
+
| `Enter` | Select resource / confirm |
|
|
198
|
+
| `p` | Preview YAML |
|
|
199
|
+
| `Ctrl+S` | Save YAML |
|
|
200
|
+
| `t` | Cycle theme |
|
|
201
|
+
| `Esc` | Close modal / go back |
|
|
202
|
+
| `q` | Quit |
|
|
203
|
+
|
|
204
|
+
**Inside Field Picker:**
|
|
205
|
+
|
|
206
|
+
| Key | Action |
|
|
207
|
+
|-----|--------|
|
|
208
|
+
| `↑ / ↓` | Navigate fields |
|
|
209
|
+
| `Enter` on leaf | Toggle field selection |
|
|
210
|
+
| `Enter` on 📁 group | Select / deselect all fields in group |
|
|
211
|
+
| `Esc` | Cancel without adding |
|
|
212
|
+
|
|
213
|
+
---
|
|
214
|
+
|
|
215
|
+
## Status
|
|
216
|
+
|
|
217
|
+
Early development — schemas and features are actively expanding.
|
|
218
|
+
|
|
219
|
+
---
|
|
220
|
+
|
|
221
|
+
## License
|
|
222
|
+
|
|
223
|
+
[PolyForm Noncommercial License 1.0.0](LICENSE)
|
ktui-0.1.0/README.md
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# ktui
|
|
2
|
+
|
|
3
|
+
> An interactive terminal UI for building Kubernetes YAML manifests — schema-driven forms, field picker, and live preview.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## What it does
|
|
8
|
+
|
|
9
|
+
`ktui` is a terminal application that lets you interactively build Kubernetes resource manifests without memorising YAML structure. Pick a resource type, fill in only the fields you need, add optional fields through a searchable picker, and preview or save the generated YAML — all from your terminal.
|
|
10
|
+
|
|
11
|
+
**Key features:**
|
|
12
|
+
- Schema-driven forms for common Kubernetes resources (Deployment, Service, ConfigMap, RBAC, …)
|
|
13
|
+
- Searchable field picker with grouped categories — select individual fields or entire groups at once
|
|
14
|
+
- Added fields are intelligently merged into the correct section (no duplicate categories)
|
|
15
|
+
- Live YAML preview
|
|
16
|
+
- Theme switching (`t` to cycle)
|
|
17
|
+
- Clean keyboard-first navigation
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Requirements
|
|
22
|
+
|
|
23
|
+
- Python ≥ 3.12
|
|
24
|
+
- A terminal with UTF-8 support (minimum 80×24)
|
|
25
|
+
- Truecolor recommended but not required
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## Installation
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
# From source (development)
|
|
33
|
+
git clone <repo-url>
|
|
34
|
+
cd ktui
|
|
35
|
+
python -m venv .venv && source .venv/bin/activate
|
|
36
|
+
pip install -e .
|
|
37
|
+
|
|
38
|
+
# Run
|
|
39
|
+
ktui
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## Keybindings
|
|
45
|
+
|
|
46
|
+
| Key | Action |
|
|
47
|
+
|-----|--------|
|
|
48
|
+
| `↑ / ↓` | Navigate list |
|
|
49
|
+
| `Enter` | Select resource / confirm |
|
|
50
|
+
| `p` | Preview YAML |
|
|
51
|
+
| `Ctrl+S` | Save YAML |
|
|
52
|
+
| `t` | Cycle theme |
|
|
53
|
+
| `Esc` | Close modal / go back |
|
|
54
|
+
| `q` | Quit |
|
|
55
|
+
|
|
56
|
+
**Inside Field Picker:**
|
|
57
|
+
|
|
58
|
+
| Key | Action |
|
|
59
|
+
|-----|--------|
|
|
60
|
+
| `↑ / ↓` | Navigate fields |
|
|
61
|
+
| `Enter` on leaf | Toggle field selection |
|
|
62
|
+
| `Enter` on 📁 group | Select / deselect all fields in group |
|
|
63
|
+
| `Esc` | Cancel without adding |
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## Status
|
|
68
|
+
|
|
69
|
+
Early development — schemas and features are actively expanding.
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
## License
|
|
74
|
+
|
|
75
|
+
[PolyForm Noncommercial License 1.0.0](LICENSE)
|