skit-cli 0.0.1__py3-none-any.whl
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.
- skit/__init__.py +3 -0
- skit/analyzer.py +410 -0
- skit/argspec.py +528 -0
- skit/argstate.py +166 -0
- skit/atomic.py +101 -0
- skit/cli.py +1621 -0
- skit/config.py +255 -0
- skit/editor.py +77 -0
- skit/flows.py +596 -0
- skit/i18n.py +324 -0
- skit/inlineform.py +61 -0
- skit/launcher.py +326 -0
- skit/locales/zh_CN/LC_MESSAGES/skit.mo +0 -0
- skit/locales/zh_TW/LC_MESSAGES/skit.mo +0 -0
- skit/metawriter.py +267 -0
- skit/models.py +154 -0
- skit/paths.py +44 -0
- skit/pep723.py +292 -0
- skit/promptform.py +67 -0
- skit/reconcile.py +321 -0
- skit/shim.py +386 -0
- skit/store.py +566 -0
- skit/theme.py +123 -0
- skit/tokens.py +112 -0
- skit/tui.py +774 -0
- skit/tui_add.py +361 -0
- skit/tui_footer.py +38 -0
- skit/tui_form.py +586 -0
- skit/tui_health.py +150 -0
- skit/tui_prefs.py +175 -0
- skit/tui_settings.py +374 -0
- skit/uvman.py +288 -0
- skit_cli-0.0.1.dist-info/METADATA +199 -0
- skit_cli-0.0.1.dist-info/RECORD +37 -0
- skit_cli-0.0.1.dist-info/WHEEL +4 -0
- skit_cli-0.0.1.dist-info/entry_points.txt +3 -0
- skit_cli-0.0.1.dist-info/licenses/LICENSE +21 -0
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: skit-cli
|
|
3
|
+
Version: 0.0.1
|
|
4
|
+
Summary: Script launcher and parameter manager: pick a script, fill in a form, run — no more opening an IDE just to tweak constants.
|
|
5
|
+
Keywords: script,launcher,uv,tui,pep723,script-manager
|
|
6
|
+
Author: Yi-Ting Chiu
|
|
7
|
+
Author-email: Yi-Ting Chiu <mytim710@gmail.com>
|
|
8
|
+
License-Expression: MIT
|
|
9
|
+
License-File: LICENSE
|
|
10
|
+
Classifier: Development Status :: 3 - Alpha
|
|
11
|
+
Classifier: Environment :: Console
|
|
12
|
+
Classifier: Environment :: Console :: Curses
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: Intended Audience :: End Users/Desktop
|
|
15
|
+
Classifier: Operating System :: OS Independent
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
19
|
+
Classifier: Topic :: Software Development :: Build Tools
|
|
20
|
+
Classifier: Topic :: Utilities
|
|
21
|
+
Requires-Dist: typer>=0.26,<1
|
|
22
|
+
Requires-Dist: platformdirs>=4.10,<5
|
|
23
|
+
Requires-Dist: tomli-w>=1.2,<2
|
|
24
|
+
Requires-Dist: textual>=8.2,<9
|
|
25
|
+
Requires-Dist: rich>=15,<16
|
|
26
|
+
Requires-Python: >=3.12
|
|
27
|
+
Project-URL: Repository, https://github.com/t41372/skit
|
|
28
|
+
Project-URL: Issues, https://github.com/t41372/skit/issues
|
|
29
|
+
Description-Content-Type: text/markdown
|
|
30
|
+
|
|
31
|
+

