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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/profile.mjs +39 -10
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cursor-keys",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "Per-project Cursor profiles so each window uses the correct BYOK API key. Zero dependencies.",
5
5
  "type": "module",
6
6
  "bin": {
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
- export function printFirstRunChecklist(
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
- console.log(`
151
- First-time setup for "${projectName}" in this Cursor profile:
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
- 1. Cursor Settings → Models → API keys
154
- 2. Paste your project API key under OpenAI API Key (or run: cursor-keys set-key ${projectName})
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
- Then run: cursor-keys doctor ${projectName}
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 }) {