Skip to content

momorph/cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

38 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

MoMorph CLI

Transform Figma designs into production-ready code

Go Version License


Table of Contents

πŸ€” What is MoMorph CLI?

MoMorph CLI is a command-line tool (CLI) used to initialize, manage, and operate projects following an AI-Driven Development approach, where Figma design serves as the starting point of the entire software development lifecycle.

MoMorph helps transform:

Design β†’ Specs β†’ Test Cases β†’ Code

into an automated, consistent, and repeatable workflow, powered by AI.

⚑ Getting Started

1. Install MoMorph CLI

Choose your preferred installation method:

Option 1: Homebrew (macOS, Linux) (Recommended)
brew install momorph/tap/momorph-cli

Then use the tool directly:

momorph version

Benefits of package manager installation:

  • Tool stays installed and available in PATH
  • Easy updates with package manager commands
  • Better dependency management
  • Cleaner system configuration
Option 2: Chocolatey (Windows)
choco install momorph-cli
Option 3: Shell Script (Linux/macOS) (coming soon)
curl -fsSL https://momorph.ai/cli/stable/install.sh | bash
Option 4: Go Install
go install github.com/momorph/cli@latest
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:

momorph init new-directory      # Initialize in a new directory
momorph init .                  # Initialize in current directory

momorph init . --ai copilot         # Copilot
momorph init . --ai claude          # Claude Code
momorph init . --ai cursor          # Cursor
momorph init . --ai windsurf        # Windsurf

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)

After that, enjoy using MoMorph commands in the next section! πŸš€πŸš€πŸš€

πŸš€ MoMorph Commands

In addition to the CLI commands, MoMorph provides a set of AI-agent workflow commands, designed to guide the AI-Driven Development process from specification to implementation.

⚠️ Note:

  • These are workflow commands used within the MoMorph flow with AI agents, not CLI commands.
  • They operate on templates and prompts generated by momorph init.

Context Commands

/momorph.specs - Generate specifications for a screen

Purpose: Generate specifications for a screen based on the Figma design image and associated screen metadata.

Input: Figma Design (Figma File Key, Frame ID)

Output: File: .momorph/specs/[screen-name].csv

Example Command:

Generate specs based on the following Figma design items:
1. Signin – fileKey: `i09vM3jClQiu8cwXsMo6uy`, frameId: `9276:19531`
/momorph.createtestcases - Generate test cases CSV

Purpose: Generate a CSV file containing a list of test cases for the specified screen based on the specs imported into MoMorph.

Input: Figma Design (Figma File Key, Frame ID)

Output: File: .momorph/testcases/{file_key}/{frame_id}-{frame-name}.csv

Example Command:

Generate test cases based on the following Figma design items:
1. Signin – fileKey: `i09vM3jClQiu8cwXsMo6uy`, frameId: `9276:19531`
/momorph.updatetestcases - Update existing test cases

Purpose: Update existing test cases to match the latest version of the specifications.

Input: Figma Design (Figma File Key, Frame ID)

Output: File: .momorph/testcases/{file_key}/{frame_id}-{frame-name}.csv

Example Command:

Update test cases based on the following Figma design items:
1. Signin – fileKey: `i09vM3jClQiu8cwXsMo6uy`, frameId: `9276:19531`

Gen Code Commands

/momorph.constitution - Initialize project constitution

Purpose: Initialize or update the project "constitution" (.momorph/constitution.md) containing technical standards, coding rules, folder structure, and governance policies.

Input: A short description of rules, coding standards, conventions, etc.

Output: .momorph/constitution.md

Example Command:

Generate constitution
/momorph.specify - Generate feature specifications from Figma

Purpose: Generate feature specifications from a Figma frame β€” produces spec.md (user stories, acceptance criteria) and design-style.md (tokens, CSS, node IDs) as sources for implementation.

Input: Figma File Key, Frame ID

Output:

  1. Path: .momorph/specs/{frameid-name}/spec.md
  2. Path: .momorph/specs/{frameid-name}/design-style.md

Example Command:

