0.1.0-beta.5 • Published 8 months ago

motia v0.1.0-beta.5

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

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 motia

Quick Start

Ready to get started in minutes? Follow these simple steps using pnpm and the automated project creation:

  1. Create a new project using the Motia CLI:

    npx motia create -t default -n my-motia-project

    (Replace my-motia-project with 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
  2. Navigate into your new project directory:

    cd my-motia-project
  3. Start the Motia development server:

    pnpm run dev

    This will launch the Motia server and the Workbench UI (typically at http://localhost:3000).

  4. Open the Motia Workbench in your browser (usually http://localhost:3000). You should see a pre-built flow named "default" with example steps visualized.

  5. Test an example API Step: In your terminal, use curl to trigger the example API endpoint (often /default in 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 init

motia build

Builds a lock file based on your current project setup which is then used by the Motia ecosystem.

motia build

motia dev

Initiates a dev environment for your project allowing you to use Motia Workbench (visualization tool for your flows).

motia dev

Visualizing Workflows

Motia Workbench provides a visual interface to inspect and debug your workflows:

motia dev

Then 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> --help

Documentation

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.

0.1.0-beta.5

8 months ago

0.1.0-beta.3

8 months ago

0.1.0-beta.2

8 months ago

0.1.0-beta

8 months ago

0.1.0-alpha.9

8 months ago

0.1.0-alpha.8

8 months ago

0.1.0-alpha.7

8 months ago

0.1.0-alpha.6

8 months ago

0.1.0-alpha.5

8 months ago

0.1.0-alpha.4

8 months ago

0.1.0-alpha.3

8 months ago

0.1.0-alpha.2

8 months ago

0.1.0-alpha

8 months ago

0.0.39-alpha

8 months ago

0.0.38-alpha

8 months ago

0.0.37

8 months ago

0.0.36

8 months ago

0.0.34

8 months ago

0.0.33

8 months ago

0.0.32

8 months ago

0.0.31

8 months ago

0.0.30

8 months ago

0.0.29

9 months ago

0.0.28

9 months ago

0.0.27

9 months ago

0.0.26

9 months ago

0.0.25

9 months ago

0.0.24

9 months ago

0.0.23

9 months ago

0.0.22

9 months ago

0.0.21

9 months ago

0.0.20

9 months ago

0.0.19

9 months ago

0.0.18

9 months ago

0.0.17

9 months ago

0.0.16

10 months ago

0.0.15

10 months ago

0.0.14

10 months ago

0.0.3

10 months ago

0.0.2

10 months ago

0.0.1

10 months ago