Sync your code easily with Claude.ai Projects without leaving your IDE.
Download
·
Quick Start
·
Configuration
One of the most underrated features of Claude.ai is "projects". You can sync your code with a project, and then simply talk to Claude about your code, without needing to worry about supplying context. ChatGPT has a similar feature, but only works with their "4o" model as of now, and is not as good as Claude.
Claude Sync aims to make it easier to use Claude.ai projects by directly letting you sync your code from your IDE, with features like auto-syncing, exclude/include files, and more.
Inspired by ClaudeSync by jahwag.
Note
This extension requires a Claude.ai account with the Pro plan.
You can install ClaudeSync directly from the VS Code Marketplace!
To connect ClaudeSync with your Claude.ai account, you'll need your session token. Here's how to get it:
- Visit claude.ai and sign in to your account.
- Open Developer Tools:
- Windows/Linux:
F12
orCtrl+Shift+I
- Mac:
Cmd+Option+I
- Windows/Linux:
- Navigate to:
Application → Cookies → claude.ai → sessionKey
- Copy the token value (starts with "sk-ant")
Tip: Make sure you copy the raw token value, not the URL-encoded version!
- Open the Command Palette in VS Code:
- Windows/Linux:
Ctrl+Shift+P
- Mac:
Cmd+Shift+P
- Windows/Linux:
- Type "ClaudeSync: Set Token"
- Paste your Claude session token
- You're ready to go!
Access these commands through the Command Palette (Ctrl+Shift+P
or Cmd+Shift+P
):
Command | Description |
---|---|
ClaudeSync: Set Token |
Configure your Claude session token |
ClaudeSync: Initialize Project |
Set up a new Claude project for the workspace |
ClaudeSync: Sync Current File |
Sync the active file |
ClaudeSync: Sync Workspace |
Sync all workspace files |
ClaudeSync: Configure Auto-sync |
Manage automatic file syncing |
ClaudeSync: Configure Startup Sync |
Control syncing on VS Code startup |
ClaudeSync: Sync Project Instructions |
Update project instructions |
ClaudeSync: Open in Browser |
View project in Claude.ai's Web UI |
ClaudeSync: Configure Remote File Cleanup |
Configure cleanup of remote files |
ClaudeSync: Show Current Settings |
Display current extension settings |
ClaudeSync: Exclude from Sync |
Exclude specific files from syncing |
ClaudeSync: Include in Sync |
Include previously excluded files in syncing |
ClaudeSync: Show Output Channel |
Show the extension's output/logs |
ClaudeSync: Update Project Instructions |
Update project instructions in Claude.ai |
ClaudeSync: Toggle Auto-Add to Gitignore |
Toggle automatic .gitignore management |
Customize ClaudeSync through .vscode/claudesync.json
for workspace settings and VS Code's settings for global options:
{
"excludePatterns": [
"node_modules/**",
".git/**",
"dist/**",
"build/**",
"**/*.pyc",
"**/__pycache__/**",
".env"
// ... many other patterns
],
"maxFileSize": 2097152, // 2MB
"autoSync": false,
"autoSyncInterval": 30,
"syncOnStartup": false,
"cleanupRemoteFiles": false
}
Option | Description | Default | Scope |
---|---|---|---|
sessionToken |
Claude.ai session token for authentication | "" |
Global |
addToGitignore |
Automatically add claudesync.json to .gitignore | true |
Global |
excludePatterns |
Glob patterns for excluded files | See example above | Workspace |
maxFileSize |
Maximum file size in bytes | 2097152 (2MB) |
Workspace |
autoSync |
Enable automatic file syncing | false |
Workspace |
autoSyncInterval |
Delay in seconds between auto-syncs (min: 10, max: 180) | 30 |
Workspace |
syncOnStartup |
Sync workspace when VS Code starts | false |
Workspace |
cleanupRemoteFiles |
Remove remote files that don't exist locally | false |
Workspace |
Need to give Claude specific instructions for your project? Create a .projectinstructions
file in your workspace root. These instructions sync when initializing a new project, or when running "Sync Project Instructions" manually.
Feel free to contribute to this project by opening an issue or submitting a pull request.
ClaudeSync is open source software licensed under the MIT License. See the LICENSE file for details.
Warning
This extension is not officially affiliated with Anthropic's Claude.ai service.