mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-15 20:03:05 +00:00
Composable agent runtime monorepo built on the pi ecosystem
Complete overhaul of export-html.ts to replicate the TUI renderer's visual design: **Exact TUI color matching:** - User messages: rgb(52, 53, 65) dark slate background - Tool pending: rgb(40, 40, 50) dark blue-gray - Tool success: rgb(40, 50, 40) dark green - Tool error: rgb(60, 40, 40) dark red - Body background: rgb(24, 24, 30) very dark - Text colors matching chalk: cyan for paths, dimmed gray for output **Tool formatting (matching ToolExecutionComponent):** - bash: Bold `$ command`, dimmed output (max 5 lines) - write: Bold header with cyan path, line count, content preview (max 10 lines) - read: Bold header with cyan path, content preview (max 10 lines) - edit: Bold header with cyan path, unified diff with line numbers - All tools show "... (N more lines)" indicators **Additional improvements:** - Use session filename + .html for default output - Shorten paths with tilde notation (~) - Replace tabs with 3 spaces - Monospace font matching terminal aesthetic - Minimal, clean design with no borders/boxes - Print-friendly styles The HTML export now looks identical to the TUI version. |
||
|---|---|---|
| .husky | ||
| docs | ||
| packages | ||
| scripts | ||
| .gitignore | ||
| .npmrc | ||
| biome.json | ||
| CLAUDE.md | ||
| LICENSE | ||
| package-lock.json | ||
| package.json | ||
| pi-mono.code-workspace | ||
| README.md | ||
| tsconfig.base.json | ||
| tsconfig.json | ||
Pi Monorepo
A collection of tools for managing LLM deployments and building AI agents.
Packages
- @mariozechner/pi-ai - Unified multi-provider LLM API
- @mariozechner/pi-web-ui - Web components for building AI chat interfaces
- @mariozechner/pi-proxy - CORS proxy for browser-based LLM API calls
- @mariozechner/pi-tui - Terminal UI library with differential rendering
- @mariozechner/pi-agent - General-purpose agent with tool calling and session persistence
- @mariozechner/pi - CLI for managing vLLM deployments on GPU pods
Related:
- sitegeist - Browser extension for AI-powered web navigation (uses pi-ai and pi-web-ui)
Development
This is a monorepo using npm workspaces for package management and a dual TypeScript configuration for development and building.
Common Commands
# Install all dependencies
npm install
# Build all packages (required for publishing to NPM)
npm run build
# Clean out dist/ folders in all packages
npm run clean
# Run linting, formatting, and tsc typechecking (no build needed)
npm run check
# Run directly with tsx during development (no build needed)
cd packages/pods && npx tsx src/cli.ts
cd packages/agent && npx tsx src/cli.ts
Package Dependencies
The packages have the following dependency structure:
pi-tui -> pi-agent -> pi
When new packages are added, the must be inserted in the correct order in the build script in package.json.
TypeScript Configuration
The monorepo uses a dual TypeScript configuration approach:
- Root
tsconfig.json: Contains path mappings for all packages, used for type checking and development withtsx - Package
tsconfig.build.json: Clean build configuration withrootDirandoutDir, used for production builds
This setup allows:
- Type checking without building (
npm run checkworks immediately) - Running source files directly with
tsxduring development - Clean, organized build outputs for publishing
Versioning
All packages use lockstep versioning - they share the same version number:
# Bump patch version (0.5.0 -> 0.5.1)
npm run version:patch
# Bump minor version (0.5.0 -> 0.6.0)
npm run version:minor
# Bump major version (0.5.0 -> 1.0.0)
npm run version:major
These commands automatically:
- Update all package versions
- Sync inter-package dependency versions
- Update package-lock.json
Publishing
# Dry run to see what would be published
npm run publish:dry
# Publish all packages to npm
npm run publish
License
MIT