Skip to main content

Myop CLI

The Myop CLI is a command-line tool for creating, developing, and deploying Myop components — isolated, independently deployable UI modules that integrate into any host application.

npm install -g myop
# or use directly
npx myop create

Workflow

Build a component in three steps — create, develop, deploy:

Myop CLI workflow: create, develop, deploy
StepCommandWhat happens
Createnpx myop createScaffolds index.html + myop.config.json, installs AI skills, starts dev server
Developnpx myop devLocal dev server on port 9292 with hot reload
Deploynpx myop pushUploads to Myop platform — live instantly, no redeploy needed

Component Public API

Every Myop component communicates through exactly 2 global functions:

Myop component public API — myop_init_interface and myop_cta_handler
FunctionDirectionPurpose
myop_init_interface(data)Host → ComponentReceive data, render UI
myop_cta_handler(action, payload)Component → HostSend user actions back

Types are defined in a <script type="myop/types"> block with TypeScript interfaces — used by auto-generated packages and AI coding assistants.

Learn more about component development →


Dev Server

Start a local development server with file watching and instant HMR:

Myop dev server with hot reload on port 9292
npx myop dev        # Single component
npx myop dev -m # Monorepo mode — multiple components
  • Port 9292 — Component preview with hot reload
  • Port 9293 — Management dashboard
  • Monorepo mode — Serve multiple components simultaneously
Myop DevTools Dashboard

Learn more about the dev server →


Host Integration

Embed Myop components in any framework with the official SDKs:

Myop host SDKs for React, Vue, Angular, and React Native
import { MyopComponent } from "@myop/react";

<MyopComponent
componentId="your-component-id"
data={{ title: "Hello", items: ["a", "b"] }}
onItemSelected={({ itemId }) => console.log(itemId)}
/>

All SDKs support typed event handlers, data binding, preloading, auto-sizing, custom loaders/fallbacks, and enableLocalDev() for local development.

Learn more about host integration →


Push & Pull

Deploy components and download them from the Myop platform:

npx myop push                  # Deploy to Myop
npx myop pull <componentId> # Download component
npx myop list # Browse, search, batch pull/push
  • First push assigns a componentId (UUID) and saves it to myop.config.json
  • Subsequent pushes add new versions — live instantly
  • myop list provides interactive search with multi-select for batch operations

Learn more about push & pull →


AI Integration

Teach AI coding assistants how to build Myop components and give them platform access:

myop train installs skills for 30+ AI coding assistants
npx myop train    # Install AI agent skills (30+ assistants)
npx myop mcp # Configure MCP server (Claude Code, Cursor, Windsurf, Copilot)

myop train installs SKILL.md files using the Agent Skills standard — works with Claude Code, Cursor, Windsurf, VS Code Copilot, Kiro, Goose, Augment, Cline, and 30+ more.

myop mcp configures the Myop MCP server so your AI assistant can upload, list, and read components directly.

Learn more about AI integration →


All Commands

CommandDescription
myop createCreate a new component
myop devStart dev server with HMR
myop pushDeploy component to Myop
myop pullDownload component from Myop
myop listBrowse and batch operations
myop trainInstall AI agent skills
myop mcpConfigure MCP server
myop loginAuthenticate with Myop
myop logoutClear credentials
myop whoamiShow current user

Full commands reference →