@sylphx/flow — Meta-CLI orchestration layer for AI coding CLIs. Flow doesn't replace AI CLIs, it orchestrates them.
- Auto-detect environment (Claude Code / OpenCode)
- Auto-install missing dependencies
- Auto-upgrade before each session
- Configure and execute target CLI
- Graceful cleanup (restore configs, remove git skip-worktree)
Monorepo with single package:
packages/flow/— Main CLI package (@sylphx/flow)src/commands/— CLI commands (flow, settings, upgrade)src/core/— Core managers (session, target, cleanup, attach)src/services/— Business logic (config, MCP, installer)src/targets/— Target CLI adapters (Claude Code, OpenCode)src/config/— Configuration schemas and defaultssrc/utils/— Utilitiesassets/— Static assets (agents, rules)
| Choice | Why |
|---|---|
| Bun (runtime + pkg mgr) | Native TypeScript, fast, single toolchain |
| Commander.js | CLI framework — mature, well-typed |
| Bunup | Zero-config build for Bun |
| Turbo | Monorepo task orchestration |
| Biome | Lint + format in one tool, fast |
| Zod v4 | Schema validation with TypeScript inference |
- Target Adapter Pattern — Each AI CLI has an adapter implementing common interface
- Functional Core — Result types for error handling
- Config Transform Pipeline — Global settings → Target-specific format → Per-project config
- Cleanup Registration — Components register cleanup handlers for graceful shutdown
Flow uses git update-index --skip-worktree to hide temporary config changes from git status, preventing accidental commits.
Global settings stored in ~/.sylphx-flow/:
settings.json— Default agent, target, update preferencesflow-config.json— Enabled agents, rules, output stylesmcp-config.json— MCP server configurationsprovider-config.json— AI provider API keys (permissions: 600)