Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Evincere/klisk/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Klisk provides one-command deployment to Google Cloud Run:- Automatic container builds
- HTTPS endpoints
- Auto-scaling
- Zero-downtime deployments
- Environment variable management
Google Cloud offers $300 in free credits for new accounts. Cloud Run pricing is pay-per-request with a generous free tier.
Prerequisites
1. Google Cloud CLI
Install thegcloud CLI:
2. Authenticate
3. Create or Select a Project
4. Enable Billing
Enable billing at:Quick Start
Step 1: Initialize Deployment
From your project directory:Dockerfile— Container definition.dockerignore— Files to exclude from buildrequirements.txt— Python dependenciesklisk-X.Y.Z.whl— Klisk wheel for installation
Step 2: Configure Environment Variables
Ensure your.env file has real API keys:
.env
Step 3: Deploy
- Check prerequisites (gcloud, auth, billing)
- Enable required APIs
- Grant Cloud Build permissions
- Build your container
- Deploy to Cloud Run
Configuration Options
Custom Service Name
klisk.config.yaml
Specific Region
us-central1(Iowa)us-east1(South Carolina)europe-west1(Belgium)asia-northeast1(Tokyo)- Full list
Deploy Specific Project
All Options
Generated Files
Dockerfile
klisk deploy init.
.dockerignore
requirements.txt
For standard OpenAI-only projects:Klisk automatically detects if your project uses non-OpenAI models by scanning for provider prefixes (
anthropic/, gemini/, etc.) and includes the [litellm] extra.Environment Variables
Klisk automatically transfers environment variables from your.env file to Cloud Run.
How It Works
- Reads
.envfrom your project directory - Filters out placeholders (
sk-your-key-here,xxx, etc.) - Passes valid keys to
gcloud run deploy --set-env-vars
Skipped Variables
Klisk will skip and warn about:- Empty values
- Placeholders:
sk-your-key-here,your-key-here,xxx,changeme,todo
Manual Environment Variables
You can also set environment variables directly in the Cloud Console:- Go to Cloud Run Services
- Click your service
- Click Edit & Deploy New Revision
- Go to Variables & Secrets tab
- Add environment variables
API Permissions
Required APIs
Klisk automatically enables these APIs:run.googleapis.com— Cloud Runcloudbuild.googleapis.com— Container buildsartifactregistry.googleapis.com— Container registry
Service Account Permissions
Klisk grants the default compute service account these roles:roles/storage.objectAdmin— Access build artifactsroles/logging.logWriter— Write logsroles/artifactregistry.writer— Push containers
These permissions are required for Cloud Build to push your container and are automatically configured on first deploy.
Updating Your Deployment
To deploy changes:- New revision is built
- Traffic gradually shifts to new revision
- Old revision is kept for rollback
Monitoring and Logs
View Logs
Metrics
View request count, latency, and errors:Health Checks
Use the/health endpoint:
Troubleshooting
Deployment Failed
Error:Permission denied or API not enabled
Solution: Re-run the deployment. Permission propagation can take a few seconds:
Build Timeout
Error:Deployment timed out after 10 minutes
Solution: Check build status:
Environment Variables Not Working
Issue: Agent fails with “API key not found” Solution: Verify environment variables are set:No Real API Keys Warning
.env with real keys:
.env
Cost Optimization
Cloud Run pricing is based on:- Requests: Free tier includes 2M requests/month
- Compute time: Free tier includes 360,000 GiB-seconds/month
- CPU allocation: Pay only while processing requests (default)
Minimum Instances
Keep at least one instance warm to reduce cold starts:Maximum Instances
Limit concurrent instances to control costs:Custom Domains
Map a custom domain to your Cloud Run service:Rollback
Rollback to a previous revision:Next Steps
REST API
Integrate your deployed agent via HTTP
Production Server
Learn about klisk serve features