Welcome to the Morpheum project! This guide will help you get set up as a new developer and understand how to participate in our Matrix-based collaborative development environment.
Morpheum is a collaborative platform where AI agents and humans work together on software development projects. All team communication happens through Matrix chat rooms, while code is managed through GitHub. The project focuses on seamless AI-human collaboration with Matrix as the primary interface.
Before you begin, make sure you have:
- A GitHub account
- Basic understanding of Git and GitHub workflows
- Willingness to learn Matrix chat protocol (it's easy!)
Matrix is a decentralized, secure messaging protocol that serves as our primary communication platform.
- Use an existing homeserver (recommended for quick start):
- Go to element.io and hover over "Sign in" and click on "Open element web"
- Choose "Create Account" and sign up on the matrix.org homeserver
- Pick a username like
@yourname:matrix.org
Desktop/Web:
- Element (recommended): element.io
- FluffyChat: Available on most platforms
- Nheko: Lightweight desktop client
Mobile:
- Element (iOS/Android)
- FluffyChat (iOS/Android)
- SchildiChat (Android)
Important: Matrix uses end-to-end encryption, so setting up recovery is crucial to avoid losing access to your messages.
- In Element, go to Settings → Encryption
- Click "Setup Recovery Key"
- Save this key securely - store it in a password manager
- Enable cross-signing when prompted
- This allows you to verify your other devices
- Accept the security key setup that appears
When someone invites you to the Morpheum Matrix rooms:
- Check the inviter's Matrix ID (e.g.,
@username:morpheum.dev) - Click the user's profile picture and click "Verify user" to start the verification process
- If unsure, ask in a separate, verified channel
- Accept the invitation to the main Morpheum project room
- Introduce yourself briefly: mention your background and what you'd like to contribute
- Try typing
!helpto see available commands
Morpheum uses direnv and Nix to automatically set up your development environment with all required tools and secrets when you enter the project directory.
- Install Nix (the package manager):
# On Linux/macOS curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install
- Follow the installer prompts and restart your shell when complete
-
Install direnv (environment manager):
# On macOS with Homebrew brew install direnv # On Ubuntu/Debian sudo apt install direnv # On other systems, see: https://direnv.net/docs/installation.html
-
Set up direnv shell integration:
# For bash, add to ~/.bashrc: echo 'eval "$(direnv hook bash)"' >> ~/.bashrc # For zsh, add to ~/.zshrc: echo 'eval "$(direnv hook zsh)"' >> ~/.zshrc # Restart your shell or source the config file
-
Clone the repository:
git clone https://github.com/anicolao/morpheum.git cd morpheum -
Set up environment secrets:
When you first enter the directory, direnv will prompt you to allow the environment. For now, ignore the following error, which is expected:
# You'll see: direnv: error .envrc is blocked. Run `direnv allow` to approve its contentBefore allowing direnv, create your secrets file:
# Create .secrets file with your Matrix and GitHub credentials cat << 'EOF' > .secrets # Matrix Bot Configuration # Create a bot account on matrix.org for testing (eventually you may want your own homeserver) # 1. Go to https://app.element.io and click "Create Account" # 2. Choose a bot username like "myname-morpheum-bot" # 3. Complete registration and note the username/password below export HOMESERVER_URL="https://matrix.org" export MATRIX_USERNAME="your-bot-username" export MATRIX_PASSWORD="your-bot-password" # Or alternatively use an access token: # export ACCESS_TOKEN="your-matrix-access-token" # GitHub Configuration (required for development) # Create a personal access token at https://github.com/settings/tokens # Select "repo" scope for full repository access export GITHUB_TOKEN="your-github-personal-access-token" # Registration tokens for different homeservers (if registering bots) # export REGISTRATION_TOKEN_MATRIX_ORG="your-registration-token" EOF
Edit the
.secretsfile with your actual credentials:- Matrix bot credentials: Create a new Matrix account specifically for bot testing (your personal Matrix account username/password, or an access token from your account)
- GitHub personal access token: Required for full functionality - create at GitHub Settings → Tokens with "repo" scope
If you modify the
.secretsfile later, re-enter the directory to reload the environment variables. -
Allow direnv and activate environment:
direnv allow
This will:
- Automatically install
bun,ollama, and other required tools via Nix - Load your secrets as environment variables
- Set up the complete development environment
- Automatically install
-
Install project dependencies:
npm install # Note: npm is required for matrix package compatibility -
Run tests:
bun test -
Test the bot (optional but recommended):
# Start the bot locally bun src/morpheum-bot/index.tsThen invite your bot to a project room to test its functionality:
- Use your Matrix client to invite the bot account to a room
- Try typing
!helpto see available commands - Test basic bot interactions
- Main bot code:
src/morpheum-bot/ - Documentation:
docs/(Jekyll-based site) - Tests: Throughout the codebase with
.test.tsextensions - Configuration:
package.json,tsconfig.json,vitest.config.ts
Morpheum uses a unique Matrix-centric development workflow:
- Discuss in Matrix: All development discussions happen in project rooms
- AI Agent Assistance: AI agents help with code changes based on Matrix instructions
- GitHub Integration: Code changes are managed through GitHub PRs
- Review Process: Human oversight ensures quality and direction
-
Join discussions in the main project room
-
Read existing documentation:
- VISION.md - Project philosophy
- ARCHITECTURE.md - Technical overview
- CONTRIBUTING.md - Contribution guidelines
- ROADMAP.md - Current development priorities
-
Find a task:
- Check the task board
- Look at GitHub issues
- Ask in Matrix what needs help
-
Work with AI agents:
- Describe desired changes in Matrix
- AI agents will create branches and PRs
- Review and iterate based on feedback
The project uses a directory-based system to avoid merge conflicts:
- Tasks: Create new files in
docs/_tasks/instead of editingTASKS.md - Dev logs: Create new files in
docs/_devlogs/instead of editingDEVLOG.md - Follow YAML frontmatter format for automatic aggregation
- Project Website: morpheum.dev
- Task Board: Status/Tasks
- Development Logs: Status/DevLogs
- GitHub Repository: anicolao/morpheum
- VISION.md - Project goals and philosophy
- ARCHITECTURE.md - Technical architecture
- CONTRIBUTING.md - How to contribute
- AGENTS.md - AI agent guidelines
- MATRIX_SETUP.md - Advanced Matrix server setup
- Matrix Room: Main project room (after you join)
- GitHub Issues: For bugs and feature requests
- Documentation: Check the Jekyll site first
- Always verify device keys when prompted
- Use cross-signing for device verification
- Keep your recovery key/phrase secure
- Be cautious about encrypted room invitations from unknown users
- Never commit secrets to the repository
- Use environment variables for sensitive data
- Follow the project's security guidelines in CONTRIBUTING.md
- Be respectful and constructive in all communications
- Use threading for long discussions in busy rooms
- Check existing documentation before asking questions
- Help others who are also onboarding
- Complete all setup steps above
- Introduce yourself in the main Matrix room
- Read the key documentation (VISION.md, ARCHITECTURE.md, CONTRIBUTING.md)
- Explore the codebase and run tests locally
- Find a small task to start contributing
- Ask questions - the team is here to help!
Welcome to Morpheum! We're excited to have you as part of our collaborative AI-human development community.
This document is part of the Morpheum project documentation. For updates and more information, visit morpheum.dev.