Standalone vs Monorepo Development
Comprehensive guide to choosing between standalone and monorepo development approaches for ElizaOS plugins and projects
This guide helps you choose the right development approach for your ElizaOS project and provides detailed workflows for both standalone and monorepo development.
Overview
ElizaOS supports two primary development approaches:
- Standalone Development: Creating independent projects that depend on ElizaOS packages
- Monorepo Development: Contributing to or extending the ElizaOS monorepo directly
Each approach has distinct advantages and is suited for different types of projects and development scenarios.
Quick Decision Matrix
Factor | Standalone | Monorepo |
---|---|---|
Learning Curve | Lower | Higher |
Setup Time | Quick (5 minutes) | Longer (30+ minutes) |
Deployment | Simple | Complex |
Customization | Limited | Extensive |
Plugin Development | Ideal | Good |
Core Contributions | Not possible | Required |
Team Size | Small to Medium | Large |
Build Time | Fast | Slow |
Dependency Management | Simple | Complex |
Standalone Development
When to Choose Standalone
✅ Choose Standalone When:
- Building a single plugin or bot
- Rapid prototyping or proof of concept
- Small team or solo development
- Simple deployment requirements
- Using ElizaOS as a dependency
- Building commercial plugins
- Need quick iteration cycles
❌ Avoid Standalone When:
- Contributing to ElizaOS core
- Building multiple interconnected plugins
- Need to modify core functionality
- Complex multi-service architecture
Standalone Setup
1. Plugin Development
# Create a new plugin
elizaos create -t plugin myservice
cd plugin-myservice
# Start development
elizaos dev
2. Bot/Agent Development
# Create a new bot project
elizaos create -t project mybot
cd mybot
# Start development
elizaos dev
3. TEE (Trusted Execution Environment) Project
# Create a TEE project
elizaos create -t tee mytee
cd mytee
# Start development
elizaos dev
Standalone Project Structure
my-plugin/
├── src/
│ ├── index.ts # Main entry point
│ ├── plugin.ts # Plugin implementation
│ ├── actions/ # Action definitions
│ ├── providers/ # Provider implementations
│ └── services/ # Service logic
├── __tests__/ # Test files
├── images/ # Plugin assets
├── package.json # Dependencies and scripts
├── tsconfig.json # TypeScript configuration
├── tsup.config.ts # Build configuration
└── README.md # Documentation
Standalone Dependencies
{
"dependencies": {
"@elizaos/core": "^1.0.16",
"@elizaos/cli": "^1.0.16"
},
"devDependencies": {
"typescript": "^5.8.2",
"tsup": "^8.5.0"
}
}
Standalone Development Workflow
-
Development
# Hot reload development elizaos dev # Manual start (rebuild required after changes) elizaos start
-
Testing
# Run all tests elizaos test # Component tests only elizaos test component # E2E tests only elizaos test e2e
-
Building
bun run build
-
Publishing
# Initial publish elizaos publish # Updates npm version patch npm publish
Standalone Advantages
- Quick Setup: Get started in minutes
- Simple Deployment: Single package deployment
- Fast Builds: Only your code gets rebuilt
- Independent Versioning: Control your own release cycle
- Easy Distribution: npm package distribution
- Isolated Testing: Test in isolation
- Lower Complexity: Simpler dependency management
Standalone Limitations
- Limited Customization: Can't modify core behavior
- Version Dependency: Tied to ElizaOS release schedule
- No Core Access: Can't contribute to core features
- Plugin Boundaries: Limited inter-plugin communication
- Update Lag: Must wait for ElizaOS updates
Monorepo Development
When to Choose Monorepo
✅ Choose Monorepo When:
- Contributing to ElizaOS core
- Building multiple interconnected plugins
- Need to modify core functionality
- Large team with shared components
- Complex multi-service architecture
- Research and development projects
- Need cutting-edge features
❌ Avoid Monorepo When:
- Building simple plugins
- Quick prototyping
- Small team or solo development
- Commercial plugin development
- Simple deployment requirements
Monorepo Setup
1. Clone and Initialize
# Clone the repository
git clone https://github.com/elizaos/eliza.git
cd eliza
# Install dependencies
bun install
# Build all packages
bun run build
2. Create New Package
# Create new plugin in monorepo
cp -r packages/plugin-starter packages/plugin-myservice
cd packages/plugin-myservice
# Update package.json
vim package.json
3. Configure Workspace Dependencies
{
"name": "@elizaos/plugin-myservice",
"dependencies": {
"@elizaos/core": "workspace:*",
"@elizaos/server": "workspace:*"
}
}
Monorepo Structure
eliza/
├── packages/
│ ├── core/ # Core framework
│ ├── cli/ # Command-line interface
│ ├── client/ # Web client
│ ├── server/ # Server implementation
│ ├── app/ # Desktop application
│ ├── plugin-*/ # Plugin packages
│ └── your-plugin/ # Your new plugin
├── plugin-specification/ # Plugin specifications
├── scripts/ # Build and utility scripts
├── lerna.json # Lerna configuration
├── turbo.json # Turbo build configuration
└── package.json # Root package configuration
Monorepo Development Workflow
-
Development Environment
# Start full development stack bun run dev # Start specific services bun run start:app # Desktop app bun run start:client # Web client bun run start:docs # Documentation
-
Building
# Build all packages bun run build # Build specific packages bun run build:core bun run build:cli bun run build:client
-
Testing
# Run all tests bun test # Test specific packages bun run test:core bun run test:client bun run test:app
-
Package Management
# Add dependencies to specific package cd packages/my-plugin bun add some-package # Add workspace dependency bun add @elizaos/core@workspace:*
Monorepo Advantages
- Full Control: Modify any part of the system
- Cutting Edge: Access to latest features
- Shared Dependencies: Efficient dependency management
- Cross-Package Development: Easy inter-package communication
- Unified Testing: Test entire system integration
- Coordinated Releases: Synchronized package versions
- Code Reuse: Share code across packages
Monorepo Limitations
- Complex Setup: Longer initial setup time
- Slow Builds: Must build entire monorepo
- Large Repository: Significant disk space usage
- Steep Learning Curve: More complex development workflow
- Deployment Complexity: More complex deployment process
- Version Coupling: All packages share version lifecycle
Development Workflows Comparison
Standalone Workflow
# Day 1: Setup
elizaos create -t plugin myservice
cd plugin-myservice
# Day 1-N: Development
elizaos dev # Hot reload development
elizaos test # Run tests
bun run build # Build for production
# Publishing
elizaos publish # Initial publish
npm version patch && npm publish # Updates
Monorepo Workflow
# Day 1: Setup
git clone https://github.com/elizaos/eliza.git
cd eliza
bun install
bun run build
# Day 1-N: Development
bun run dev # Full stack development
bun test # Run all tests
bun run build # Build all packages
# Contributing
git checkout -b feature/my-feature
# Make changes
git commit -m "Add new feature"
git push origin feature/my-feature
# Create pull request
Migration Between Approaches
Standalone to Monorepo
- Fork the ElizaOS repository
- Copy your plugin to
packages/
- Update dependencies to workspace protocol
- Integrate with monorepo build system
- Update tests and documentation
Monorepo to Standalone
- Extract your plugin to new repository
- Update dependencies to npm versions
- Add standalone build configuration
- Set up independent CI/CD
- Publish to npm
Best Practices by Approach
Standalone Best Practices
-
Pin Dependencies: Use exact versions for stability
{ "dependencies": { "@elizaos/core": "1.0.16" } }
-
Comprehensive Testing: Test against multiple ElizaOS versions
-
Documentation: Provide clear usage examples
-
Version Strategy: Use semantic versioning
-
CI/CD: Set up automated testing and publishing
Monorepo Best Practices
-
Workspace Dependencies: Use workspace protocol
{ "dependencies": { "@elizaos/core": "workspace:*" } }
-
Incremental Building: Use Turbo for efficient builds
-
Coordinated Testing: Test across package boundaries
-
Shared Configuration: Leverage shared configs
-
Contribution Guidelines: Follow established patterns
Performance Considerations
Build Performance
Standalone:
- Fast incremental builds
- Only your code compilation
- Quick development cycles
Monorepo:
- Slower initial builds
- Turbo caching optimization
- Parallel build execution
Runtime Performance
Standalone:
- Smaller bundle sizes
- Faster startup time
- Efficient resource usage
Monorepo:
- Larger bundle sizes
- More features available
- Potential memory overhead
Use Case Examples
Standalone Examples
-
Simple Plugin
elizaos create -t plugin weather # Integrates with weather API
-
Discord Bot
elizaos create -t project discord-bot # Standalone Discord integration
-
Commercial Plugin
elizaos create -t plugin premium-analytics # Commercial analytics plugin
Monorepo Examples
-
Core Feature Addition
# Add new core functionality cd packages/core # Modify core system
-
Multi-Plugin System
# Create interconnected plugins packages/plugin-auth/ packages/plugin-analytics/ packages/plugin-dashboard/
-
Platform Integration
# Add new platform support packages/client-telegram/ packages/client-slack/
Decision Framework
Questions to Ask
-
What are you building?
- Single plugin → Standalone
- Core contribution → Monorepo
- Multiple plugins → Consider both
-
What's your timeline?
- Quick prototype → Standalone
- Long-term project → Either
- Immediate need → Standalone
-
What's your team size?
- Solo/small team → Standalone
- Large team → Monorepo
- Mixed → Depends on coordination needs
-
What's your deployment strategy?
- Simple deployment → Standalone
- Complex infrastructure → Monorepo
- Cloud services → Either
-
What's your customization needs?
- Plugin-level → Standalone
- Core-level → Monorepo
- Both → Start standalone, migrate if needed
Conclusion
Choose your development approach based on:
- Project scope and complexity
- Team size and experience
- Timeline and deployment needs
- Customization requirements
- Long-term maintenance plans
Both approaches are valid and supported. Start with the approach that best fits your immediate needs, knowing that migration is possible as your project evolves.