Skip to main content

Cursor Integration

Protect secrets in Cursor’s AI features: Chat, Composer, and inline edits.

Setup

1

Install the extension

Open Cursor and install the Takumo extension:
  1. Cmd/Ctrl + Shift + X to open Extensions
  2. Search for “Takumo”
  3. Click Install
2

Configure

Open settings (Cmd/Ctrl + ,) and search for “Takumo”:
{
  "takumo.enabled": true,
  "takumo.autoTokenize": true,
  "takumo.showNotifications": true
}
3

Verify

Open a file with secrets. You should see a shield icon in the status bar showing detected secrets.

How it works

The extension intercepts Cursor’s AI requests:

Before send

Scans attached files, tokenizes secrets

AI processing

Cursor sees tokens, not real values

After receive

Rehydrates tokens in AI responses

Usage

Chat

Secrets in attached files are automatically tokenized:
You: @config.ts Add retry logic to the database connection

[Takumo: Tokenized 2 secrets in config.ts]

Cursor: Here's the updated config with retry logic...

Composer

Multi-file edits work the same way:
You: Refactor authentication across these files
     @auth.ts @middleware.ts @routes/login.ts

[Takumo: Tokenized 5 secrets across 3 files]

Inline edits

Select code, press Cmd/Ctrl + K:
// Selected:
const db = postgres("postgres://admin:examplepass@prod:5432/app");

// Takumo tokenizes before sending to AI
// AI response is rehydrated before applying

Status bar

The status bar shows protection status:
IconMeaning
🛡️ 33 secrets protected in current file
🛡️ ✓All secrets tokenized, ready to send
⚠️Secrets detected but not yet tokenized
Click the icon to see details.

Commands

Open command palette (Cmd/Ctrl + Shift + P):
CommandDescription
Takumo: Scan FileScan current file for secrets
Takumo: Scan WorkspaceScan all files in workspace
Takumo: Show SessionView current token vault
Takumo: Clear SessionReset token vault

Configuration

Full settings reference:
{
  // Enable/disable protection
  "takumo.enabled": true,

  // Auto-tokenize when attaching files to chat
  "takumo.autoTokenize": true,

  // Show notifications when secrets are detected
  "takumo.showNotifications": true,

  // Files to scan
  "takumo.include": ["**/*"],
  "takumo.exclude": ["**/node_modules/**", "**/.git/**"],

  // Highlight detected secrets in editor
  "takumo.highlightSecrets": true,

  // Custom patterns (same format as .takumorc)
  "takumo.customPatterns": []
}

Troubleshooting

Check the Output panel (View > Output) and select “Takumo” from the dropdown. Look for activation errors.Common fixes:
  • Reload window: Cmd/Ctrl + Shift + P → “Reload Window”
  • Check extension is enabled for workspace
The extension only processes files explicitly attached with @filename. It doesn’t scan:
  • Code pasted directly into chat
  • Files referenced by path only
Attach files using @ to ensure protection.
For large workspaces, limit scanning:
{
  "takumo.include": ["src/**/*", "config/**/*"],
  "takumo.exclude": ["**/dist/**", "**/coverage/**"]
}