shortcutxl 0.2.12 → 0.2.13
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.
- package/README.md +26 -26
- package/agent-docs/README.md +397 -397
- package/agent-docs/docs/compaction.md +390 -390
- package/agent-docs/docs/custom-provider.md +580 -580
- package/agent-docs/docs/extensions.md +1971 -1971
- package/agent-docs/docs/packages.md +209 -209
- package/agent-docs/docs/rpc.md +1317 -1317
- package/agent-docs/docs/sdk.md +962 -962
- package/agent-docs/docs/session.md +412 -412
- package/agent-docs/docs/termux.md +127 -127
- package/agent-docs/docs/tui.md +887 -887
- package/agent-docs/examples/README.md +25 -25
- package/agent-docs/examples/extensions/README.md +205 -205
- package/agent-docs/examples/extensions/antigravity-image-gen.ts +447 -447
- package/agent-docs/examples/extensions/auto-commit-on-exit.ts +49 -49
- package/agent-docs/examples/extensions/bash-spawn-hook.ts +30 -30
- package/agent-docs/examples/extensions/bookmark.ts +50 -50
- package/agent-docs/examples/extensions/built-in-tool-renderer.ts +256 -256
- package/agent-docs/examples/extensions/claude-rules.ts +86 -86
- package/agent-docs/examples/extensions/commands.ts +75 -75
- package/agent-docs/examples/extensions/confirm-destructive.ts +59 -59
- package/agent-docs/examples/extensions/custom-compaction.ts +126 -126
- package/agent-docs/examples/extensions/custom-footer.ts +63 -63
- package/agent-docs/examples/extensions/custom-header.ts +73 -73
- package/agent-docs/examples/extensions/custom-provider-anthropic/index.ts +660 -660
- package/agent-docs/examples/extensions/custom-provider-gitlab-duo/index.ts +362 -362
- package/agent-docs/examples/extensions/custom-provider-gitlab-duo/test.ts +88 -88
- package/agent-docs/examples/extensions/custom-provider-qwen-cli/index.ts +349 -349
- package/agent-docs/examples/extensions/dirty-repo-guard.ts +56 -56
- package/agent-docs/examples/extensions/doom-overlay/doom-component.ts +133 -133
- package/agent-docs/examples/extensions/doom-overlay/doom-keys.ts +108 -108
- package/agent-docs/examples/extensions/doom-overlay/index.ts +74 -74
- package/agent-docs/examples/extensions/dynamic-resources/index.ts +15 -15
- package/agent-docs/examples/extensions/dynamic-tools.ts +77 -77
- package/agent-docs/examples/extensions/event-bus.ts +43 -43
- package/agent-docs/examples/extensions/file-trigger.ts +41 -41
- package/agent-docs/examples/extensions/git-checkpoint.ts +53 -53
- package/agent-docs/examples/extensions/handoff.ts +155 -155
- package/agent-docs/examples/extensions/hello.ts +25 -25
- package/agent-docs/examples/extensions/inline-bash.ts +94 -94
- package/agent-docs/examples/extensions/input-transform.ts +43 -43
- package/agent-docs/examples/extensions/interactive-shell.ts +209 -209
- package/agent-docs/examples/extensions/mac-system-theme.ts +47 -47
- package/agent-docs/examples/extensions/message-renderer.ts +59 -59
- package/agent-docs/examples/extensions/minimal-mode.ts +430 -430
- package/agent-docs/examples/extensions/modal-editor.ts +90 -90
- package/agent-docs/examples/extensions/model-status.ts +31 -31
- package/agent-docs/examples/extensions/notify.ts +55 -55
- package/agent-docs/examples/extensions/overlay-qa-tests.ts +936 -936
- package/agent-docs/examples/extensions/overlay-test.ts +159 -159
- package/agent-docs/examples/extensions/permission-gate.ts +37 -37
- package/agent-docs/examples/extensions/pirate.ts +47 -47
- package/agent-docs/examples/extensions/plan-mode/index.ts +363 -363
- package/agent-docs/examples/extensions/preset.ts +418 -418
- package/agent-docs/examples/extensions/protected-paths.ts +30 -30
- package/agent-docs/examples/extensions/qna.ts +122 -122
- package/agent-docs/examples/extensions/question.ts +278 -278
- package/agent-docs/examples/extensions/questionnaire.ts +440 -440
- package/agent-docs/examples/extensions/rainbow-editor.ts +90 -90
- package/agent-docs/examples/extensions/reload-runtime.ts +37 -37
- package/agent-docs/examples/extensions/rpc-demo.ts +124 -124
- package/agent-docs/examples/extensions/sandbox/index.ts +324 -324
- package/agent-docs/examples/extensions/send-user-message.ts +97 -97
- package/agent-docs/examples/extensions/session-name.ts +27 -27
- package/agent-docs/examples/extensions/shutdown-command.ts +69 -69
- package/agent-docs/examples/extensions/snake.ts +343 -343
- package/agent-docs/examples/extensions/space-invaders.ts +566 -566
- package/agent-docs/examples/extensions/ssh.ts +233 -233
- package/agent-docs/examples/extensions/status-line.ts +40 -40
- package/agent-docs/examples/extensions/subagent/agents.ts +130 -130
- package/agent-docs/examples/extensions/subagent/index.ts +1068 -1068
- package/agent-docs/examples/extensions/summarize.ts +206 -206
- package/agent-docs/examples/extensions/system-prompt-header.ts +17 -17
- package/agent-docs/examples/extensions/timed-confirm.ts +72 -72
- package/agent-docs/examples/extensions/titlebar-spinner.ts +58 -58
- package/agent-docs/examples/extensions/todo.ts +314 -314
- package/agent-docs/examples/extensions/tool-override.ts +146 -146
- package/agent-docs/examples/extensions/tools.ts +145 -145
- package/agent-docs/examples/extensions/trigger-compact.ts +40 -40
- package/agent-docs/examples/extensions/truncated-tool.ts +194 -194
- package/agent-docs/examples/extensions/widget-placement.ts +17 -17
- package/agent-docs/examples/extensions/with-deps/index.ts +37 -37
- package/agent-docs/examples/rpc-extension-ui.ts +654 -654
- package/agent-docs/examples/sdk/01-minimal.ts +22 -22
- package/agent-docs/examples/sdk/02-custom-model.ts +48 -48
- package/agent-docs/examples/sdk/03-custom-prompt.ts +55 -55
- package/agent-docs/examples/sdk/04-skills.ts +53 -53
- package/agent-docs/examples/sdk/05-tools.ts +56 -56
- package/agent-docs/examples/sdk/06-extensions.ts +88 -88
- package/agent-docs/examples/sdk/07-context-files.ts +40 -40
- package/agent-docs/examples/sdk/08-prompt-templates.ts +47 -47
- package/agent-docs/examples/sdk/09-api-keys-and-oauth.ts +48 -48
- package/agent-docs/examples/sdk/10-settings.ts +54 -54
- package/agent-docs/examples/sdk/11-sessions.ts +48 -48
- package/agent-docs/examples/sdk/12-full-control.ts +82 -82
- package/agent-docs/examples/sdk/README.md +144 -144
- package/agent-docs/xll-spec.md +110 -110
- package/dist/core/auth-storage.js +21 -2
- package/package.json +1 -1
- package/xll/ShortcutXL.xll +0 -0
- package/xll/modules/debug_render.py +272 -272
- package/xll/modules/gameboy.py +241 -241
- package/xll/modules/pong.py +188 -188
- package/xll/modules/shortcut_xl/_diff_highlight.py +176 -0
- package/xll/modules/shortcut_xl/_log.py +12 -12
- package/xll/modules/shortcut_xl/_registry.py +44 -44
- package/xll/modules/stocks.py +100 -100
- /package/skills/{com-advanced-api → COM-advanced-api}/SKILL.md +0 -0
- /package/skills/{com-advanced-api → COM-advanced-api}/excel-type-library.py +0 -0
- /package/skills/{com-advanced-api → COM-advanced-api}/office-type-library.py +0 -0
|
@@ -1,209 +1,209 @@
|
|
|
1
|
-
> Shortcut can help you create Shortcut packages. Ask it to bundle your extensions, skills, prompt templates, or themes.
|
|
2
|
-
|
|
3
|
-
# Shortcut Packages
|
|
4
|
-
|
|
5
|
-
Shortcut packages bundle extensions, skills, prompt templates, and themes so you can share them through npm or git. A package can declare resources in `package.json` under the `shortcut` key, or use conventional directories.
|
|
6
|
-
|
|
7
|
-
## Table of Contents
|
|
8
|
-
|
|
9
|
-
- [Install and Manage](#install-and-manage)
|
|
10
|
-
- [Package Sources](#package-sources)
|
|
11
|
-
- [Creating a Shortcut Package](#creating-a-shortcut-package)
|
|
12
|
-
- [Package Structure](#package-structure)
|
|
13
|
-
- [Dependencies](#dependencies)
|
|
14
|
-
- [Package Filtering](#package-filtering)
|
|
15
|
-
- [Enable and Disable Resources](#enable-and-disable-resources)
|
|
16
|
-
- [Scope and Deduplication](#scope-and-deduplication)
|
|
17
|
-
|
|
18
|
-
## Install and Manage
|
|
19
|
-
|
|
20
|
-
> **Security:** Shortcut packages run with full system access. Extensions execute arbitrary code, and skills can instruct the model to perform any action including running executables. Review source code before installing third-party packages.
|
|
21
|
-
|
|
22
|
-
```bash
|
|
23
|
-
shortcut install npm:@foo/bar@1.0.0
|
|
24
|
-
shortcut install git:github.com/user/repo@v1
|
|
25
|
-
shortcut install https://github.com/user/repo # raw URLs work too
|
|
26
|
-
shortcut install /absolute/path/to/package
|
|
27
|
-
shortcut install ./relative/path/to/package
|
|
28
|
-
|
|
29
|
-
shortcut remove npm:@foo/bar
|
|
30
|
-
shortcut list # show installed packages from settings
|
|
31
|
-
shortcut update # update all non-pinned packages
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
By default, `install` and `remove` write to global settings (`~/.shortcut/agent/settings.json`). Use `-l` to write to project settings (`.shortcut/settings.json`) instead. Project settings can be shared with your team, and Shortcut installs any missing packages automatically on startup.
|
|
35
|
-
|
|
36
|
-
To try a package without installing it, use `--extension` or `-e`. This installs to a temporary directory for the current run only:
|
|
37
|
-
|
|
38
|
-
```bash
|
|
39
|
-
shortcut -e npm:@foo/bar
|
|
40
|
-
shortcut -e git:github.com/user/repo
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
## Package Sources
|
|
44
|
-
|
|
45
|
-
Shortcut accepts three source types in settings and `shortcut install`.
|
|
46
|
-
|
|
47
|
-
### npm
|
|
48
|
-
|
|
49
|
-
```
|
|
50
|
-
npm:@scope/pkg@1.2.3
|
|
51
|
-
npm:pkg
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
- Versioned specs are pinned and skipped by `shortcut update`.
|
|
55
|
-
- Global installs use `npm install -g`.
|
|
56
|
-
- Project installs go under `.shortcut/npm/`.
|
|
57
|
-
|
|
58
|
-
### git
|
|
59
|
-
|
|
60
|
-
```
|
|
61
|
-
git:github.com/user/repo@v1
|
|
62
|
-
git:git@github.com:user/repo@v1
|
|
63
|
-
https://github.com/user/repo@v1
|
|
64
|
-
ssh://git@github.com/user/repo@v1
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
- Without `git:` prefix, only protocol URLs are accepted (`https://`, `http://`, `ssh://`, `git://`).
|
|
68
|
-
- With `git:` prefix, shorthand formats are accepted, including `github.com/user/repo` and `git@github.com:user/repo`.
|
|
69
|
-
- HTTPS and SSH URLs are both supported.
|
|
70
|
-
- SSH URLs use your configured SSH keys automatically (respects `~/.ssh/config`).
|
|
71
|
-
- For non-interactive runs (for example CI), you can set `GIT_TERMINAL_PROMPT=0` to disable credential prompts and set `GIT_SSH_COMMAND` (for example `ssh -o BatchMode=yes -o ConnectTimeout=5`) to fail fast.
|
|
72
|
-
- Refs pin the package and skip `shortcut update`.
|
|
73
|
-
- Cloned to `~/.shortcut/agent/git/<host>/<path>` (global) or `.shortcut/git/<host>/<path>` (project).
|
|
74
|
-
- Runs `npm install` after clone or pull if `package.json` exists.
|
|
75
|
-
|
|
76
|
-
**SSH examples:**
|
|
77
|
-
```bash
|
|
78
|
-
# git@host:path shorthand (requires git: prefix)
|
|
79
|
-
shortcut install git:git@github.com:user/repo
|
|
80
|
-
|
|
81
|
-
# ssh:// protocol format
|
|
82
|
-
shortcut install ssh://git@github.com/user/repo
|
|
83
|
-
|
|
84
|
-
# With version ref
|
|
85
|
-
shortcut install git:git@github.com:user/repo@v1.0.0
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
### Local Paths
|
|
89
|
-
|
|
90
|
-
```
|
|
91
|
-
/absolute/path/to/package
|
|
92
|
-
./relative/path/to/package
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
Local paths point to files or directories on disk and are added to settings without copying. Relative paths are resolved against the settings file they appear in. If the path is a file, it loads as a single extension. If it is a directory, Shortcut loads resources using package rules.
|
|
96
|
-
|
|
97
|
-
## Creating a Shortcut Package
|
|
98
|
-
|
|
99
|
-
Add a `shortcut` manifest to `package.json` or use conventional directories. Include the `shortcut-package` keyword for discoverability.
|
|
100
|
-
|
|
101
|
-
```json
|
|
102
|
-
{
|
|
103
|
-
"name": "my-package",
|
|
104
|
-
"keywords": ["shortcut-package"],
|
|
105
|
-
"shortcut": {
|
|
106
|
-
"extensions": ["./extensions"],
|
|
107
|
-
"skills": ["./skills"],
|
|
108
|
-
"prompts": ["./prompts"],
|
|
109
|
-
"themes": ["./themes"]
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
Paths are relative to the package root. Arrays support glob patterns and `!exclusions`.
|
|
115
|
-
|
|
116
|
-
### Gallery Metadata
|
|
117
|
-
|
|
118
|
-
Packages tagged with `shortcut-package` are discoverable via npm search. Add `video` or `image` fields to show a preview:
|
|
119
|
-
|
|
120
|
-
```json
|
|
121
|
-
{
|
|
122
|
-
"name": "my-package",
|
|
123
|
-
"keywords": ["shortcut-package"],
|
|
124
|
-
"shortcut": {
|
|
125
|
-
"extensions": ["./extensions"],
|
|
126
|
-
"video": "https://example.com/demo.mp4",
|
|
127
|
-
"image": "https://example.com/screenshot.png"
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
```
|
|
131
|
-
|
|
132
|
-
- **video**: MP4 only. On desktop, autoplays on hover. Clicking opens a fullscreen player.
|
|
133
|
-
- **image**: PNG, JPEG, GIF, or WebP. Displayed as a static preview.
|
|
134
|
-
|
|
135
|
-
If both are set, video takes precedence.
|
|
136
|
-
|
|
137
|
-
## Package Structure
|
|
138
|
-
|
|
139
|
-
### Convention Directories
|
|
140
|
-
|
|
141
|
-
If no `shortcut` manifest is present, Shortcut auto-discovers resources from these directories:
|
|
142
|
-
|
|
143
|
-
- `extensions/` loads `.ts` and `.js` files
|
|
144
|
-
- `skills/` recursively finds `SKILL.md` folders and loads top-level `.md` files as skills
|
|
145
|
-
- `prompts/` loads `.md` files
|
|
146
|
-
- `themes/` loads `.json` files
|
|
147
|
-
|
|
148
|
-
## Dependencies
|
|
149
|
-
|
|
150
|
-
Third party runtime dependencies belong in `dependencies` in `package.json`. Dependencies that do not register extensions, skills, prompt templates, or themes also belong in `dependencies`. When Shortcut installs a package from npm or git, it runs `npm install`, so those dependencies are installed automatically.
|
|
151
|
-
|
|
152
|
-
Shortcut bundles core packages for extensions and skills. If you import any of these, list them in `peerDependencies` with a `"*"` range and do not bundle them: `shortcutxl`, `@sinclair/typebox`.
|
|
153
|
-
|
|
154
|
-
Other Shortcut packages must be bundled in your tarball. Add them to `dependencies` and `bundledDependencies`, then reference their resources through `node_modules/` paths. Shortcut loads packages with separate module roots, so separate installs do not collide or share modules.
|
|
155
|
-
|
|
156
|
-
Example:
|
|
157
|
-
|
|
158
|
-
```json
|
|
159
|
-
{
|
|
160
|
-
"dependencies": {
|
|
161
|
-
"shitty-extensions": "^1.0.1"
|
|
162
|
-
},
|
|
163
|
-
"bundledDependencies": ["shitty-extensions"],
|
|
164
|
-
"shortcut": {
|
|
165
|
-
"extensions": ["extensions", "node_modules/shitty-extensions/extensions"],
|
|
166
|
-
"skills": ["skills", "node_modules/shitty-extensions/skills"]
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
```
|
|
170
|
-
|
|
171
|
-
## Package Filtering
|
|
172
|
-
|
|
173
|
-
Filter what a package loads using the object form in settings:
|
|
174
|
-
|
|
175
|
-
```json
|
|
176
|
-
{
|
|
177
|
-
"packages": [
|
|
178
|
-
"npm:simple-pkg",
|
|
179
|
-
{
|
|
180
|
-
"source": "npm:my-package",
|
|
181
|
-
"extensions": ["extensions/*.ts", "!extensions/legacy.ts"],
|
|
182
|
-
"skills": [],
|
|
183
|
-
"prompts": ["prompts/review.md"],
|
|
184
|
-
"themes": ["+themes/legacy.json"]
|
|
185
|
-
}
|
|
186
|
-
]
|
|
187
|
-
}
|
|
188
|
-
```
|
|
189
|
-
|
|
190
|
-
`+path` and `-path` are exact paths relative to the package root.
|
|
191
|
-
|
|
192
|
-
- Omit a key to load all of that type.
|
|
193
|
-
- Use `[]` to load none of that type.
|
|
194
|
-
- `!pattern` excludes matches.
|
|
195
|
-
- `+path` force-includes an exact path.
|
|
196
|
-
- `-path` force-excludes an exact path.
|
|
197
|
-
- Filters layer on top of the manifest. They narrow down what is already allowed.
|
|
198
|
-
|
|
199
|
-
## Enable and Disable Resources
|
|
200
|
-
|
|
201
|
-
Use `shortcut config` to enable or disable extensions, skills, prompt templates, and themes from installed packages and local directories. Works for both global (`~/.shortcut/agent`) and project (`.shortcut/`) scopes.
|
|
202
|
-
|
|
203
|
-
## Scope and Deduplication
|
|
204
|
-
|
|
205
|
-
Packages can appear in both global and project settings. If the same package appears in both, the project entry wins. Identity is determined by:
|
|
206
|
-
|
|
207
|
-
- npm: package name
|
|
208
|
-
- git: repository URL without ref
|
|
209
|
-
- local: resolved absolute path
|
|
1
|
+
> Shortcut can help you create Shortcut packages. Ask it to bundle your extensions, skills, prompt templates, or themes.
|
|
2
|
+
|
|
3
|
+
# Shortcut Packages
|
|
4
|
+
|
|
5
|
+
Shortcut packages bundle extensions, skills, prompt templates, and themes so you can share them through npm or git. A package can declare resources in `package.json` under the `shortcut` key, or use conventional directories.
|
|
6
|
+
|
|
7
|
+
## Table of Contents
|
|
8
|
+
|
|
9
|
+
- [Install and Manage](#install-and-manage)
|
|
10
|
+
- [Package Sources](#package-sources)
|
|
11
|
+
- [Creating a Shortcut Package](#creating-a-shortcut-package)
|
|
12
|
+
- [Package Structure](#package-structure)
|
|
13
|
+
- [Dependencies](#dependencies)
|
|
14
|
+
- [Package Filtering](#package-filtering)
|
|
15
|
+
- [Enable and Disable Resources](#enable-and-disable-resources)
|
|
16
|
+
- [Scope and Deduplication](#scope-and-deduplication)
|
|
17
|
+
|
|
18
|
+
## Install and Manage
|
|
19
|
+
|
|
20
|
+
> **Security:** Shortcut packages run with full system access. Extensions execute arbitrary code, and skills can instruct the model to perform any action including running executables. Review source code before installing third-party packages.
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
shortcut install npm:@foo/bar@1.0.0
|
|
24
|
+
shortcut install git:github.com/user/repo@v1
|
|
25
|
+
shortcut install https://github.com/user/repo # raw URLs work too
|
|
26
|
+
shortcut install /absolute/path/to/package
|
|
27
|
+
shortcut install ./relative/path/to/package
|
|
28
|
+
|
|
29
|
+
shortcut remove npm:@foo/bar
|
|
30
|
+
shortcut list # show installed packages from settings
|
|
31
|
+
shortcut update # update all non-pinned packages
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
By default, `install` and `remove` write to global settings (`~/.shortcut/agent/settings.json`). Use `-l` to write to project settings (`.shortcut/settings.json`) instead. Project settings can be shared with your team, and Shortcut installs any missing packages automatically on startup.
|
|
35
|
+
|
|
36
|
+
To try a package without installing it, use `--extension` or `-e`. This installs to a temporary directory for the current run only:
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
shortcut -e npm:@foo/bar
|
|
40
|
+
shortcut -e git:github.com/user/repo
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Package Sources
|
|
44
|
+
|
|
45
|
+
Shortcut accepts three source types in settings and `shortcut install`.
|
|
46
|
+
|
|
47
|
+
### npm
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
npm:@scope/pkg@1.2.3
|
|
51
|
+
npm:pkg
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
- Versioned specs are pinned and skipped by `shortcut update`.
|
|
55
|
+
- Global installs use `npm install -g`.
|
|
56
|
+
- Project installs go under `.shortcut/npm/`.
|
|
57
|
+
|
|
58
|
+
### git
|
|
59
|
+
|
|
60
|
+
```
|
|
61
|
+
git:github.com/user/repo@v1
|
|
62
|
+
git:git@github.com:user/repo@v1
|
|
63
|
+
https://github.com/user/repo@v1
|
|
64
|
+
ssh://git@github.com/user/repo@v1
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
- Without `git:` prefix, only protocol URLs are accepted (`https://`, `http://`, `ssh://`, `git://`).
|
|
68
|
+
- With `git:` prefix, shorthand formats are accepted, including `github.com/user/repo` and `git@github.com:user/repo`.
|
|
69
|
+
- HTTPS and SSH URLs are both supported.
|
|
70
|
+
- SSH URLs use your configured SSH keys automatically (respects `~/.ssh/config`).
|
|
71
|
+
- For non-interactive runs (for example CI), you can set `GIT_TERMINAL_PROMPT=0` to disable credential prompts and set `GIT_SSH_COMMAND` (for example `ssh -o BatchMode=yes -o ConnectTimeout=5`) to fail fast.
|
|
72
|
+
- Refs pin the package and skip `shortcut update`.
|
|
73
|
+
- Cloned to `~/.shortcut/agent/git/<host>/<path>` (global) or `.shortcut/git/<host>/<path>` (project).
|
|
74
|
+
- Runs `npm install` after clone or pull if `package.json` exists.
|
|
75
|
+
|
|
76
|
+
**SSH examples:**
|
|
77
|
+
```bash
|
|
78
|
+
# git@host:path shorthand (requires git: prefix)
|
|
79
|
+
shortcut install git:git@github.com:user/repo
|
|
80
|
+
|
|
81
|
+
# ssh:// protocol format
|
|
82
|
+
shortcut install ssh://git@github.com/user/repo
|
|
83
|
+
|
|
84
|
+
# With version ref
|
|
85
|
+
shortcut install git:git@github.com:user/repo@v1.0.0
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### Local Paths
|
|
89
|
+
|
|
90
|
+
```
|
|
91
|
+
/absolute/path/to/package
|
|
92
|
+
./relative/path/to/package
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
Local paths point to files or directories on disk and are added to settings without copying. Relative paths are resolved against the settings file they appear in. If the path is a file, it loads as a single extension. If it is a directory, Shortcut loads resources using package rules.
|
|
96
|
+
|
|
97
|
+
## Creating a Shortcut Package
|
|
98
|
+
|
|
99
|
+
Add a `shortcut` manifest to `package.json` or use conventional directories. Include the `shortcut-package` keyword for discoverability.
|
|
100
|
+
|
|
101
|
+
```json
|
|
102
|
+
{
|
|
103
|
+
"name": "my-package",
|
|
104
|
+
"keywords": ["shortcut-package"],
|
|
105
|
+
"shortcut": {
|
|
106
|
+
"extensions": ["./extensions"],
|
|
107
|
+
"skills": ["./skills"],
|
|
108
|
+
"prompts": ["./prompts"],
|
|
109
|
+
"themes": ["./themes"]
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
Paths are relative to the package root. Arrays support glob patterns and `!exclusions`.
|
|
115
|
+
|
|
116
|
+
### Gallery Metadata
|
|
117
|
+
|
|
118
|
+
Packages tagged with `shortcut-package` are discoverable via npm search. Add `video` or `image` fields to show a preview:
|
|
119
|
+
|
|
120
|
+
```json
|
|
121
|
+
{
|
|
122
|
+
"name": "my-package",
|
|
123
|
+
"keywords": ["shortcut-package"],
|
|
124
|
+
"shortcut": {
|
|
125
|
+
"extensions": ["./extensions"],
|
|
126
|
+
"video": "https://example.com/demo.mp4",
|
|
127
|
+
"image": "https://example.com/screenshot.png"
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
- **video**: MP4 only. On desktop, autoplays on hover. Clicking opens a fullscreen player.
|
|
133
|
+
- **image**: PNG, JPEG, GIF, or WebP. Displayed as a static preview.
|
|
134
|
+
|
|
135
|
+
If both are set, video takes precedence.
|
|
136
|
+
|
|
137
|
+
## Package Structure
|
|
138
|
+
|
|
139
|
+
### Convention Directories
|
|
140
|
+
|
|
141
|
+
If no `shortcut` manifest is present, Shortcut auto-discovers resources from these directories:
|
|
142
|
+
|
|
143
|
+
- `extensions/` loads `.ts` and `.js` files
|
|
144
|
+
- `skills/` recursively finds `SKILL.md` folders and loads top-level `.md` files as skills
|
|
145
|
+
- `prompts/` loads `.md` files
|
|
146
|
+
- `themes/` loads `.json` files
|
|
147
|
+
|
|
148
|
+
## Dependencies
|
|
149
|
+
|
|
150
|
+
Third party runtime dependencies belong in `dependencies` in `package.json`. Dependencies that do not register extensions, skills, prompt templates, or themes also belong in `dependencies`. When Shortcut installs a package from npm or git, it runs `npm install`, so those dependencies are installed automatically.
|
|
151
|
+
|
|
152
|
+
Shortcut bundles core packages for extensions and skills. If you import any of these, list them in `peerDependencies` with a `"*"` range and do not bundle them: `shortcutxl`, `@sinclair/typebox`.
|
|
153
|
+
|
|
154
|
+
Other Shortcut packages must be bundled in your tarball. Add them to `dependencies` and `bundledDependencies`, then reference their resources through `node_modules/` paths. Shortcut loads packages with separate module roots, so separate installs do not collide or share modules.
|
|
155
|
+
|
|
156
|
+
Example:
|
|
157
|
+
|
|
158
|
+
```json
|
|
159
|
+
{
|
|
160
|
+
"dependencies": {
|
|
161
|
+
"shitty-extensions": "^1.0.1"
|
|
162
|
+
},
|
|
163
|
+
"bundledDependencies": ["shitty-extensions"],
|
|
164
|
+
"shortcut": {
|
|
165
|
+
"extensions": ["extensions", "node_modules/shitty-extensions/extensions"],
|
|
166
|
+
"skills": ["skills", "node_modules/shitty-extensions/skills"]
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
## Package Filtering
|
|
172
|
+
|
|
173
|
+
Filter what a package loads using the object form in settings:
|
|
174
|
+
|
|
175
|
+
```json
|
|
176
|
+
{
|
|
177
|
+
"packages": [
|
|
178
|
+
"npm:simple-pkg",
|
|
179
|
+
{
|
|
180
|
+
"source": "npm:my-package",
|
|
181
|
+
"extensions": ["extensions/*.ts", "!extensions/legacy.ts"],
|
|
182
|
+
"skills": [],
|
|
183
|
+
"prompts": ["prompts/review.md"],
|
|
184
|
+
"themes": ["+themes/legacy.json"]
|
|
185
|
+
}
|
|
186
|
+
]
|
|
187
|
+
}
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
`+path` and `-path` are exact paths relative to the package root.
|
|
191
|
+
|
|
192
|
+
- Omit a key to load all of that type.
|
|
193
|
+
- Use `[]` to load none of that type.
|
|
194
|
+
- `!pattern` excludes matches.
|
|
195
|
+
- `+path` force-includes an exact path.
|
|
196
|
+
- `-path` force-excludes an exact path.
|
|
197
|
+
- Filters layer on top of the manifest. They narrow down what is already allowed.
|
|
198
|
+
|
|
199
|
+
## Enable and Disable Resources
|
|
200
|
+
|
|
201
|
+
Use `shortcut config` to enable or disable extensions, skills, prompt templates, and themes from installed packages and local directories. Works for both global (`~/.shortcut/agent`) and project (`.shortcut/`) scopes.
|
|
202
|
+
|
|
203
|
+
## Scope and Deduplication
|
|
204
|
+
|
|
205
|
+
Packages can appear in both global and project settings. If the same package appears in both, the project entry wins. Identity is determined by:
|
|
206
|
+
|
|
207
|
+
- npm: package name
|
|
208
|
+
- git: repository URL without ref
|
|
209
|
+
- local: resolved absolute path
|