How prajith48/airlock works
Airlock is a local-first security CLI with three distinct protections: a development-server reverse proxy, an MCP stdio watcher, and an in-memory secrets broker. The principal workflow starts at the CLI, which dispatches to a protection component; the Guard then validates requests before proxying them to the private development server. The README documents the MCP and Secret Gate workflows, but their full implementation was not sampled, so those relationships are cited to the README. The shared logging and error-handling layer is included; no unshown integrations are inferred.
Main entry points: cli.ts Airlock CLI · watcher.ts MCP Watcher · runner.ts Guard Runner · proxy.ts Reverse Proxy
Components 17
CLI
- Airlock CLI
src/cli.ts
Dev Server Guard
- Guard Runner
src/guard/runner.ts - Header Validation
src/guard/validation.ts - Reverse Proxy
src/guard/proxy.ts
MCP Watch
- MCP Watcher
src/mcpwatch/watcher.ts
Secret Gate
- Secret Broker
src/secretgate/broker.ts - Secret Client
src/secretgate/client.ts
Shared Utilities
- Path Detection
src/utils/pathValidation.ts - Structured Logger
src/utils/logger.ts - Error Handler
src/utils/errorHandler.ts - CLI Output
src/utils/banner.ts
Other components
- Developer
- Browser
- Dev Server
- AI Agent
- MCP Server
- Secrets Consumer
Connections 20
- Developer → Airlock CLI: runs commands
README.md - Airlock CLI → Guard Runner: starts guard
src/cli.ts - Guard Runner → Header Validation: validates requests
src/guard/runner.ts - Guard Runner → Reverse Proxy: starts proxy
src/guard/runner.ts - Browser → Reverse Proxy: sends requests
README.md - Reverse Proxy → Dev Server: proxies traffic
README.md - Airlock CLI → MCP Watcher: starts watcher
src/cli.ts - AI Agent → MCP Watcher: uses stdio relay
README.md - MCP Watcher → MCP Server: relays stdio
README.md - MCP Watcher → Path Detection: checks paths
src/mcpwatch/watcher.ts - Airlock CLI → Secret Broker: loads secrets
src/cli.ts - Secrets Consumer → Secret Client: requests secrets
README.md - Secret Client → Secret Broker: fetches over socket
README.md - Airlock CLI → CLI Output: prints status
src/cli.ts - Airlock CLI → Error Handler: handles errors
src/cli.ts - Reverse Proxy → Error Handler: reports failures
src/guard/proxy.ts - Error Handler → Structured Logger: logs events
src/utils/errorHandler.ts - Guard Runner → Structured Logger: logs events
src/guard/runner.ts - Header Validation → Structured Logger: logs warnings
src/guard/validation.ts - MCP Watcher → Structured Logger: logs alerts
src/mcpwatch/watcher.ts