|
|
32
|
+
|
|
33
|
+
[](https://github.com/t41372/skit/actions/workflows/ci.yml)
|
|
34
|
+
[](https://codecov.io/gh/t41372/skit)
|
|
35
|
+
[](https://github.com/boxed/mutmut)
|
|
36
|
+
[](https://pypi.org/project/skit-cli/)
|
|
37
|
+
[](https://www.python.org/)
|
|
38
|
+
[](https://github.com/astral-sh/ruff)
|
|
39
|
+
[](https://github.com/astral-sh/ty)
|
|
40
|
+
[](LICENSE)
|
|
41
|
+
|
|
42
|
+
**English** | [繁體中文](./README.zh-TW.md) | [简体中文](./README.zh-CN.md)
|
|
43
|
+
|
|
44
|
+
**skit is a launcher and a home for your Python scripts.**
|
|
45
|
+
|
|
46
|
+
skit stores your Python scripts in one place and makes them painless to launch.
|
|
47
|
+
|
|
48
|
+
**AI writes the scripts. skit gives them a home.**
|
|
49
|
+
|
|
50
|
+
<video src="https://github.com/user-attachments/assets/65c9eed8-d6fa-4a16-836c-7017eb08bb9c" controls></video>
|
|
51
|
+
|
|
52
|
+
## What it does
|
|
53
|
+
|
|
54
|
+
- **One home for your scripts.** `skit add` collects scattered scripts into a searchable library — keep a copy in the library, or reference the original file.
|
|
55
|
+
- **Parameters without the pain.** Flags, `input()` calls, and the constants you tick become form fields (choices → pickers, booleans → checkboxes, types enforced).
|
|
56
|
+
- **It remembers.** Last-used values come back automatically; save favorites as named presets. Parameters marked secret never touch disk. Tokens like `{cwd}` and `{today}` keep presets portable.
|
|
57
|
+
- **No environment mess.** skit declares each script's dependencies in the script itself (PEP 723) and runs it through uv in an isolated, cached environment — no venvs to manage, nothing installed globally.
|
|
58
|
+
- **Mouse or keyboard.** Plain `skit` opens the full TUI; every key hint on screen is also a clickable button.
|
|
59
|
+
- **Automation-ready.** Every TUI action is also a CLI command with `--json` output and meaningful exit codes — for shell scripts, CI, and AI agents.
|
|
60
|
+
- **Speaks your language.** English, 繁體中文, and 简体中文, with more to come. See [Languages](#languages).
|
|
61
|
+
|
|
62
|
+
| Problem | What skit does |
|
|
63
|
+
| --- | --- |
|
|
64
|
+
| Scripts scattered all over the place | One central menu, with search |
|
|
65
|
+
| Scripts with weird external dependencies | An isolated environment per script — dependencies declared in the file (PEP 723), resolved by uv |
|
|
66
|
+
| CLI flags you forget ten minutes later, `input()` prompts, hard-coded constants meant to be edited by hand | Static analysis extracts them all into an interactive form — no code changes. Last-used values come prefilled; favorites save as presets. |
|
|
67
|
+
|
|
68
|
+
Nothing to set up per script — no refactoring, no config to maintain. The script an AI wrote last week and the one you barely remember from last year launch the same way.
|
|
69
|
+
|
|
70
|
+
|  |  |
|
|
71
|
+
|:--:|:--:|
|
|
72
|
+
| **The library** — every action on screen, mouse or keyboard | **The run form** — generated from the script's own parameters |
|
|
73
|
+
|  |  |
|
|
74
|
+
| **Adding a script** — parameters detected statically, tick to manage | **Script settings** — parameters, secrets, presets, dependencies |
|
|
75
|
+
|
|
76
|
+
<p align="center">
|
|
77
|
+
<img width="480" alt="Driving skit with the mouse alone — every control on screen is a click target" src="https://raw.githubusercontent.com/t41372/skit/main/docs/assets/demo-mouse.gif"><br>
|
|
78
|
+
<em>Fully mouse operable — every key hint on screen is also a button.</em>
|
|
79
|
+
</p>
|
|
80
|
+
|
|
81
|
+
## Install
|
|
82
|
+
|
|
83
|
+
skit is built on [uv](https://docs.astral.sh/uv/) (tested against 0.11.26). Don't have it? skit asks first, then downloads a pinned uv into its own private directory — your `PATH` and global environment stay untouched. A system-wide [install](https://docs.astral.sh/uv/getting-started/installation/) is still preferred.
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
# Install skit with uv tool from PyPI (the package is named skit-cli; the command is skit)
|
|
87
|
+
uv tool install skit-cli
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
> **In mainland China?** Set the mirror by hand for this one command (details in [Mainland China (中国大陆)](#mainland-china-中国大陆)):
|
|
92
|
+
>
|
|
93
|
+
> ```bash
|
|
94
|
+
> export UV_DEFAULT_INDEX=https://pypi.tuna.tsinghua.edu.cn/simple
|
|
95
|
+
> uv tool install skit-cli
|
|
96
|
+
> ```
|
|
97
|
+
|
|
98
|
+
Or install the latest dev version from the main branch.
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
uv tool install git+https://github.com/t41372/skit # latest development version
|
|
102
|
+
uvx --from git+https://github.com/t41372/skit skit --help # try it without installing
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
## Uninstall
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
uv tool uninstall skit-cli
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
That removes skit and its `PATH` shim. Your library and settings live **outside** the package, so they survive on purpose — reinstall and you're right back where you left off. To erase those too, delete skit's own directories:
|
|
112
|
+
|
|
113
|
+
| OS | Directories |
|
|
114
|
+
| --- | --- |
|
|
115
|
+
| **macOS** | `~/Library/Application Support/skit` |
|
|
116
|
+
| **Linux** | `~/.local/share/skit` · `~/.local/state/skit` · `~/.config/skit` |
|
|
117
|
+
| **Windows** | `%LOCALAPPDATA%\skit` |
|
|
118
|
+
|
|
119
|
+
They hold your script library, config, presets, and last-used values — plus, if skit ever bootstrapped its own uv, the private `uv` binary (in `…/skit/bin`, deleted along with the rest).
|
|
120
|
+
|
|
121
|
+
```bash
|
|
122
|
+
# macOS
|
|
123
|
+
rm -rf ~/Library/Application\ Support/skit
|
|
124
|
+
|
|
125
|
+
# Linux — honors XDG_DATA_HOME / XDG_STATE_HOME / XDG_CONFIG_HOME if you've set them
|
|
126
|
+
rm -rf ~/.local/share/skit ~/.local/state/skit ~/.config/skit
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
```powershell
|
|
130
|
+
# Windows (PowerShell)
|
|
131
|
+
Remove-Item -Recurse -Force $env:LOCALAPPDATA\skit
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
Not sure where yours landed? `skit doctor` prints the resolved library path (and respects any `SKIT_DATA_DIR` / `SKIT_STATE_DIR` / `SKIT_CONFIG_DIR` overrides). That's everything skit owns — it never writes to your `PATH`, shell, or global uv config, so nothing else needs undoing. The uv download cache and any Python builds uv fetched are shared with the rest of your uv setup, not skit's to remove; if you don't use uv elsewhere and want the space back, `uv cache clean` clears the cache.
|
|
135
|
+
|
|
136
|
+
## Usage
|
|
137
|
+
|
|
138
|
+
Two commands are the whole interface:
|
|
139
|
+
|
|
140
|
+
```bash
|
|
141
|
+
skit add my_script.py # add a script
|
|
142
|
+
skit # open the menu, pick it, fill in the form, run
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
Everything else happens inside the TUI — on screen, mouse or keyboard, nothing to memorize.
|
|
146
|
+
|
|
147
|
+
The rest of the CLI exists for automation and AI agents — every TUI action, scriptable:
|
|
148
|
+
|
|
149
|
+
```bash
|
|
150
|
+
skit run my_script -p fast # run with a saved preset
|
|
151
|
+
skit run my_script --dry-run # print the exact command, don't run it
|
|
152
|
+
skit params my_script # show managed parameters and last-used values
|
|
153
|
+
skit list --json # machine-readable listing
|
|
154
|
+
skit config # settings: language, editor, mirror, form style
|
|
155
|
+
skit --help # everything else
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
## Languages
|
|
159
|
+
|
|
160
|
+
| Language | Status |
|
|
161
|
+
| --- | --- |
|
|
162
|
+
| English | ✅ 100%, human-reviewed |
|
|
163
|
+
| 繁體中文 (zh-TW) | ✅ 100%, human-reviewed |
|
|
164
|
+
| 简体中文 (zh-CN) | ✅ 100%, human-reviewed |
|
|
165
|
+
|
|
166
|
+
skit follows your system language; switch it in the TUI preferences (for automation: `skit config lang zh-TW`, or `SKIT_LANG=zh-CN skit` for one run).
|
|
167
|
+
|
|
168
|
+
## Mainland China (中国大陆)
|
|
169
|
+
|
|
170
|
+
Three downloads tend to fail in mainland China: PyPI packages, the Python builds uv fetches from GitHub, and skit's own uv bootstrap. skit can route all three through domestic mirrors.
|
|
171
|
+
|
|
172
|
+
Mirror settings live inside skit only: your global uv config is never touched, and existing mirror settings (`UV_DEFAULT_INDEX`, `uv.toml`, …) are respected.
|
|
173
|
+
|
|
174
|
+
- **First run**: if PyPI/GitHub look unreachable, skit offers to turn mirrors on — just press Enter.
|
|
175
|
+
- **Any time**: TUI Preferences → mirror, or:
|
|
176
|
+
|
|
177
|
+
```bash
|
|
178
|
+
skit config mirror tsinghua # or: aliyun / ustc / custom / off
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
Defaults: PyPI via Tsinghua / Aliyun / USTC; Python builds and the uv binary via NJU. Pick `custom` to swap any URL.
|
|
182
|
+
|
|
183
|
+
## Why skit exists
|
|
184
|
+
|
|
185
|
+
skit began as an answer to [a linux.do forum thread](https://linux.do/t/topic/2512255) (in Chinese).
|
|
186
|
+
|
|
187
|
+
## Development
|
|
188
|
+
|
|
189
|
+
Development runs entirely on uv — see [CONTRIBUTING.md](./CONTRIBUTING.md) for the full workflow and quality gates (ruff, ty strict, 100% test coverage, mutation testing with mutmut, zizmor-audited workflows).
|
|
190
|
+
|
|
191
|
+
```bash
|
|
192
|
+
uv sync --dev
|
|
193
|
+
uv run pytest -q
|
|
194
|
+
uv run python scripts/serve_preview.py # TUI web preview (textual-serve, localhost:8000)
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
## License
|
|
198
|
+
|
|
199
|
+
[MIT](LICENSE)
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
skit/__init__.py,sha256=YJ23aWI8fJwlKp41zZyoFdHDujfJCVVI_zStiBevY34,89
|
|
2
|
+
skit/analyzer.py,sha256=qlZHOWXS3cEgglsGANTA4S_d9CTOjuhDtdrSc5FacOM,19191
|
|
3
|
+
skit/argspec.py,sha256=15ZCQzz2P2WHJCwutbfISimXboqBAtKojB5OSqDDDh4,21677
|
|
4
|
+
skit/argstate.py,sha256=N3qZiBcbLAAwhNd8-tu_xxVNFGG87D8bBHUxHLC-LlI,6311
|
|
5
|
+
skit/atomic.py,sha256=2uWybRSOTUlrjmy1EzgXv3EBNXoAZqaCypoxdkqzrbM,4258
|
|
6
|
+
skit/cli.py,sha256=RUCFTzQOBMKlfNZj05sbOs6Mj8xHQxYneBxUdpXRtzs,62218
|
|
7
|
+
skit/config.py,sha256=EQPcJuLv-KHfsAxebxF9ZTDA0R22QU2nvp9tUHngTzU,10294
|
|
8
|
+
skit/editor.py,sha256=_erqoKbudXak59sOSVKGzkaW0ggzCtljLi5C0sMq8z0,3378
|
|
9
|
+
skit/flows.py,sha256=dQwzUkpMCYjCCdUEorMGp-TiYGinIG4xfd-oBKWGBsQ,24695
|
|
10
|
+
skit/i18n.py,sha256=g9DbO_p61HkRZcgA-IAo6OeSDSo2euHUNE885B6XYCw,13027
|
|
11
|
+
skit/inlineform.py,sha256=HpwXjZx9oiFUwiv7ZhEhvx8U1Rd4xxAfMGMjpNcMUPg,2163
|
|
12
|
+
skit/launcher.py,sha256=Tsod4-_HbePssHnABs3rGkSDipwFW_M6kfx7Ew69xWw,13721
|
|
13
|
+
skit/locales/zh_CN/LC_MESSAGES/skit.mo,sha256=vKcsuueDHZyXyG6k_57tocqvfhKCFgOQIXqCvbpCMls,39342
|
|
14
|
+
skit/locales/zh_TW/LC_MESSAGES/skit.mo,sha256=3r2nMkF7Z9k9VuzsEYpxjzdLClGYzrLriRVnvB-QHi0,39296
|
|
15
|
+
skit/metawriter.py,sha256=wHAvZMrhDec2F54Q57hLh3rnRuBRQdRgmtfjEdQJ-g0,11041
|
|
16
|
+
skit/models.py,sha256=sbbHoG6SFiKoveyccrQYjZaNNeEViGynpCzYEx5oYJw,5572
|
|
17
|
+
skit/paths.py,sha256=rt483_rMSkTi-U8dw7V_3a-pRFCUNoNofyOd-0NaBQI,1047
|
|
18
|
+
skit/pep723.py,sha256=Lv0elvSXakocTIXyEJ5IvepttXU7NSikuVYYcGfozVM,12347
|
|
19
|
+
skit/promptform.py,sha256=iNkBIBbBUbybxkDWR8jjuwKnZQjE93zOI3z7mXpjZeE,2494
|
|
20
|
+
skit/reconcile.py,sha256=oYmJs25pKB6Tr3qEjpURvokgHc6Abl0dotSBRb0ly0M,13747
|
|
21
|
+
skit/shim.py,sha256=xdn1cb-j9crUzWf9JNpibBH0sRG783dfpdA7-7ekIfE,19445
|
|
22
|
+
skit/store.py,sha256=pug6b5NO25AEJ6M3ba918Dy3YYl1h_5gNtMFbDqvIWY,22026
|
|
23
|
+
skit/theme.py,sha256=ICYiHtdvv54XC9HAam2rpYO4puUMRm-8JEaXtPIPo1I,5711
|
|
24
|
+
skit/tokens.py,sha256=8mdTEeSsFQm0g5JM0mcFLBw5T_9fh97Nu8vRzwqQ8X8,3661
|
|
25
|
+
skit/tui.py,sha256=ePQoFvageE2WDPEgluN3B68hISyiJt5xru5PWC2E61I,32266
|
|
26
|
+
skit/tui_add.py,sha256=Ljrx_DQJUv1cv7f0uuSnpX7wUnhIeXVXSh7bMgpbST4,16029
|
|
27
|
+
skit/tui_footer.py,sha256=PeKdvp0nADkHzeq24qqFkNLJVxovwk0dwQJATvFm5uE,1745
|
|
28
|
+
skit/tui_form.py,sha256=xgGZgzPT5fdh9HmrowAwHo2iQqFmqTBODAa3_ml6XRI,25049
|
|
29
|
+
skit/tui_health.py,sha256=at1OJwJCP0_PkQkPD65AkNJuY9HMbokBhIi-EIXR-X0,5832
|
|
30
|
+
skit/tui_prefs.py,sha256=ZDZt0T1QKIrOoKLwWow0ojUURAF7_WiIzZRx2XT1ffM,7233
|
|
31
|
+
skit/tui_settings.py,sha256=QoXgzxUYpkpSZEzj2cWYA8dZFyOgQPS_qnGxhkERSvY,16114
|
|
32
|
+
skit/uvman.py,sha256=QkEHR3wR8aquFXuMMOHAU820NfJuvhFKbYcD_GBAsU4,14379
|
|
33
|
+
skit_cli-0.0.1.dist-info/licenses/LICENSE,sha256=5ejThDd-KAn5uMko8s4LhK4nTwqbgXgnWb-JQCKpSxQ,1074
|
|
34
|
+
skit_cli-0.0.1.dist-info/WHEEL,sha256=CoDSoyhtC_eO_tlxRYzsTraPv1fPJRXFx91k6ISeAvA,81
|
|
35
|
+
skit_cli-0.0.1.dist-info/entry_points.txt,sha256=FYgSm0ZknaO2FpnYfyP_kVzXlL7gmMilzrC5XgmeekA,39
|
|
36
|
+
skit_cli-0.0.1.dist-info/METADATA,sha256=cFm_WYMYU4ixaMBJTKu-Lqx4mPg_RmMyQbumSVOgp5Q,10222
|
|
37
|
+
skit_cli-0.0.1.dist-info/RECORD,,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 skit contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|