motia v0.1.0-beta.5
Motia
What is Motia?
Motia is a lightweight, flexible framework for building complex workflows and business processes across multiple programming languages. It allows you to define, visualize, and execute workflows with a clean, declarative API in JavaScript, TypeScript, Ruby, Python, and more languages coming soon.
Key features:
- 🔄 Declarative Workflows: Define complex processes with a simple, readable syntax
- 🛠️ Type-Safe: Built with strong typing support for all supported languages
- 🔍 Visualizable: Inspect and debug your workflows with Motia Workbench
- 🧩 Composable: Build complex workflows from reusable components
- 🚀 Multi-Language Support: Works with JavaScript, TypeScript, Ruby, Python, with more languages coming soon
- 🌐 Framework Agnostic: Integrates with any framework in your language of choice
Installation
JavaScript/TypeScript
npm install motia
# or
yarn add motia
# or
pnpm add motiaQuick Start
Ready to get started in minutes? Follow these simple steps using pnpm and the automated project creation:
Create a new project using the Motia CLI:
npx motia create -t default -n my-motia-project(Replace
my-motia-projectwith your desired project name)This command will:
- Create a new folder
my-motia-project - Set up a basic Motia project with example steps
- Install dependencies using pnpm
- Create a new folder
Navigate into your new project directory:
cd my-motia-projectStart the Motia development server:
pnpm run devThis will launch the Motia server and the Workbench UI (typically at
http://localhost:3000).Open the Motia Workbench in your browser (usually
http://localhost:3000). You should see a pre-built flow named "default" with example steps visualized.Test an example API Step: In your terminal, use
curlto trigger the example API endpoint (often/defaultin the default template):curl -X POST http://localhost:3000/default \ -H "Content-Type: application/json" \ -d '{}'Alternatively, use the Motia CLI to emit an event (for event-based steps in the template):
npx motia emit --topic test-state --message '{}'Check the Workbench logs – you should see logs indicating the step execution and event flow!
Congratulations! You've just created and run your first Motia workflow using the automated project setup.
CLI Commands
Motia comes with a powerful CLI to help you manage your projects:
motia init
Initializes a new Motia project in the current directory.
motia initmotia build
Builds a lock file based on your current project setup which is then used by the Motia ecosystem.
motia buildmotia dev
Initiates a dev environment for your project allowing you to use Motia Workbench (visualization tool for your flows).
motia devVisualizing Workflows
Motia Workbench provides a visual interface to inspect and debug your workflows:
motia devThen open your browser at http://localhost:3000 to see your workflows in action.
Language Support
Motia currently supports:
- JavaScript
- TypeScript
- Ruby
- Python
With more languages coming soon!
Help
For more information on a specific command, you can use the --help flag:
motia <command> --helpDocumentation
For full documentation, visit https://motia.dev/docs
Contributing
We welcome contributions! Please see our Contributing Guide for details.
License
This project is licensed under the MIT License.
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago