skit-cli 0.2.0__tar.gz → 0.4.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.
Files changed (93) hide show
  1. {skit_cli-0.2.0 → skit_cli-0.4.0}/PKG-INFO +62 -19
  2. {skit_cli-0.2.0 → skit_cli-0.4.0}/README.md +54 -16
  3. {skit_cli-0.2.0 → skit_cli-0.4.0}/pyproject.toml +33 -3
  4. {skit_cli-0.2.0 → skit_cli-0.4.0}/src/skit/agentskill.py +7 -2
  5. skit_cli-0.4.0/src/skit/analysis.py +517 -0
  6. {skit_cli-0.2.0 → skit_cli-0.4.0}/src/skit/argstate.py +59 -9
  7. skit_cli-0.4.0/src/skit/argv_text.py +80 -0
  8. {skit_cli-0.2.0 → skit_cli-0.4.0}/src/skit/atomic.py +98 -0
  9. skit_cli-0.4.0/src/skit/callmatch.py +129 -0
  10. skit_cli-0.4.0/src/skit/cli.py +5586 -0
  11. skit_cli-0.4.0/src/skit/config.py +1168 -0
  12. {skit_cli-0.2.0 → skit_cli-0.4.0}/src/skit/editor.py +31 -0
  13. skit_cli-0.4.0/src/skit/flows.py +1147 -0
  14. skit_cli-0.4.0/src/skit/healthcheck.py +98 -0
  15. {skit_cli-0.2.0 → skit_cli-0.4.0}/src/skit/i18n.py +28 -25
  16. {skit_cli-0.2.0 → skit_cli-0.4.0}/src/skit/inlineform.py +34 -8
  17. skit_cli-0.4.0/src/skit/kindnames.py +53 -0
  18. skit_cli-0.4.0/src/skit/langs/__init__.py +1 -0
  19. skit_cli-0.4.0/src/skit/langs/base.py +347 -0
  20. skit_cli-0.4.0/src/skit/langs/fish/__init__.py +17 -0
  21. skit_cli-0.4.0/src/skit/langs/fish/analyzer.py +387 -0
  22. skit_cli-0.4.0/src/skit/langs/fish/cli_reader.py +151 -0
  23. skit_cli-0.4.0/src/skit/langs/javascript/__init__.py +12 -0
  24. skit_cli-0.4.0/src/skit/langs/javascript/analyzer.py +367 -0
  25. skit_cli-0.4.0/src/skit/langs/javascript/cli_reader.py +342 -0
  26. skit_cli-0.4.0/src/skit/langs/javascript/deps.py +414 -0
  27. skit_cli-0.4.0/src/skit/langs/javascript/inject.py +248 -0
  28. skit_cli-0.4.0/src/skit/langs/javascript/io.py +28 -0
  29. skit_cli-0.4.0/src/skit/langs/launch.py +724 -0
  30. skit_cli-0.4.0/src/skit/langs/powershell/__init__.py +14 -0
  31. skit_cli-0.4.0/src/skit/langs/powershell/cli_reader.py +274 -0
  32. skit_cli-0.4.0/src/skit/langs/prompt/__init__.py +6 -0
  33. skit_cli-0.4.0/src/skit/langs/prompt/analyzer.py +66 -0
  34. skit_cli-0.4.0/src/skit/langs/prompt/render.py +113 -0
  35. skit_cli-0.4.0/src/skit/langs/prompt/text.py +38 -0
  36. skit_cli-0.4.0/src/skit/langs/python/__init__.py +1 -0
  37. {skit_cli-0.2.0/src/skit → skit_cli-0.4.0/src/skit/langs/python}/analyzer.py +9 -154
  38. {skit_cli-0.2.0/src/skit → skit_cli-0.4.0/src/skit/langs/python}/argspec.py +190 -82
  39. {skit_cli-0.2.0/src/skit → skit_cli-0.4.0/src/skit/langs/python}/metawriter.py +39 -121
  40. skit_cli-0.4.0/src/skit/langs/python/reconcile.py +59 -0
  41. {skit_cli-0.2.0/src/skit → skit_cli-0.4.0/src/skit/langs/python}/shim.py +59 -148
  42. skit_cli-0.4.0/src/skit/langs/registry.py +534 -0
  43. skit_cli-0.4.0/src/skit/langs/shell/__init__.py +6 -0
  44. skit_cli-0.4.0/src/skit/langs/shell/analyzer.py +681 -0
  45. skit_cli-0.4.0/src/skit/langs/shell/cli_reader.py +113 -0
  46. skit_cli-0.4.0/src/skit/langs/shell/inject.py +555 -0
  47. skit_cli-0.4.0/src/skit/langs/shell/normalize.py +127 -0
  48. skit_cli-0.4.0/src/skit/launcher.py +303 -0
  49. skit_cli-0.4.0/src/skit/locales/skit.pot +3606 -0
  50. skit_cli-0.4.0/src/skit/locales/zh_CN/LC_MESSAGES/skit.mo +0 -0
  51. skit_cli-0.4.0/src/skit/locales/zh_CN/LC_MESSAGES/skit.po +3932 -0
  52. skit_cli-0.4.0/src/skit/locales/zh_TW/LC_MESSAGES/skit.mo +0 -0
  53. skit_cli-0.4.0/src/skit/locales/zh_TW/LC_MESSAGES/skit.po +3932 -0
  54. {skit_cli-0.2.0 → skit_cli-0.4.0}/src/skit/models.py +66 -3
  55. skit_cli-0.4.0/src/skit/params.py +550 -0
  56. {skit_cli-0.2.0 → skit_cli-0.4.0}/src/skit/paths.py +16 -0
  57. {skit_cli-0.2.0 → skit_cli-0.4.0}/src/skit/pep723.py +112 -45
  58. {skit_cli-0.2.0 → skit_cli-0.4.0}/src/skit/promptform.py +40 -4
  59. skit_cli-0.4.0/src/skit/rewrite.py +169 -0
  60. skit_cli-0.4.0/src/skit/skills/skit/SKILL.md +280 -0
  61. skit_cli-0.4.0/src/skit/store.py +1162 -0
  62. {skit_cli-0.2.0 → skit_cli-0.4.0}/src/skit/tokens.py +16 -5
  63. {skit_cli-0.2.0 → skit_cli-0.4.0}/src/skit/tui.py +237 -88
  64. skit_cli-0.4.0/src/skit/tui_add.py +1779 -0
  65. skit_cli-0.4.0/src/skit/tui_form.py +987 -0
  66. {skit_cli-0.2.0 → skit_cli-0.4.0}/src/skit/tui_health.py +61 -30
  67. skit_cli-0.4.0/src/skit/tui_pathpick.py +461 -0
  68. skit_cli-0.4.0/src/skit/tui_prefs.py +513 -0
  69. skit_cli-0.4.0/src/skit/tui_prompt.py +152 -0
  70. skit_cli-0.4.0/src/skit/tui_runner.py +516 -0
  71. skit_cli-0.4.0/src/skit/tui_settings.py +1199 -0
  72. {skit_cli-0.2.0 → skit_cli-0.4.0}/src/skit/uvman.py +1 -1
  73. skit_cli-0.2.0/src/skit/cli.py +0 -2002
  74. skit_cli-0.2.0/src/skit/config.py +0 -275
  75. skit_cli-0.2.0/src/skit/flows.py +0 -608
  76. skit_cli-0.2.0/src/skit/launcher.py +0 -326
  77. skit_cli-0.2.0/src/skit/locales/skit.pot +0 -1862
  78. skit_cli-0.2.0/src/skit/locales/zh_CN/LC_MESSAGES/skit.mo +0 -0
  79. skit_cli-0.2.0/src/skit/locales/zh_CN/LC_MESSAGES/skit.po +0 -2250
  80. skit_cli-0.2.0/src/skit/locales/zh_TW/LC_MESSAGES/skit.mo +0 -0
  81. skit_cli-0.2.0/src/skit/locales/zh_TW/LC_MESSAGES/skit.po +0 -2250
  82. skit_cli-0.2.0/src/skit/reconcile.py +0 -321
  83. skit_cli-0.2.0/src/skit/skills/skit/SKILL.md +0 -143
  84. skit_cli-0.2.0/src/skit/store.py +0 -566
  85. skit_cli-0.2.0/src/skit/tui_add.py +0 -466
  86. skit_cli-0.2.0/src/skit/tui_form.py +0 -623
  87. skit_cli-0.2.0/src/skit/tui_prefs.py +0 -208
  88. skit_cli-0.2.0/src/skit/tui_settings.py +0 -381
  89. {skit_cli-0.2.0 → skit_cli-0.4.0}/LICENSE +0 -0
  90. {skit_cli-0.2.0 → skit_cli-0.4.0}/src/skit/__init__.py +0 -0
  91. {skit_cli-0.2.0 → skit_cli-0.4.0}/src/skit/theme.py +0 -0
  92. {skit_cli-0.2.0 → skit_cli-0.4.0}/src/skit/tui_footer.py +0 -0
  93. {skit_cli-0.2.0 → skit_cli-0.4.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.2.0
4
- Summary: Script launcher and parameter manager: all your scripts in one menu, their flags, input() calls, and constants auto-extracted into a run form no more opening an IDE just to tweak a value.
5
- Keywords: script,launcher,uv,tui,pep723,script-manager,script-runner,automation,ai-agent,agent-skills
3
+ Version: 0.4.0
4
+ Summary: A terminal script manager and launcher for humans and AI agents: put any script, prompt, or program in one library; skit turns its inputs and flags into a run form and remembers past parameters. Ships an Agent Skill so agents reuse the scripts they wrote.
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,10 @@ 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 Python scripts.**
49
+ **skit is a launcher and a home for your scripts.**
45
50
 
46
- skit stores your Python scripts in one place and makes them painless to launch.
51
+ skit stores your scripts in one place and makes them painless to launch — Python, shell, and
52
+ JS/TS go deepest, a dozen kinds in all.
47
53
 
48
54
  **AI writes the scripts. skit gives them a home.**
49
55
 
@@ -51,23 +57,25 @@ And it's a home you share with your agent: the library you drive from a menu, AI
51
57
  drive through a deterministic CLI — checking it before writing yet another one-off
52
58
  script, and (with your OK) saving the good ones back, so they outlive the chat.
53
59
 
54
- <video src="https://github.com/user-attachments/assets/d27121fe-5855-4270-91b0-b0ee9e5d11ee" controls></video>
60
+ <video src="https://github.com/user-attachments/assets/8a1f27cd-f2f2-42db-977a-b4f8ea207340" controls></video>
55
61
 
56
62
  ## What it does
57
63
 
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).
60
- - **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.** 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.
64
+ - **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.
65
+ - **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).
66
+ - **Paths you don't have to type.** Every text field carries a `📁 browse` link that opens a file picker, and path fields complete as you type press `→` to accept the suggestion. You never hand-type a directory again. (`Ctrl+T` *File or folder…* is the keyboard route to the same picker.)
67
+ - **It remembers.** Script defaults arrive prefilled and track the source when it changes; last-used values come back automatically, and `↺ default` (Ctrl+O) puts the script's own value back. Save favorites as named presets. Parameters marked secret never touch disk. Tokens like `{cwd}` and `{today}` keep presets portable.
68
+ - **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
69
  - **Mouse or keyboard.** Plain `skit` opens the full TUI; every key hint on screen is also a clickable button.
