TarzanGPT for Visual Studio Code
Generate UML and workflow diagrams directly in VS Code using AI-powered diagram generation from TarzanGPT.
Features
- Generate diagrams from selected code - Select any code snippet and generate a diagram
- Generate diagrams from entire files - Analyze whole files to create comprehensive diagrams
- Custom diagram generation - Describe what you want and let AI create it
- Live preview - See your diagrams rendered instantly with Mermaid.js
- Multiple diagram types - Flowcharts, sequence diagrams, class diagrams, ER diagrams, and more
- Easy export - Copy Mermaid code or save to file
Supported Diagram Types
- Flowchart - Process flows and decision trees
- Sequence - Interaction sequences between objects
- Class - Class structures and relationships
- ER - Entity relationship diagrams
- Gantt - Project timelines and schedules
- State - State machines and transitions
Installation
From VS Code Marketplace (Coming Soon)
- Open VS Code
- Go to Extensions (Ctrl+Shift+X / Cmd+Shift+X)
- Search for "TarzanGPT"
- Click Install
Manual Installation
- Download the
.vsix file from tarzangpt.com/extensions
- In VS Code, open Command Palette (Ctrl+Shift+P / Cmd+Shift+P)
- Run
Extensions: Install from VSIX...
- Select the downloaded file
Setup
1. Get Your API Token
- Go to tarzangpt.com/settings/api-tokens
- Click "Generate New Token"
- Give it a name (e.g., "VSCode Extension")
- Choose expiration (90 days or 1 year)
- Copy the token immediately (shown only once!)
Option A: VS Code Settings UI
- Open Settings (Ctrl+, / Cmd+,)
- Search for "TarzanGPT"
- Paste your API token in
tarzangpt.apiToken
Option B: settings.json
- Open Command Palette (Ctrl+Shift+P / Cmd+Shift+P)
- Run
Preferences: Open Settings (JSON)
- Add:
{
"tarzangpt.apiToken": "tar_your_token_here",
"tarzangpt.apiUrl": "https://tarzangpt.com",
"tarzangpt.defaultDiagramType": "flowchart",
"tarzangpt.autoPreview": true
}
Usage
Generate from Selected Code
- Select code in your editor
- Right-click → "TarzanGPT: Generate Diagram from Selection"
- Or: Command Palette → "TarzanGPT: Generate Diagram from Selection"
- Choose diagram type
- View the generated diagram!
Generate from Current File
- Open a file
- Command Palette → "TarzanGPT: Generate Diagram from Current File"
- Choose diagram type
- View the generated diagram!
Generate Custom Diagram
- Command Palette → "TarzanGPT: Generate Custom Diagram"
- Choose diagram type
- Describe what you want in the diagram
- View the generated diagram!
Commands
| Command |
Description |
Keyboard Shortcut |
TarzanGPT: Generate Diagram from Selection |
Generate diagram from selected code |
- |
TarzanGPT: Generate Diagram from Current File |
Generate diagram from entire file |
- |
TarzanGPT: Generate Custom Diagram |
Describe and generate custom diagram |
- |
Configuration
| Setting |
Description |
Default |
tarzangpt.apiToken |
Your TarzanGPT API token |
"" |
tarzangpt.apiUrl |
TarzanGPT API URL |
"https://tarzangpt.com" |
tarzangpt.defaultDiagramType |
Default diagram type |
"flowchart" |
tarzangpt.autoPreview |
Auto-show preview after generation |
true |
Examples
Example 1: Generate Flowchart from Code
// Select this code and run "Generate from Selection"
function login(username, password) {
if (!username || !password) {
return { error: 'Missing credentials' };
}
const user = authenticate(username, password);
if (!user) {
return { error: 'Invalid credentials' };
}
return { success: true, user };
}
Example 2: Custom Sequence Diagram
- Run "Generate Custom Diagram"
- Select "sequence"
- Enter: "User logs in, system validates credentials, database checks user, returns token, user receives token"
Credits & Pricing
- Each TarzanGPT account gets 10 free credits per month
- Each diagram generation uses 1 credit
- Check your remaining credits in the notification after each generation
Troubleshooting
"Insufficient Credits"
"Failed to generate diagram"
- Check your internet connection
- Verify your API token is valid and not expired
- Make sure TarzanGPT service is accessible
Diagram not rendering
- Check if your input is valid
- Try a different diagram type
- Simplify your input description
Support
Privacy & Security
- API tokens are stored locally in VS Code settings
- Code is sent to TarzanGPT API only when you explicitly generate diagrams
- No code is stored or logged on our servers
- All API communication uses HTTPS encryption
License
MIT
Made with ❤️ by TarzanGPT Team
| |