# atmos atlantis generate repo-config

Use this command to generate a repository configuration (`atlantis.yaml`) for Atlantis.

```shell
atmos atlantis generate repo-config [options]
```

:::tip
Run `atmos atlantis generate repo-config --help` to see all the available options
:::

## Examples

```shell
atmos atlantis generate repo-config

atmos atlantis generate repo-config --output-path /dev/stdout

atmos atlantis generate repo-config --config-template config-1 --project-template project-1

atmos atlantis generate repo-config --config-template config-1 --project-template project-1 --stacks <stack1, stack2>

atmos atlantis generate repo-config --config-template config-1 --project-template project-1 --components <component1, component2>

atmos atlantis generate repo-config --config-template config-1 --project-template project-1 --stacks <stack1> --components <component1, component2>

atmos atlantis generate repo-config --affected-only=true

atmos atlantis generate repo-config --affected-only=true --output-path /dev/stdout

atmos atlantis generate repo-config --affected-only=true --verbose=true

atmos atlantis generate repo-config --affected-only=true --output-path /dev/stdout --verbose=true

atmos atlantis generate repo-config --affected-only=true --repo-path <path_to_cloned_target_repo>

atmos atlantis generate repo-config --affected-only=true --ref refs/heads/main

atmos atlantis generate repo-config --affected-only=true --ref refs/tags/v1.1.0

atmos atlantis generate repo-config --affected-only=true --sha 3a5eafeab90426bd82bf5899896b28cc0bab3073

atmos atlantis generate repo-config --affected-only=true --ref refs/tags/v1.2.0 --sha 3a5eafeab90426bd82bf5899896b28cc0bab3073

atmos atlantis generate repo-config --affected-only=true --ssh-key <path_to_ssh_key>

atmos atlantis generate repo-config --affected-only=true --ssh-key <path_to_ssh_key> --ssh-key-password <password>

atmos atlantis generate repo-config --affected-only=true --clone-target-ref=true
```

## Flags

- **`--config-template` (optional)** — Atlantis config template name.
- **`--project-template` (optional)** — Atlantis project template name.
- **`--output-path` (optional)** — Output path to write `atlantis.yaml` file.
- **`--stacks` (optional)** — Generate Atlantis projects for the specified stacks only (comma-separated values).
- **`--components` (optional)** — Generate Atlantis projects for the specified components only (comma-separated values).
- **`--affected-only` (optional)** — Generate Atlantis projects only for the Atmos components changedbetween two Git commits.
- **`--ref` (optional)** — [Git Reference](https://git-scm.com/book/en/v2/Git-Internals-Git-References) with which to compare the current working branch.
- **`--sha` (optional)** — Git commit SHA with which to compare the current working branch.
- **`--ssh-key` (optional)** — Path to PEM-encoded private key to clone private repos using SSH.
- **`--ssh-key-password` (optional)** — Encryption password for the PEM-encoded private key if the key containsa password-encrypted PEM block.
- **`--repo-path` (optional)** — Path to the already cloned target repository with which to compare the current branch.Conflicts with `--ref`, `--sha`, `--ssh-key` and `--ssh-key-password`.
- **`--verbose` (optional)** — Print more detailed output when cloning and checking out the targetGit repository and processing the result.
- **`--clone-target-ref` (optional)** — Clone the target reference with which to compare the current branch.`atmos atlantis generate repo-config --affected-only=true --clone-target-ref=true`The flag is only used when `--affected-only=true`If set to `false` (default), the target reference will be checked out insteadThis requires that the target reference is already cloned by Git,and the information about it exists in the `.git` directory.

:::info

Refer to [Atlantis Integration](/cli/configuration/integrations/atlantis) for more details on the Atlantis integration in Atmos

:::

## Try it out

### demo-atlantis

Copy the example into a new directory and make it your own:

```shell
atmos init examples/demo-atlantis
cd demo-atlantis
```

Generate an Atlantis repository configuration from the included project and configuration templates. No Atlantis server is needed for generation.

```shell
atmos atlantis generate repo-config --config-template config-1 --project-template project-1
```

- [Installation guide](/install)
- [Explore the example](/examples/demo-atlantis)
- [Initialization and repository settings](/cli/commands/init#examples-and-source-directories)