63
70
  - **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
- - **Your agent's script library too.** The official [Agent Skill](https://agentskills.io) teaches Claude Code, Codex, Cursor, Gemini CLI, and friends the whole drill: discover scripts 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).
71
+ - **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.
72
+ - **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
73
  - **Speaks your language.** English, 繁體中文, and 简体中文, with more to come. See [Languages](#languages).
66
74
 
67
75
  | Problem | What skit does |
68
76
  | --- | --- |
69
77
  | Scripts scattered all over the place | One central menu, with search |
70
- | Scripts with weird external dependencies | An isolated environment per script dependencies declared in the file (PEP 723), resolved by uv |
78
+ | 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
79
  | 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
80
  | 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
81
 
@@ -84,6 +92,34 @@ Nothing to set up per script — no refactoring, no config to maintain. The scri
84
92
  <em>Fully mouse operable — every key hint on screen is also a button.</em>
85
93
  </p>
86
94
 
95
+ ## Language support
96
+
97
+ 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.
98
+
99
+ | Kind | Runs via | Params detected | Injection | Reads its own CLI | Deps / needs |
100
+ | --- | --- | --- | --- | --- | --- |
101
+ | **Python** | `uv run --script` | constants, `input()` | ✅ | argparse · click · typer | PEP 723 (uv) + needs |
102
+ | **Shell** (bash/sh/zsh) | interpreter | constants, `${VAR:-}` env-defaults, `read` | ✅ | getopts | needs |
103
+ | **JS / TS** | deno › bun › node | `const` | ✅ | `util.parseArgs` | npm (per script) + needs |
104
+ | **fish** | fish | `set -q NAME; or set NAME …` env-defaults | — | `argparse` builtin | needs |
105
+ | **PowerShell** | pwsh | — | — | `param()` | needs |
106
+ | **Ruby · Perl · Lua · R** | interpreter | — | — | — | needs |
107
+ | **Programs** (exe) | direct exec | — | — | — | needs |
108
+ | **Commands** | template fill | — | — | — | needs |
109
+ | **Prompts** | your agent CLI (claude · codex · …) | `{{name}}` placeholders | — | — | needs |
110
+
111
+ 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.
112
+
113
+ ### Prompts
114
+
115
+ 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.
116
+
117
+ ```bash
118
+ skit add review.prompt.md # managed placeholders become form fields
119
+ skit run review # pick the agent, fill the form, go
120
+ skit run review --runner codex --set target=src/app.py --no-input
121
+ ```
122
+
87
123
  ## Install
88
124
 
89
125
  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 +167,7 @@ That removes skit and its `PATH` shim. Your library and settings live **outside*
131
167
  | **Linux** | `~/.local/share/skit` · `~/.local/state/skit` · `~/.config/skit` |
132
168
  | **Windows** | `%LOCALAPPDATA%\skit` |
133
169
 
134
- 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).
170
+ 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
171
 
