Alpha Feature — Source code editing is currently in alpha. Monk makes
targeted fixes to resolve deployment issues, not general code refactoring.
What It Does
When you deploy, Monk sometimes finds issues in your source code that block a successful deployment. Wrong ports, missing environment variables, broken connection strings, container build problems. Monk doesn’t just report these. It fixes them. Targeted, deployment-focused edits to get your app running.How It Works
When Monk Edits Code
During deployment, if Monk hits a fixable issue, it tells you what’s wrong and offers to fix it. Example — Wrong Port Configuration:- Approve — Apply the fix
- Reject — Skip it
- Revert — Undo after seeing the result
Types of Fixes
Deployment-related:- Port configuration — Aligning server port with Containerfile EXPOSE
- Environment variables — Reading from correct env var names
- Connection strings — Fixing database URLs, Redis hosts
- Build commands — Correcting package.json scripts, Makefiles
- Entry points — Fixing main files, startup commands
- Containerfile issues — EXPOSE directives, CMD/ENTRYPOINT
- Build scripts — Missing build steps, incorrect paths
- Health checks — Adding or fixing health check endpoints
- Dependencies — Critical missing dependencies for deployment
- Config file paths — Fixing paths that work locally but fail in containers
- Static file serving — Correct asset paths for containerized apps
- API endpoints — Environment-aware endpoint configuration
What Monk Won’t Touch
Monk’s code editing is strictly for deployment. It won’t:- Add new features to your application
- Refactor code for better structure
- Fix business logic bugs
- Optimize performance (unless it blocks deployment)
- Modify your application’s core functionality
Files Monk Can Edit
Source Code
- JavaScript/TypeScript:
*.ts,*.tsx,*.js,*.jsx,*.mjs,*.cjs - Python:
*.py - Go:
*.go - Java/Kotlin:
*.java,*.kt - Rust:
*.rs - Ruby:
*.rb - PHP:
*.php - C/C++:
*.c,*.cpp,*.h,*.hpp - Shell scripts:
*.sh,*.bash
Build & Configuration
- Package files:
package.json,requirements.txt,go.mod,Cargo.toml,Gemfile,composer.json - Build configs:
tsconfig.json,jsconfig.json,pyproject.toml,Makefile,Procfile - Container:
Containerfile,docker-compose.yml - CI/CD:
.github/workflows/*.yml,netlify.toml,vercel.json
Off-Limits
- Monk templates —
MANIFEST,*.yaml(use the template editor) - Environment files —
.env,.env.production(security) - Lock files —
package-lock.json,yarn.lock, etc. (integrity) - Generated files —
dist/,build/,target/directories - Binary files — Images, fonts, archives
Example Scenarios
Scenario 1: Port Mismatch
Problem: Containerfile exposes 3000, but Express app listens on 8080. Monk’s fix:Scenario 2: Missing Environment Variable
Problem: App crashes because DATABASE_URL isn’t read from the environment. Monk’s fix:Scenario 3: Incorrect Connection String
Problem: Hardcoded localhost Redis connection fails in production. Monk’s fix:Scenario 4: Container Build Issue
Problem: Containerfile COPY command fails because the path is wrong. Monk’s fix:When Code Editing Happens
During Deployment
Most often, during initial deployment:On Demand
You can ask directly:After Failed Deployments
If a deployment fails due to code issues:Limitations
This is an alpha feature. It works well for common deployment issues but may not catch every edge case.
Best suited for straightforward codebases. Complex fixes may still need human review.
Monk errs on the side of caution — if it’s unsure, it asks rather than guessing.
Autonomous Deployment
See how code editing fits into Monk’s deployment flow.
Configuration & Wiring
How Monk handles environment variables and service connections.

