skit-cli 0.0.1__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 (39) hide show
  1. skit_cli-0.0.1/LICENSE +21 -0
  2. skit_cli-0.0.1/PKG-INFO +199 -0
  3. skit_cli-0.0.1/README.md +169 -0
  4. skit_cli-0.0.1/pyproject.toml +178 -0
  5. skit_cli-0.0.1/src/skit/__init__.py +3 -0
  6. skit_cli-0.0.1/src/skit/analyzer.py +410 -0
  7. skit_cli-0.0.1/src/skit/argspec.py +528 -0
  8. skit_cli-0.0.1/src/skit/argstate.py +166 -0
  9. skit_cli-0.0.1/src/skit/atomic.py +101 -0
  10. skit_cli-0.0.1/src/skit/cli.py +1621 -0
  11. skit_cli-0.0.1/src/skit/config.py +255 -0
  12. skit_cli-0.0.1/src/skit/editor.py +77 -0
  13. skit_cli-0.0.1/src/skit/flows.py +596 -0
  14. skit_cli-0.0.1/src/skit/i18n.py +324 -0
  15. skit_cli-0.0.1/src/skit/inlineform.py +61 -0
  16. skit_cli-0.0.1/src/skit/launcher.py +326 -0
  17. skit_cli-0.0.1/src/skit/locales/skit.pot +1688 -0
  18. skit_cli-0.0.1/src/skit/locales/zh_CN/LC_MESSAGES/skit.mo +0 -0
  19. skit_cli-0.0.1/src/skit/locales/zh_CN/LC_MESSAGES/skit.po +1883 -0
  20. skit_cli-0.0.1/src/skit/locales/zh_TW/LC_MESSAGES/skit.mo +0 -0
  21. skit_cli-0.0.1/src/skit/locales/zh_TW/LC_MESSAGES/skit.po +1883 -0
  22. skit_cli-0.0.1/src/skit/metawriter.py +267 -0
  23. skit_cli-0.0.1/src/skit/models.py +154 -0
  24. skit_cli-0.0.1/src/skit/paths.py +44 -0
  25. skit_cli-0.0.1/src/skit/pep723.py +292 -0
  26. skit_cli-0.0.1/src/skit/promptform.py +67 -0
  27. skit_cli-0.0.1/src/skit/reconcile.py +321 -0
  28. skit_cli-0.0.1/src/skit/shim.py +386 -0
  29. skit_cli-0.0.1/src/skit/store.py +566 -0
  30. skit_cli-0.0.1/src/skit/theme.py +123 -0
  31. skit_cli-0.0.1/src/skit/tokens.py +112 -0
  32. skit_cli-0.0.1/src/skit/tui.py +774 -0
  33. skit_cli-0.0.1/src/skit/tui_add.py +361 -0
  34. skit_cli-0.0.1/src/skit/tui_footer.py +38 -0
  35. skit_cli-0.0.1/src/skit/tui_form.py +586 -0
  36. skit_cli-0.0.1/src/skit/tui_health.py +150 -0
  37. skit_cli-0.0.1/src/skit/tui_prefs.py +175 -0
  38. skit_cli-0.0.1/src/skit/tui_settings.py +374 -0
  39. skit_cli-0.0.1/src/skit/uvman.py +288 -0
