skit-cli 0.2.0__tar.gz → 0.3.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.
- {skit_cli-0.2.0 → skit_cli-0.3.0}/PKG-INFO +59 -17
- {skit_cli-0.2.0 → skit_cli-0.3.0}/README.md +51 -14
- {skit_cli-0.2.0 → skit_cli-0.3.0}/pyproject.toml +33 -3
- {skit_cli-0.2.0 → skit_cli-0.3.0}/src/skit/agentskill.py +7 -2
- skit_cli-0.2.0/src/skit/reconcile.py → skit_cli-0.3.0/src/skit/analysis.py +165 -63
- {skit_cli-0.2.0 → skit_cli-0.3.0}/src/skit/argstate.py +28 -2
- skit_cli-0.3.0/src/skit/argv_text.py +80 -0
- {skit_cli-0.2.0 → skit_cli-0.3.0}/src/skit/atomic.py +98 -0
- skit_cli-0.3.0/src/skit/callmatch.py +129 -0
- skit_cli-0.3.0/src/skit/cli.py +5544 -0
- skit_cli-0.3.0/src/skit/config.py +1168 -0
- {skit_cli-0.2.0 → skit_cli-0.3.0}/src/skit/editor.py +31 -0
- skit_cli-0.3.0/src/skit/flows.py +1055 -0
- skit_cli-0.3.0/src/skit/healthcheck.py +98 -0
- {skit_cli-0.2.0 → skit_cli-0.3.0}/src/skit/i18n.py +28 -25
- {skit_cli-0.2.0 → skit_cli-0.3.0}/src/skit/inlineform.py +34 -8
- skit_cli-0.3.0/src/skit/kindnames.py +53 -0
- skit_cli-0.3.0/src/skit/langs/__init__.py +1 -0
- skit_cli-0.3.0/src/skit/langs/base.py +347 -0
- skit_cli-0.3.0/src/skit/langs/fish/__init__.py +17 -0
- skit_cli-0.3.0/src/skit/langs/fish/analyzer.py +387 -0
- skit_cli-0.3.0/src/skit/langs/fish/cli_reader.py +151 -0
- skit_cli-0.3.0/src/skit/langs/javascript/__init__.py +12 -0
- skit_cli-0.3.0/src/skit/langs/javascript/analyzer.py +367 -0
- skit_cli-0.3.0/src/skit/langs/javascript/cli_reader.py +196 -0
- skit_cli-0.3.0/src/skit/langs/javascript/deps.py +414 -0
- skit_cli-0.3.0/src/skit/langs/javascript/inject.py +248 -0
- skit_cli-0.3.0/src/skit/langs/javascript/io.py +28 -0
- skit_cli-0.3.0/src/skit/langs/launch.py +724 -0
- skit_cli-0.3.0/src/skit/langs/powershell/__init__.py +14 -0
- skit_cli-0.3.0/src/skit/langs/powershell/cli_reader.py +274 -0
- skit_cli-0.3.0/src/skit/langs/prompt/__init__.py +6 -0
- skit_cli-0.3.0/src/skit/langs/prompt/analyzer.py +66 -0
- skit_cli-0.3.0/src/skit/langs/prompt/render.py +113 -0
- skit_cli-0.3.0/src/skit/langs/prompt/text.py +38 -0
- skit_cli-0.3.0/src/skit/langs/python/__init__.py +1 -0
- {skit_cli-0.2.0/src/skit → skit_cli-0.3.0/src/skit/langs/python}/analyzer.py +9 -154
- {skit_cli-0.2.0/src/skit → skit_cli-0.3.0/src/skit/langs/python}/argspec.py +88 -70
- {skit_cli-0.2.0/src/skit → skit_cli-0.3.0/src/skit/langs/python}/metawriter.py +39 -121
- skit_cli-0.3.0/src/skit/langs/python/reconcile.py +59 -0
- {skit_cli-0.2.0/src/skit → skit_cli-0.3.0/src/skit/langs/python}/shim.py +59 -148
- skit_cli-0.3.0/src/skit/langs/registry.py +534 -0
- skit_cli-0.3.0/src/skit/langs/shell/__init__.py +6 -0
- skit_cli-0.3.0/src/skit/langs/shell/analyzer.py +677 -0
- skit_cli-0.3.0/src/skit/langs/shell/cli_reader.py +113 -0
- skit_cli-0.3.0/src/skit/langs/shell/inject.py +555 -0
- skit_cli-0.3.0/src/skit/langs/shell/normalize.py +127 -0
- skit_cli-0.3.0/src/skit/launcher.py +303 -0
- skit_cli-0.3.0/src/skit/locales/skit.pot +3590 -0
- skit_cli-0.3.0/src/skit/locales/zh_CN/LC_MESSAGES/skit.mo +0 -0
- skit_cli-0.3.0/src/skit/locales/zh_CN/LC_MESSAGES/skit.po +3916 -0
- skit_cli-0.3.0/src/skit/locales/zh_TW/LC_MESSAGES/skit.mo +0 -0
- skit_cli-0.3.0/src/skit/locales/zh_TW/LC_MESSAGES/skit.po +3916 -0
- {skit_cli-0.2.0 → skit_cli-0.3.0}/src/skit/models.py +66 -3
- skit_cli-0.3.0/src/skit/params.py +550 -0
- {skit_cli-0.2.0 → skit_cli-0.3.0}/src/skit/paths.py +16 -0
- {skit_cli-0.2.0 → skit_cli-0.3.0}/src/skit/pep723.py +112 -45
- {skit_cli-0.2.0 → skit_cli-0.3.0}/src/skit/promptform.py +36 -4
- skit_cli-0.3.0/src/skit/rewrite.py +169 -0
- skit_cli-0.3.0/src/skit/skills/skit/SKILL.md +277 -0
- skit_cli-0.3.0/src/skit/store.py +1162 -0
- {skit_cli-0.2.0 → skit_cli-0.3.0}/src/skit/tokens.py +16 -5
- {skit_cli-0.2.0 → skit_cli-0.3.0}/src/skit/tui.py +227 -88
- skit_cli-0.3.0/src/skit/tui_add.py +1779 -0
- {skit_cli-0.2.0 → skit_cli-0.3.0}/src/skit/tui_form.py +323 -80
- {skit_cli-0.2.0 → skit_cli-0.3.0}/src/skit/tui_health.py +61 -30
- skit_cli-0.3.0/src/skit/tui_pathpick.py +461 -0
- skit_cli-0.3.0/src/skit/tui_prefs.py +513 -0
- skit_cli-0.3.0/src/skit/tui_prompt.py +152 -0
- skit_cli-0.3.0/src/skit/tui_runner.py +516 -0
- skit_cli-0.3.0/src/skit/tui_settings.py +1186 -0
- {skit_cli-0.2.0 → skit_cli-0.3.0}/src/skit/uvman.py +1 -1
- skit_cli-0.2.0/src/skit/cli.py +0 -2002
- skit_cli-0.2.0/src/skit/config.py +0 -275
- skit_cli-0.2.0/src/skit/flows.py +0 -608
- skit_cli-0.2.0/src/skit/launcher.py +0 -326
- skit_cli-0.2.0/src/skit/locales/skit.pot +0 -1862
- skit_cli-0.2.0/src/skit/locales/zh_CN/LC_MESSAGES/skit.mo +0 -0
- skit_cli-0.2.0/src/skit/locales/zh_CN/LC_MESSAGES/skit.po +0 -2250
- skit_cli-0.2.0/src/skit/locales/zh_TW/LC_MESSAGES/skit.mo +0 -0
- skit_cli-0.2.0/src/skit/locales/zh_TW/LC_MESSAGES/skit.po +0 -2250
- skit_cli-0.2.0/src/skit/skills/skit/SKILL.md +0 -143
- skit_cli-0.2.0/src/skit/store.py +0 -566
- skit_cli-0.2.0/src/skit/tui_add.py +0 -466
- skit_cli-0.2.0/src/skit/tui_prefs.py +0 -208
- skit_cli-0.2.0/src/skit/tui_settings.py +0 -381
- {skit_cli-0.2.0 → skit_cli-0.3.0}/LICENSE +0 -0
- {skit_cli-0.2.0 → skit_cli-0.3.0}/src/skit/__init__.py +0 -0
- {skit_cli-0.2.0 → skit_cli-0.3.0}/src/skit/theme.py +0 -0
- {skit_cli-0.2.0 → skit_cli-0.3.0}/src/skit/tui_footer.py +0 -0
- {skit_cli-0.2.0 → skit_cli-0.3.0}/src/skit/tui_layout.py +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: skit-cli
|
|
3
|
-
Version: 0.
|
|
4
|
-
Summary:
|
|
5
|
-
Keywords: script,launcher,uv,tui,pep723,script-manager,script-runner,automation,ai-agent,agent-skills
|
|
3
|
+
Version: 0.3.0
|
|
4
|
+
Summary: Launcher and parameter manager for scripts, prompts, programs, and commands: one library, one run form, nothing to memorize.
|
|
5
|
+
Keywords: script,launcher,uv,tui,pep723,script-manager,script-runner,automation,ai-agent,ai-prompt,agent-skills
|
|
6
6
|
Author: Yi-Ting Chiu
|
|
7
7
|
Author-email: Yi-Ting Chiu <mytim710@gmail.com>
|
|
8
8
|
License-Expression: MIT
|
|
@@ -20,9 +20,14 @@ Classifier: Topic :: Software Development :: Build Tools
|
|
|
20
20
|
Classifier: Topic :: Utilities
|
|
21
21
|
Requires-Dist: typer>=0.26,<1
|
|
22
22
|
Requires-Dist: platformdirs>=4.10,<5
|
|
23
|
+
Requires-Dist: packaging>=24,<27
|
|
23
24
|
Requires-Dist: tomli-w>=1.2,<2
|
|
24
25
|
Requires-Dist: textual>=8.2,<9
|
|
25
26
|
Requires-Dist: rich>=15,<16
|
|
27
|
+
Requires-Dist: tree-sitter>=0.25,<0.27
|
|
28
|
+
Requires-Dist: tree-sitter-bash>=0.25,<0.26
|
|
29
|
+
Requires-Dist: tree-sitter-javascript>=0.25,<0.26
|
|
30
|
+
Requires-Dist: tree-sitter-typescript>=0.23,<0.24
|
|
26
31
|
Requires-Python: >=3.12
|
|
27
32
|
Project-URL: Repository, https://github.com/t41372/skit
|
|
28
33
|
Project-URL: Issues, https://github.com/t41372/skit/issues
|
|
@@ -41,9 +46,9 @@ Description-Content-Type: text/markdown
|
|
|
41
46
|
|
|
42
47
|
**English** | [繁體中文](./README.zh-TW.md) | [简体中文](./README.zh-CN.md)
|
|
43
48
|
|
|
44
|
-
**skit is a launcher and a home for your
|
|
49
|
+
**skit is a launcher and a home for your scripts.**
|
|
45
50
|
|
|
46
|
-
skit stores your
|
|
51
|
+
skit stores your scripts in one place and makes them painless to launch.
|
|
47
52
|
|
|
48
53
|
**AI writes the scripts. skit gives them a home.**
|
|
49
54
|
|
|
@@ -55,19 +60,21 @@ script, and (with your OK) saving the good ones back, so they outlive the chat.
|
|
|
55
60
|
|
|
56
61
|
## What it does
|
|
57
62
|
|
|
58
|
-
- **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.
|
|
59
|
-
- **Parameters without the pain.** Flags, `input()` calls, and the constants you tick become form fields (choices → pickers, booleans → checkboxes, types enforced).
|
|
63
|
+
- **One home for your scripts and prompts.** `skit add` collects scattered scripts and prompts into a searchable library — keep a copy in the library, or reference the original file. Run it bare and it asks what you're adding; hand it a file it can't classify and it asks which kind, instead of erroring out.
|
|
64
|
+
- **Parameters without the pain.** Flags, `input()` calls, and the constants you tick become form fields (choices → pickers, booleans → checkboxes, paths → completion and a file browser, types enforced).
|
|
65
|
+
- **Paths you don't have to type.** Path fields complete as you type — press `→` to accept the suggestion — and `Ctrl+T` → *File or folder…* opens a browsable picker, so you never hand-type a directory again.
|
|
60
66
|
- **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.
|
|
61
|
-
- **No environment mess.**
|
|
67
|
+
- **No environment mess.** Python scripts declare their dependencies inline (PEP 723) and run via uv in isolated environments; JS/TS scripts get a per-script `node_modules`, installed from their declared packages on first run. Nothing global either way. Other languages use the tools already on your machine — skit checks that declared external commands are on your `PATH` before running.
|
|
62
68
|
- **Mouse or keyboard.** Plain `skit` opens the full TUI; every key hint on screen is also a clickable button.
|
|
63
69
|
- **Automation-ready.** Every TUI action is also a CLI command with `--json` output and meaningful exit codes — for shell scripts, CI, and AI agents.
|
|
64
|
-
- **
|
|
70
|
+
- **Prompts are first-class library entries.** Store a parameterized prompt (managed `{{placeholders}}` become form fields) and fire it at your coding agent — claude, codex, opencode, and friends are preconfigured runners, and any CLI is one `skit runner add` away.
|
|
71
|
+
- **Your agent's library too.** The official [Agent Skill](https://agentskills.io) teaches Claude Code, Codex, Cursor, Gemini CLI, and friends the whole drill: discover entries with `skit list`, read a parameter schema with `skit show`, run with `skit run --set … --no-input`. One `skit agent install` away — see [Works with your AI agent](#works-with-your-ai-agent).
|
|
65
72
|
- **Speaks your language.** English, 繁體中文, and 简体中文, with more to come. See [Languages](#languages).
|
|
66
73
|
|
|
67
74
|
| Problem | What skit does |
|
|
68
75
|
| --- | --- |
|
|
69
76
|
| Scripts scattered all over the place | One central menu, with search |
|
|
70
|
-
| Scripts
|
|
77
|
+
| Scripts that need specific packages or tools | Per-script dependencies for Python (PEP 723 + uv) and JS/TS (npm); for any language, skit checks declared external commands on your `PATH` |
|
|
71
78
|
| 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. |
|
|
72
79
|
| The weird script an AI wrote for you dies with the chat session | Agents check the library first, reuse what's there, and save the keepers — one-off scripts become permanent, parameterized tools |
|
|
73
80
|
|
|
@@ -84,6 +91,34 @@ Nothing to set up per script — no refactoring, no config to maintain. The scri
|
|
|
84
91
|
<em>Fully mouse operable — every key hint on screen is also a button.</em>
|
|
85
92
|
</p>
|
|
86
93
|
|
|
94
|
+
## Language support
|
|
95
|
+
|
|
96
|
+
Python, shell, and JS/TS get static parameter detection **and** value injection. The rest launch out of the box, accept declared parameters, and work with their own CLI parsers.
|
|
97
|
+
|
|
98
|
+
| Kind | Runs via | Params detected | Injection | Reads its own CLI | Deps / needs |
|
|
99
|
+
| --- | --- | --- | --- | --- | --- |
|
|
100
|
+
| **Python** | `uv run --script` | constants, `input()` | ✅ | argparse · click · typer | PEP 723 (uv) + needs |
|
|
101
|
+
| **Shell** (bash/sh/zsh) | interpreter | constants, `${VAR:-}` env-defaults, `read` | ✅ | getopts | needs |
|
|
102
|
+
| **JS / TS** | deno › bun › node | `const` | ✅ | `util.parseArgs` | npm (per script) + needs |
|
|
103
|
+
| **fish** | fish | `set -q NAME; or set NAME …` env-defaults | — | `argparse` builtin | needs |
|
|
104
|
+
| **PowerShell** | pwsh | — | — | `param()` | needs |
|
|
105
|
+
| **Ruby · Perl · Lua · R** | interpreter | — | — | — | needs |
|
|
106
|
+
| **Programs** (exe) | direct exec | — | — | — | needs |
|
|
107
|
+
| **Commands** | template fill | — | — | — | needs |
|
|
108
|
+
| **Prompts** | your agent CLI (claude · codex · …) | `{{name}}` placeholders | — | — | needs |
|
|
109
|
+
|
|
110
|
+
You can also declare parameters by hand for any kind — so even plain executables and command templates get the same form / preset / `--set` experience. **needs** are external commands — skit checks they're on your `PATH` before each run (any kind). Python and JS/TS get isolated per-script package dependencies: uv resolves the PEP 723 block, and npm-style deps install into a `node_modules` next to the stored copy (`skit add` suggests them from the script's own imports). Managed JS/TS deps apply to copied entries — a referenced script keeps using its own project's `node_modules` — and installs never run package lifecycle scripts (npm and bun get `--ignore-scripts`; deno skips them by default). One more evener: when deno is the runner skit picks, it passes `--allow-all`, so the same script behaves the same under deno, bun, and node. skit bootstraps uv for Python, but never a JS runtime — you supply node, bun, or deno.
|
|
111
|
+
|
|
112
|
+
### Prompts
|
|
113
|
+
|
|
114
|
+
A prompt entry is a reusable, parameterized piece of text for an AI coding agent. Add a `.prompt.md` file (or draft one with `skit add --prompt`); in interactive add review, choose which detected `{{placeholders}}` become form fields. Up to 30 are selected by default; when detection exceeds 30, none are selected by default, so code samples are not mistaken for variables. Managed fields get the full preset / last-values / `--set` experience. There are no escape sequences to learn: anything that isn't a placeholder you manage — unmanaged `{{holes}}` included — travels to the agent byte-for-byte as written, and a per-prompt switch (`--no-interpolate`, or one checkbox in Entry settings) turns insertion off entirely for prompts that were never written with it in mind. Running one renders the text and invokes the selected runner's configured argv command with it. The bundled Claude, Codex, OpenCode, and Antigravity commands open their interactive sessions; Amp is the deliberate exception, using its official `amp -x` one-shot mode to execute the prompt and return. The **runner** is picked on the run form (or pinned per prompt), claude / codex / opencode / amp / antigravity come preconfigured, and `skit runner add mycli -- mycli run {{prompt}}` registers anything else. The rendered prompt travels as a single process argument — no shell in between. One honest caveat: prompts are not a secrets channel — whatever the rendered text contains ends up in the receiving agent's own session logs.
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
skit add review.prompt.md # managed placeholders become form fields
|
|
118
|
+
skit run review # pick the agent, fill the form, go
|
|
119
|
+
skit run review --runner codex --set target=src/app.py --no-input
|
|
120
|
+
```
|
|
121
|
+
|
|
87
122
|
## Install
|
|
88
123
|
|
|
89
124
|
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.
|
|
@@ -131,7 +166,7 @@ That removes skit and its `PATH` shim. Your library and settings live **outside*
|
|
|
131
166
|
| **Linux** | `~/.local/share/skit` · `~/.local/state/skit` · `~/.config/skit` |
|
|
132
167
|
| **Windows** | `%LOCALAPPDATA%\skit` |
|
|
133
168
|
|
|
134
|
-
They hold your
|
|
169
|
+
They hold your tool 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).
|
|
135
170
|
|
|
136
171
|
```bash
|
|
137
172
|
# macOS
|
|
@@ -154,6 +189,7 @@ Two commands are the whole interface:
|
|
|
154
189
|
|
|
155
190
|
```bash
|
|
156
191
|
skit add my_script.py # add a script
|
|
192
|
+
skit add # not sure what you're adding? it asks
|
|
157
193
|
skit # open the menu, pick it, fill in the form, run
|
|
158
194
|
```
|
|
159
195
|
|
|
@@ -167,6 +203,7 @@ skit run my_script --dry-run # print the exact command, don't run it
|
|
|
167
203
|
skit run my_script --set width=800 --no-input # set values explicitly, never prompt
|
|
168
204
|
skit show my_script --json # one script's full parameter schema, machine-readable
|
|
169
205
|
skit params my_script # show managed parameters and last-used values
|
|
206
|
+
skit deps my_script --dep "requests>=2" # set a script's package dependencies
|
|
170
207
|
skit list --json # machine-readable listing
|
|
171
208
|
skit config # settings: language, editor, mirror, form style
|
|
172
209
|
skit --help # everything else
|
|
@@ -199,18 +236,23 @@ skit follows your system language; switch it in the TUI preferences (for automat
|
|
|
199
236
|
|
|
200
237
|
## Mainland China (中国大陆)
|
|
201
238
|
|
|
202
|
-
|
|
239
|
+
Four downloads tend to fail in mainland China: PyPI packages, npm packages, the Python builds uv fetches from GitHub, and skit's own uv bootstrap. skit can route all four through domestic mirrors.
|
|
240
|
+
|
|
241
|
+
Mirror settings live inside skit only: your global uv config is never touched, and existing mirror settings (`UV_DEFAULT_INDEX`, `uv.toml`, …) are respected. The npm registry rides `NPM_CONFIG_REGISTRY`: an existing value of that variable in your environment still wins, but note npm itself ranks it above `~/.npmrc`.
|
|
203
242
|
|
|
204
|
-
|
|
243
|
+
Each ecosystem is its own, independent choice — mirror vendors differ per ecosystem, so no single vendor name spans them:
|
|
205
244
|
|
|
206
|
-
- **First run**: if PyPI/GitHub look unreachable, skit offers
|
|
207
|
-
- **Any time**: TUI Preferences →
|
|
245
|
+
- **First run**: if PyPI/GitHub look unreachable, skit offers mirror setup — one question per ecosystem, Enter accepts each one's recommended preset.
|
|
246
|
+
- **Any time**: TUI Preferences → mirrors, or:
|
|
208
247
|
|
|
209
248
|
```bash
|
|
210
|
-
skit config mirror tsinghua
|
|
249
|
+
skit config mirror.pypi tsinghua # Python packages: tsinghua / aliyun / ustc / a URL / off
|
|
250
|
+
skit config mirror.github nju # Python builds + the uv binary: nju / an https:// base URL / off
|
|
251
|
+
skit config mirror.npm npmmirror # JS/TS packages: npmmirror / a URL / off
|
|
252
|
+
skit config mirror off # master switch: off keeps the URLs; `on` restores them
|
|
211
253
|
```
|
|
212
254
|
|
|
213
|
-
|
|
255
|
+
Custom URLs: pick `custom` in TUI Preferences (or the first-run wizard), or pass a URL to the axis key directly.
|
|
214
256
|
|
|
215
257
|
## Why skit exists
|
|
216
258
|
|
|
@@ -11,9 +11,9 @@
|
|
|
11
11
|
|
|
12
12
|
**English** | [繁體中文](./README.zh-TW.md) | [简体中文](./README.zh-CN.md)
|
|
13
13
|
|
|
14
|
-
**skit is a launcher and a home for your
|
|
14
|
+
**skit is a launcher and a home for your scripts.**
|
|
15
15
|
|
|
16
|
-
skit stores your
|
|
16
|
+
skit stores your scripts in one place and makes them painless to launch.
|
|
17
17
|
|
|
18
18
|
**AI writes the scripts. skit gives them a home.**
|
|
19
19
|
|
|
@@ -25,19 +25,21 @@ script, and (with your OK) saving the good ones back, so they outlive the chat.
|
|
|
25
25
|
|
|
26
26
|
## What it does
|
|
27
27
|
|
|
28
|
-
- **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.
|
|
29
|
-
- **Parameters without the pain.** Flags, `input()` calls, and the constants you tick become form fields (choices → pickers, booleans → checkboxes, types enforced).
|
|
28
|
+
- **One home for your scripts and prompts.** `skit add` collects scattered scripts and prompts into a searchable library — keep a copy in the library, or reference the original file. Run it bare and it asks what you're adding; hand it a file it can't classify and it asks which kind, instead of erroring out.
|
|
29
|
+
- **Parameters without the pain.** Flags, `input()` calls, and the constants you tick become form fields (choices → pickers, booleans → checkboxes, paths → completion and a file browser, types enforced).
|
|
30
|
+
- **Paths you don't have to type.** Path fields complete as you type — press `→` to accept the suggestion — and `Ctrl+T` → *File or folder…* opens a browsable picker, so you never hand-type a directory again.
|
|
30
31
|
- **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.
|
|
31
|
-
- **No environment mess.**
|
|
32
|
+
- **No environment mess.** Python scripts declare their dependencies inline (PEP 723) and run via uv in isolated environments; JS/TS scripts get a per-script `node_modules`, installed from their declared packages on first run. Nothing global either way. Other languages use the tools already on your machine — skit checks that declared external commands are on your `PATH` before running.
|
|
32
33
|
- **Mouse or keyboard.** Plain `skit` opens the full TUI; every key hint on screen is also a clickable button.
|
|
33
34
|
- **Automation-ready.** Every TUI action is also a CLI command with `--json` output and meaningful exit codes — for shell scripts, CI, and AI agents.
|
|
34
|
-
- **
|
|
35
|
+
- **Prompts are first-class library entries.** Store a parameterized prompt (managed `{{placeholders}}` become form fields) and fire it at your coding agent — claude, codex, opencode, and friends are preconfigured runners, and any CLI is one `skit runner add` away.
|
|
36
|
+
- **Your agent's library too.** The official [Agent Skill](https://agentskills.io) teaches Claude Code, Codex, Cursor, Gemini CLI, and friends the whole drill: discover entries with `skit list`, read a parameter schema with `skit show`, run with `skit run --set … --no-input`. One `skit agent install` away — see [Works with your AI agent](#works-with-your-ai-agent).
|
|
35
37
|
- **Speaks your language.** English, 繁體中文, and 简体中文, with more to come. See [Languages](#languages).
|
|
36
38
|
|
|
37
39
|
| Problem | What skit does |
|
|
38
40
|
| --- | --- |
|
|
39
41
|
| Scripts scattered all over the place | One central menu, with search |
|
|
40
|
-
| Scripts
|
|
42
|
+
| Scripts that need specific packages or tools | Per-script dependencies for Python (PEP 723 + uv) and JS/TS (npm); for any language, skit checks declared external commands on your `PATH` |
|
|
41
43
|
| 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. |
|
|
42
44
|
| The weird script an AI wrote for you dies with the chat session | Agents check the library first, reuse what's there, and save the keepers — one-off scripts become permanent, parameterized tools |
|
|
43
45
|
|
|
@@ -54,6 +56,34 @@ Nothing to set up per script — no refactoring, no config to maintain. The scri
|
|
|
54
56
|
<em>Fully mouse operable — every key hint on screen is also a button.</em>
|
|
55
57
|
</p>
|
|
56
58
|
|
|
59
|
+
## Language support
|
|
60
|
+
|
|
61
|
+
Python, shell, and JS/TS get static parameter detection **and** value injection. The rest launch out of the box, accept declared parameters, and work with their own CLI parsers.
|
|
62
|
+
|
|
63
|
+
| Kind | Runs via | Params detected | Injection | Reads its own CLI | Deps / needs |
|
|
64
|
+
| --- | --- | --- | --- | --- | --- |
|
|
65
|
+
| **Python** | `uv run --script` | constants, `input()` | ✅ | argparse · click · typer | PEP 723 (uv) + needs |
|
|
66
|
+
| **Shell** (bash/sh/zsh) | interpreter | constants, `${VAR:-}` env-defaults, `read` | ✅ | getopts | needs |
|
|
67
|
+
| **JS / TS** | deno › bun › node | `const` | ✅ | `util.parseArgs` | npm (per script) + needs |
|
|
68
|
+
| **fish** | fish | `set -q NAME; or set NAME …` env-defaults | — | `argparse` builtin | needs |
|
|
69
|
+
| **PowerShell** | pwsh | — | — | `param()` | needs |
|
|
70
|
+
| **Ruby · Perl · Lua · R** | interpreter | — | — | — | needs |
|
|
71
|
+
| **Programs** (exe) | direct exec | — | — | — | needs |
|
|
72
|
+
| **Commands** | template fill | — | — | — | needs |
|
|
73
|
+
| **Prompts** | your agent CLI (claude · codex · …) | `{{name}}` placeholders | — | — | needs |
|
|
74
|
+
|
|
75
|
+
You can also declare parameters by hand for any kind — so even plain executables and command templates get the same form / preset / `--set` experience. **needs** are external commands — skit checks they're on your `PATH` before each run (any kind). Python and JS/TS get isolated per-script package dependencies: uv resolves the PEP 723 block, and npm-style deps install into a `node_modules` next to the stored copy (`skit add` suggests them from the script's own imports). Managed JS/TS deps apply to copied entries — a referenced script keeps using its own project's `node_modules` — and installs never run package lifecycle scripts (npm and bun get `--ignore-scripts`; deno skips them by default). One more evener: when deno is the runner skit picks, it passes `--allow-all`, so the same script behaves the same under deno, bun, and node. skit bootstraps uv for Python, but never a JS runtime — you supply node, bun, or deno.
|
|
76
|
+
|
|
77
|
+
### Prompts
|
|
78
|
+
|
|
79
|
+
A prompt entry is a reusable, parameterized piece of text for an AI coding agent. Add a `.prompt.md` file (or draft one with `skit add --prompt`); in interactive add review, choose which detected `{{placeholders}}` become form fields. Up to 30 are selected by default; when detection exceeds 30, none are selected by default, so code samples are not mistaken for variables. Managed fields get the full preset / last-values / `--set` experience. There are no escape sequences to learn: anything that isn't a placeholder you manage — unmanaged `{{holes}}` included — travels to the agent byte-for-byte as written, and a per-prompt switch (`--no-interpolate`, or one checkbox in Entry settings) turns insertion off entirely for prompts that were never written with it in mind. Running one renders the text and invokes the selected runner's configured argv command with it. The bundled Claude, Codex, OpenCode, and Antigravity commands open their interactive sessions; Amp is the deliberate exception, using its official `amp -x` one-shot mode to execute the prompt and return. The **runner** is picked on the run form (or pinned per prompt), claude / codex / opencode / amp / antigravity come preconfigured, and `skit runner add mycli -- mycli run {{prompt}}` registers anything else. The rendered prompt travels as a single process argument — no shell in between. One honest caveat: prompts are not a secrets channel — whatever the rendered text contains ends up in the receiving agent's own session logs.
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
skit add review.prompt.md # managed placeholders become form fields
|
|
83
|
+
skit run review # pick the agent, fill the form, go
|
|
84
|
+
skit run review --runner codex --set target=src/app.py --no-input
|
|
85
|
+
```
|
|
86
|
+
|
|
57
87
|
## Install
|
|
58
88
|
|
|
59
89
|
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.
|
|
@@ -101,7 +131,7 @@ That removes skit and its `PATH` shim. Your library and settings live **outside*
|
|
|
101
131
|
| **Linux** | `~/.local/share/skit` · `~/.local/state/skit` · `~/.config/skit` |
|
|
102
132
|
| **Windows** | `%LOCALAPPDATA%\skit` |
|
|
103
133
|
|
|
104
|
-
They hold your
|
|
134
|
+
They hold your tool 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).
|
|
105
135
|
|
|
106
136
|
```bash
|
|
107
137
|
# macOS
|
|
@@ -124,6 +154,7 @@ Two commands are the whole interface:
|
|
|
124
154
|
|
|
125
155
|
```bash
|
|
126
156
|
skit add my_script.py # add a script
|
|
157
|
+
skit add # not sure what you're adding? it asks
|
|
127
158
|
skit # open the menu, pick it, fill in the form, run
|
|
128
159
|
```
|
|
129
160
|
|
|
@@ -137,6 +168,7 @@ skit run my_script --dry-run # print the exact command, don't run it
|
|
|
137
168
|
skit run my_script --set width=800 --no-input # set values explicitly, never prompt
|
|
138
169
|
skit show my_script --json # one script's full parameter schema, machine-readable
|
|
139
170
|
skit params my_script # show managed parameters and last-used values
|
|
171
|
+
skit deps my_script --dep "requests>=2" # set a script's package dependencies
|
|
140
172
|
skit list --json # machine-readable listing
|
|
141
173
|
skit config # settings: language, editor, mirror, form style
|
|
142
174
|
skit --help # everything else
|
|
@@ -169,18 +201,23 @@ skit follows your system language; switch it in the TUI preferences (for automat
|
|
|
169
201
|
|
|
170
202
|
## Mainland China (中国大陆)
|
|
171
203
|
|
|
172
|
-
|
|
204
|
+
Four downloads tend to fail in mainland China: PyPI packages, npm packages, the Python builds uv fetches from GitHub, and skit's own uv bootstrap. skit can route all four through domestic mirrors.
|
|
205
|
+
|
|
206
|
+
Mirror settings live inside skit only: your global uv config is never touched, and existing mirror settings (`UV_DEFAULT_INDEX`, `uv.toml`, …) are respected. The npm registry rides `NPM_CONFIG_REGISTRY`: an existing value of that variable in your environment still wins, but note npm itself ranks it above `~/.npmrc`.
|
|
173
207
|
|
|
174
|
-
|
|
208
|
+
Each ecosystem is its own, independent choice — mirror vendors differ per ecosystem, so no single vendor name spans them:
|
|
175
209
|
|
|
176
|
-
- **First run**: if PyPI/GitHub look unreachable, skit offers
|
|
177
|
-
- **Any time**: TUI Preferences →
|
|
210
|
+
- **First run**: if PyPI/GitHub look unreachable, skit offers mirror setup — one question per ecosystem, Enter accepts each one's recommended preset.
|
|
211
|
+
- **Any time**: TUI Preferences → mirrors, or:
|
|
178
212
|
|
|
179
213
|
```bash
|
|
180
|
-
skit config mirror tsinghua
|
|
214
|
+
skit config mirror.pypi tsinghua # Python packages: tsinghua / aliyun / ustc / a URL / off
|
|
215
|
+
skit config mirror.github nju # Python builds + the uv binary: nju / an https:// base URL / off
|
|
216
|
+
skit config mirror.npm npmmirror # JS/TS packages: npmmirror / a URL / off
|
|
217
|
+
skit config mirror off # master switch: off keeps the URLs; `on` restores them
|
|
181
218
|
```
|
|
182
219
|
|
|
183
|
-
|
|
220
|
+
Custom URLs: pick `custom` in TUI Preferences (or the first-run wizard), or pass a URL to the axis key directly.
|
|
184
221
|
|
|
185
222
|
## Why skit exists
|
|
186
223
|
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
# Distribution name only ("skit" is admin-prohibited on PyPI); the import package,
|
|
3
3
|
# CLI command, and config dirs all stay "skit".
|
|
4
4
|
name = "skit-cli"
|
|
5
|
-
version = "0.
|
|
6
|
-
description = "
|
|
5
|
+
version = "0.3.0"
|
|
6
|
+
description = "Launcher and parameter manager for scripts, prompts, programs, and commands: one library, one run form, nothing to memorize."
|
|
7
7
|
readme = "README.md"
|
|
8
8
|
requires-python = ">=3.12"
|
|
9
9
|
license = "MIT"
|
|
@@ -19,6 +19,7 @@ keywords = [
|
|
|
19
19
|
"script-runner",
|
|
20
20
|
"automation",
|
|
21
21
|
"ai-agent",
|
|
22
|
+
"ai-prompt",
|
|
22
23
|
"agent-skills",
|
|
23
24
|
]
|
|
24
25
|
classifiers = [
|
|
@@ -39,9 +40,14 @@ classifiers = [
|
|
|
39
40
|
dependencies = [
|
|
40
41
|
"typer>=0.26,<1",
|
|
41
42
|
"platformdirs>=4.10,<5",
|
|
43
|
+
"packaging>=24,<27",
|
|
42
44
|
"tomli-w>=1.2,<2",
|
|
43
45
|
"textual>=8.2,<9",
|
|
44
46
|
"rich>=15,<16",
|
|
47
|
+
"tree-sitter>=0.25,<0.27",
|
|
48
|
+
"tree-sitter-bash>=0.25,<0.26",
|
|
49
|
+
"tree-sitter-javascript>=0.25,<0.26",
|
|
50
|
+
"tree-sitter-typescript>=0.23,<0.24",
|
|
45
51
|
]
|
|
46
52
|
|
|
47
53
|
[project.urls]
|
|
@@ -62,6 +68,7 @@ dev = [
|
|
|
62
68
|
"mutmut>=3.6,<4",
|
|
63
69
|
"zizmor>=1.26,<2",
|
|
64
70
|
"babel>=2.18,<3", # dev-only: extract/update/compile .po↔.mo (runtime uses stdlib gettext)
|
|
71
|
+
"pytest-rerunfailures>=16.4",
|
|
65
72
|
]
|
|
66
73
|
|
|
67
74
|
[build-system]
|
|
@@ -190,4 +197,27 @@ source_paths = ["src/skit/"]
|
|
|
190
197
|
pytest_add_cli_args_test_selection = ["tests/"]
|
|
191
198
|
# The skill-sync test (tests/test_agent_skill.py) compares the repo-root skill against
|
|
192
199
|
# the packaged copy; mutmut's mutants/ tree only carries src/ + tests/ by default.
|
|
193
|
-
|
|
200
|
+
# README.md rides along because pyproject's `readme` references it — without it, uv
|
|
201
|
+
# can't build the project inside mutants/ on a cold cache. scripts/ rides along because
|
|
202
|
+
# the i18n-gate tests (test_js_deps.py) import scripts/i18n_coverage.py by path. locales/
|
|
203
|
+
# must be explicit too: mutmut never refreshes non-Python files already present under a
|
|
204
|
+
# reused source_paths copy, while also_copy directories are overlaid on every run. That
|
|
205
|
+
# applies to both runtime package-data trees: translation catalogs and the bundled skill.
|
|
206
|
+
also_copy = [
|
|
207
|
+
"skills/",
|
|
208
|
+
"README.md",
|
|
209
|
+
"scripts/",
|
|
210
|
+
"src/skit/locales/",
|
|
211
|
+
"src/skit/skills/",
|
|
212
|
+
]
|
|
213
|
+
# mutmut's native pragma scan only sees statement-level comments: a trailing pragma on a
|
|
214
|
+
# multi-line statement marks the first line only, so an equivalent mutant on a later line
|
|
215
|
+
# of the same statement can't be pinned natively. This pattern makes any line that carries
|
|
216
|
+
# the pragma text skip the expression starting there, so a pragma can sit exactly on the
|
|
217
|
+
# equivalent-mutant line (e.g. one branch of a wrapped ternary) without silencing its
|
|
218
|
+
# siblings — mutants on the statement's other lines stay live. (Note the anchor is the
|
|
219
|
+
# expression's FIRST line: call-argument mutants belong to the whole Call node, so they
|
|
220
|
+
# can't be pinned per-argument this way — kill those with a forwarding test instead.) No
|
|
221
|
+
# existing pragma line opens a multi-line expression, so for every other site this is a
|
|
222
|
+
# no-op.
|
|
223
|
+
do_not_mutate_patterns = ['pragma: no mutate']
|
|
@@ -51,9 +51,14 @@ def default_roots() -> tuple[Path, Path]:
|
|
|
51
51
|
def skill_text() -> str:
|
|
52
52
|
"""The bundled SKILL.md, read from the installed package (single source: the repo's
|
|
53
53
|
skills/skit/SKILL.md is a test-enforced byte-identical copy of this file)."""
|
|
54
|
-
|
|
54
|
+
package = "skit"
|
|
55
|
+
# files(None) infers this module's own package, and agentskill lives directly in `skit`, so
|
|
56
|
+
# anchor→None resolves to the identical package root — an equivalent mutant. Scoped to this one
|
|
57
|
+
# line so the killable anchor-string ("skit"→…) and joinpath mutants below stay mutation-tested.
|
|
58
|
+
root = resources.files(package) # pragma: no mutate
|
|
59
|
+
res = root.joinpath("skills", SKILL_DIR_NAME, SKILL_FILE_NAME)
|
|
55
60
|
# I/O kwarg mutants ("utf-8"→"UTF-8"/None) are equivalent aliases here; content is
|
|
56
|
-
# pinned by
|
|
61
|
+
# pinned by test_skill_ships_inside_the_package (see docs/mutation-ledger.md).
|
|
57
62
|
return res.read_text(encoding="utf-8") # pragma: no mutate
|
|
58
63
|
|
|
59
64
|
|