cursor-keys 1.2.0 → 1.2.1
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/package.json +1 -1
- package/src/profile.mjs +39 -10
package/package.json
CHANGED
package/src/profile.mjs
CHANGED
|
@@ -143,21 +143,50 @@ export function needsFirstRunChecklist(profileDir) {
|
|
|
143
143
|
return !fs.existsSync(path.join(profileDir, SETUP_MARKER));
|
|
144
144
|
}
|
|
145
145
|
|
|
146
|
-
|
|
146
|
+
/**
|
|
147
|
+
* @param {string} projectName
|
|
148
|
+
* @param {string} baseUrl
|
|
149
|
+
* @param {string} platform Node process.platform
|
|
150
|
+
*/
|
|
151
|
+
export function buildFirstRunChecklist(
|
|
147
152
|
projectName,
|
|
148
153
|
baseUrl = "https://gateway.example.com/v1",
|
|
154
|
+
platform = process.platform,
|
|
149
155
|
) {
|
|
150
|
-
|
|
151
|
-
|
|
156
|
+
if (platform === "darwin") {
|
|
157
|
+
return `
|
|
158
|
+
First-time setup for "${projectName}" · copy-paste in order:
|
|
159
|
+
|
|
160
|
+
cursor-keys clone ${projectName} # inherit sign-in, settings, model config from main Cursor
|
|
161
|
+
cursor-keys set-key ${projectName} # inject the project API key (encrypted, hidden prompt)
|
|
162
|
+
cursor-keys doctor ${projectName} # verify the profile
|
|
163
|
+
|
|
164
|
+
Manual alternative: Cursor Settings → Models → API keys, paste the key under
|
|
165
|
+
OpenAI API Key, enable "Override OpenAI Base URL" with: ${baseUrl}
|
|
166
|
+
|
|
167
|
+
Already inside this profile's window? Close it before running clone or set-key.
|
|
168
|
+
`;
|
|
169
|
+
}
|
|
152
170
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
3. Enable "Use OpenAI API Key" and "Override OpenAI Base URL"
|
|
156
|
-
4. Base URL: ${baseUrl}
|
|
157
|
-
5. Add your gateway models and disable models you do not use
|
|
171
|
+
return `
|
|
172
|
+
First-time setup for "${projectName}" · copy-paste in order:
|
|
158
173
|
|
|
159
|
-
|
|
160
|
-
|
|
174
|
+
cursor-keys clone ${projectName} # inherit sign-in, settings, model config from main Cursor
|
|
175
|
+
cursor-keys open ${projectName} # open once so Cursor creates its state
|
|
176
|
+
cursor-keys doctor ${projectName} # verify the profile
|
|
177
|
+
|
|
178
|
+
Then in that window: Cursor Settings → Models → API keys, paste the key under
|
|
179
|
+
OpenAI API Key, enable "Override OpenAI Base URL" with: ${baseUrl}
|
|
180
|
+
|
|
181
|
+
Already inside this profile's window? Close it before running clone.
|
|
182
|
+
`;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
export function printFirstRunChecklist(
|
|
186
|
+
projectName,
|
|
187
|
+
baseUrl = "https://gateway.example.com/v1",
|
|
188
|
+
) {
|
|
189
|
+
console.log(buildFirstRunChecklist(projectName, baseUrl, process.platform));
|
|
161
190
|
}
|
|
162
191
|
|
|
163
192
|
export function createProfile({ profileDir, projectName, color, cloneFrom }) {
|