malv dev
Run your project locally. This starts all your apps and infrastructure so you can develop and test.
Usage
malv dev
What It Does
- Finds
malv.jsonin the current or parent directories - Resolves where each app lives (workspace, local path, or registry)
- Starts each app on an available port (4550, 4551, etc.)
- Starts the infrastructure server on port 59459
- Watches for file changes and hot-reloads
The Infrastructure Server
During development, a local server provides all the infrastructure services:
| Endpoint | What It Does |
|---|---|
/apps |
Serves app metadata for discovery |
/token |
Signs and verifies tokens |
/storage |
Handles storage operations |
/search |
Semantic search across storage |
Your apps talk to http://localhost:59459 instead of production services. The code is identical - only the URLs change.
Environment Variables
The CLI injects environment variables for your web projects:
| Variable | Example | What It's For |
|---|---|---|
VITE_MALV_APPS_URL |
http://localhost:59459/apps |
App discovery |
VITE_MALV_STORAGE_URL |
http://localhost:59459/storage |
Storage access |
VITE_APP_MY_APP |
http://localhost:4550 |
Individual app URLs |
App names are converted to variable format: @my-org/my-app becomes VITE_APP_MY_ORG_MY_APP.
Output
You'll see which apps are starting and their ports:
Starting apps...
@my-org/notes → http://localhost:4550
@my-org/auth → http://localhost:4551
@my-org/email → http://localhost:4552
Infrastructure server running at http://localhost:59459
Watching for changes...
Options
# Show detailed output from all processes
malv dev --verbose
Hot Reload
When you change a file:
- TypeScript files - App rebuilds and restarts
- JSON config files - Changes picked up on next request
- Web files - Vite hot-reloads in the browser
You don't need to restart malv dev during normal development.
Checking App Status
While malv dev is running, you can check what's happening:
# In another terminal
malv logs
This shows a unified log stream from all running apps.
Stopping
Press Ctrl+C to stop all apps and the infrastructure server.
Common Issues
Port already in use
Another process is using port 59459 or one of the app ports. Stop the other process or use:
lsof -i :59459
kill <pid>
App not starting
Check for TypeScript errors:
malv validate
Changes not reflecting
Make sure the file watcher detected your change. Check the console output or restart malv dev.