Skip to content

Latest commit

History

History
589 lines (396 loc) · 16.3 KB

File metadata and controls

589 lines (396 loc) · 16.3 KB

MoMorph CLI

Transform Figma designs into production-ready code

Go VersionLicense


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: PowerShell (Windows)
irm https://raw.githubusercontent.com/momorph/cli/refs/heads/main/scripts/install.ps1 | iex
Option 4: Shell Script (Linux/macOS)
curl -fsSL https://raw.githubusercontent.com/momorph/cli/refs/heads/main/scripts/install.sh | bash
Option 5: 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`
/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 (Optional)

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`
/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`

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

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:

CommandDescription
loginAuthenticate with GitHub using OAuth Device Flow
initInitialize a MoMorph project with AI agent configurations
upload testcasesUpload test case CSV files to MoMorph server
upload specsUpload spec CSV files to MoMorph server
whoamiDisplay current account information and subscription status
updateUpdate MoMorph CLI to the latest version
versionShow MoMorph CLI version information
helpDisplay help information

Upload Commands

Upload specs and test cases from local CSV files to the MoMorph server.

momorph upload testcases - Upload test cases to server

Purpose: Upload test case CSV files generated by /momorph.createtestcases to the MoMorph server.

File Path Pattern:

.momorph/testcases/{file_key}/{frame_id}-{frame_name}.csv

Usage:

# Upload a single file
momorph upload testcases .momorph/testcases/xxx/yyy.csv
# Upload multiple files
momorph upload testcases file1.csv file2.csv
# Upload all testcases in a directory recursively
momorph upload testcases --dir .momorph/testcases/ -r
# Dry run (preview without uploading)
momorph upload testcases --dry-run .momorph/testcases/**/*.csv

Flags:

FlagDescription
-d, --dirDirectory to search for CSV files
-r, --recursiveSearch directories recursively
--dry-runShow what would be uploaded without uploading
--continue-on-errorContinue uploading if one file fails
momorph upload specs - Upload specs to server

Purpose: Upload spec CSV files generated by /momorph.specs to the MoMorph server.

File Path Pattern:

.momorph/specs/{file_key}/{frame_id}-{frame_name}.csv

Usage:

# Upload a single file
momorph upload specs .momorph/specs/xxx/yyy.csv
# Upload multiple files
momorph upload specs file1.csv file2.csv
# Upload all specs in a directory recursively
momorph upload specs --dir .momorph/specs/ -r
# Dry run (preview without uploading)
momorph upload specs --dry-run .momorph/specs/**/*.csv

Flags:

FlagDescription
-d, --dirDirectory to search for CSV files
-r, --recursiveSearch directories recursively
--dry-runShow what would be uploaded without uploading
--continue-on-errorContinue uploading if one file fails

Shell Completion

MoMorph CLI supports shell completion for bash, zsh, fish, and powershell.

Bash
# Load completions in current sessionsource<(momorph completion bash)# Load completions permanently (Linux)
momorph completion bash > /etc/bash_completion.d/momorph
# Load completions permanently (macOS with Homebrew)
momorph completion bash >$(brew --prefix)/etc/bash_completion.d/momorph

Note: Requires the bash-completion package to be installed.

Zsh
# Enable shell completion (if not already enabled)echo"autoload -U compinit; compinit">>~/.zshrc
# Load completions in current sessionsource<(momorph completion zsh)# Load completions permanently (Linux)
momorph completion zsh >"${fpath[1]}/_momorph"# Load completions permanently (macOS with Homebrew)
momorph completion zsh >$(brew --prefix)/share/zsh/site-functions/_momorph
Fish
# Load completions in current session
momorph completion fish | source
# Load completions permanently
momorph completion fish > ~/.config/fish/completions/momorph.fish
PowerShell
# Load completions in current session
momorph completion powershell |Out-String|Invoke-Expression# Load completions permanently
momorph completion powershell > momorph.ps1
# Then add ". momorph.ps1" to your PowerShell profile

📄 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
, 'i'); if (__m === '*' || __re.test(location.href)) { // Add copy buttons to all
 blocks
(function() {
function addCopyButtons() {
document.querySelectorAll('pre code').forEach(function(codeBlock) {
if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;
codeBlock.parentElement.setAttribute('data-copy-added', 'true');
var btn = document.createElement('button');
btn.textContent = 'Copy';
btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';
btn.onmouseover = function() { this.style.opacity = '1'; };
btn.onmouseout = function() { this.style.opacity = '0.7'; };
btn.onclick = function() {
navigator.clipboard.writeText(codeBlock.textContent).then(function() {
btn.textContent = 'Copied!';
setTimeout(function() { btn.textContent = 'Copy'; }, 1500);
});
};
codeBlock.parentElement.style.position = 'relative';
codeBlock.parentElement.appendChild(btn);
});
}
addCopyButtons();
// Re-run on dynamic content
var observer = new MutationObserver(addCopyButtons);
observer.observe(document.body, { childList: true, subtree: true });
})();
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
cli/README.md at main · momorph/cli · GitHub
Skip to content

Latest commit

History

History
589 lines (396 loc) · 16.3 KB

File metadata and controls

589 lines (396 loc) · 16.3 KB

MoMorph CLI

Transform Figma designs into production-ready code

Go VersionLicense


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: PowerShell (Windows)
irm https://raw.githubusercontent.com/momorph/cli/refs/heads/main/scripts/install.ps1 | iex
Option 4: Shell Script (Linux/macOS)
curl -fsSL https://raw.githubusercontent.com/momorph/cli/refs/heads/main/scripts/install.sh | bash
Option 5: 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`
/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 (Optional)

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`
/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`

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

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:

CommandDescription
loginAuthenticate with GitHub using OAuth Device Flow
initInitialize a MoMorph project with AI agent configurations
upload testcasesUpload test case CSV files to MoMorph server
upload specsUpload spec CSV files to MoMorph server
whoamiDisplay current account information and subscription status
updateUpdate MoMorph CLI to the latest version
versionShow MoMorph CLI version information
helpDisplay help information

Upload Commands

Upload specs and test cases from local CSV files to the MoMorph server.

momorph upload testcases - Upload test cases to server

Purpose: Upload test case CSV files generated by /momorph.createtestcases to the MoMorph server.

File Path Pattern:

.momorph/testcases/{file_key}/{frame_id}-{frame_name}.csv

Usage:

# Upload a single file
momorph upload testcases .momorph/testcases/xxx/yyy.csv
# Upload multiple files
momorph upload testcases file1.csv file2.csv
# Upload all testcases in a directory recursively
momorph upload testcases --dir .momorph/testcases/ -r
# Dry run (preview without uploading)
momorph upload testcases --dry-run .momorph/testcases/**/*.csv

Flags:

FlagDescription
-d, --dirDirectory to search for CSV files
-r, --recursiveSearch directories recursively
--dry-runShow what would be uploaded without uploading
--continue-on-errorContinue uploading if one file fails
momorph upload specs - Upload specs to server

Purpose: Upload spec CSV files generated by /momorph.specs to the MoMorph server.

File Path Pattern:

.momorph/specs/{file_key}/{frame_id}-{frame_name}.csv

Usage:

# Upload a single file
momorph upload specs .momorph/specs/xxx/yyy.csv
# Upload multiple files
momorph upload specs file1.csv file2.csv
# Upload all specs in a directory recursively
momorph upload specs --dir .momorph/specs/ -r
# Dry run (preview without uploading)
momorph upload specs --dry-run .momorph/specs/**/*.csv

Flags:

FlagDescription
-d, --dirDirectory to search for CSV files
-r, --recursiveSearch directories recursively
--dry-runShow what would be uploaded without uploading
--continue-on-errorContinue uploading if one file fails

Shell Completion

MoMorph CLI supports shell completion for bash, zsh, fish, and powershell.

Bash
# Load completions in current sessionsource<(momorph completion bash)# Load completions permanently (Linux)
momorph completion bash > /etc/bash_completion.d/momorph
# Load completions permanently (macOS with Homebrew)
momorph completion bash >$(brew --prefix)/etc/bash_completion.d/momorph

Note: Requires the bash-completion package to be installed.

Zsh
# Enable shell completion (if not already enabled)echo"autoload -U compinit; compinit">>~/.zshrc
# Load completions in current sessionsource<(momorph completion zsh)# Load completions permanently (Linux)
momorph completion zsh >"${fpath[1]}/_momorph"# Load completions permanently (macOS with Homebrew)
momorph completion zsh >$(brew --prefix)/share/zsh/site-functions/_momorph
Fish
# Load completions in current session
momorph completion fish | source
# Load completions permanently
momorph completion fish > ~/.config/fish/completions/momorph.fish
PowerShell
# Load completions in current session
momorph completion powershell |Out-String|Invoke-Expression# Load completions permanently
momorph completion powershell > momorph.ps1
# Then add ". momorph.ps1" to your PowerShell profile

