Publishing Templates
Once you've created and tested your Codebolt template, you can share it with the community by publishing it to the Codebolt registry. This guide covers the publishing process through both the Codebolt Portal and CLI.
Prerequisites
Before publishing your template, ensure you have:
- Completed Template: A fully functional template with all required files
- Codebolt Account: Active account on portal.codebolt.ai
- GitHub Repository: Public repository hosting your template
- Valid Configuration: Properly configured
codeboltconfig.yaml
- Documentation: Comprehensive README and documentation
- Testing: Template has been tested and validated
Publishing Methods
Method 1: Codebolt Portal (Recommended)
The Codebolt Portal provides a user-friendly interface for publishing templates.
Step 1: Access the Portal
- Navigate to portal.codebolt.ai
- Sign in to your Codebolt account
- Go to the Templates section
- Click "Add Templates" button
Step 2: Fill Template Information
Complete the template submission form:
Basic Information:
- Template Title: Descriptive name for your template
- Description: Brief explanation of what the template provides
- Template Type: Select "Template" or "App" based on your template type
- URL: GitHub repository URL or deployment URL
Template Icon:
- Upload an icon/logo for your template
- Recommended size: 256x256 pixels
- Supported formats: PNG, JPG, SVG
Step 3: Submit for Review
- Review all information for accuracy
- Click "Add" to submit your template
- Your template will be reviewed by the Codebolt team
- You'll receive notification once approved
Method 2: CLI Publishing
Use the Codebolt CLI for programmatic template publishing.
Step 1: Prepare Your Template
Ensure your template is ready:
# Navigate to your template directory
cd my-awesome-template
# Validate template structure
npm run validate-template
# Test template functionality
npm install
npm run dev
npm run build
Step 2: Login to CLI
# Login to your Codebolt account
npx codebolt-cli login
# Verify authentication
npx codebolt-cli whoami
Step 3: Publish Template
# Publish template to registry
npx codebolt-cli publish-template
# Or specify template directory
npx codebolt-cli publish-template ./path/to/template
The CLI will:
- Validate your
codeboltconfig.yaml
- Package your template
- Upload to the Codebolt registry
- Provide a confirmation with template ID
Template Preparation Checklist
Required Files
Ensure your template includes:
- ✅
codeboltconfig.yaml
- Template configuration - ✅
package.json
- Dependencies and scripts - ✅
README.md
- Comprehensive documentation - ✅
.env.example
- Environment variable template - ✅
.gitignore
- Git ignore rules - ✅ Source code files in
src/
directory
Optional but Recommended
- ✅
LICENSE
- License file (MIT recommended) - ✅
CHANGELOG.md
- Version history - ✅
CONTRIBUTING.md
- Contribution guidelines - ✅
.github/workflows/
- CI/CD workflows - ✅
docs/
- Additional documentation - ✅
scripts/
- Setup and build scripts
Quality Checklist
Code Quality:
- ✅ Code follows best practices and conventions
- ✅ No hardcoded secrets or sensitive information