Quick Reference¶
Fast lookup for common Krill configurations.
Minimal Recipe¶
Execute Types¶
Pixi¶
execute:
type: pixi
task: start-server
environment: production # optional
working_dir: ./services # optional
stop_task: cleanup # optional
ROS2¶
execute:
type: ros2
package: nav2_bringup
launch_file: navigation_launch.py
launch_args: # optional
use_sim_time: "false"
map: "/maps/map.yaml"
working_dir: ./ros2_ws # optional
Docker¶
execute:
type: docker
image: nginx:latest
volumes: # optional
- "/host:/container"
- "/data:/app:ro"
ports: # optional
- "8080:80"
- "443:443"
privileged: false # optional
network: bridge # optional
Shell¶
execute:
type: shell
command: npm start
working_dir: ./app # optional
stop_command: npm stop # optional
Health Checks¶
Heartbeat¶
TCP¶
HTTP¶
health_check:
type: http
port: 8080
path: /health # optional, default: /health
expected_status: 200 # optional, default: 200
Script¶
Dependencies¶
Simple (wait for start)¶
Conditional (wait for healthy)¶
Policies¶
Never Restart¶
Always Restart¶
Restart on Failure¶
Common Flags¶
Critical Service¶
GPU Required¶
Complete Examples¶
Simple Web App¶
version: "1"
name: webapp
services:
backend:
execute:
type: docker
image: api:latest
ports:
- "8000:8000"
health_check:
type: http
port: 8000
path: /health
policy:
restart: always
ROS2 Robot¶
version: "1"
name: robot
env:
ROS_DOMAIN_ID: "42"
services:
lidar:
execute:
type: ros2
package: ldlidar_ros2
launch_file: ldlidar.launch.py
health_check:
type: tcp
port: 4048
navigation:
execute:
type: ros2
package: nav2_bringup
launch_file: navigation_launch.py
dependencies:
- lidar: healthy
critical: true
Microservices¶
version: "1"
name: microservices
services:
database:
execute:
type: docker
image: postgres:15
health_check:
type: tcp
port: 5432
backend:
execute:
type: pixi
task: start
dependencies:
- database: healthy
health_check:
type: http
port: 8000
frontend:
execute:
type: docker
image: frontend:latest
ports:
- "3000:3000"
dependencies:
- backend: healthy
Duration Format¶
| Unit | Example | Description |
|---|---|---|
ms |
500ms |
Milliseconds |
s |
5s |
Seconds |
m |
2m |
Minutes |
h |
1h |
Hours |
CLI Commands¶
# Start daemon and open TUI
krill up recipe.yaml
# Start daemon only (no TUI)
krill up recipe.yaml -d
# Connect to running daemon
krill
# Stop all services and daemon
krill down
# View logs
krill logs service-name
# Restart service
krill restart service-name
# Stop service
krill stop service-name
TUI Keybindings¶
| Key | Action |
|---|---|
↑/k |
Previous service |
↓/j |
Next service |
Enter |
View logs |
d |
Detail view |
r |
Restart service |
s |
Stop service |
S |
Stop daemon |
q |
Quit TUI |
h |
Help |
Validation Rules¶
Service Names¶
- Only alphanumeric, hyphens, underscores
- Cannot be empty
- Examples:
my-service,camera_0,lidar1
Shell Commands¶
Rejected patterns:
- Pipes: |
- Redirections: >, <, >>
- Command substitution: `, $()
- Background: &
- Command chaining: ;, &&, ||
Safe commands: