Mirror Security Logo
Code Prism

Quick Start

Get started with Code Prism in 5 minutes

Quick Start Guide

Get up and running with Code Prism in just a few minutes. This guide assumes you've already installed the extension.


Step 1: Set Your API Key

Open the Command Palette and configure your API key:

  1. Press Cmd+Shift+P (Mac) or Ctrl+Shift+P (Windows/Linux)
  2. Type: Code Prism: Set API Key
  3. Paste your API key from https://platform.mirrorsecurity.io
  4. Press Enter

✅ Your API key is securely stored in VS Code's secret storage.


Step 2: Configure Server URL

Set the Mirror server URL (skip if using default localhost):

Via Command Palette:

  1. Press Cmd+Shift+P (Mac) or Ctrl+Shift+P (Windows/Linux)
  2. Type: Code Prism: Configure Server URL
  3. Enter your server URL: https://mirrorapi.azure-api.net/telemetry (or your custom URL)

Via Settings:

  1. Open Settings: Preferences: Open Settings (UI)
  2. Search: mirrorProvider.serverUrl
  3. Update the value

Step 3: Configure Server Public Key

  1. Press Cmd+Shift+P (Mac) or Ctrl+Shift+P (Windows/Linux)
  2. Type: Code Prism: Configure Server Public URL
  3. choose “Fetch from the server (with verification)” or Paste the key directly if you have already
  4. Press Enter

Step 4: Verify Setup

Check that Code Prism is active:

Status Bar Check

Look at the bottom-right corner of VS Code. You should see:

  • 🛡️ Code Prism: Protected (idle state)

Encryption Keys Check

Run the verification command:

  1. Press Cmd+Shift+P / Ctrl+Shift+P
  2. Type: Code Prism: Verify Encryption Keys
  3. You should see a message confirming your encryption keys are valid

If you don't have keys yet, generate them:

  1. Press Cmd+Shift+P / Ctrl+Shift+P
  2. Type: Code Prism: Regenerate Client Encryption Keys
  3. Wait for confirmation

Step 5: Select a Mirror Model

Now you're ready to use Code Prism with GitHub Copilot:

  1. Open GitHub Copilot Chat panel

  2. Click the model selector (dropdown at top)

  3. You should see:

    • Mirror 70B - Best for complex reasoning and large codebases
    • Mirror 7B - Fast responses for quick questions
  4. Select Mirror 70B or Mirror 7B


Step 6: Start Chatting (Protected!)

Send your first encrypted message:

  1. In Copilot Chat, type a question:

    How do I implement a secure authentication system in Node.js?
  2. Press Enter and watch:

    • Status bar changes to: ⟳ Code Prism: Active
    • Chat shows: 🔒 Protected by Code Prism at the top of response
    • Status bar returns to: 🛡️ Code Prism: Protected when done

🎉 Congratulations! Your code is now protected with end-to-end encryption.


What Just Happened?

When you sent that message, Code Prism:

  1. ✅ Encrypted your question on your device using FHE
  2. ✅ Sent encrypted data to Mirror server
  3. ✅ Mirror AI processed encrypted data without seeing plaintext
  4. ✅ Received encrypted response
  5. ✅ Decrypted response only on your device

Your code never left your machine unencrypted!


Try These Next

Use @workspace for Code Context

@workspace How can I refactor this authentication module?

Code Prism will encrypt:

  • Your question
  • File contents from @workspace
  • AI's response

All protected end-to-end!

Use @files for Specific Files

@file:auth.js Can you review this code for security vulnerabilities?

The file contents are encrypted before being sent to the AI.

Complex Code Questions

I have a legacy monolith application. How should I approach
microservices migration while maintaining data consistency?

Mirror 70B excels at complex architectural questions - all while your codebase details remain encrypted.


Visual Indicators

Status Bar States

IndicatorMeaning
🛡️ Code Prism: ProtectedIdle - Ready to encrypt requests
⟳ Code Prism: ActiveProcessing - Currently encrypting/decrypting

Chat Badge

Every response from Mirror AI will show:

🔒 Protected by Code Prism

[AI response here...]

This confirms the response was encrypted end-to-end.


Common Use Cases

1. Code Review

@file:payment.js Review this payment processing code for security issues

2. Refactoring

@workspace Suggest how to refactor this monolithic service
into microservices

3. Bug Fixing

@file:api.js Why is this API endpoint returning 500 errors?

4. Architecture Questions

What's the best way to implement event-driven architecture
for real-time notifications in a Node.js app?

5. Best Practices

@file:database.js Is this database query optimized?
Suggest improvements.

Advanced: Debug Mode (Optional)

Want to verify encryption is really working? Enable debug mode:

Enable Encrypted Markers

  1. Open Settings: Preferences: Open Settings (UI)
  2. Search: Code Prism Advanced
  3. Enable:
    • Show Encrypted Markers
    • Show Encrypted Payload

Now when you chat, you'll see:

  • Encrypted chunk markers with decrypt links
  • Base64-encoded encrypted payload previews
  • Proof that data is encrypted before sending

View Logs

  1. Open Developer Console: HelpToggle Developer Tools
  2. Go to Console tab
  3. Look for messages like:
    === Sending Encrypted Request ===
    User public key in request: true
    Encrypted messages count: 1

This confirms encryption is active.


Next Steps

Now that you're up and running:

  1. Configuration Options - Customize your setup
  2. Security & Verification - Learn about the encryption
  3. Troubleshooting - Solve common issues

Tips for Best Experience

Use Mirror 70B for:

  • Complex architectural decisions
  • Large codebase analysis
  • In-depth code reviews
  • Multi-file refactoring

Use Mirror 7B for:

  • Quick syntax questions
  • Code completion
  • Simple bug fixes
  • Fast responses

Always Remember:

  • 🔒 Your code is always encrypted with Code Prism
  • 🛡️ Status bar shows protection status
  • ✅ Every response is verified with chat badge

Need Help?


Happy Coding with Zero Code Exposure! 🚀