136
172
  ```bash
137
173
  # macOS
@@ -154,6 +190,7 @@ Two commands are the whole interface:
154
190
 
155
191
  ```bash
156
192
  skit add my_script.py # add a script
193
+ skit add # not sure what you're adding? it asks
157
194
  skit # open the menu, pick it, fill in the form, run
158
195
  ```
159
196
 
@@ -167,6 +204,7 @@ skit run my_script --dry-run # print the exact command, don't run it
167
204
  skit run my_script --set width=800 --no-input # set values explicitly, never prompt
168
205
  skit show my_script --json # one script's full parameter schema, machine-readable
169
206
  skit params my_script # show managed parameters and last-used values
207
+ skit deps my_script --dep "requests>=2" # set a script's package dependencies
170
208
  skit list --json # machine-readable listing
171
209
  skit config # settings: language, editor, mirror, form style
172
210
  skit --help # everything else
@@ -199,18 +237,23 @@ skit follows your system language; switch it in the TUI preferences (for automat
199
237
 
200
238
  ## Mainland China (中国大陆)
201
239
 
202
- 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.
240
+ 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.
241
+
242
+ 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
243
 
204
- Mirror settings live inside skit only: your global uv config is never touched, and existing mirror settings (`UV_DEFAULT_INDEX`, `uv.toml`, …) are respected.
244
+ Each ecosystem is its own, independent choice mirror vendors differ per ecosystem, so no single vendor name spans them:
205
245
 
206
- - **First run**: if PyPI/GitHub look unreachable, skit offers to turn mirrors on just press Enter.
207
- - **Any time**: TUI Preferences → mirror, or:
246
+ - **First run**: if PyPI/GitHub look unreachable, skit offers mirror setup one question per ecosystem, Enter accepts each one's recommended preset.
247
+ - **Any time**: TUI Preferences → mirrors, or:
208
248
 
209
249
  ```bash
