✨ Highlights
- 🎯 Smart Auto-Detect — Press Ctrl + Alt + C (
Cmd+Alt+C on macOS) to convert cURL directly into the active file's language (.ts, .py, .go, .rs, .php, etc.).
- 📋 Clipboard to Code — Copy any cURL from Chrome DevTools, Postman, or Swagger, and insert clean code right at your cursor.
- 🖥️ Interactive Live Playground — Dedicated sidebar view and editor tab with live preview, language switchers, and instant copy/insert buttons.
- 🔒 100% Offline & Private — Runs entirely on your local machine with zero external network requests. Your API keys and tokens never leave your editor.
- ⚡ Zero Dependencies — Ultralight bundled build with instant startup time.
🌐 Supported Languages & HTTP Clients
| Language |
Supported Clients & Libraries |
| JavaScript |
fetch (Native ESM / Node 18+), axios, node-fetch, ky, got |
| TypeScript |
fetch (Typed), axios (Typed) |
| Python |
requests, httpx (Async), httpx (Sync), aiohttp |
| Go |
net/http (Standard Library with Context), resty |
| Rust |
reqwest (Async Tokio), reqwest (Blocking / Sync) |
| Java |
java.net.http.HttpClient (Java 11+), OkHttp 3/4 |
| Kotlin |
Ktor Client |
| C# / .NET |
HttpClient (Modern .NET), RestSharp |
| PHP |
cURL (Native PHP), GuzzleHttp |
| Dart / Flutter |
package:http, dio |
| Ruby |
Net::HTTP, HTTParty |
| Swift |
URLSession (Modern async/await), Alamofire |
| CLI / Shell |
HTTPie, Wget |
🎮 How to Use
1. Smart Convert Shortcut
- Highlight a
curl ... command or copy one to your clipboard.
- Press Ctrl + Alt + C (or Cmd + Alt + C).
- The snippet is instantly converted and inserted into your current document!
Click the ⚡ cURL to Code icon in your VS Code Activity Bar to open the interactive live playground.
- Paste your cURL command into the input box.
- Switch languages and HTTP clients with instant real-time preview.
- Click Copy Code or Insert in Editor.
Right-click anywhere in your editor:
- cURL to Code: Convert Selected cURL... (Pick target language & client)
- cURL to Code: Smart Convert to Current Language
- cURL to Code: Convert & Copy As Language...
⚙️ Configuration
Customize behavior in VS Code Settings (Ctrl+, / Cmd+, -> search curlToCode):
{
"curlToCode.defaultLanguage": "javascript",
"curlToCode.defaultClient": "fetch",
"curlToCode.useAsyncAwait": true,
"curlToCode.includeImports": true
}
📦 Quick Installation
Install directly from the .vsix file:
code --install-extension curl-to-code-1.0.0.vsix
| |