๐ฎ MoMorph CLI
Initialize MoMorph projects for AI-driven development
A command-line tool for initializing MoMorph projects during development. MoMorph CLI helps developers set up design-driven AI development environments by connecting UI designs with specifications, tests, and implementation through AI agent collaboration.
Table of Contents
๐ค What is MoMorph CLI?
MoMorph is an enterprise software development collaboration platform that leverages AI to connect the entire development process, with UI design as the central axis. It seamlessly integrates with AI agents to automate the loop of "Design โ AI โ Specifications โ Tests โ Implementation" in a flexible and continuous manner.
MoMorph CLI is the command-line tool that initializes MoMorph projects during the development phase. It sets up the necessary project structure, configurations, and workflows to enable design-driven AI development, helping teams eliminate information gaps and standardize development processes.
MoMorph enables:
- Design-Driven Development: Start from UI designs in Figma and automatically generate specifications, test cases, and code
- AI-Powered Collaboration: Seamlessly connect with AI coding assistants (GitHub Copilot, Cursor, Claude Code) throughout the development lifecycle
- Comprehensive Integration: From specification generation to test case creation, code generation, and GitHub integration - all supported by AI
- Multilingual Support: Suitable for multinational team development environments
Key Benefits of MoMorph CLI
- Standardized Setup: Initialize projects with MoMorph's design-driven development structure
- AI-Ready Configuration: Pre-configure prompts, rules, and agent modes for optimal AI collaboration
- Quick Initialization: Set up complete MoMorph development environments in seconds
- Multi-Platform: Works on macOS, Linux, and Windows
- Version Control: Keep configurations synchronized with the latest MoMorph templates
โก Get Started
1. Install MoMorph CLI
Choose your preferred installation method:
Option 1: Homebrew (macOS/Linux)
brew install momorph/tap/momorph-cli
Then use the tool directly:
# Login with GitHub
momorph login
# Initialize new MoMorph project
momorph init <PROJECT_NAME> --ai copilot
# Or initialize in existing project
momorph init . --ai cursor
Option 2: Chocolatey (Windows)
choco install momorph
Option 3: Shell Script (Linux/macOS)
curl -fsSL https://momorph.ai/cli/stable/install.sh | bash
Option 4: Go Install
go install github.com/momorph/cli@latest
Benefits of package manager installation:
- Tool stays installed and available in PATH
- Easy updates with package manager commands
- Better dependency management
- Cleaner system configuration
Verify setup
Check your account information and configuration:
# Display current account info
momorph whoami
# Check CLI version
momorph version
2. Authenticate with GitHub
Launch MoMorph CLI and authenticate using GitHub OAuth Device Flow:
momorph login
The CLI will display a user code and authentication link. Open the link in your browser and enter the code to complete authentication.
3. Initialize your MoMorph project
Use the momorph init command to set up a MoMorph project with design-driven AI development workflow:
# Initialize in a new directory
momorph init viblo --ai copilot
# Initialize in current directory
momorph init . --ai cursor
# Initialize without confirmation (force mode)
momorph init . --force --ai claude
The CLI will:
- Download the latest MoMorph project template from backend
- Extract configuration files (
.claude, .github, prompt files, workflow scripts, etc.)
- Set up the project structure for design-driven AI development
- Configure AI agent integration for the specified assistant (Copilot, Cursor, or Claude Code)
4. Environment Configuration (Optional)
By default, MoMorph CLI connects to the production MoMorph API. For development or testing purposes, you can configure the CLI to use different environments:
Using Staging Environment
Staging environment requires Basic Authentication in addition to GitHub token. Set up your environment variables:
# Set environment to staging
export MOMORPH_ENV=staging
# or
export MOMORPH_ENV=stg
# Set Basic Auth credentials (required for staging)
export MOMORPH_BASIC_AUTH_USERNAME=your_username
export MOMORPH_BASIC_AUTH_PASSWORD=your_password
# Now all commands will use staging API with Basic Auth
momorph login
momorph init my-project --ai copilot
Using .env File (Recommended)
For convenience and security, you can use a .env file:
# Copy the example file
cp .env.example .env
# Edit .env with your credentials
nano .env
# Load environment variables (bash/zsh)
source .env
# Or use with direnv (auto-loads when entering directory)
echo "dotenv" > .envrc
direnv allow
Important Security Notes:
- โ
.env is already in .gitignore - your credentials won't be committed
- โ
Basic Auth credentials are NEVER saved to disk config files
- โ
Credentials are only read from environment variables at runtime
- โ ๏ธ Keep your
.env file secure: chmod 600 .env
- โ ๏ธ Never share or commit your
.env file
- โ ๏ธ Use different credentials for staging and production
Custom API Endpoint
# Use a custom API endpoint
export MOMORPH_API_ENDPOINT=https://custom.momorph.com
# Commands will now use the custom endpoint
momorph login
momorph init my-project --ai copilot
Available Environment Variables
| Environment Variable |
Description |
Required |
Example Value |
MOMORPH_ENV |
Predefined environment |
No |
staging, stg |
MOMORPH_API_ENDPOINT |
Custom API endpoint URL |
No |
https://stg.momorph.com |
MOMORPH_BASIC_AUTH_USERNAME |
Basic Auth username (staging only) |
For staging |
your_username |
MOMORPH_BASIC_AUTH_PASSWORD |
Basic Auth password (staging only) |
For staging |
your_password |
Environment Priority:
MOMORPH_API_ENDPOINT (highest priority)
MOMORPH_ENV
- Default production URL (lowest priority)
Authentication by Environment:
- Production: GitHub OAuth โ MoMorph Bearer Token
- Staging: GitHub OAuth + Basic Auth (username/password)
Note: Basic Auth is only used in staging environment. Production uses standard Bearer token authentication.
- The
MOMORPH_API_ENDPOINT variable takes precedence over MOMORPH_ENV if both are set.
- The
MOMORPH_BASIC_AUTH variable is used for staging environments that require Basic Authentication instead of Bearer tokens.
๐ค Supported AI Agents
Currently, only GitHub Copilot is fully supported. Support for Cursor and Claude Code is coming soon. If you encounter issues, please open an issue.
๐ง MoMorph CLI Reference
The mm command supports the following operations:
Commands
| Command |
Description |
login |
Authenticate with GitHub using OAuth Device Flow |
init |
Initialize a MoMorph project with AI agent configurations |
whoami |
Display current account information and subscription status |
update |
Update MoMorph CLI to the latest version |
version |
Show MoMorph CLI version information |
help |
Display help information |
Examples
# Basic project initialization
momorph init my-project
# Initialize with specific AI assistant
momorph init my-project --ai copilot
momorph init my-project --ai cursor
momorph init my-project --ai claude
# Initialize in current directory
momorph init . --ai copilot
# Force initialization without confirmation
momorph init . --force --ai cursor
# Check account information
momorph whoami
# Update CLI
momorph update
# Check version
momorph version
๐ป Development
Setup
# Clone repository
git clone https://github.com/momorph/cli.git
cd momorph-cli
# Install dependencies
go mod download
# Build
go run main.go -- <command>
Project Structure
momorph-cli/
โโโ cmd/ # CLI commands
โ โโโ login.go
โ โโโ init.go
โ โโโ whoami.go
โ โโโ update.go
โ โโโ version.go
โ โโโ root.go
โโโ internal/ # Internal packages
โ โโโ auth/ # Authentication logic
โ โโโ api/ # API client
โ โโโ config/ # Configuration management
โ โโโ template/ # Template management
โ โโโ ui/ # UI components
โโโ pkg/ # Public packages
โโโ go.mod
โโโ go.sum
โโโ main.go
โโโ README.md
Running Tests
go test ./...
# With coverage
go test -cover ./...
# Verbose output
go test -v ./...
Building for Release
# Create snapshot release
goreleaser release --snapshot --clean
# Build for all platforms
goreleaser build --snapshot --clean
๐ License
This project is licensed under the terms of the MIT open source license. Please refer to the LICENSE file for the full terms.
Made with โค๏ธ by the MoMorph Team