The Lucid for Visual Studio Code (VS Code) extension allows you to create, open, preview, and edit Lucid diagrams side by side with your codebase, without switching to a browser. Every diagram is supported by a dynamic Lucid document that stays synced with your repository. This keeps diagrams reviewable in your pull requests while providing teammates and AI agents with instant system architecture context.
Plan availability: Free, Individual, Team, and Enterprise.
- Not available on FedRAMP accounts.
- Read the Lucid Plans article for more information about what is available on your account or the Upgrade your Lucid account article for instructions to upgrade.
Connect VS Code to your Lucid account
To install the Lucid extension for VS Code, follow these steps:
- Open the VS Code application.
- Navigate to the Extensions Marketplace by clicking
the Extensions icon on the Activity Bar on the far left side of the window.
- Or press Ctrl + Shift + X (PC) or Cmd + Shift + X (Mac) to use a keyboard shortcut.
- Search "Lucid" in the VS Code Marketplace.
- Click Install on the right side of the extension card.
- Follow the prompt to sign in to your Lucid account.
- Open the Command Palette and type “Lucid”.
- Or press Cmd + Shift + P (PC) or Ctrl + Shift + P (Mac).
- Open an existing diagram or create a new one.
- Edit your diagram.
- Click Save to codebase in the upper-right of the editor.
- Select your repository folder.
- Follow the prompts on your device to save.
Note: VS Code does not use cookies. This means active Lucid sessions do not persist after VS Code is closed.
Work with Lucid diagrams in VS Code
Create and open a Lucid diagram
To create or open diagrams, follow these steps within VS Code:
- Open the Command Palette.
- Or press Cmd + Shift + P (PC) or Ctrl + Shift + P (Mac) to use the keyboard shortcut.
- Search for and select Lucid: Open Document or Lucid: Create New Document.
- From the document picker that opens next to your source code, select your document or click New Document.
Update an existing Lucid diagram
When you’re not editing a Lucid diagram, it appears as a static image saved to your codebase. To edit an existing diagram directly within VS Code, follow these steps:
- Open a Lucid document in VS Code.
- Click the
Lucid icon at the top of the editor.
- Edit your Lucid document in VS Code.
- Click Save to Codebase.
- Select your repository folder.
- Follow the prompts on your device to save.
To confirm your updates were saved successfully, follow these steps:
- Edit and save your Lucid document in VS Code.
- Close the Lucid editor tab and the diagram preview tab.
- In the File Explorer, select your diagram's PNG file to open the updated preview.
Convert Mermaid syntax to Lucid objects
To paste Mermaid from Claude Code, Cursor, Codex, or anywhere else and get editable shapes in a Lucid document, follow these steps:
- Copy raw Mermaid code.
- Paste the code anywhere in the Lucid extension panel.
The extension converts the code into standard, editable Lucid shapes and lines.
Learn more: For more information about using Mermaid syntax in Lucid, check out our article Diagram as code with Mermaid in Lucidchart.
Sync changes from Lucid’s web editor to VS Code
To ensure your VS Code preview reflects your latest edits in Lucid, follow these steps:
- Open a Lucid document in VS Code.
- Click the open
the external link icon at the top of the editor.
- Follow the prompts to open the web version of Lucid.
- From the pop-up window of Lucid’s web version that appears, edit your diagram.
- Close out of the web version.
- Return to VS Code.
- In the VS Code File Explorer, select any other file, then click back onto your diagram's PNG file to refresh the view.
- Click Update Lucid PNG at the bottom-left of the editor to render the latest version.
Save diagrams to your codebase
Save a PNG image and a lightweight reference file (.lucid) directly to your local repository so you can commit them with your code. Here’s how:
- Edit the canvas directly inside VS Code.
- Select Save to Codebase from the top-right of the extension menu.
- Select your repository folder.
- Follow the prompts on your device to save.
VS Code editor limitations
With the in-editor experience, you get a focused subset of the web-based Lucid editor, tailored for quick viewing and updates directly alongside your code. To access full capabilities, including the ones listed in the table below, open your document in the web version of Lucid.
| Unsupported features in the VS Code extension | Additional details and recommendations | |
| Lucid AI | Lucid AI prompts and Mermaid code generation | To access full AI capabilities, click the external link icon at the top of the editor and open Lucid in your browser. |
| Exports | Direct export to SVG, PDF, CSV, JSON, or PowerPoint | Native export in the extension is restricted to PNG. |
| Sharing | In-editor share modal | To edit permissions and share links, click the external link icon at the top of the Lucid editor. |
| Templates and embeds | Template libraries and embed features | Click Save to Codebase to store visual assets locally. |
| Enterprise security | Enterprise accounts with Anonymous Users disabled | Not supported. |
FAQ
What version of VS Code is Lucid compatible with?
Lucid for VS Code is compatible with all standard VS Code installations supporting VS Code engine version 1.82.0 or higher.
Do I need a Lucid account to use the VS Code extension?
Yes, you need an active Lucid account. Use of the extension is subject to Lucid’s Terms of Service and Privacy Policy, which apply to your use of the extension but not to your use of any Non-Lucid Application (as defined in our Terms of Service) in connection with the extension.
Resources
Give feedback on this article
Have feedback about this article? Tell us about your experience here.