How nilbuild/slim works
Slim is a CLI for HTTPS local domains, path-based routing, and public sharing. Its main flow configures local certificates and ingress, starts a daemon, and serves requests through a reverse proxy to project ports. Other product branches manage project services and custom domains, expose tunnels, and provide inspection and cleanup commands. Some command implementations were not sampled; those nodes reflect documented capabilities, and links are omitted where source evidence was unavailable.
Main entry points: config.go Configuration · start.go Domain commands · setup.go First-run setup · server.go HTTPS proxy server
Components 25
CLI workflows
- Command entry
cmd/root.go - Domain commands
cmd/start.go - Project services
cmd/up.go - Project config
internal/project/project.go
Local HTTPS
- Configuration
internal/config/config.go - First-run setup
internal/setup/setup.go - Certificate authority
internal/cert/ca.go - Domain certificates
internal/cert/leaf.go - OS certificate trust
internal/cert/trust_linux.go - Port forwarding
internal/system/portfwd_darwin.go - Background daemon
internal/daemon/daemon.go - HTTPS proxy server
internal/proxy/server.go - Domain and path routing
internal/proxy/handler.go - Local project services
- Local state files
internal/config/paths.go
Internet sharing
- Share command
cmd/share.go - Tunnel client
internal/tunnel/client.go
Account services
- Custom domains
cmd/domain.go - Slim service
- CLI authentication
internal/auth/auth.go
Inspection and cleanup
- Logs and diagnostics
cmd/doctor.go - System checks
internal/doctor/doctor.go - Stop and uninstall
cmd/uninstall.go
Other components
- CLI user
- Public visitors
Connections 31
- CLI user → Command entry: runs commands
- Command entry → Domain commands: dispatches
- Domain commands → First-run setup: prepares local ingress
cmd/start.go - First-run setup → Certificate authority: generates CA
internal/setup/setup.go - First-run setup → OS certificate trust: trusts CA
internal/setup/setup.go - First-run setup → Port forwarding: enables forwarding
internal/setup/setup.go - Domain commands → Configuration: configures domains
cmd/start.go - Domain commands → Background daemon: starts daemon
cmd/start.go - Background daemon → Configuration: loads configuration
internal/daemon/daemon.go - Background daemon → HTTPS proxy server: starts server
internal/daemon/daemon.go - HTTPS proxy server → Configuration: loads domain routes
internal/proxy/server.go - HTTPS proxy server → Domain certificates: loads domain certificates
internal/proxy/server.go - HTTPS proxy server → Domain and path routing: routes requests
internal/proxy/server.go - Domain and path routing → Local project services: proxies HTTP
internal/proxy/handler.go - Project services → Project config: reads project config
README.md - Project services → Configuration: starts project services
README.md - CLI user → Share command: runs share
README.md - Share command → CLI authentication: requires login
cmd/share.go - Share command → Tunnel client: opens tunnel
cmd/share.go - Tunnel client → Slim service: connects by WebSocket
internal/tunnel/client.go - Slim service → Public visitors: serves public URL
README.md - Tunnel client → Local project services: forwards requests
internal/tunnel/client.go - Custom domains → CLI authentication: requires login
cmd/domain.go - Custom domains → Slim service: manages DNS verification
cmd/domain.go - CLI user → Logs and diagnostics: runs diagnostics
README.md - Logs and diagnostics → System checks: runs checks
- System checks → Certificate authority: checks certificates
internal/doctor/doctor.go - System checks → Background daemon: checks daemon status
internal/doctor/doctor.go - System checks → Port forwarding: checks forwarding
internal/doctor/doctor.go - Stop and uninstall → Configuration: removes local setup
README.md - Configuration → Local state files: uses state paths
internal/config/config.go