---
name: mprove-basic
description: Mprove Basics
---

# mprove-basic

Use `mprove` CLI for `sync` command only. 
For other tasks, use Mprove MCP tools.

When you start to work on session - run `mprove sync --from-server --env <env-id>`
to make the local and server repo state the same by applying SERVER repo state to local repo.

If you created/deleted/changed files, run `mprove sync --env <env-id>` to make the local and 
server repo state the same by applying LOCAL repo state to server repo.

Sync command also validates (rebuilds) Mprove and Malloy files.

If project has no `mprove.yml` file - you should setup Mprove project first.

## Mprove project setup

The flow for setup a new Mprove project:

- create `.gitignore` file if not exist (or add missing parts from `.gitignore` example)
- load more relevant skills to context if needed
- call `get-schemas` tool. If there are no connections, ask the user to create Mprove database connection in UI before proceeding to the next step.
- create `mprove.yml` (if not exist)
- call `get-state` tool
- create `.schema` file for metadata and relationships (use `get-schemas` and `get-sample` tools to understand relationships)
- create Mprove model(s) based on Malloy sources
- create Mprove report, dashboard, chart
- run report, dashboard, chart
- provide report, dashboard, chart links to user

## Load more relevant skills if needed

- mprove-project-structure (Files and folders structure patterns)
- mprove-connection-schemas (`.schema` metadata files)
- mprove-build-malloy-model (Build Mprove Model based on Malloy sources)
- mprove-build-store-model (Build Mprove `*.store` Model file based on HTTP API sources)
- mprove-build-chart (Build Mprove Chart)
- mprove-build-report (Build Mprove Report)
- mprove-build-dashboard (Build Mprove Dashboard)
- mprove-query-data (Query chart, dashboard, report or build a new one. Answer question using data.)

## Notes

If YAML property has an array type - use an empty array [] instead of undefined or null value.

Mprove Reports are much more useful for Metrics (measures + time based dimension) than Mprove Charts or Dashboards.

## .gitignore Example

```
*.env
.envrc

.DS_Store
Thumbs.db
```

## Malloy Docs

When you need to look up Malloy documentation, check https://docs.malloydata.dev/documentation/user_guides/quickstart_modeling and/or other pages based on task.
