mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-15 05:02:07 +00:00
- Set up npm workspaces for three packages: pi-tui, pi-agent, and pi (pods) - Implemented dual TypeScript configuration: - Root tsconfig.json with path mappings for development and type checking - Package-specific tsconfig.build.json for clean production builds - Configured lockstep versioning with sync script for inter-package dependencies - Added comprehensive documentation for development and publishing workflows - All packages at version 0.5.0 ready for npm publishing
97 lines
No EOL
2.4 KiB
Markdown
97 lines
No EOL
2.4 KiB
Markdown
# Pi Monorepo
|
|
|
|
A collection of tools for managing LLM deployments and building AI agents.
|
|
|
|
## Packages
|
|
|
|
- **[@mariozechner/pi-tui](packages/tui)** - Terminal UI library with differential rendering
|
|
- **[@mariozechner/pi-agent](packages/agent)** - General-purpose agent with tool calling and session persistence
|
|
- **[@mariozechner/pi](packages/pods)** - CLI for managing vLLM deployments on GPU pods
|
|
|
|
## Development
|
|
|
|
This is a monorepo using npm workspaces for package management and a dual TypeScript configuration for development and building.
|
|
|
|
### Setup
|
|
|
|
```bash
|
|
# Install all dependencies
|
|
npm install
|
|
|
|
# Build all packages (required for production use)
|
|
npm run build
|
|
|
|
# Or 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
|
|
```
|
|
|
|
### Common Commands
|
|
|
|
```bash
|
|
# Clean all build artifacts and tsconfig.tsbuildinfo files
|
|
npm run clean
|
|
|
|
# Build all packages in dependency order
|
|
npm run build
|
|
|
|
# Run biome checks and TypeScript type checking (no build required)
|
|
npm run check
|
|
|
|
# Run tests (if present)
|
|
npm run test
|
|
```
|
|
|
|
### Package Dependencies
|
|
|
|
The packages have the following dependency structure:
|
|
|
|
`pi-tui` -> `pi-agent` -> `pi`
|
|
|
|
### 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 with `tsx`
|
|
- **Package `tsconfig.build.json`**: Clean build configuration with `rootDir` and `outDir`, used for production builds
|
|
|
|
This setup allows:
|
|
- Type checking without building (`npm run check` works immediately)
|
|
- Running source files directly with `tsx` during development
|
|
- Clean, organized build outputs for publishing
|
|
|
|
### Versioning
|
|
|
|
All packages use **lockstep versioning** - they share the same version number:
|
|
|
|
```bash
|
|
# 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:
|
|
1. Update all package versions
|
|
2. Sync inter-package dependency versions
|
|
3. Update package-lock.json
|
|
|
|
### Publishing
|
|
|
|
See [PUBLISHING.md](PUBLISHING.md) for the complete publishing workflow.
|
|
|
|
Quick version:
|
|
```bash
|
|
# Dry run to see what would be published
|
|
npm run publish:dry
|
|
|
|
# Publish all packages to npm
|
|
npm run publish:all
|
|
```
|
|
|
|
## License
|
|
|
|
MIT |