# Quickstart

> Connect a cloud account, create a pipeline from the CI/CD template, check it, and run it.

Web page: https://docs.cadence.ci/en/quickstart

Run the CI/CD template with its steps on machines Cadence.CI starts in your cloud account, and follow the run in the console.

You need:

- [Mélodium](https://melodium.tech/en/download) 0.11 or later (`melodium --version`);
- a Cadence.CI account: the free Access plan is enough;
- a cloud account with one of the [supported providers](https://docs.cadence.ci/en/how-it-works/clouds.md#supported-cloud-providers).

## 1. Connect Your Cloud Account

In the console, open [**Clouds**](https://console.cadence.ci/clouds), pick your provider, and click **Connect**. [Connect a Cloud](https://docs.cadence.ci/en/console/clouds.md) lists the fields to fill in and the permissions the credentials need.

## 2. Create the Pipeline

At the root of a Git repository:

```sh
melodium new --template cicd --path .melodium-ci cicd
```

This creates `.melodium-ci/` with the CI/CD program: a `build` step and a `test` step, each in its own container on its own machine, the first one streaming a file to the second. [CI/CD Template](https://docs.cadence.ci/en/from-template/cicd.md) explains each part.

## 3. Check It

```sh
melodium check .melodium-ci/Compo.toml
```

Nothing runs yet: Mélodium checks the whole program, types, connections and parameters, and prints nothing when it is valid. A mistake is reported here, with its line and its cause, in about a second instead of minutes later on a runner.

## 4. Create a Run Token

In the console, open [**Keys**](https://console.cadence.ci/tokens), then **Create Token** next to **Run Tokens**. Copy the token when it appears: it is shown only once.

## 5. Run It

```sh
export MELODIUM_API_TOKEN="<your run token>"
melodium run --api-report .melodium-ci/Compo.toml \
  --repository_clone_url "https://github.com/<you>/<repository>.git" \
  --repository_clone_ref main
```

- `--api-report` reports the run to Cadence.CI, with its logs, debug events and program.
- The template finds the run token in `MELODIUM_API_TOKEN` and asks Cadence.CI for a machine for each step. Cadence.CI starts them in your cloud account and stops them when the steps end.
- The build step clones the repository itself, so use one it can reach, such as a public repository.

The logs also print in your terminal. The template's steps ask for ARM64 machines: if the run shows **Unschedulable**, none of your connected accounts offers a matching instance type, see [How Instance Selection Works](https://docs.cadence.ci/en/console/clouds.md#how-the-match-happens).

No cloud account at hand yet? Add `--work_location compose` to run the steps as containers on your machine, with Docker or Podman and Compose installed.

## 6. Follow the Run

Open [**Runs**](https://console.cadence.ci/runs) in the console. The run page shows the pipeline graph with the timeline of what the engine did, the logs, and the debug events. [View Results](https://docs.cadence.ci/en/console/runs.md) walks through each part.

*Screenshot: Pipeline graph and debug timeline of a run*

## Next Steps

- [How It Works](https://docs.cadence.ci/en/how-it-works/general.md): the life of a run, step by step.
- [Concepts](https://docs.cadence.ci/en/how-it-works/concepts.md): programs, runs, runners and tokens, defined.
- [What Goes Through Cadence.CI](https://docs.cadence.ci/en/how-it-works/data-flows.md): what Cadence.CI receives, and where your secrets are kept.
- [Build a Pipeline with AI](https://docs.cadence.ci/en/with-ai/build-pipeline.md).
- [Open-source plan](https://cadence.ci/en/open-source): free for open-source projects, with public runs.
- [Mélodium Language Book](https://doc.melodium.tech/book/en/): the language behind the pipeline, from [installation](https://doc.melodium.tech/book/en/installation/main.html) to [distribution](https://doc.melodium.tech/book/en/release/distribute.html).
- [Mélodium Reference](https://doc.melodium.tech/latest/en/): every treatment of the [`cicd`](https://doc.melodium.tech/latest/en/cicd/index.html) package and the others.