Build specifications for the project based on the following Figma design items:
1. Signin – fileKey: `i09vM3jClQiu8cwXsMo6uy`, frameId: `9276:19531`
/momorph.plan - Generate implementation plan

Purpose: Generate a detailed implementation plan from specs (architecture, files to create/modify, dependencies, strategy) and hand off to momorph.tasks.

Input: Figma File Key, Frame ID

Output: Path: .momorph/specs/{frameid-name}/plan.md

Example Command:

Plan for the following Figma design items:
1. Signin – fileKey: `i09vM3jClQiu8cwXsMo6uy`, frameId: `9276:19531`
/momorph.tasks - Break down plan into tasks

Purpose: Break down the plan into executable tasks (tasks.md) by user story, with detailed checklists, dependencies, and parallelization hints.

Input: Figma File Key, Frame ID

Output: Path: .momorph/specs/{frameid-name}/tasks.md

Example Command:

Break tasks for the following Figma design items:
1. Signin – fileKey: `i09vM3jClQiu8cwXsMo6uy`, frameId: `9276:19531`
/momorph.implement - Execute implementation

Purpose: "Implementation mode" β€” execute tasks, write code following the constitution and design-style, run tests, and ensure pixel-perfect UI alignment with Figma.

Input: Figma File Key, Frame ID

Output:

  • Backend source code
  • Frontend source code
  • Unit test source code

Example Command:

Execute the implementation plan by processing and executing all tasks defined for the following Figma design items:
1. Signin – fileKey: `i09vM3jClQiu8cwXsMo6uy`, frameId: `9276:19531`
/momorph.commit - Create Git commits

Purpose: Create Git commits from the current diff following Conventional Commits rules; split commits if needed to match commit types.

Input: No input required

Output: New commit(s) created

Example Command:

/momorph.commit

or

/momorph.commit only staged files
/momorph.database - Generate database schemas

Purpose: Analyze Figma screens to design database schemas, generate SQL schema, ERD (Mermaid), and database analysis documentation.

Input: Figma File Key, Frame ID

Output:

  1. .momorph/contexts/DATABASE_ANALYSIS.md – Screen analysis
  2. .momorph/contexts/database-schema.sql – SQL schema
  3. .momorph/contexts/DATABASE_DESIGN.mmd – ERD diagram

Example Command:

Generate database schemas for the Figma design items:
1. Signin – fileKey: `i09vM3jClQiu8cwXsMo6uy`, frameId: `9276:19531`
/momorph.apispecs - Generate OpenAPI specifications

Purpose: Generate OpenAPI specifications (api-docs.yaml) and backend test cases from Figma designs β€” defining endpoints, schemas, and functional tests.

Input: Figma File Key, Frame ID

Output: Controllers and Routes files generated for all specified APIs. Route handler implementations are left empty.

Example Command:

Generate API specs for the following Figma design items:
1. Signin – fileKey: `i09vM3jClQiu8cwXsMo6uy`, frameId: `9276:19531`

E2E Testing Commands

/momorph.setupe2e - Set up E2E testing environment

Purpose: Automatically set up and generate an E2E testing environment using Playwright (run once only).

Input: Figma File Key, Frame ID

Output: A fully initialized E2E test folder

Example Command:

Set up a Playwright project for me.

<Paste your project configuration here>
/momorph.writee2e - Generate Playwright E2E tests

Purpose: Automatically generate Playwright E2E tests (after test code review is available).

Input:

  1. Figma File Key, Frame ID
  2. URL of the screen to be tested

Output: Complete Playwright E2E test code for the specified screen

Example Command:

fileKey: `i09vM3jClQiu8cwXsMo6uy`
signup frame_link_id: "9276:19630"

URL: ...
/momorph.reviewe2e - Review E2E test code

Purpose: Automatically review generated E2E test code.

Input: (Optional) Specific screen or test file

Output: Review report of the generated E2E tests. May include fixes if bugs or test failures are found.

Example Command:

Review the E2E test code for me.

<You may specify a specific screen or test file to review>

πŸ”§ MoMorph CLI Reference

The momorph command supports the following operations:

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

πŸ“„ 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