skit_cli-0.0.1/LICENSE ADDED
@@ -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.
@@ -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
+ ![skit — script launcher and parameter manager](https://raw.githubusercontent.com/t41372/skit/main/docs/assets/banner.png)
32
+
33
+ [![CI](https://github.com/t41372/skit/actions/workflows/ci.yml/badge.svg)](https://github.com/t41372/skit/actions/workflows/ci.yml)
34
+ [![codecov](https://codecov.io/gh/t41372/skit/branch/main/graph/badge.svg)](https://codecov.io/gh/t41372/skit)
35
+ [![Mutation tested: mutmut](https://img.shields.io/badge/mutation%20tested-mutmut-blue)](https://github.com/boxed/mutmut)
36
+ [![PyPI](https://img.shields.io/pypi/v/skit-cli)](https://pypi.org/project/skit-cli/)
37
+ [![Python 3.12+](https://img.shields.io/badge/python-3.12%2B-blue)](https://www.python.org/)
38
+ [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
39
+ [![Types: ty](https://img.shields.io/badge/types-ty-261230.svg)](https://github.com/astral-sh/ty)
40
+ [![License: MIT](https://img.shields.io/badge/license-MIT-yellow.svg)](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
+ | ![The library menu](https://raw.githubusercontent.com/t41372/skit/main/docs/assets/tui-library-en.png) | ![The run form](https://raw.githubusercontent.com/t41372/skit/main/docs/assets/tui-form-en.png) |
71
+ |:--:|:--:|
72
+ | **The library** — every action on screen, mouse or keyboard | **The run form** — generated from the script's own parameters |
73
+ | ![Adding a script](https://raw.githubusercontent.com/t41372/skit/main/docs/assets/tui-add-en.png) | ![Script settings](https://raw.githubusercontent.com/t41372/skit/main/docs/assets/tui-settings-en.png) |
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,169 @@
1
+ ![skit — script launcher and parameter manager](https://raw.githubusercontent.com/t41372/skit/main/docs/assets/banner.png)
2
+
3
+ [![CI](https://github.com/t41372/skit/actions/workflows/ci.yml/badge.svg)](https://github.com/t41372/skit/actions/workflows/ci.yml)
4
+ [![codecov](https://codecov.io/gh/t41372/skit/branch/main/graph/badge.svg)](https://codecov.io/gh/t41372/skit)
5
+ [![Mutation tested: mutmut](https://img.shields.io/badge/mutation%20tested-mutmut-blue)](https://github.com/boxed/mutmut)
6
+ [![PyPI](https://img.shields.io/pypi/v/skit-cli)](https://pypi.org/project/skit-cli/)
7
+ [![Python 3.12+](https://img.shields.io/badge/python-3.12%2B-blue)](https://www.python.org/)
8
+ [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
9
+ [![Types: ty](https://img.shields.io/badge/types-ty-261230.svg)](https://github.com/astral-sh/ty)
10
+ [![License: MIT](https://img.shields.io/badge/license-MIT-yellow.svg)](LICENSE)
11
+
12
+ **English** | [繁體中文](./README.zh-TW.md) | [简体中文](./README.zh-CN.md)
13
+
14
+ **skit is a launcher and a home for your Python scripts.**
15
+
16
+ skit stores your Python scripts in one place and makes them painless to launch.
17
+
18
+ **AI writes the scripts. skit gives them a home.**
19
+
20
+ <video src="https://github.com/user-attachments/assets/65c9eed8-d6fa-4a16-836c-7017eb08bb9c" controls></video>
21
+
22
+ ## What it does
23
+
24
+ - **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.
25
+ - **Parameters without the pain.** Flags, `input()` calls, and the constants you tick become form fields (choices → pickers, booleans → checkboxes, types enforced).
26
+ - **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.
27
+ - **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.
28
+ - **Mouse or keyboard.** Plain `skit` opens the full TUI; every key hint on screen is also a clickable button.
29
+ - **Automation-ready.** Every TUI action is also a CLI command with `--json` output and meaningful exit codes — for shell scripts, CI, and AI agents.
30
+ - **Speaks your language.** English, 繁體中文, and 简体中文, with more to come. See [Languages](#languages).
31
+
32
+ | Problem | What skit does |
33
+ | --- | --- |
34
+ | Scripts scattered all over the place | One central menu, with search |
35
+ | Scripts with weird external dependencies | An isolated environment per script — dependencies declared in the file (PEP 723), resolved by uv |
36
+ | 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. |
37
+
38
+ 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.
39
+
40
+ | ![The library menu](https://raw.githubusercontent.com/t41372/skit/main/docs/assets/tui-library-en.png) | ![The run form](https://raw.githubusercontent.com/t41372/skit/main/docs/assets/tui-form-en.png) |
41
+ |:--:|:--:|
42
+ | **The library** — every action on screen, mouse or keyboard | **The run form** — generated from the script's own parameters |
43
+ | ![Adding a script](https://raw.githubusercontent.com/t41372/skit/main/docs/assets/tui-add-en.png) | ![Script settings](https://raw.githubusercontent.com/t41372/skit/main/docs/assets/tui-settings-en.png) |
44
+ | **Adding a script** — parameters detected statically, tick to manage | **Script settings** — parameters, secrets, presets, dependencies |
45
+
46
+ <p align="center">
47
+ <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>
48
+ <em>Fully mouse operable — every key hint on screen is also a button.</em>
49
+ </p>
50
+
51
+ ## Install
52
+
53
+ 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.
54
+
55
+ ```bash
56
+ # Install skit with uv tool from PyPI (the package is named skit-cli; the command is skit)
57
+ uv tool install skit-cli
58
+ ```
59
+
60
+
61
+ > **In mainland China?** Set the mirror by hand for this one command (details in [Mainland China (中国大陆)](#mainland-china-中国大陆)):
62
+ >
63
+ > ```bash
64
+ > export UV_DEFAULT_INDEX=https://pypi.tuna.tsinghua.edu.cn/simple
65
+ > uv tool install skit-cli
66
+ > ```
67
+
68
+ Or install the latest dev version from the main branch.
69
+
70
+ ```bash
71
+ uv tool install git+https://github.com/t41372/skit # latest development version
72
+ uvx --from git+https://github.com/t41372/skit skit --help # try it without installing
73
+ ```
74
+
75
+ ## Uninstall
76
+
77
+ ```bash
78
+ uv tool uninstall skit-cli
79
+ ```
80
+
81
+ 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:
82
+
83
+ | OS | Directories |
84
+ | --- | --- |
85
+ | **macOS** | `~/Library/Application Support/skit` |
86
+ | **Linux** | `~/.local/share/skit` · `~/.local/state/skit` · `~/.config/skit` |
87
+ | **Windows** | `%LOCALAPPDATA%\skit` |
88
+
89
+ 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).
90
+
91
+ ```bash
92
+ # macOS
93
+ rm -rf ~/Library/Application\ Support/skit
94
+
95
+ # Linux — honors XDG_DATA_HOME / XDG_STATE_HOME / XDG_CONFIG_HOME if you've set them
96
+ rm -rf ~/.local/share/skit ~/.local/state/skit ~/.config/skit
97
+ ```
98
+
99
+ ```powershell
100
+ # Windows (PowerShell)
101
+ Remove-Item -Recurse -Force $env:LOCALAPPDATA\skit
102
+ ```
103
+
104
+ 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.
105
+
106
+ ## Usage
107
+
108
+ Two commands are the whole interface:
109
+
110
+ ```bash
111
+ skit add my_script.py # add a script
112
+ skit # open the menu, pick it, fill in the form, run
113
+ ```
114
+
115
+ Everything else happens inside the TUI — on screen, mouse or keyboard, nothing to memorize.
116
+
117
+ The rest of the CLI exists for automation and AI agents — every TUI action, scriptable:
118
+
119
+ ```bash
120
+ skit run my_script -p fast # run with a saved preset
121
+ skit run my_script --dry-run # print the exact command, don't run it
122
+ skit params my_script # show managed parameters and last-used values
123
+ skit list --json # machine-readable listing
124
+ skit config # settings: language, editor, mirror, form style
125
+ skit --help # everything else
126
+ ```
127
+
128
+ ## Languages
129
+
130
+ | Language | Status |
131
+ | --- | --- |
132
+ | English | ✅ 100%, human-reviewed |
133
+ | 繁體中文 (zh-TW) | ✅ 100%, human-reviewed |
134
+ | 简体中文 (zh-CN) | ✅ 100%, human-reviewed |
135
+
136
+ 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).
137
+
138
+ ## Mainland China (中国大陆)
139
+
140
+ 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.
141
+
142
+ Mirror settings live inside skit only: your global uv config is never touched, and existing mirror settings (`UV_DEFAULT_INDEX`, `uv.toml`, …) are respected.
143
+
144
+ - **First run**: if PyPI/GitHub look unreachable, skit offers to turn mirrors on — just press Enter.
145
+ - **Any time**: TUI Preferences → mirror, or:
146
+
147
+ ```bash
148
+ skit config mirror tsinghua # or: aliyun / ustc / custom / off
149
+ ```
150
+
151
+ Defaults: PyPI via Tsinghua / Aliyun / USTC; Python builds and the uv binary via NJU. Pick `custom` to swap any URL.
152
+
153
+ ## Why skit exists
154
+
155
+ skit began as an answer to [a linux.do forum thread](https://linux.do/t/topic/2512255) (in Chinese).
156
+
157
+ ## Development
158
+
159
+ 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).
160
+
161
+ ```bash
162
+ uv sync --dev
163
+ uv run pytest -q
164
+ uv run python scripts/serve_preview.py # TUI web preview (textual-serve, localhost:8000)
165
+ ```
166
+
167
+ ## License
168
+
169
+ [MIT](LICENSE)
@@ -0,0 +1,178 @@
1
+ [project]
2
+ # Distribution name only ("skit" is admin-prohibited on PyPI); the import package,
3
+ # CLI command, and config dirs all stay "skit".
4
+ name = "skit-cli"
5
+ version = "0.0.1"
6
+ description = "Script launcher and parameter manager: pick a script, fill in a form, run — no more opening an IDE just to tweak constants."
7
+ readme = "README.md"
8
+ requires-python = ">=3.12"
9
+ license = "MIT"
10
+ license-files = ["LICENSE"]
11
+ authors = [{ name = "Yi-Ting Chiu", email = "mytim710@gmail.com" }]
12
+ keywords = ["script", "launcher", "uv", "tui", "pep723", "script-manager"]
13
+ classifiers = [
14
+ "Development Status :: 3 - Alpha",
15
+ "Environment :: Console",
16
+ "Environment :: Console :: Curses",
17
+ "Intended Audience :: Developers",
18
+ "Intended Audience :: End Users/Desktop",
19
+ "Operating System :: OS Independent",
20
+ "Programming Language :: Python :: 3",
21
+ "Programming Language :: Python :: 3.12",
22
+ "Programming Language :: Python :: 3.13",
23
+ "Topic :: Software Development :: Build Tools",
24
+ "Topic :: Utilities",
25
+ ]
26
+ # Upper caps let a lockfile-less `uv tool install skit-cli` refuse a future breaking major
27
+ # (or minor, for pre-1.0 deps). Reproducible dev/CI installs are hash-pinned by uv.lock.
28
+ dependencies = [
29
+ "typer>=0.26,<1",
30
+ "platformdirs>=4.10,<5",
31
+ "tomli-w>=1.2,<2",
32
+ "textual>=8.2,<9",
33
+ "rich>=15,<16",
34
+ ]
35
+
36
+ [project.urls]
37
+ Repository = "https://github.com/t41372/skit"
38
+ Issues = "https://github.com/t41372/skit/issues"
39
+
40
+ [project.scripts]
41
+ skit = "skit.cli:app"
42
+
43
+ [dependency-groups]
44
+ dev = [
45
+ "pytest>=9.1,<10",
46
+ "pytest-asyncio>=1.4,<2",
47
+ "pytest-cov>=7.1,<8",
48
+ "textual-serve>=1.1,<2",
49
+ "ty>=0.0.56,<0.1",
50
+ "ruff>=0.15,<0.16",
51
+ "mutmut>=3.6,<4",
52
+ "zizmor>=1.26,<2",
53
+ "babel>=2.18,<3", # dev-only: extract/update/compile .po↔.mo (runtime uses stdlib gettext)
54
+ ]
55
+
56
+ [build-system]
57
+ requires = ["uv_build>=0.11,<0.12"]
58
+ build-backend = "uv_build"
59
+
60
+ [tool.uv.build-backend]
61
+ # The distribution is skit-cli but the import package stays src/skit; without this the
62
+ # backend would look for src/skit_cli.
63
+ module-name = "skit"
64
+ # Catalog sources (.po/.pot) are maintainer-only inputs to `scripts/i18n.py compile`; the
65
+ # runtime (src/skit/i18n.py) loads only compiled .mo via stdlib gettext. Keep sources in the
66
+ # sdist for maintainers/rebuilds, drop them from the wheel that end users install.
67
+ wheel-exclude = ["**/*.po", "**/*.pot"]
68
+
69
+ [tool.pytest.ini_options]
70
+ testpaths = ["tests"]
71
+ asyncio_mode = "auto"
72
+ addopts = "--strict-markers --strict-config"
73
+ xfail_strict = true
74
+ filterwarnings = ["error::DeprecationWarning:skit"]
75
+
76
+ [tool.coverage.run]
77
+ source = ["skit"]
78
+ branch = true
79
+ parallel = true
80
+
81
+ [tool.coverage.paths]
82
+ source = ["src/skit", "*/site-packages/skit"]
83
+
84
+ [tool.coverage.report]
85
+ fail_under = 100
86
+ show_missing = true
87
+ skip_covered = true
88
+ exclude_also = [
89
+ "if TYPE_CHECKING:",
90
+ "@overload",
91
+ 'if __name__ == "__main__":',
92
+ ]
93
+
94
+ [tool.ty.rules]
95
+ all = "error"
96
+
97
+ [tool.ty.environment]
98
+ python-version = "3.12"
99
+ python-platform = "all"
100
+
101
+ [tool.ruff]
102
+ line-length = 100
103
+ target-version = "py312"
104
+ src = ["src", "tests"]
105
+
106
+ [tool.ruff.lint]
107
+ select = [
108
+ "E", # pycodestyle errors
109
+ "W", # pycodestyle warnings
110
+ "F", # pyflakes
111
+ "I", # isort
112
+ "B", # flake8-bugbear
113
+ "C4", # flake8-comprehensions
114
+ "UP", # pyupgrade
115
+ "SIM", # flake8-simplify
116
+ "RUF", # ruff-specific
117
+ "PT", # flake8-pytest-style
118
+ "PL", # pylint
119
+ "TRY", # tryceratops
120
+ "PERF", # perflint
121
+ "S", # flake8-bandit
122
+ ]
123
+ ignore = [
124
+ "PLR0913", # too many arguments — CLI entry points legitimately take many options
125
+ "PLR2004", # magic values in comparisons — noisy in parsers
126
+ "TRY003", # long exception messages — user-facing i18n messages
127
+ "B008", # function calls in defaults — the canonical typer.Option/Argument pattern
128
+ "PLC0415", # imports inside functions — deliberate lazy imports for CLI startup speed
129
+ "E501", # line length — the formatter owns wrapping; source-string gettext msgids can't be split
130
+ ]
131
+
132
+ [tool.ruff.lint.per-file-ignores]
133
+ "src/skit/tui.py" = [
134
+ "RUF012", # Textual BINDINGS/CSS class attributes are the framework's documented pattern
135
+ ]
136
+ "src/skit/tui_*.py" = [
137
+ "RUF012", # Textual BINDINGS/CSS class attributes are the framework's documented pattern
138
+ ]
139
+ "src/skit/inlineform.py" = [
140
+ "RUF012", # Textual BINDINGS/CSS class attributes are the framework's documented pattern
141
+ ]
142
+ "src/skit/i18n.py" = [
143
+ "PLW0603", # module-level localization singleton is intentional
144
+ ]
145
+ "src/skit/cli.py" = [
146
+ "PLR0912", # typer command bodies with many options naturally branch a lot
147
+ "PLR0915",
148
+ ]
149
+ "scripts/serve_preview.py" = [
150
+ "S104", # dev-only preview server binds 0.0.0.0 on purpose
151
+ "S108", # dev-only demo sandbox under /tmp on purpose
152
+ ]
153
+ "scripts/i18n.py" = [
154
+ "S603", # dev-only maintainer tool: fixed-arg subprocess to pybabel
155
+ "PLR0911", # subcommand dispatcher returns once per command
156
+ ]
157
+ "docs/assets/demo/scripts/zh/*.py" = [
158
+ "RUF001", # the Chinese demo scripts use fullwidth punctuation on purpose
159
+ ]
160
+ "scripts/i18n_coverage.py" = [
161
+ "S603", # dev-only maintainer tool: fixed-arg subprocess to pybabel extract
162
+ "PLR0912", # the sink-dispatch scan is inherently branchy
163
+ "PERF401", # explicit append loops read clearer than comprehensions in the AST walk
164
+ ]
165
+ "tests/**" = [
166
+ "S101", # assert is the point of tests
167
+ "S108", # tests use fixed /tmp fixtures as opaque path strings
168
+ "S310", # tests exercise file:// URLs against local fixtures
169
+ "S603", # subprocess calls with fixed args in tests
170
+ "PLR0912", # long/branchy test helpers are fine
171
+ "PLR0915",
172
+ "SIM117", # nested with statements readable in tests
173
+ ]
174
+ "tests/corpus/**" = ["ALL"] # corpus files are verbatim analyzer inputs, not code style subjects
175
+
176
+ [tool.mutmut]
177
+ paths_to_mutate = ["src/skit/"]
178
+ tests_dir = ["tests/"]
@@ -0,0 +1,3 @@
1
+ """skit — a launcher and parameter manager for your scripts."""
2
+
3
+ __version__ = "0.0.1"