📄 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
, 'i'); if (__m === '*' || __re.test(location.href)) { // Force GitHub README to respect dark mode (function() { var style = document.createElement('style'); style.textContent = ' .markdown-body { color-scheme: dark light; } .markdown-body pre { background: #161b22 !important; } .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; } .markdown-body table th, .markdown-body table td { border-color: #30363d !important; } .markdown-body img { background: #0d1117; } .markdown-body blockquote { border-left-color: #8b949e; } .markdown-body hr { border-color: #30363d; } '; document.head.appendChild(style); })(); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' cli/README.md at main · momorph/cli · GitHub
Skip to content

Latest commit

History

History
589 lines (396 loc) · 16.3 KB

File metadata and controls

589 lines (396 loc) · 16.3 KB

MoMorph CLI

Transform Figma designs into production-ready code

Go VersionLicense


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: PowerShell (Windows)
irm https://raw.githubusercontent.com/momorph/cli/refs/heads/main/scripts/install.ps1 | iex
Option 4: Shell Script (Linux/macOS)
curl -fsSL https://raw.githubusercontent.com/momorph/cli/refs/heads/main/scripts/install.sh | bash
Option 5: 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`
/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 (Optional)

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`
/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`

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

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:

CommandDescription
loginAuthenticate with GitHub using OAuth Device Flow
initInitialize a MoMorph project with AI agent configurations
upload testcasesUpload test case CSV files to MoMorph server
upload specsUpload spec CSV files to MoMorph server
whoamiDisplay current account information and subscription status
updateUpdate MoMorph CLI to the latest version
versionShow MoMorph CLI version information
helpDisplay help information

Upload Commands

Upload specs and test cases from local CSV files to the MoMorph server.

momorph upload testcases - Upload test cases to server

Purpose: Upload test case CSV files generated by /momorph.createtestcases to the MoMorph server.

File Path Pattern:

.momorph/testcases/{file_key}/{frame_id}-{frame_name}.csv

Usage:

# Upload a single file
momorph upload testcases .momorph/testcases/xxx/yyy.csv
# Upload multiple files
momorph upload testcases file1.csv file2.csv
# Upload all testcases in a directory recursively
momorph upload testcases --dir .momorph/testcases/ -r
# Dry run (preview without uploading)
momorph upload testcases --dry-run .momorph/testcases/**/*.csv

Flags:

FlagDescription
-d, --dirDirectory to search for CSV files
-r, --recursiveSearch directories recursively
--dry-runShow what would be uploaded without uploading
--continue-on-errorContinue uploading if one file fails
momorph upload specs - Upload specs to server

Purpose: Upload spec CSV files generated by /momorph.specs to the MoMorph server.

File Path Pattern:

.momorph/specs/{file_key}/{frame_id}-{frame_name}.csv

Usage:

# Upload a single file
momorph upload specs .momorph/specs/xxx/yyy.csv
# Upload multiple files
momorph upload specs file1.csv file2.csv
# Upload all specs in a directory recursively
momorph upload specs --dir .momorph/specs/ -r
# Dry run (preview without uploading)
momorph upload specs --dry-run .momorph/specs/**/*.csv

Flags:

FlagDescription
-d, --dirDirectory to search for CSV files
-r, --recursiveSearch directories recursively
--dry-runShow what would be uploaded without uploading
--continue-on-errorContinue uploading if one file fails

Shell Completion

MoMorph CLI supports shell completion for bash, zsh, fish, and powershell.

Bash
# Load completions in current sessionsource<(momorph completion bash)# Load completions permanently (Linux)
momorph completion bash > /etc/bash_completion.d/momorph
# Load completions permanently (macOS with Homebrew)
momorph completion bash >$(brew --prefix)/etc/bash_completion.d/momorph

Note: Requires the bash-completion package to be installed.

Zsh
# Enable shell completion (if not already enabled)echo"autoload -U compinit; compinit">>~/.zshrc
# Load completions in current sessionsource<(momorph completion zsh)# Load completions permanently (Linux)
momorph completion zsh >"${fpath[1]}/_momorph"# Load completions permanently (macOS with Homebrew)
momorph completion zsh >$(brew --prefix)/share/zsh/site-functions/_momorph
Fish
# Load completions in current session
momorph completion fish | source
# Load completions permanently
momorph completion fish > ~/.config/fish/completions/momorph.fish
PowerShell
# Load completions in current session
momorph completion powershell |Out-String|Invoke-Expression# Load completions permanently
momorph completion powershell > momorph.ps1
# Then add ". momorph.ps1" to your PowerShell profile

📄 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
, 'i'); if (__m === '*' || __re.test(location.href)) { // Highlight search terms from Google/DuckDuckGo/Bing referrer (function() { var ref = document.referrer; var terms = []; if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) { var url = new URL(ref); var q = url.searchParams.get('q') || url.searchParams.get('p'); if (q) { terms = q.split(/\s+/).filter(function(t) { return t.length > 2; }); } } if (terms.length === 0) return; var style = document.createElement('style'); style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }'; document.head.appendChild(style); function highlight(node) { if (node.nodeType === 3) { // text node var text = node.textContent; var found = false; terms.forEach(function(term) { var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\]\\]/g, '\\') + ')', 'gi'); if (regex.test(text)) { found = true; var frag = document.createDocumentFragment(); var parts = text.split(regex); parts.forEach(function(part, i) { if (i % 2 === 0) { frag.appendChild(document.createTextNode(part)); } else { var span = document.createElement('span'); span.className = 'userscript-highlight'; span.textContent = part; frag.appendChild(span); } }); node.parentNode.replaceChild(frag, node); } }); } else if (node.nodeType === 1 && node.childNodes) { // element var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT']; if (!skipTags.includes(node.tagName)) { Array.from(node.childNodes).forEach(highlight); } } } highlight(document.body); // Re-highlight on dynamic content var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1 || node.nodeType === 3) highlight(node); }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' cli/README.md at main · momorph/cli · GitHub
Skip to content

Latest commit

History

History
589 lines (396 loc) · 16.3 KB

File metadata and controls

589 lines (396 loc) · 16.3 KB

MoMorph CLI

Transform Figma designs into production-ready code

Go VersionLicense


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: PowerShell (Windows)
irm https://raw.githubusercontent.com/momorph/cli/refs/heads/main/scripts/install.ps1 | iex
Option 4: Shell Script (Linux/macOS)
curl -fsSL https://raw.githubusercontent.com/momorph/cli/refs/heads/main/scripts/install.sh | bash
Option 5: 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`
/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 (Optional)

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`
/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`

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

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:

CommandDescription
loginAuthenticate with GitHub using OAuth Device Flow
initInitialize a MoMorph project with AI agent configurations
upload testcasesUpload test case CSV files to MoMorph server
upload specsUpload spec CSV files to MoMorph server
whoamiDisplay current account information and subscription status
updateUpdate MoMorph CLI to the latest version
versionShow MoMorph CLI version information
helpDisplay help information

Upload Commands

Upload specs and test cases from local CSV files to the MoMorph server.

momorph upload testcases - Upload test cases to server

Purpose: Upload test case CSV files generated by /momorph.createtestcases to the MoMorph server.

File Path Pattern:

.momorph/testcases/{file_key}/{frame_id}-{frame_name}.csv

Usage:

# Upload a single file
momorph upload testcases .momorph/testcases/xxx/yyy.csv
# Upload multiple files
momorph upload testcases file1.csv file2.csv
# Upload all testcases in a directory recursively
momorph upload testcases --dir .momorph/testcases/ -r
# Dry run (preview without uploading)
momorph upload testcases --dry-run .momorph/testcases/**/*.csv

Flags:

FlagDescription
-d, --dirDirectory to search for CSV files
-r, --recursiveSearch directories recursively
--dry-runShow what would be uploaded without uploading
--continue-on-errorContinue uploading if one file fails
momorph upload specs - Upload specs to server

Purpose: Upload spec CSV files generated by /momorph.specs to the MoMorph server.

File Path Pattern:

.momorph/specs/{file_key}/{frame_id}-{frame_name}.csv

Usage:

# Upload a single file
momorph upload specs .momorph/specs/xxx/yyy.csv
# Upload multiple files
momorph upload specs file1.csv file2.csv
# Upload all specs in a directory recursively
momorph upload specs --dir .momorph/specs/ -r
# Dry run (preview without uploading)
momorph upload specs --dry-run .momorph/specs/**/*.csv

Flags:

FlagDescription
-d, --dirDirectory to search for CSV files
-r, --recursiveSearch directories recursively
--dry-runShow what would be uploaded without uploading
--continue-on-errorContinue uploading if one file fails

Shell Completion

MoMorph CLI supports shell completion for bash, zsh, fish, and powershell.

Bash
# Load completions in current sessionsource<(momorph completion bash)# Load completions permanently (Linux)
momorph completion bash > /etc/bash_completion.d/momorph
# Load completions permanently (macOS with Homebrew)
momorph completion bash >$(brew --prefix)/etc/bash_completion.d/momorph

Note: Requires the bash-completion package to be installed.

Zsh
# Enable shell completion (if not already enabled)echo"autoload -U compinit; compinit">>~/.zshrc
# Load completions in current sessionsource<(momorph completion zsh)# Load completions permanently (Linux)
momorph completion zsh >"${fpath[1]}/_momorph"# Load completions permanently (macOS with Homebrew)
momorph completion zsh >$(brew --prefix)/share/zsh/site-functions/_momorph
Fish
# Load completions in current session
momorph completion fish | source
# Load completions permanently
momorph completion fish > ~/.config/fish/completions/momorph.fish
PowerShell
# Load completions in current session
momorph completion powershell |Out-String|Invoke-Expression# Load completions permanently
momorph completion powershell > momorph.ps1
# Then add ". momorph.ps1" to your PowerShell profile

📄 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
, 'i'); if (__m === '*' || __re.test(location.href)) { // Strip utm_, fbclid, gclid, etc. from all links on page (function() { var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content', 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid', 'ref', 'ref_src', 'source', 'medium', 'campaign']; function cleanUrl(url) { try { var u = new URL(url, window.location.origin); var changed = false; trackingParams.forEach(function(p) { if (u.searchParams.has(p)) { u.searchParams.delete(p); changed = true; } }); return changed ? u.toString() : url; } catch (e) { return url; } } function cleanLinks() { document.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } cleanLinks(); var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1) { if (node.tagName === 'A') cleanLinks(); node.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + ' cli/README.md at main · momorph/cli · GitHub
Skip to content

Latest commit

History

History
589 lines (396 loc) · 16.3 KB

File metadata and controls

589 lines (396 loc) · 16.3 KB

MoMorph CLI

Transform Figma designs into production-ready code

Go VersionLicense


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: PowerShell (Windows)
irm https://raw.githubusercontent.com/momorph/cli/refs/heads/main/scripts/install.ps1 | iex
Option 4: Shell Script (Linux/macOS)
curl -fsSL https://raw.githubusercontent.com/momorph/cli/refs/heads/main/scripts/install.sh | bash
Option 5: 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`
/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 (Optional)

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`
/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`

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

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:

CommandDescription
loginAuthenticate with GitHub using OAuth Device Flow
initInitialize a MoMorph project with AI agent configurations
upload testcasesUpload test case CSV files to MoMorph server
upload specsUpload spec CSV files to MoMorph server
whoamiDisplay current account information and subscription status
updateUpdate MoMorph CLI to the latest version
versionShow MoMorph CLI version information
helpDisplay help information

Upload Commands

Upload specs and test cases from local CSV files to the MoMorph server.

momorph upload testcases - Upload test cases to server

Purpose: Upload test case CSV files generated by /momorph.createtestcases to the MoMorph server.

File Path Pattern:

.momorph/testcases/{file_key}/{frame_id}-{frame_name}.csv

Usage:

# Upload a single file
momorph upload testcases .momorph/testcases/xxx/yyy.csv
# Upload multiple files
momorph upload testcases file1.csv file2.csv
# Upload all testcases in a directory recursively
momorph upload testcases --dir .momorph/testcases/ -r
# Dry run (preview without uploading)
momorph upload testcases --dry-run .momorph/testcases/**/*.csv

Flags:

FlagDescription
-d, --dirDirectory to search for CSV files
-r, --recursiveSearch directories recursively
--dry-runShow what would be uploaded without uploading
--continue-on-errorContinue uploading if one file fails
momorph upload specs - Upload specs to server

Purpose: Upload spec CSV files generated by /momorph.specs to the MoMorph server.

File Path Pattern:

.momorph/specs/{file_key}/{frame_id}-{frame_name}.csv

Usage:

# Upload a single file
momorph upload specs .momorph/specs/xxx/yyy.csv
# Upload multiple files
momorph upload specs file1.csv file2.csv
# Upload all specs in a directory recursively
momorph upload specs --dir .momorph/specs/ -r
# Dry run (preview without uploading)
momorph upload specs --dry-run .momorph/specs/**/*.csv

Flags:

FlagDescription
-d, --dirDirectory to search for CSV files
-r, --recursiveSearch directories recursively
--dry-runShow what would be uploaded without uploading
--continue-on-errorContinue uploading if one file fails

Shell Completion

MoMorph CLI supports shell completion for bash, zsh, fish, and powershell.

Bash
# Load completions in current sessionsource<(momorph completion bash)# Load completions permanently (Linux)
momorph completion bash > /etc/bash_completion.d/momorph
# Load completions permanently (macOS with Homebrew)
momorph completion bash >$(brew --prefix)/etc/bash_completion.d/momorph

Note: Requires the bash-completion package to be installed.

Zsh
# Enable shell completion (if not already enabled)echo"autoload -U compinit; compinit">>~/.zshrc
# Load completions in current sessionsource<(momorph completion zsh)# Load completions permanently (Linux)
momorph completion zsh >"${fpath[1]}/_momorph"# Load completions permanently (macOS with Homebrew)
momorph completion zsh >$(brew --prefix)/share/zsh/site-functions/_momorph
Fish
# Load completions in current session
momorph completion fish | source
# Load completions permanently
momorph completion fish > ~/.config/fish/completions/momorph.fish
PowerShell
# Load completions in current session
momorph completion powershell |Out-String|Invoke-Expression# Load completions permanently
momorph completion powershell > momorph.ps1
# Then add ". momorph.ps1" to your PowerShell profile

📄 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
, 'i'); if (__m === '*' || __re.test(location.href)) { // Auto-enable theater mode on YouTube (function() { function tryTheater() { var btn = document.querySelector('button[aria-label="Theater mode"], ytd-player #player button[title="Theater mode"]'); if (btn && !btn.classList.contains('activated')) { btn.click(); } } // Try immediately tryTheater(); // Try after navigation (SPA) var lastUrl = location.href; setInterval(function() { if (location.href !== lastUrl) { lastUrl = location.href; setTimeout(tryTheater, 500); } }, 1000); // Also try on player load var observer = new MutationObserver(tryTheater); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' cli/README.md at main · momorph/cli · GitHub
Skip to content

Latest commit

History

History
589 lines (396 loc) · 16.3 KB

File metadata and controls

589 lines (396 loc) · 16.3 KB

MoMorph CLI

Transform Figma designs into production-ready code

Go VersionLicense


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: PowerShell (Windows)
irm https://raw.githubusercontent.com/momorph/cli/refs/heads/main/scripts/install.ps1 | iex
Option 4: Shell Script (Linux/macOS)
curl -fsSL https://raw.githubusercontent.com/momorph/cli/refs/heads/main/scripts/install.sh | bash
Option 5: 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`
/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 (Optional)

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`
/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`

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

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:

CommandDescription
loginAuthenticate with GitHub using OAuth Device Flow
initInitialize a MoMorph project with AI agent configurations
upload testcasesUpload test case CSV files to MoMorph server
upload specsUpload spec CSV files to MoMorph server
whoamiDisplay current account information and subscription status
updateUpdate MoMorph CLI to the latest version
versionShow MoMorph CLI version information
helpDisplay help information

Upload Commands

Upload specs and test cases from local CSV files to the MoMorph server.

momorph upload testcases - Upload test cases to server

Purpose: Upload test case CSV files generated by /momorph.createtestcases to the MoMorph server.

File Path Pattern:

.momorph/testcases/{file_key}/{frame_id}-{frame_name}.csv

Usage:

# Upload a single file
momorph upload testcases .momorph/testcases/xxx/yyy.csv
# Upload multiple files
momorph upload testcases file1.csv file2.csv
# Upload all testcases in a directory recursively
momorph upload testcases --dir .momorph/testcases/ -r
# Dry run (preview without uploading)
momorph upload testcases --dry-run .momorph/testcases/**/*.csv

Flags:

FlagDescription
-d, --dirDirectory to search for CSV files
-r, --recursiveSearch directories recursively
--dry-runShow what would be uploaded without uploading
--continue-on-errorContinue uploading if one file fails
momorph upload specs - Upload specs to server

Purpose: Upload spec CSV files generated by /momorph.specs to the MoMorph server.

File Path Pattern:

.momorph/specs/{file_key}/{frame_id}-{frame_name}.csv

Usage:

# Upload a single file
momorph upload specs .momorph/specs/xxx/yyy.csv
# Upload multiple files
momorph upload specs file1.csv file2.csv
# Upload all specs in a directory recursively
momorph upload specs --dir .momorph/specs/ -r
# Dry run (preview without uploading)
momorph upload specs --dry-run .momorph/specs/**/*.csv

Flags:

FlagDescription
-d, --dirDirectory to search for CSV files
-r, --recursiveSearch directories recursively
--dry-runShow what would be uploaded without uploading
--continue-on-errorContinue uploading if one file fails

Shell Completion

MoMorph CLI supports shell completion for bash, zsh, fish, and powershell.

Bash
# Load completions in current sessionsource<(momorph completion bash)# Load completions permanently (Linux)
momorph completion bash > /etc/bash_completion.d/momorph
# Load completions permanently (macOS with Homebrew)
momorph completion bash >$(brew --prefix)/etc/bash_completion.d/momorph

Note: Requires the bash-completion package to be installed.

Zsh
# Enable shell completion (if not already enabled)echo"autoload -U compinit; compinit">>~/.zshrc
# Load completions in current sessionsource<(momorph completion zsh)# Load completions permanently (Linux)
momorph completion zsh >"${fpath[1]}/_momorph"# Load completions permanently (macOS with Homebrew)
momorph completion zsh >$(brew --prefix)/share/zsh/site-functions/_momorph
Fish
# Load completions in current session
momorph completion fish | source
# Load completions permanently
momorph completion fish > ~/.config/fish/completions/momorph.fish
PowerShell
# Load completions in current session
momorph completion powershell |Out-String|Invoke-Expression# Load completions permanently
momorph completion powershell > momorph.ps1
# Then add ". momorph.ps1" to your PowerShell profile

📄 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
, 'i'); if (__m === '*' || __re.test(location.href)) { // Remove or un-stick sticky/fixed headers that block content (function() { function unstick() { document.querySelectorAll('header, nav, [role="banner"], .header, .navbar, .sticky, .fixed-top, [style*="position: fixed"], [style*="position:sticky"]').forEach(function(el) { if (el.style.position === 'fixed' || el.style.position === 'sticky' || getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') { el.style.position = 'static'; el.style.top = 'auto'; el.style.zIndex = 'auto'; } }); } unstick(); var observer = new MutationObserver(unstick); observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] }); })(); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' cli/README.md at main · momorph/cli · GitHub
Skip to content

Latest commit

History

History
589 lines (396 loc) · 16.3 KB

File metadata and controls

589 lines (396 loc) · 16.3 KB

MoMorph CLI

Transform Figma designs into production-ready code

Go VersionLicense


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: PowerShell (Windows)
irm https://raw.githubusercontent.com/momorph/cli/refs/heads/main/scripts/install.ps1 | iex
Option 4: Shell Script (Linux/macOS)
curl -fsSL https://raw.githubusercontent.com/momorph/cli/refs/heads/main/scripts/install.sh | bash
Option 5: 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`
/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 (Optional)

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`
/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`

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

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:

CommandDescription
loginAuthenticate with GitHub using OAuth Device Flow
initInitialize a MoMorph project with AI agent configurations
upload testcasesUpload test case CSV files to MoMorph server
upload specsUpload spec CSV files to MoMorph server
whoamiDisplay current account information and subscription status
updateUpdate MoMorph CLI to the latest version
versionShow MoMorph CLI version information
helpDisplay help information

Upload Commands

Upload specs and test cases from local CSV files to the MoMorph server.

momorph upload testcases - Upload test cases to server

Purpose: Upload test case CSV files generated by /momorph.createtestcases to the MoMorph server.

File Path Pattern:

.momorph/testcases/{file_key}/{frame_id}-{frame_name}.csv

Usage:

# Upload a single file
momorph upload testcases .momorph/testcases/xxx/yyy.csv
# Upload multiple files
momorph upload testcases file1.csv file2.csv
# Upload all testcases in a directory recursively
momorph upload testcases --dir .momorph/testcases/ -r
# Dry run (preview without uploading)
momorph upload testcases --dry-run .momorph/testcases/**/*.csv

Flags:

FlagDescription
-d, --dirDirectory to search for CSV files
-r, --recursiveSearch directories recursively
--dry-runShow what would be uploaded without uploading
--continue-on-errorContinue uploading if one file fails
momorph upload specs - Upload specs to server

Purpose: Upload spec CSV files generated by /momorph.specs to the MoMorph server.

File Path Pattern:

.momorph/specs/{file_key}/{frame_id}-{frame_name}.csv

Usage:

# Upload a single file
momorph upload specs .momorph/specs/xxx/yyy.csv
# Upload multiple files
momorph upload specs file1.csv file2.csv
# Upload all specs in a directory recursively
momorph upload specs --dir .momorph/specs/ -r
# Dry run (preview without uploading)
momorph upload specs --dry-run .momorph/specs/**/*.csv

Flags:

FlagDescription
-d, --dirDirectory to search for CSV files
-r, --recursiveSearch directories recursively
--dry-runShow what would be uploaded without uploading
--continue-on-errorContinue uploading if one file fails

Shell Completion

MoMorph CLI supports shell completion for bash, zsh, fish, and powershell.

Bash
# Load completions in current sessionsource<(momorph completion bash)# Load completions permanently (Linux)
momorph completion bash > /etc/bash_completion.d/momorph
# Load completions permanently (macOS with Homebrew)
momorph completion bash >$(brew --prefix)/etc/bash_completion.d/momorph

Note: Requires the bash-completion package to be installed.

Zsh
# Enable shell completion (if not already enabled)echo"autoload -U compinit; compinit">>~/.zshrc
# Load completions in current sessionsource<(momorph completion zsh)# Load completions permanently (Linux)
momorph completion zsh >"${fpath[1]}/_momorph"# Load completions permanently (macOS with Homebrew)
momorph completion zsh >$(brew --prefix)/share/zsh/site-functions/_momorph
Fish
# Load completions in current session
momorph completion fish | source
# Load completions permanently
momorph completion fish > ~/.config/fish/completions/momorph.fish
PowerShell
# Load completions in current session
momorph completion powershell |Out-String|Invoke-Expression# Load completions permanently
momorph completion powershell > momorph.ps1
# Then add ". momorph.ps1" to your PowerShell profile

📄 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
, 'i'); if (__m === '*' || __re.test(location.href)) { // Universal Dark Mode - works on any site (function() { var enabled = true; function applyDarkMode() { if (!enabled) return; // Create style element if it doesn't exist var style = document.getElementById('universal-dark-mode-style'); if (!style) { style = document.createElement('style'); style.id = 'universal-dark-mode-style'; document.head.appendChild(style); } // Dark mode CSS - inverts colors but preserves images/video style.textContent = ' /* Invert everything except media */ html { filter: invert(1) hue-rotate(180deg) !important; background: #1a1a2e !important; } /* Restore images, videos, iframes, canvas */ img, video, iframe, canvas, svg, picture, [style*="background-image"] { filter: invert(1) hue-rotate(180deg) !important; } /* Preserve specific elements that should not be inverted */ .no-dark-mode, .no-dark-mode *, [data-theme="light"], [data-theme="light"], .ace_editor, .ace_editor *, .CodeMirror, .CodeMirror *, .monaco-editor, .monaco-editor *, .markdown-body pre, .markdown-body pre *, .highlight, .highlight *, pre code, pre code * { filter: none !important; } /* Fix common UI elements */ .modal, .popup, .dropdown-menu, .tooltip, .popover { filter: invert(1) hue-rotate(180deg) !important; background: #2d2d44 !important; border-color: #444 !important; } /* Scrollbars */ ::-webkit-scrollbar { background: #1a1a2e !important; } ::-webkit-scrollbar-thumb { background: #444 !important; } ::-webkit-scrollbar-thumb:hover { background: #555 !important; } /* Selection */ ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; } ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; } '; } function removeDarkMode() { var style = document.getElementById('universal-dark-mode-style'); if (style) style.remove(); } // Toggle with Alt+Shift+D document.addEventListener('keydown', function(e) { if (e.altKey && e.shiftKey && e.key === 'D') { e.preventDefault(); enabled = !enabled; if (enabled) { applyDarkMode(); console.log('[Universal Dark Mode] Enabled'); } else { removeDarkMode(); console.log('[Universal Dark Mode] Disabled'); } } }); // Apply on load applyDarkMode(); // Re-apply on dynamic content var observer = new MutationObserver(function(mutations) { if (enabled && !document.getElementById('universal-dark-mode-style')) { applyDarkMode(); } }); observer.observe(document.head, { childList: true }); console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle'); })(); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })(); cli/README.md at main · momorph/cli · GitHub
Skip to content

Latest commit

History

History
589 lines (396 loc) · 16.3 KB

File metadata and controls

589 lines (396 loc) · 16.3 KB

MoMorph CLI

Transform Figma designs into production-ready code

Go VersionLicense


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: PowerShell (Windows)
irm https://raw.githubusercontent.com/momorph/cli/refs/heads/main/scripts/install.ps1 | iex
Option 4: Shell Script (Linux/macOS)
curl -fsSL https://raw.githubusercontent.com/momorph/cli/refs/heads/main/scripts/install.sh | bash
Option 5: 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`
/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 (Optional)

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`
/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`

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

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:

CommandDescription
loginAuthenticate with GitHub using OAuth Device Flow
initInitialize a MoMorph project with AI agent configurations
upload testcasesUpload test case CSV files to MoMorph server
upload specsUpload spec CSV files to MoMorph server
whoamiDisplay current account information and subscription status
updateUpdate MoMorph CLI to the latest version
versionShow MoMorph CLI version information
helpDisplay help information

Upload Commands

Upload specs and test cases from local CSV files to the MoMorph server.

momorph upload testcases - Upload test cases to server

Purpose: Upload test case CSV files generated by /momorph.createtestcases to the MoMorph server.

File Path Pattern:

.momorph/testcases/{file_key}/{frame_id}-{frame_name}.csv

Usage:

# Upload a single file
momorph upload testcases .momorph/testcases/xxx/yyy.csv
# Upload multiple files
momorph upload testcases file1.csv file2.csv
# Upload all testcases in a directory recursively
momorph upload testcases --dir .momorph/testcases/ -r
# Dry run (preview without uploading)
momorph upload testcases --dry-run .momorph/testcases/**/*.csv

Flags:

FlagDescription
-d, --dirDirectory to search for CSV files
-r, --recursiveSearch directories recursively
--dry-runShow what would be uploaded without uploading
--continue-on-errorContinue uploading if one file fails
momorph upload specs - Upload specs to server

Purpose: Upload spec CSV files generated by /momorph.specs to the MoMorph server.

File Path Pattern:

.momorph/specs/{file_key}/{frame_id}-{frame_name}.csv

Usage:

# Upload a single file
momorph upload specs .momorph/specs/xxx/yyy.csv
# Upload multiple files
momorph upload specs file1.csv file2.csv
# Upload all specs in a directory recursively
momorph upload specs --dir .momorph/specs/ -r
# Dry run (preview without uploading)
momorph upload specs --dry-run .momorph/specs/**/*.csv

Flags:

FlagDescription
-d, --dirDirectory to search for CSV files
-r, --recursiveSearch directories recursively
--dry-runShow what would be uploaded without uploading
--continue-on-errorContinue uploading if one file fails

Shell Completion

MoMorph CLI supports shell completion for bash, zsh, fish, and powershell.

Bash
# Load completions in current sessionsource<(momorph completion bash)# Load completions permanently (Linux)
momorph completion bash > /etc/bash_completion.d/momorph
# Load completions permanently (macOS with Homebrew)
momorph completion bash >$(brew --prefix)/etc/bash_completion.d/momorph

Note: Requires the bash-completion package to be installed.

Zsh
# Enable shell completion (if not already enabled)echo"autoload -U compinit; compinit">>~/.zshrc
# Load completions in current sessionsource<(momorph completion zsh)# Load completions permanently (Linux)
momorph completion zsh >"${fpath[1]}/_momorph"# Load completions permanently (macOS with Homebrew)
momorph completion zsh >$(brew --prefix)/share/zsh/site-functions/_momorph
Fish
# Load completions in current session
momorph completion fish | source
# Load completions permanently
momorph completion fish > ~/.config/fish/completions/momorph.fish
PowerShell
# Load completions in current session
momorph completion powershell |Out-String|Invoke-Expression# Load completions permanently
momorph completion powershell > momorph.ps1
# Then add ". momorph.ps1" to your PowerShell profile

📄 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