@impulselab/directory 1.0.0 → 1.0.2
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 +16 -8
- package/index.js +24 -12
- package/package.json +8 -2
package/README.md
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
# Impulse Directory Command Installer
|
|
2
2
|
|
|
3
|
-
An NPX command that downloads prompts from Impulse Directory and installs them for Claude Desktop or Cursor.
|
|
3
|
+
An NPX command by Impulse Lab (`https://impulselab.ai`) that downloads prompts from Impulse Directory and installs them for Claude Desktop or Cursor.
|
|
4
4
|
|
|
5
5
|
## 🚀 Installation and Usage
|
|
6
6
|
|
|
7
7
|
### Direct usage with npx
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
|
+
npx @impulselab/directory <user-slug>/<command-slug> [--target <target>]
|
|
11
|
+
npx @impulselab/directory stack <stack-id> [--target <target>]
|
|
12
|
+
|
|
13
|
+
# Legacy command name also works
|
|
10
14
|
npx impulse-directory <user-slug>/<command-slug> [--target <target>]
|
|
11
15
|
npx impulse-directory stack <stack-id> [--target <target>]
|
|
12
16
|
```
|
|
@@ -30,25 +34,25 @@ When using the `stack` command, all prompts in the stack are installed for the c
|
|
|
30
34
|
|
|
31
35
|
```bash
|
|
32
36
|
# Download a Claude slash command from impulse.directory
|
|
33
|
-
npx
|
|
37
|
+
npx @impulselab/directory john/my-awesome-command
|
|
34
38
|
|
|
35
39
|
# Install as a Claude sub agent
|
|
36
|
-
npx
|
|
40
|
+
npx @impulselab/directory john/my-awesome-command --target claude-sub-agent
|
|
37
41
|
|
|
38
42
|
# Install as a Cursor command (inside a Cursor project)
|
|
39
|
-
npx
|
|
43
|
+
npx @impulselab/directory john/my-awesome-command --target cursor-command
|
|
40
44
|
|
|
41
45
|
# Install as a Cursor rule (inside a Cursor project)
|
|
42
|
-
npx
|
|
46
|
+
npx @impulselab/directory john/my-awesome-command --target cursor-rule
|
|
43
47
|
|
|
44
48
|
# Install an Impulse stack (tool-specific stack ID)
|
|
45
|
-
npx
|
|
49
|
+
npx @impulselab/directory stack 01JH0000000ABCDEF --target claude-slash
|
|
46
50
|
|
|
47
51
|
# Use a custom URL (local development)
|
|
48
|
-
IMPULSE_BASE_URL=localhost:3000 npx
|
|
52
|
+
IMPULSE_BASE_URL=localhost:3000 npx @impulselab/directory dev-user/dev-command
|
|
49
53
|
|
|
50
54
|
# Use another server
|
|
51
|
-
IMPULSE_BASE_URL=my-custom-domain.com npx
|
|
55
|
+
IMPULSE_BASE_URL=my-custom-domain.com npx @impulselab/directory author/custom-command
|
|
52
56
|
```
|
|
53
57
|
|
|
54
58
|
## 📁 Command Placement Logic
|
|
@@ -142,3 +146,7 @@ To see download details:
|
|
|
142
146
|
# The command automatically displays the download path and destination folder
|
|
143
147
|
npx impulse-directory debug-user/debug-command
|
|
144
148
|
```
|
|
149
|
+
|
|
150
|
+
## 🏷️ Branding
|
|
151
|
+
|
|
152
|
+
Made by Impulse Lab — `https://impulselab.ai`
|
package/index.js
CHANGED
|
@@ -6,6 +6,14 @@ const https = require('https');
|
|
|
6
6
|
const http = require('http');
|
|
7
7
|
const os = require('os');
|
|
8
8
|
|
|
9
|
+
const PACKAGE = {
|
|
10
|
+
scopeName: '@impulselab/directory',
|
|
11
|
+
commandName: 'impulse-directory',
|
|
12
|
+
aliasName: 'directory',
|
|
13
|
+
brand: 'Impulse Lab',
|
|
14
|
+
websiteUrl: 'https://impulselab.ai',
|
|
15
|
+
};
|
|
16
|
+
|
|
9
17
|
const DEFAULT_BASE_URL = 'impulse.directory';
|
|
10
18
|
const RAW_PATH = '/raw/';
|
|
11
19
|
const STACK_API_PREFIX = '/api/stacks/';
|
|
@@ -76,12 +84,16 @@ const TARGET_CONFIG = {
|
|
|
76
84
|
const KNOWN_TARGETS = Object.keys(TARGET_CONFIG);
|
|
77
85
|
|
|
78
86
|
function showHelp() {
|
|
79
|
-
|
|
80
|
-
|
|
87
|
+
const primaryUsageCmd = `npx ${PACKAGE.scopeName}`;
|
|
88
|
+
const legacyUsageCmd = `npx ${PACKAGE.commandName}`;
|
|
89
|
+
console.log(`
|
|
90
|
+
Impulse Directory Command Installer
|
|
91
|
+
Made by ${PACKAGE.brand} (${PACKAGE.websiteUrl})
|
|
81
92
|
|
|
82
93
|
Usage:
|
|
83
|
-
|
|
84
|
-
|
|
94
|
+
${primaryUsageCmd} <user-slug>/<command-slug> [--target <target>]
|
|
95
|
+
${primaryUsageCmd} stack <stack-id>
|
|
96
|
+
(${legacyUsageCmd} also supported)
|
|
85
97
|
|
|
86
98
|
Description:
|
|
87
99
|
Downloads a command from Impulse Directory and installs it in the right tool folder.
|
|
@@ -98,20 +110,20 @@ Options:
|
|
|
98
110
|
|
|
99
111
|
Targets:
|
|
100
112
|
${KNOWN_TARGETS.map((key) => {
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
113
|
+
const config = TARGET_CONFIG[key];
|
|
114
|
+
const defaultLabel = key === DEFAULT_TARGET ? ' (default)' : '';
|
|
115
|
+
return ` ${key.padEnd(18)} ${config.label}${defaultLabel}\n -> ${config.description}`;
|
|
116
|
+
}).join('\n')}
|
|
105
117
|
|
|
106
118
|
Environment Variables:
|
|
107
119
|
IMPULSE_BASE_URL Base host for Impulse Directory (hostname[:port], no scheme, no trailing slash)
|
|
108
120
|
Examples: impulse.directory | localhost:3000
|
|
109
121
|
|
|
110
122
|
Examples:
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
123
|
+
${primaryUsageCmd} john/my-awesome-command
|
|
124
|
+
${primaryUsageCmd} john/my-awesome-command --target claude-sub-agent
|
|
125
|
+
${primaryUsageCmd} john/my-awesome-command --target cursor-command
|
|
126
|
+
${primaryUsageCmd} stack 01JH0000000ABCDEF --target claude-slash
|
|
115
127
|
`);
|
|
116
128
|
}
|
|
117
129
|
|
package/package.json
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@impulselab/directory",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Download and install Claude commands from Impulse Directory",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
7
|
+
"directory": "./index.js",
|
|
7
8
|
"impulse-directory": "./index.js"
|
|
8
9
|
},
|
|
9
10
|
"keywords": [
|
|
@@ -12,7 +13,12 @@
|
|
|
12
13
|
"impulse",
|
|
13
14
|
"npx"
|
|
14
15
|
],
|
|
15
|
-
"author": "Impulse",
|
|
16
|
+
"author": "Impulse Lab <hello@impulselab.ai> (https://impulselab.ai)",
|
|
17
|
+
"homepage": "https://impulselab.ai",
|
|
18
|
+
"repository": {
|
|
19
|
+
"type": "git",
|
|
20
|
+
"url": "git+https://github.com/impulselab-ai/impulse-directory.git"
|
|
21
|
+
},
|
|
16
22
|
"license": "MIT",
|
|
17
23
|
"engines": {
|
|
18
24
|
"node": ">=14"
|