Skip to content

Commit f00aafc

Browse files
committed
chore(blog): implement blog functionality with dynamic routing and MDX support
- Added blog page with a list of posts and individual post pages using dynamic routing. - Integrated MDX for rendering blog content, allowing for rich text formatting. - Created components for blog header, footer, and individual post display. - Implemented utility functions for fetching and managing blog posts. - Enhanced navigation with links to previous and next posts. - Updated the header to include a link to the new blog section. - Added a new blog post on managing multiple Cursor IDE instances.
1 parent 60dddfa commit f00aafc

22 files changed

Lines changed: 2759 additions & 14 deletions

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,6 @@ yarn.lock
4747

4848
# Github Copilot
4949
.github/copilot-instructions.md
50-
.github/copilot-instructions/
50+
.github/copilot-instructions/
51+
52+
.content-collections

apps/www/content-collections.ts

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
2+
import { defineCollection, defineConfig } from "@content-collections/core";
3+
import { compileMDX } from "@content-collections/mdx";
4+
import rehypePrettyCode from "rehype-pretty-code";
5+
import { z } from "zod";
6+
7+
const posts = defineCollection({
8+
name: "posts",
9+
directory: "content/blog",
10+
include: "*.mdx",
11+
schema: z.object({
12+
title: z.string(),
13+
description: z.string().optional(),
14+
date: z.string(),
15+
author: z.string().optional(),
16+
tags: z.array(z.string()).optional(),
17+
featured: z.boolean().optional(),
18+
image: z.string().optional(),
19+
published: z.boolean().optional(),
20+
}),
21+
transform: async (document, context) => {
22+
const mdx = await compileMDX(context, document, {
23+
rehypePlugins: [
24+
[
25+
rehypePrettyCode,
26+
{
27+
theme: "github-dark",
28+
keepBackground: true,
29+
},
30+
],
31+
],
32+
});
33+
return {
34+
...document,
35+
mdx,
36+
slug: document._meta.path,
37+
readingTime: Math.ceil(document.content.split(/\s+/).length / 200),
38+
};
39+
},
40+
});
41+
42+
export default defineConfig({
43+
collections: [posts],
44+
});
Lines changed: 232 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,232 @@
1+
---
2+
title: "How to Run Multiple Cursor IDE Instances for Multi-Account Workflows"
3+
description: "Learn how to use Cursor Kit's instance command to run multiple Cursor IDE instances simultaneously on macOS, enabling parallel development workflows with different accounts."
4+
date: "2025-12-17"
5+
author: "Cursor Kit Team"
6+
tags: ["cursor-ide", "multi-account", "productivity", "macos", "developer-tools"]
7+
featured: true
8+
---
9+
10+
Managing multiple Cursor IDE accounts is a common challenge for developers who work across different organizations, freelance projects, or need to separate personal and professional workflows. The **Cursor Kit `instance` command** provides a powerful solution that enables you to run multiple Cursor instances simultaneously on macOS.
11+
12+
## The Multi-Account Problem
13+
14+
Modern developers often face scenarios requiring multiple IDE accounts:
15+
16+
- **Enterprise vs Personal** — Using separate accounts for work and personal projects
17+
- **Freelance Work** — Managing multiple client accounts with different access permissions
18+
- **Team Collaboration** — Testing with different team member permissions
19+
- **API Quotas** — Distributing AI assistant usage across multiple accounts
20+
21+
Without proper tooling, switching between accounts requires logging out and back in—a frustrating workflow that breaks your concentration.
22+
23+
## Introducing Cursor Kit Instance
24+
25+
Cursor Kit's `instance` command creates isolated copies of Cursor IDE, each with its own identity and data directory. This means you can:
26+
27+
- Run multiple Cursor windows with different logged-in accounts
28+
- Keep extensions and settings separate per instance
29+
- Preserve all configurations when Cursor updates
30+
- Create shell aliases for quick access
31+
32+
## Getting Started
33+
34+
First, install Cursor Kit globally:
35+
36+
```bash
37+
npm install -g cursor-kit-cli
38+
```
39+
40+
Then create your first instance:
41+
42+
```bash
43+
cursor-kit instance -a create -n "Cursor Work"
44+
```
45+
46+
This command performs several operations behind the scenes:
47+
48+
1. Creates a copy of Cursor.app in `~/Applications/`
49+
2. Assigns a unique bundle identifier (e.g., `com.cursor.cursorwork`)
50+
3. Creates a separate data directory in `~/Library/Application Support/`
51+
4. Re-signs the app with an ad-hoc signature
52+
53+
## Creating Shell Aliases
54+
55+
One of the most powerful features is the ability to create shell aliases. Just like the `cursor` command opens files in Cursor, you can create custom commands for each instance:
56+
57+
```bash
58+
# Create instance with alias in one command
59+
cursor-kit instance -a create -n "Cursor Work" -A cursor-work
60+
61+
# Or add an alias to an existing instance
62+
cursor-kit instance -a alias -n "Cursor Work" -A cursor-work
63+
```
64+
65+
Now you can open projects directly in your work instance:
66+
67+
```bash
68+
cursor-work ~/projects/enterprise-app
69+
cursor-work . # Open current directory
70+
```
71+
72+
### Alias Storage Options
73+
74+
Choose where to store your aliases based on your preferences:
75+
76+
| Location | Path | Best For |
77+
|----------|------|----------|
78+
| `shell-config` | `~/.zshrc` or `~/.bashrc` | Most users (restart terminal to activate) |
79+
| `home-bin` | `~/bin/` | Users with custom bin paths |
80+
| `usr-local-bin` | `/usr/local/bin/` | System-wide access |
81+
82+
Specify your preferred location:
83+
84+
```bash
85+
cursor-kit instance -a create -n "Cursor Work" -A cursor-work --aliasLocation shell-config
86+
```
87+
88+
## Managing Your Instances
89+
90+
### List All Instances
91+
92+
View all your configured instances and their aliases:
93+
94+
```bash
95+
cursor-kit instance -l
96+
```
97+
98+
Output:
99+
100+
```text
101+
● Cursor Enterprise (alias: cursor-work)
102+
└─ ~/Applications/Cursor Enterprise.app
103+
● Cursor Personal (alias: cursor-personal)
104+
└─ ~/Applications/Cursor Personal.app
105+
```
106+
107+
### Reinstall After Updates
108+
109+
When Cursor releases an update, your instances need to be refreshed. The reinstall command preserves your data and settings:
110+
111+
```bash
112+
cursor-kit instance -a reinstall -n "Cursor Work"
113+
```
114+
115+
This ensures you always have the latest Cursor features while maintaining your separate instances.
116+
117+
### Remove an Instance
118+
119+
Clean up instances you no longer need:
120+
121+
```bash
122+
cursor-kit instance -a remove -n "Cursor Work"
123+
```
124+
125+
You'll be prompted to also remove the associated shell alias.
126+
127+
## Real-World Workflow Example
128+
129+
Here's a complete workflow for a developer managing enterprise and personal projects:
130+
131+
```bash
132+
# Step 1: Create enterprise instance
133+
cursor-kit instance -a create -n "Cursor Enterprise" -A cursor-enterprise
134+
135+
# Step 2: Create personal instance
136+
cursor-kit instance -a create -n "Cursor Personal" -A cursor-personal
137+
138+
# Step 3: Open projects in the appropriate instance
139+
cursor-enterprise ~/work/enterprise-saas
140+
cursor-personal ~/personal/side-project
141+
142+
# Step 4: After Cursor updates, reinstall instances
143+
cursor-kit instance -a reinstall -n "Cursor Enterprise"
144+
cursor-kit instance -a reinstall -n "Cursor Personal"
145+
```
146+
147+
## Best Practices
148+
149+
### 1. Use Descriptive Names
150+
151+
Choose instance names that clearly indicate their purpose:
152+
153+
```bash
154+
# Good
155+
cursor-kit instance -a create -n "Cursor Client ABC"
156+
cursor-kit instance -a create -n "Cursor OpenSource"
157+
158+
# Avoid
159+
cursor-kit instance -a create -n "Cursor 2"
160+
```
161+
162+
### 2. Consistent Alias Naming
163+
164+
Use a consistent pattern for aliases that's easy to remember:
165+
166+
```bash
167+
cursor-work # Work projects
168+
cursor-personal # Personal projects
169+
cursor-client-x # Specific client
170+
```
171+
172+
### 3. Document Your Setup
173+
174+
Keep track of your instances in your dotfiles or notes:
175+
176+
```bash
177+
# ~/.zshrc or documentation
178+
# Cursor Instances:
179+
# - cursor-enterprise: Work account (org@company.com)
180+
# - cursor-personal: Personal account (me@gmail.com)
181+
```
182+
183+
### 4. Regular Maintenance
184+
185+
After each Cursor update, remember to reinstall your instances:
186+
187+
```bash
188+
cursor-kit instance -a reinstall -n "Cursor Enterprise"
189+
```
190+
191+
## Troubleshooting
192+
193+
### Instance Won't Launch
194+
195+
If an instance fails to open after a Cursor update:
196+
197+
```bash
198+
cursor-kit instance -a reinstall -n "Your Instance Name"
199+
```
200+
201+
### Alias Not Working
202+
203+
Ensure your shell configuration is sourced:
204+
205+
```bash
206+
source ~/.zshrc # For zsh users
207+
source ~/.bashrc # For bash users
208+
```
209+
210+
### Permission Issues
211+
212+
For `/usr/local/bin/` aliases, you may need sudo:
213+
214+
```bash
215+
sudo cursor-kit instance -a alias -n "Instance" -A alias-name --aliasLocation usr-local-bin
216+
```
217+
218+
## Conclusion
219+
220+
Cursor Kit's `instance` command transforms how you work with multiple Cursor accounts. By creating isolated instances with custom shell aliases, you can seamlessly switch between different contexts without logging in and out.
221+
222+
Whether you're managing enterprise and personal projects, working with multiple clients, or simply want to organize your development workflows, this feature provides the flexibility you need.
223+
224+
> **Ready to get started?** Install Cursor Kit today and create your first instance:
225+
> ```bash
226+
> npm install -g cursor-kit-cli
227+
> cursor-kit instance -a create -n "My First Instance"
228+
> ```
229+
230+
---
231+
232+
*Cursor Kit is an open-source project that helps developers supercharge their AI IDE experience. Check out our [GitHub repository](https://github.com/duongductrong/cursor-kit) for more features and updates.*

apps/www/next.config.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { withContentCollections } from "@content-collections/next";
12
import type { NextConfig } from "next";
23

34
const nextConfig: NextConfig = {
@@ -12,4 +13,4 @@ const nextConfig: NextConfig = {
1213
},
1314
};
1415

15-
export default nextConfig;
16+
export default withContentCollections(nextConfig);

apps/www/package.json

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,25 @@
99
"lint": "eslint"
1010
},
1111
"dependencies": {
12+
"@content-collections/core": "^0.13.0",
13+
"@content-collections/mdx": "^0.2.2",
14+
"@content-collections/next": "^0.2.10",
1215
"@radix-ui/react-slot": "^1.2.4",
1316
"class-variance-authority": "^0.7.1",
1417
"clsx": "^2.1.1",
18+
"date-fns": "^4.1.0",
19+
"gray-matter": "^4.0.3",
1520
"lucide-react": "^0.556.0",
1621
"motion": "^12.23.25",
1722
"next": "16.0.7",
23+
"next-mdx-remote": "^5.0.0",
1824
"next-themes": "^0.4.6",
1925
"react": "19.2.0",
2026
"react-dom": "19.2.0",
21-
"tailwind-merge": "^3.4.0"
27+
"rehype-pretty-code": "^0.14.1",
28+
"shiki": "^3.20.0",
29+
"tailwind-merge": "^3.4.0",
30+
"zod": "^4.2.1"
2231
},
2332
"devDependencies": {
2433
"@tailwindcss/postcss": "^4",

0 commit comments

Comments
 (0)