Thank you for your interest in contributing! 🎉
- Fork the repository
- Clone your fork:
git clone https://github.com/YOUR_USERNAME/curlconverter.git - Install dependencies:
npm install - Create a branch:
git checkout -b feature/your-feature - Make your changes
- Test locally:
npm run dev - Build to verify:
npm run build - Commit your changes:
git commit -m "feat: add your feature" - Push to your fork:
git push origin feature/your-feature - Create a Pull Request
- Use TypeScript for all new code
- Follow existing code patterns and naming conventions
- Add JSDoc comments for public functions
- Use meaningful variable names
- Keep functions small and focused
Follow Conventional Commits:
feat: add Python asyncio generator
fix: correct header parsing for multipart forms
docs: update README with new examples
refactor: simplify cURL parser logic
test: add test cases for Go generator
Before submitting a PR:
- Test with various cURL commands (GET, POST, headers, auth, etc.)
- Verify responsive design on mobile/tablet/desktop
- Ensure build succeeds:
npm run build - Check TypeScript types:
npm run check
Create src/lib/generators/yourlang.ts:
import type { Request } from '../curlconverter';
/**
* Generate YourLang code using Library1
*/
export function generateYourLangLibrary1(request: Request): string {
const { url, method = 'GET', headers, data } = request;
let code = `// YourLang - Library1\n`;
code += `import library1;\n\n`;
// Add method and URL
code += `const response = library1.${method.toLowerCase()}("${url}"`;
// Add headers if present
if (headers && Object.keys(headers).length > 0) {
code += `, {\n headers: {\n`;
for (const [key, value] of Object.entries(headers)) {
code += ` "${key}": "${value}",\n`;
}
code += ` }`;
}
// Add body if present
if (data) {
code += `,\n body: ${JSON.stringify(data)}`;
}
code += `\n});\n`;
return code;
}
/**
* Generate YourLang code using Library2 (alternative)
*/
export function generateYourLangLibrary2(request: Request): string {
// Alternative implementation
return `// YourLang - Library2 implementation`;
}Add to src/lib/generators/index.ts:
export async function getYourLangGenerators() {
const { generateYourLangLibrary1, generateYourLangLibrary2 } = await import('./yourlang');
return {
'Library1': generateYourLangLibrary1,
'Library2': generateYourLangLibrary2,
};
}
// Add to factory function
export async function getGenerators(language: string): Promise<Record<string, CodeGenerator> | null> {
switch (language) {
// ... existing cases
case 'yourlang':
return await getYourLangGenerators();
default:
return null;
}
}
// Add to supported languages
export const supportedLanguages = [
// ... existing languages
'yourlang',
] as const;Update src/lib/languages.ts:
export const TARGETS = [
// ... existing languages
{ value: 'yourlang', label: 'YourLang', icon: '🔷' },
] as const;
export type TargetLang =
| 'python'
| 'javascript'
// ... existing types
| 'yourlang';Create src/pages/yourlang.astro:
---
import Layout from './_layout.astro';
import ConverterIsland from '../components/ConverterIsland';
import { TARGETS } from '../lib/languages';
const lang = TARGETS.find(t => t.value === 'yourlang');
---
<Layout
title={`Free cURL to ${lang?.label} Converter - Online Tool | CurlConverter.net`}
description={`Convert cURL commands to ${lang?.label} code (Library1, Library2). Fast, secure, browser-based converter.`}
ogTitle={`Free cURL to ${lang?.label} Converter`}
>
<section class="text-center mb-12 md:mb-16">
<div class="inline-flex items-center gap-2 px-4 py-2 rounded-full bg-blue-100 text-blue-700 text-sm font-medium mb-6">
<span class="text-xl">{lang?.icon}</span>
{lang?.label} Code Generator
</div>
<h1 class="heading mb-6">
Convert cURL to <span class="bg-gradient-to-r from-blue-600 via-indigo-600 to-purple-600 bg-clip-text text-transparent">{lang?.label}</span>
</h1>
<p class="subtle max-w-2xl mx-auto mb-8">
Transform cURL commands into production-ready {lang?.label} code.
Fast, secure, and runs entirely in your browser.
</p>
</section>
<ConverterIsland client:load defaultLang="yourlang" />
<section class="mt-12 text-center">
<a href="/" class="inline-flex items-center gap-2 text-blue-600 hover:text-blue-700 font-medium">
← Convert to other languages
</a>
</section>
</Layout>Add to public/sitemap.xml:
<url>
<loc>https://curlconverter.net/yourlang</loc>
<lastmod>2025-11-29</lastmod>
<changefreq>weekly</changefreq>
<priority>0.9</priority>
</url>Add case to src/components/ConverterIsland.tsx:
case 'yourlang':
generators = await getYourLangGenerators();
break;When reporting bugs, please include:
- Description of the issue
- Steps to reproduce
- Expected behavior
- Actual behavior
- cURL command that caused the issue (if applicable)
- Browser & OS information
- Screenshots (if relevant)
We welcome feature suggestions! Please:
- Check if the feature already exists or is requested
- Provide clear use cases
- Explain why it would benefit users
- Include example implementations (if applicable)
Improvements to documentation are always welcome:
- Fix typos and grammar
- Add examples
- Clarify explanations
- Add missing information
- Improve README structure
Have questions? Feel free to:
- Open a GitHub Discussion
- Check existing Issues
- Review the README
By contributing, you agree that your contributions will be licensed under the MIT License.
Thank you for making cURL Converter better! 🚀