210
- skit config mirror tsinghua # or: aliyun / ustc / custom / off
250
+ skit config mirror.pypi tsinghua # Python packages: tsinghua / aliyun / ustc / a URL / off
251
+ skit config mirror.github nju # Python builds + the uv binary: nju / an https:// base URL / off
252
+ skit config mirror.npm npmmirror # JS/TS packages: npmmirror / a URL / off
253
+ skit config mirror off # master switch: off keeps the URLs; `on` restores them
211
254
  ```
212
255
 
213
- Defaults: PyPI via Tsinghua / Aliyun / USTC; Python builds and the uv binary via NJU. Pick `custom` to swap any URL.
256
+ Custom URLs: pick `custom` in TUI Preferences (or the first-run wizard), or pass a URL to the axis key directly.
214
257
 
215
258
  ## Why skit exists
216
259
 
@@ -11,9 +11,10 @@
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 Python scripts.**
14
+ **skit is a launcher and a home for your scripts.**
15
15
 
16
- skit stores your Python scripts in one place and makes them painless to launch.
16
+ skit stores your scripts in one place and makes them painless to launch — Python, shell, and
17
+ JS/TS go deepest, a dozen kinds in all.
17
18
 
18
19
  **AI writes the scripts. skit gives them a home.**
19
20
 
@@ -21,23 +22,25 @@ And it's a home you share with your agent: the library you drive from a menu, AI
21
22
  drive through a deterministic CLI — checking it before writing yet another one-off
22
23
  script, and (with your OK) saving the good ones back, so they outlive the chat.
23
24
 
24
- <video src="https://github.com/user-attachments/assets/d27121fe-5855-4270-91b0-b0ee9e5d11ee" controls></video>
25
+ <video src="https://github.com/user-attachments/assets/8a1f27cd-f2f2-42db-977a-b4f8ea207340" controls></video>
25
26
 
26
27
  ## What it does
27
28
 
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).
30
- - **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.** 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.
29
+ - **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.
30
+ - **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).
31
+ - **Paths you don't have to type.** Every text field carries a `📁 browse` link that opens a file picker, and path fields complete as you type press `→` to accept the suggestion. You never hand-type a directory again. (`Ctrl+T` *File or folder…* is the keyboard route to the same picker.)
32
+ - **It remembers.** Script defaults arrive prefilled and track the source when it changes; last-used values come back automatically, and `↺ default` (Ctrl+O) puts the script's own value back. Save favorites as named presets. Parameters marked secret never touch disk. Tokens like `{cwd}` and `{today}` keep presets portable.
33
+ - **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
34
  - **Mouse or keyboard.** Plain `skit` opens the full TUI; every key hint on screen is also a clickable button.
33
35
  - **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
- - **Your agent's script library too.** The official [Agent Skill](https://agentskills.io) teaches Claude Code, Codex, Cursor, Gemini CLI, and friends the whole drill: discover scripts 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).
36
+ - **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.
37
+ - **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
38
  - **Speaks your language.** English, 繁體中文, and 简体中文, with more to come. See [Languages](#languages).
36
39
 
37
40
  | Problem | What skit does |
38
41
  | --- | --- |
39
42
  | Scripts scattered all over the place | One central menu, with search |
40
- | Scripts with weird external dependencies | An isolated environment per script dependencies declared in the file (PEP 723), resolved by uv |
43
+ | 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
44
  | 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
45
  | 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
46
 
@@ -54,6 +57,34 @@ Nothing to set up per script — no refactoring, no config to maintain. The scri
54
57
  <em>Fully mouse operable — every key hint on screen is also a button.</em>
55
58
  </p>
56
59
 
60
+ ## Language support
61
+
62
+ 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.
63
+
64
+ | Kind | Runs via | Params detected | Injection | Reads its own CLI | Deps / needs |
65
+ | --- | --- | --- | --- | --- | --- |
66
+ | **Python** | `uv run --script` | constants, `input()` | ✅ | argparse · click · typer | PEP 723 (uv) + needs |
67
+ | **Shell** (bash/sh/zsh) | interpreter | constants, `${VAR:-}` env-defaults, `read` | ✅ | getopts | needs |
68
+ | **JS / TS** | deno › bun › node | `const` | ✅ | `util.parseArgs` | npm (per script) + needs |
69
+ | **fish** | fish | `set -q NAME; or set NAME …` env-defaults | — | `argparse` builtin | needs |
70
+ | **PowerShell** | pwsh | — | — | `param()` | needs |
71
+ | **Ruby · Perl · Lua · R** | interpreter | — | — | — | needs |
72
+ | **Programs** (exe) | direct exec | — | — | — | needs |
73
+ | **Commands** | template fill | — | — | — | needs |
74
+ | **Prompts** | your agent CLI (claude · codex · …) | `{{name}}` placeholders | — | — | needs |
75
+
76
+ 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.
77
+
78
+ ### Prompts
79
+
80
+ 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.
81
+
82
+ ```bash
83
+ skit add review.prompt.md # managed placeholders become form fields
84
+ skit run review # pick the agent, fill the form, go
85
+ skit run review --runner codex --set target=src/app.py --no-input
86
+ ```
87
+
57
88
  ## Install
58
89
 
59
90
  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 +132,7 @@ That removes skit and its `PATH` shim. Your library and settings live **outside*
101
132
  | **Linux** | `~/.local/share/skit` · `~/.local/state/skit` · `~/.config/skit` |
102
133
  | **Windows** | `%LOCALAPPDATA%\skit` |
103
134
 
104
- 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).
135
+ 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
136
 
106
137
  ```bash
