malv create

Scaffold a new project with the recommended structure.

Usage

malv create

What It Does

The command walks you through creating a new project:

  1. Asks for a project name
  2. Creates the directory structure
  3. Sets up malv.json and package.json
  4. Initializes git (optional)

Project Structure

After running malv create, you get:

my-project/
├── malv.json          # Project configuration
├── .malv/             # Generated files (gitignored)
├── packages/
│   ├── apps/          # Your apps live here
│   └── web/           # Web interfaces
├── package.json
└── .gitignore

The malv.json File

This is your project's configuration:

{
  "apps": {},
  "web": []
}

Add apps as you create them:

{
  "apps": {
    "@my-org/notes": "workspace:*",
    "@my-org/auth": "workspace:*"
  },
  "web": ["packages/web"]
}

App Locations

The apps field maps app names to their locations:

Format What It Means
workspace:* Find automatically in the workspace
workspace:path Specific path relative to project root
./path Local path
1.0.0 Registry version
^1.2.0 Registry version with semver range

For local development, workspace:* is the most common. The CLI searches your project for a matching folder.

Next Steps

After creating a project:

cd my-project
yarn install

Then create your first app in packages/apps/:

packages/apps/my-app/
├── src/
│   └── tools/
├── tools.json
└── package.json

Add it to malv.json:

{
  "apps": {
    "@my-org/my-app": "workspace:*"
  }
}

And start developing:

malv dev