Terminal User Interface for Flocks project.
tui/
├── flocks/ # Flocks TUI core source code
│ ├── cli/cmd/tui/ # TUI main code
│ ├── provider/ # AI Provider
│ ├── tool/ # Tools
│ ├── lsp/ # LSP
│ └── ... # Other modules
├── sdk/ # SDK client
├── util/ # Utility functions
├── src/ # TUI entry point
│ └── index.ts # Main entry file
├── package.json # Dependency configuration
├── tsconfig.json # TypeScript configuration
├── bunfig.toml # Bun runtime configuration (important!)
└── node_modules/ # Installed dependencies
This is the most important configuration file, telling Bun how to preload SolidJS JSX transformer:
preload = ["@opentui/solid/preload"]Without this file, Bun cannot properly handle JSX syntax and will throw an error:
Export named 'jsxDEV' not found in module
Configures path aliases for cleaner import paths:
{
"paths": {
"@/*": ["./flocks/*"],
"@tui/*": ["./flocks/cli/cmd/tui/*"],
"@flocks-ai/sdk/v2": ["./sdk/v2/index.ts"]
}
}# In tui directory
cd tui
bun install# Connect to running server
bun run --conditions=browser ./src/index.ts attach http://localhost:8000# Automatically start backend and frontend
flocks tui
# Specify project directory
flocks tui -d /path/to/project
# Specify port
flocks tui -p 8080
# Continue existing session
flocks tui -s <session-id>The flocks tui command will:
- Start Flocks API server in background (default port 8000)
- Wait for server to be ready
- Start TUI frontend connecting to server
- Automatically clean up server process when TUI exits
- Bun: JavaScript/TypeScript runtime
- SolidJS: Reactive UI framework
- OpenTUI: Terminal UI framework
- TypeScript: Type safety
Key dependencies:
solid-js: 1.9.10@opentui/core: 0.1.74@opentui/solid: 0.1.74zod: 4.1.8- etc...
If you encounter Export named 'jsxDEV' not found error, ensure:
bunfig.tomlfile exists@opentui/solidpackage is correctly installed
# Clean and reinstall
rm -rf node_modules bun.lockb
bun installEnsure compatible Bun version is used:
bun --version # Should be 1.3.5 or higher- Directory rename:
flocks/→flocks/ flocks/cli/cmd/tui/routes/session/index.tsx- Fixed import path forparsers-config.tsflocks/cli/cmd/tui/component/logo.tsx- Updated to Flocks Logoflocks/cli/ui.ts- Updated CLI Logosrc/index.ts- Custom entry file with simplified CLI commands- Configuration path:
.flocks/→.flocks/ - Theme:
flocks.json→flocks.json
- OpenTUI framework: https://github.com/anomalyco/opentui