An AI-powered web application that helps you create custom open-source licenses or find existing licenses that match your needs.
- Two Interface Options:
- Chatbot Interface (recommended): Interactive conversation with code blocks and artifacts like Claude
- Form Interface: Simple form-based generation for quick one-off licenses
- BYOK (Bring Your Own Key): Use your own OpenRouter API key for complete privacy and access to multiple AI models
- Smart Recommendations: AI analyzes your requirements and suggests existing licenses when appropriate
- Custom License Generation: Creates tailored licenses when existing ones don't fit
- Code Block Display: View generated licenses in copy-friendly code blocks
- Download & Copy: Download license files or copy directly from code blocks
- Conversational Refinement: Chat to refine and adjust licenses iteratively
- Natural Language Interface: Describe your needs in plain English
- Markdown Output: Generated licenses are formatted in markdown
- Automatic File Saving: Licenses are automatically saved to local files
- Python 3.8 or higher
- uv - Fast Python package installer (recommended)
curl -LsSf https://astral.sh/uv/install.sh | sh - An OpenRouter API key (get one at openrouter.ai)
- Clone this repository:
git clone https://github.com/yourusername/Custom-License-Creator.git
cd Custom-License-Creator- Make the run script executable:
chmod +x run.sh- (Optional) Set up environment variables:
cp .env.example .env
# Edit .env and add your API keyThat's it! The run.sh script will handle the rest (creating venv, installing dependencies, etc.)
Use the provided bash wrapper script that handles environment setup with uv:
./run.shThis script will:
- Check if
uvis installed - Create a virtual environment (if needed)
- Install/update all dependencies
- Let you choose between Chatbot or Form interface
- Launch the Gradio interface
Alternatively, you can run manually:
# With uv (Chatbot interface - recommended)
uv venv
uv pip install -r requirements.txt
uv run python app_chatbot.py
# Or use the Form interface
uv run python app.py
# Or with traditional pip
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
pip install -r requirements.txt
python app_chatbot.py # or app.py for form interfaceThe application will be available at http://localhost:7860
- Enter your OpenRouter API key in the sidebar
- Add project details (optional): Project name, author, copyright year
- Start chatting: Describe what kind of license you need
- Refine iteratively: Ask follow-up questions or request changes
- Copy or Download: License appears in a code block - click to copy or download the file
- Enter your OpenRouter API key in the field
- Choose license type: Project-specific or boilerplate/template
- Describe your requirements in natural language
- Optional: Add project details (name, author, year) for copyright notices
- Click Generate License
- "I want a permissive license similar to MIT but with a no-warranty clause"
- "I need a copyleft license that requires derivative works to be open source"
- "Create a license that allows commercial use but prohibits military applications"
- "I want something like Apache 2.0 but simpler and easier to understand"
- "I need a license that requires attribution and doesn't allow sublicensing"
The application uses Claude AI (via OpenRouter) to:
- Analyze your requirements described in natural language
- Search for existing licenses that match your needs
- Recommend established licenses when they fit (MIT, Apache, GPL, etc.)
- Generate custom licenses when existing ones don't meet your specific requirements
- Explain tradeoffs between your needs and recommended licenses
-
For project-specific licenses:
- Displayed in the interface
- Saved to
generated_licenses/directory - Available for download
-
For boilerplate licenses:
- Displayed in the interface for you to copy and reuse
- Your API key is never stored - it's only used for the current session
- All processing happens via OpenRouter - no data is stored on servers
- Local file generation - licenses are saved locally on your machine
- Open source - audit the code yourself
Custom-License-Creator/
├── app_chatbot.py # Chatbot interface (recommended)
├── app.py # Form-based interface
├── run.sh # Bash launcher script (uv-based)
├── requirements.txt # Python dependencies
├── system-prompt.md # AI assistant instructions
├── .env.example # Example environment variables
├── .gitignore # Git ignore rules
├── README.md # This file
└── generated_licenses/ # Auto-created directory for generated licenses
Contributions are welcome! Please feel free to submit a Pull Request.
This project is open source. Use it to create licenses for your own projects!
- Built with Gradio
- Powered by Claude AI via OpenRouter
- Inspired by the need for flexible, understandable open-source licenses