Overview
Constants integrates with GitHub so you can:- Export Workers to repositories
- Version control your generated applications
- Continue development in your preferred IDE
- Share code with your team
Connecting GitHub
Step 1: Open GitHub Settings
- Click your profile icon in the sidebar
- Look for the GitHub section in the menu
- Click Connect GitHub
Step 2: Authorize Constants
You’ll be redirected to GitHub to authorize the Constants application. We request:- Read access to your profile information
- Write access to repositories (for exporting)
You can revoke access at any time from your GitHub Settings → Applications → Authorized OAuth Apps.
Step 3: Confirm Connection
Once authorized, you’ll see your GitHub username displayed in the sidebar menu. You’re now ready to export Workers!Exporting a Worker
From the Worker View
- Open the Worker you want to export
- Click the Export to GitHub button
- Choose export options:
- Repository: Select existing or create new
- Branch: Choose which branch to push to
- Commit message: Describe your changes
Export Options
- New Repository
- Existing Repository
Create a fresh repository for your Worker:
- Select “Create new repository”
- Enter a repository name
- Choose public or private visibility
- Click Export
What Gets Exported
When you export a Worker, Constants creates a complete project structure:Running Exported Code Locally
Prerequisites
- Python 3.9 or higher
- pip (Python package manager)
Steps
Syncing Changes
Currently, export is one-way: from Constants to GitHub. If you modify the code in your repository, those changes won’t automatically sync back to Constants.Coming soon: Two-way sync will allow you to push changes from your IDE back to Constants.
Workflow Recommendation
For ongoing development:- Prototype in Constants - Use natural language to quickly build your app
- Export when ready - Push to GitHub once you’re happy with the base
- Continue in IDE - Make detailed changes in your preferred editor
- New features in Constants - Come back for major additions, then re-export
Disconnecting GitHub
To disconnect your GitHub account:- Click your profile icon in the sidebar
- Find your GitHub username in the menu
- Click the × button next to it
- Confirm disconnection
Troubleshooting
Can't see my repositories
Can't see my repositories
Make sure you’ve granted Constants access to the repositories you want to use. You may need to:
- Go to GitHub → Settings → Applications
- Find Constants in Authorized OAuth Apps
- Click to review and grant additional repository access
Export failed
Export failed
Common causes:
- Repository name already exists (for new repos)
- Insufficient permissions on the target repo
- Network connectivity issues
Branch conflicts
Branch conflicts
If the branch already has content, Constants will attempt to merge. If there are conflicts:
- Export to a new branch instead
- Merge manually in GitHub or your IDE
Best Practices
Use Descriptive Names
Name your repositories clearly so you can find them later. Consider prefixes like
constants- for exported Workers.Export Often
Export after significant changes to maintain a history of your Worker’s evolution.
Add Documentation
The generated README is a starting point. Add your own notes about how to use and configure the app.
Review Before Push
Check the generated code before exporting to ensure it meets your standards.
