motia-config

A configuration guide for Motia applications, including the central motia.config.ts file and related project settings. Motia is an application framework that uses JavaScript modules and configurable plugins, adapters, authentication, and Express settings.

In plain words
What is it for?
Use it when creating or updating a Motia project, configuring plugins and adapters, setting stream authentication, adjusting Express options, and adding the required package scripts.
Why use it?
It helps prevent setup and import errors caused by missing ES module configuration or an incomplete Motia configuration file.

Cursor rule for Cursor

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add rules/crypticsaiyan/githubwrapped/motia-config
Clone the repo
git clone --depth 1 https://github.com/crypticsaiyan/githubwrapped

Made for: Cursor.

Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 3,320 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.03320
Opus 5 $0.00000 $0.01660
Sonnet 5 $0.00000 $0.00664
Haiku 4.5 $0.00000 $0.00332

Measured 2d ago against content hash d5d13c500a6b, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

motia-config scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursor/rules/motia/motia-config.mdc · 535 lines

How it starts

The opening of the file, as written. The whole thing — 535 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Motia Configuration Guide

The motia.config.ts file is the central configuration file for your Motia application. It allows you to customize plugins, adapters, stream authentication, and Express app settings.

Critical Requirement: package.json Must Use ES Modules

All Motia projects MUST have "type": "module" in their package.json.

Motia uses ES modules internally and requires this setting to function correctly. Without it, you may encounter import/export errors during runtime.

Correct package.json Setup

{
  "name": "my-motia-project",
  "description": "My Motia application",
  "type": "module",
  "scripts": {
    "postinstall": "motia install",
    "dev": "motia dev",
    "start": "motia start",
    "build": "motia build",
    "generate-types": "motia generate-types"
  }
}

Migration from Existing Projects

If you have an existing Motia project, ensure you add "type": "module" to your package.json:

{
  "name": "my-project",
  "type": "module",  // ← Add this line
  "scripts": {
    "dev": "motia dev"
  }
}

Creating the Configuration File

Create a motia.config.ts file in the root of your project:

import { config } from 'motia'

export default config({
  plugins: [],
  adapters: {},
  streamAuth: undefined,
  app: undefined,
})

Creating Projects Without Embedded Redis

By default, Motia includes an embedded Redis binary for easy local development. However, if you prefer to use your own external Redis instance, you can use the --skip-redis flag when creating a new project:

npx motia create my-app --skip-redis

This flag:

  • Skips the embedded Redis binary installation
  • Creates a motia.config.ts pre-configured for external Redis connection
  • Requires you to provide your own Redis instance before running Motia

When using --skip-redis, you'll need to ensure Redis is running and properly configured in your motia.config.ts file (see Redis Configuration section below).

Read the full file on GitHub · 535 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 535 lines · 0 tokens per session scan A d5d13c500a6b

Subscribe to this mod's changes

motia-config is a cursor rule published in the GitHub repository crypticsaiyan/githubwrapped (5 stars, last pushed 8mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 3,320 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.