107
138
  # macOS
@@ -124,6 +155,7 @@ Two commands are the whole interface:
124
155
 
125
156
  ```bash
126
157
  skit add my_script.py # add a script
158
+ skit add # not sure what you're adding? it asks
127
159
  skit # open the menu, pick it, fill in the form, run
128
160
  ```
129
161
 
@@ -137,6 +169,7 @@ skit run my_script --dry-run # print the exact command, don't run it
137
169
  skit run my_script --set width=800 --no-input # set values explicitly, never prompt
138
170
  skit show my_script --json # one script's full parameter schema, machine-readable
139
171
  skit params my_script # show managed parameters and last-used values
172
+ skit deps my_script --dep "requests>=2" # set a script's package dependencies
140
173
  skit list --json # machine-readable listing
141
174
  skit config # settings: language, editor, mirror, form style
142
175
  skit --help # everything else
@@ -169,18 +202,23 @@ skit follows your system language; switch it in the TUI preferences (for automat
169
202
 
170
203
  ## Mainland China (中国大陆)
171
204
 
172
- 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.
205
+ 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.
206
+
207
+ 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
208
 
174
- Mirror settings live inside skit only: your global uv config is never touched, and existing mirror settings (`UV_DEFAULT_INDEX`, `uv.toml`, …) are respected.
209
+ Each ecosystem is its own, independent choice mirror vendors differ per ecosystem, so no single vendor name spans them:
175
210
 
176
- - **First run**: if PyPI/GitHub look unreachable, skit offers to turn mirrors on just press Enter.
177
- - **Any time**: TUI Preferences → mirror, or:
211
+ - **First run**: if PyPI/GitHub look unreachable, skit offers mirror setup one question per ecosystem, Enter accepts each one's recommended preset.
212
+ - **Any time**: TUI Preferences → mirrors, or:
178
213
 
179
214
  ```bash
180
- skit config mirror tsinghua # or: aliyun / ustc / custom / off
215
+ skit config mirror.pypi tsinghua # Python packages: tsinghua / aliyun / ustc / a URL / off
216
+ skit config mirror.github nju # Python builds + the uv binary: nju / an https:// base URL / off
217
+ skit config mirror.npm npmmirror # JS/TS packages: npmmirror / a URL / off
218
+ skit config mirror off # master switch: off keeps the URLs; `on` restores them
181
219
  ```
182
220
 
183
- Defaults: PyPI via Tsinghua / Aliyun / USTC; Python builds and the uv binary via NJU. Pick `custom` to swap any URL.
221
+ Custom URLs: pick `custom` in TUI Preferences (or the first-run wizard), or pass a URL to the axis key directly.
184
222
 
185
223
  ## Why skit exists
186
224
 
@@ -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.2.0"
6
- description = "Script launcher and parameter manager: all your scripts in one menu, their flags, input() calls, and constants auto-extracted into a run form no more opening an IDE just to tweak a value."
5
+ version = "0.4.0"
6
+ description = "A terminal script manager and launcher for humans and AI agents: put any script, prompt, or program in one library; skit turns its inputs and flags into a run form and remembers past parameters. Ships an Agent Skill so agents reuse the scripts they wrote."
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
- also_copy = ["skills/"]
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
- res = resources.files("skit").joinpath("skills", SKILL_DIR_NAME, SKILL_FILE_NAME)
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 test_skill_text_is_the_bundled_skill (see docs/mutation-ledger.md).
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