Skip to content

Commit 10a0d5a

Browse files
authored
feat: add start command to docs and templates (#996)
1 parent 5a7c0d1 commit 10a0d5a

File tree

11 files changed

+92
-6
lines changed

11 files changed

+92
-6
lines changed

packages/docs/content/docs/api-reference.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1391,7 +1391,7 @@ motia dev --port 4000 --host 0.0.0.0
13911391

13921392
### `motia start`
13931393

1394-
Start production server (no Workbench, no hot reload).
1394+
Start production server without hot reload. Workbench is included by default (can be disabled via `MOTIA_DOCKER_DISABLE_WORKBENCH` environment variable).
13951395

13961396
```bash
13971397
motia start

packages/docs/content/docs/development-guide/cli.mdx

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ The deployment process:
110110

111111
### `dev`
112112

113-
Start the development server.
113+
Start the development server with hot reload and Workbench.
114114

115115
```bash
116116
npx motia dev [options]
@@ -121,6 +121,36 @@ Options:
121121
- `-p, --port <port>`: The port to run the server on (default: 3000).
122122
- `-H, --host [host]`: The host address for the server (default: localhost).
123123
- `-d, --debug`: Enable debug logging.
124+
- `-m, --mermaid`: Enable Mermaid diagram generation.
125+
- `--motia-dir <path>`: Custom path for `.motia` folder.
126+
127+
### `start`
128+
129+
Start the production server without hot reload. Workbench is included by default (can be disabled via `MOTIA_DOCKER_DISABLE_WORKBENCH` environment variable).
130+
131+
```bash
132+
npx motia start [options]
133+
```
134+
135+
Options:
136+
137+
- `-p, --port <port>`: The port to run the server on (default: 3000).
138+
- `-H, --host [host]`: The host address for the server (default: localhost).
139+
- `-d, --debug`: Enable debug logging.
140+
- `--motia-dir <path>`: Custom path for `.motia` folder.
141+
142+
Example:
143+
144+
```bash
145+
# Start production server on port 8080
146+
npx motia start --port 8080
147+
148+
# Start on a specific host
149+
npx motia start --host 0.0.0.0 --port 3000
150+
151+
# Start without Workbench
152+
MOTIA_DOCKER_DISABLE_WORKBENCH=true npx motia start
153+
```
124154

125155
### `get-config`
126156

packages/docs/public/llm-docs/concepts/cli.mdx.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ The deployment process:
7373

7474
### `dev`
7575

76-
Start the development server.
76+
Start the development server with hot reload and Workbench.
7777

7878
```bash
7979
npx motia dev [options]
@@ -84,6 +84,23 @@ Options:
8484
- `-p, --port <port>`: The port to run the server on (default: 3000).
8585
- `-H, --host [host]`: The host address for the server (default: localhost).
8686
- `-d, --debug`: Enable debug logging.
87+
- `-m, --mermaid`: Enable Mermaid diagram generation.
88+
- `--motia-dir <path>`: Custom path for `.motia` folder.
89+
90+
### `start`
91+
92+
Start the production server without hot reload. Workbench is included by default (can be disabled via `MOTIA_DOCKER_DISABLE_WORKBENCH` environment variable).
93+
94+
```bash
95+
npx motia start [options]
96+
```
97+
98+
Options:
99+
100+
- `-p, --port <port>`: The port to run the server on (default: 3000).
101+
- `-H, --host [host]`: The host address for the server (default: localhost).
102+
- `-d, --debug`: Enable debug logging.
103+
- `--motia-dir <path>`: Custom path for `.motia` folder.
87104

88105
### `get-config`
89106

packages/snap/src/create/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ export const create = async ({ projectName, template, cursorEnabled, context }:
125125
scripts: {
126126
postinstall: 'motia install',
127127
dev: 'motia dev',
128+
start: 'motia start',
128129
'generate-types': 'motia generate-types',
129130
build: 'motia build',
130131
clean: 'rm -rf dist node_modules python_modules .motia .mermaid',

packages/snap/src/create/templates/hello/README.md.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,13 @@ yarn dev
4444
# or
4545
pnpm dev
4646

47+
# Start production server (without hot reload)
48+
npm run start
49+
# or
50+
yarn start
51+
# or
52+
pnpm start
53+
4754
# Generate TypeScript types from Step configs
4855
npm run generate-types
4956
# or

packages/snap/src/create/templates/hello_js/README.md.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,13 @@ yarn dev
4444
# or
4545
pnpm dev
4646

47+
# Start production server (without hot reload)
48+
npm run start
49+
# or
50+
yarn start
51+
# or
52+
pnpm start
53+
4754
# Generate TypeScript types from Step configs
4855
npm run generate-types
4956
# or

packages/snap/src/create/templates/hello_python/README.md.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,13 @@ yarn dev
4444
# or
4545
pnpm dev
4646

47+
# Start production server (without hot reload)
48+
npm run start
49+
# or
50+
yarn start
51+
# or
52+
pnpm start
53+
4754
# Generate TypeScript types from Step configs
4855
npm run generate-types
4956
# or

packages/snap/src/create/templates/nodejs/README.md.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,13 @@ yarn dev
4343
# or
4444
pnpm dev
4545

46+
# Start production server (without hot reload)
47+
npm run start
48+
# or
49+
yarn start
50+
# or
51+
pnpm start
52+
4653
# Generate TypeScript types from Step configs
4754
npm run generate-types
4855
# or

packages/snap/src/create/templates/python/README.md.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,13 @@ yarn dev
4343
# or
4444
pnpm dev
4545

46+
# Start production server (without hot reload)
47+
npm run start
48+
# or
49+
yarn start
50+
# or
51+
pnpm start
52+
4653
# Generate TypeScript types from Step configs
4754
npm run generate-types
4855
# or

packages/snap/src/cursor-rules/dot-files/AGENTS.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,12 @@ This is a **Motia** application - a framework for building event-driven, type-sa
2020
# Install dependencies
2121
npm install
2222

23-
# Start development server
23+
# Start development server (with hot reload)
2424
npm run dev
2525

26+
# Start production server (without hot reload)
27+
npm run start
28+
2629
# Generate TypeScript types from steps
2730
npx motia generate-types
2831
```

0 commit comments

Comments
 (0)