CLI Reference
The kl CLI manages your workspace from within the dev container. Most commands support interactive mode when run without arguments.
Quick Start
kl status # Show workspace info
kl pkg add nodejs python # Install packages
kl env connect # Connect to environment (interactive)
kl intercept start # Intercept a service (interactive)
kl expose 3000 # Expose port with public URL
kl pkgaliases: package, pManage Nix packages in your workspace.
Search packages
kl pkg search <query> # Search available packages
kl p s nodejs # Short form
Add packages
kl pkg add # Interactive mode with fuzzy search
kl pkg add nodejs python # Add multiple packages
kl pkg add nodejs --exact # Pin to exact version (slower)
Install with version control
kl pkg install nodejs --version 20.0.0
kl pkg install python --channel nixos-24.05
kl pkg install curl --commit abc123def
Manage installed
kl pkg list # List installed packages
kl pkg uninstall vim # Remove package
kl envaliases: environment, eConnect to environments and access services by name.
kl env connect # Interactive environment selection
kl env connect my-env # Connect to specific environment
kl env disconnect # Disconnect (removes intercepts)
kl env status # Show connection status
kl interceptaliases: int, iRoute service traffic to your workspace for debugging.
kl intercept start # Interactive service & port selection
kl intercept start api # Start intercepting specific service
kl intercept stop api # Stop intercepting
kl intercept list # List active intercepts
kl intercept status # Show intercept status
kl statusaliases: st, sDisplay workspace information including phase, resources, access URLs, and timing.
kl status # Show workspace info
Shows:
- • Workspace name & owner
- • Current phase
- • Resource usage (CPU, Memory, Storage)
Also includes:
- • Access URLs (VS Code, SSH)
- • Start time & last activity
- • Active connections count
kl configaliases: cfg, cView and update workspace configuration.
kl config get # Show all configuration
kl config get display-name # Get specific value
kl config set display-name "My Workspace"
kl config set git.user-email "[email protected]"
Available keys:
display-namegit.user-namedescriptiongit.user-emailauto-stopgit.default-branchidle-timeoutenv.<VAR_NAME>max-runtimevscode-version
kl exposeExpose workspace ports with public URLs for HTTP services.
kl expose 3000 # Expose port 3000
kl expose list # List exposed ports
kl expose remove 3000 # Remove exposed port
Generates URLs like https://p3000-abc.subdomain.khost.dev
kl imageBuild and push container images to Kloudlite registry.
kl image push myapp # Build and push image
kl image push -f Dockerfile.prod myapp
kl image push --build-arg VERSION=1.0 myapp
Other Commands
kl mcp
Start MCP server for AI assistants. Exposes 29 tools for Claude and other AI tools.
kl completion
Generate shell completions for bash, zsh, fish, or powershell.
kl version alias: v
Display CLI version information.