Deploy current Git repository to the Developer Platform using MCP tools. Use when user asks to deploy, to deploy their project, or wants to push code to production. Covers pre-flight checks, GitHub OAuth, pipeline creation with environment variable detection, deployment triggering, and monitoring.
Install
npx skillscat add chronoaiproject/chrono-cli/chrono-deploy Install via the SkillsCat registry.
Deploy Current Project
Deploy the current Git repository using developer-platform MCP.
Pre-Flight Check: Verify Project Structure
IMPORTANT: Before deploying, you MUST verify the project structure is correct.
First, follow the chrono-precheck skill:
- Read the chrono-precheck skill to understand the verification steps
- Check if
backend/Dockerfileexists (for backend/fullstack projects) - Verify frontend is a valid SPA (for frontend/fullstack projects)
- Ensure all required files are in place
# Quick verification checks:
# For fullstack/backend projects:
test -f backend/Dockerfile && echo "✓ Backend Dockerfile exists" || echo "✗ Missing backend/Dockerfile"
# For frontend projects:
grep -q '"build"' frontend/package.json 2>/dev/null && echo "✓ Frontend has build script" || echo "✗ Frontend missing build script"
grep -q '"build"' package.json 2>/dev/null && echo "✓ Root has build script" || echo "✗ Root missing build script"❌ If checks fail:
- Follow the chrono-precheck skill to fix the structure
- Create the required Dockerfile for backend projects
- Ensure build scripts exist for frontend projects
- Only proceed with deployment once all checks pass
✅ If all checks pass: Continue with deployment below.
Step 0: Check for Project Metadata
First, check if .chrono/metadata.yaml exists:
if [ -f .chrono/metadata.yaml ]; then
echo "✓ Found project metadata"
cat .chrono/metadata.yaml
else
echo "⚠ No metadata found - will detect project structure"
fiIf metadata exists:
- Use the detected project type, tech stack, and middleware directly
- Skip to Step 3 with pre-populated values
- The metadata contains: project type, frameworks, ports, dockerfile paths, env vars
If no metadata:
- Continue with detection steps below
- Consider running "chrono detect --save" to create metadata for faster future deployments
Step 1: Check Git Status
git config --get remote.origin.url
git branch --show-current
git status --porcelain
git log origin/$(git branch --show-current)..HEAD --oneline 2>/dev/nullParse repo as owner/repo from the URL.
Pre-flight:
- Uncommitted changes? → Ask to commit first
- Unpushed commits? → Ask to push first, show the commits
- Clean? → Continue
Step 2: Check GitHub Connection
Use check_github_connection. If not connected:
Use
start_github_device_flowto get the userCode and deviceCodeOpen browser by running:
open "https://github.com/login/device"Display the code prominently to the user like this:
GitHub Authorization
I've opened GitHub in your browser.
Enter this code:
XXXX-XXXXThen click Continue → Authorize
Use
poll_github_device_flowwith the deviceCode until success (poll every 5 seconds)
Step 3: Find or Create Pipeline
Use list_pipelines to find existing pipeline for this repo+branch.
If exists: Use it.
If not: Create a new pipeline:
3a. Get Project Information
Option A: From .chrono/metadata.yaml (if exists)
- Read project type (frontend/backend/fullstack)
- Use detected frameworks, ports, and middleware
- Use detected environment variables
- Skip detection steps
Option B: Detect Project (if no metadata)
detect_repo_typeto get app type (frontend/backend/fullstack)list_projects/create_projectAnalyze code for middleware dependencies:
Before asking the user, scan the codebase to detect middleware:
For Node.js (check package.json dependencies):
mongodb,mongoose,@prisma/client(with mongodb) → suggest MongoDBredis,ioredis,@redis/client→ suggest Redispg,postgres,@prisma/client(with postgresql) → suggest PostgreSQL
For Python (check requirements.txt or pyproject.toml):
pymongo,motor,mongoengine→ suggest MongoDBredis,aioredis→ suggest Redispsycopg2,asyncpg,sqlalchemy→ suggest PostgreSQL
For Go (check go.mod):
go.mongodb.org/mongo-driver→ suggest MongoDBgithub.com/redis/go-redis,github.com/go-redis/redis→ suggest Redisgithub.com/lib/pq,github.com/jackc/pgx→ suggest PostgreSQL
*For .NET/C# (check .csproj PackageReference or packages.config):
MongoDB.Driver→ suggest MongoDBStackExchange.Redis,Microsoft.Extensions.Caching.StackExchangeRedis→ suggest RedisNpgsql,Npgsql.EntityFrameworkCore.PostgreSQL→ suggest PostgreSQL
Read and parse .env files:
REQUIRED: You MUST read .env files to detect environment variables.
Search for .env files in this order:
# Check which .env files exist ls -la .env* 2>/dev/null ls -la frontend/.env* 2>/dev/null ls -la backend/.env* 2>/dev/nullRead files in priority order (first found wins for each variable):
For Frontend (check
frontend/first, then root):.env.production→ production values (preferred).env.local→ local overrides.env→ default values
For Backend (check
backend/first, then root):.env.production.env.local.env
Parse each .env file:
# Read and display env vars (excluding comments and empty lines) grep -v '^#' .env | grep -v '^$' | grep '='Identify framework-specific prefixes:
NEXT_PUBLIC_*→ Next.js (exposed to browser)REACT_APP_*→ Create React App (exposed to browser)VITE_*→ Vite (exposed to browser)VUE_APP_*→ Vue CLI (exposed to browser)- No prefix → Backend-only (keep server-side)
Classify variables:
Frontend (public - baked into bundle):
NEXT_PUBLIC_*,REACT_APP_*,VITE_*,VUE_APP_*- These are visible in browser, never put secrets here!
- Goes in
frontendEnvVars
Backend (non-sensitive config):
- ONLY these types:
PORT,LOG_LEVEL,NODE_ENV,HOST,DEBUG - Simple configuration that isn't sensitive
- Goes in
backendEnvVars
Secrets (sensitive data - stored securely):
- MUST go to secrets if name contains:
KEY,SECRET,TOKEN,PASSWORD,CREDENTIAL,AUTH,PRIVATE - Pattern match examples:
*_API_KEY,*_SECRET,*_TOKEN,JWT_*,*_PASSWORD - Specific examples:
LLM_API_KEY,OPENAI_API_KEY,JWT_SECRET,DATABASE_PASSWORD,AUTH_TOKEN - ALWAYS use
secretsfield for these, NEVERbackendEnvVars - Goes in
secretsfield - Stored encrypted, injected at runtime via K8s secrets
⚠️ CRITICAL: When in doubt, put it in
secrets. It's safer to over-protect than under-protect.Present detected configuration and ASK user to confirm:
You MUST show the user what you detected and get confirmation before creating the pipeline.
Format your message like this:
Detected Configuration
Project Type: {fullstack/backend/frontend}
Backend Port: {detected port, default 3000}
Middleware Detected:
- {MongoDB/Redis/PostgreSQL or "None detected"}
Frontend Environment Variables: (public, baked into bundle)
Variable Value NEXT_PUBLIC_API_URL https://api.example.com NEXT_PUBLIC_APP_NAME MyApp Backend Environment Variables: (private, injected via K8s secrets)
Variable Value PORT 3000 LOG_LEVEL info Secrets: (sensitive data, stored securely via K8s secrets)
⚠️ Any variable with KEY, SECRET, TOKEN, PASSWORD, AUTH in the name goes here!Secret Value LLM_API_KEY sk-xxx... OPENAI_API_KEY sk-xxx... JWT_SECRET (please provide) DATABASE_PASSWORD (please provide)
Please confirm or update:
- Are these environment variables correct?
- Do you need to add any additional variables?
- Please provide values for the secrets listed above
- Should I provision MongoDB/Redis?
Wait for user response before proceeding.
If user adds/modifies variables:
- Update your list with their changes
- Confirm the final list before creating pipeline
If no .env files found:
- Ask: "I didn't find any .env files. Do you have environment variables to configure?"
- For backend: "What port does your backend listen on?" (default: 3000)
For middleware:
- If detected: "I detected {middleware} dependencies. Should I provision these?"
- If not detected: "Do you need a database or cache? (MongoDB, Redis, PostgreSQL)"
- MongoDB → auto-injects
MONGODB_URIandMONGODB_DATABASE - Redis → auto-injects
REDIS_URL - PostgreSQL → auto-injects
DATABASE_URL
For object storage (file upload):
- Ask: "Does your app need file upload functionality? (images, documents, etc.)"
- If yes, note: Object storage can be enabled after deployment using
configure_storage - Object storage → auto-injects
CHRONO_CDN_URL(CDN base URL)
create_pipelinewith:- name and appName: Both use format {repo}-{branch-short}. Keep short and readable.
- Detected settings from step 1
frontendEnvVars: public frontend variables (NEXT_PUBLIC_*, etc.)backendEnvVars: ONLY non-sensitive config (PORT, LOG_LEVEL, NODE_ENV, HOST)secrets: ALL variables containing KEY, SECRET, TOKEN, PASSWORD, AUTH (e.g., LLM_API_KEY, JWT_SECRET, DATABASE_PASSWORD)middleware:["mongodb"],["redis"], or["mongodb", "redis"]- Backend port if not 8080
⚠️ IMPORTANT: Double-check that no secrets ended up in
backendEnvVars. Any *_KEY, *_SECRET, *_TOKEN MUST be insecrets.Show the user the generated URLs from the response:
- Frontend URL: https://{appName}.chrono-ai.fun
- Backend URL: https://{appName}-api.chrono-ai.fun
Step 4: Deploy
Use trigger_pipeline_run with pipelineId.
Step 5: Monitor
Use get_run_status to poll progress. Poll every 15 seconds (builds take 2-5 minutes).
Report: stages, success URL, or failure details.
Post-Deployment Verification (Optional)
After successful deployment, verify the application is running correctly:
# Check deployment health
get_deployment_status(pipelineId)
# Get pod logs for troubleshooting
get_deployment_logs(pipelineId)
# Verify env vars are set correctly (secrets masked)
get_pod_env_vars(pipelineId)Enable Object Storage (If Needed)
If your app requires file upload, enable S3 object storage after deployment:
Use the configure_storage MCP tool:
{
"pipelineId": "<pipeline-id>",
"storageType": "object_storage",
"enabled": true
}Success response:
{
"message": "S3 Object Storage successfully enabled for pipeline",
"pipelineId": "<pipeline-id>",
"appName": "<app-name>",
"storageType": "object_storage",
"enabled": true,
"status": "enabled"
}Environment variable injected:
CHRONO_CDN_URL=https://cdn.chrono-ai.fun/{appName}
To disable:
{
"pipelineId": "<pipeline-id>",
"storageType": "object_storage",
"enabled": false
}Note: See chrono-storage skill for upload implementation examples.
Tip: Create Metadata for Faster Future Deployments
After successful deployment, create metadata to skip detection next time:
chrono detect --saveThis creates .chrono/metadata.yaml with your project configuration.
Important Notes
- Deployments are manual only. Use /deploy or trigger_pipeline_run each time you want to deploy new code.
- Automatic deployments on git push are NOT supported.