Documentation Index
Fetch the complete documentation index at: https://docs.constants.io/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Constants integrates with GitHub to turn your existing scripts into tools:- Import scripts directly from any repository
- Scan entire repos with AI to discover tool candidates
- Bulk-create tools from scan results
- Track provenance — know exactly what code is running
Connecting GitHub
Step 1: Open GitHub Settings
- Click your profile icon in the sidebar
- Look for the GitHub section
- Click Connect GitHub
Step 2: Authorize Constants
You’ll be redirected to GitHub to authorize the Constants app. We request:- Read access to your repositories (for importing scripts)
- Read access to your profile information
You can revoke access at any time from your GitHub Settings → Applications → Authorized OAuth Apps.
Step 3: Confirm Connection
Once authorized, your GitHub username appears in the sidebar. You’re ready to import and scan.Importing a Script
From the Composer
- Click Create new Tool
- Click the GitHub button or paste a URL directly
- Enter the repository URL:
URL Formats Supported
- File URL
- Directory URL
- Repository URL
Point to a specific script:
Repository Scanning
What Is It?
Instead of importing scripts one by one, you can let AI scan your entire repository to discover scripts and utilities worth turning into tools.How Scanning Works
Connect & Select Repository
Connect your GitHub account and select a repository to scan. Both public and private repos are supported.
AI Explores Your Codebase
Constants explores the repo with read-only access — identifying entry points, analyzing dependencies, and understanding project structure.
Review Candidates
The scan produces a list of tool candidates, each with:
- Name and description
- Category (data processing, API integration, etc.)
- Confidence score
- Source file path
Scan Progress
While a scan is running, a progress banner shows:- Current status and phase
- Number of candidates discovered so far
- Any errors or warnings
Private Repositories
Private repos are fully supported. The scan uses your GitHub OAuth token to access the repository — your credentials are never stored in the scanning environment.Branch Selection
After entering a repository URL:- Constants fetches available branches
- Select your target branch from the dropdown
- The tool uses code from that branch
What Gets Imported
When you import a script, Constants:Analyzes the Code
- Detects language and dependencies
- Identifies the main entrypoint
- Parses function signatures, CLI arguments, and docstrings
- Maps required credentials
Generates the Tool
- Interface — Input/output definitions with types and validation
- Frontend — Form-based UI with file upload and result display
- Backend — Execution code with access to built-in utilities
- Runtime config — Compute tier, dependencies, resource limits
Troubleshooting
Can't access repository
Can't access repository
Make sure you’ve:
- Connected your GitHub account
- Granted access to the repository (for private repos)
- Have at least read permission on the repository
Script not detected during import
Script not detected during import
If Constants can’t find the entrypoint:
- Ensure the file has a recognized extension (
.py,.js, etc.) - Add a clear
if __name__ == "__main__"block for Python - Use a descriptive filename (e.g.,
main.py,run.py)
Scan found no candidates
Scan found no candidates
If the scan returns few or no candidates:
- Ensure the repo contains executable scripts (not just libraries)
- Repos with clear entry points and CLI tools yield better results
- Very large monorepos may need path-scoped imports instead of full scans
Dependencies not found
Dependencies not found
Ensure your repo includes:
requirements.txtfor Pythonpackage.jsonfor JavaScript/TypeScript- Or specify dependencies manually in the tool settings
Branch not showing
Branch not showing
If a branch doesn’t appear:
- Check that it exists on the remote
- Ensure you have access to view the branch
- Try refreshing the branch list
Best Practices
Scan Before Importing
For repos with many scripts, use the scan feature first to discover the best candidates.
Use Clear Entrypoints
Scripts with obvious entry points (
main.py, index.js) produce better tools.Include Dependencies
Always include a
requirements.txt or package.json so Constants can set up the environment correctly.Add Documentation
Docstrings and comments help the AI generate better input/output descriptions.
Recommended Workflow
For teams using Constants with GitHub:- Develop scripts in your repository as usual
- Scan the repo to discover tool candidates
- Review candidates and create tools from the best ones
- Share with teammates who can run without any setup
- Iterate via conversation to refine tool behavior
- Re-import when you want to update with source changes
