# amfelt pull

Pull the environment's committed config from Git (git-lite pull).

Fetch the environment's committed config tree from the Amfelt control plane
and materialize it on this host (git-lite pull).

Writes amfelt.yaml, every contracts/*.odcs.yaml, and every SQL template
override at templates/`<plugin>`/`<name>`.sql over a copy of the current
files into a new folder under ``<workspace>``/projects/``<project>``/```<env>```/, points
the environment at it (the .amfelt-current file names the folder), creates
the project binding if none exists yet, and records the branch HEAD SHA the
tree was read at. A file only this host has is kept. A run that is still
reading the previous folder keeps it until it ends. Every command that takes
`--path` accepts ``<workspace>``/projects/``<project>``/```<env>```/amfelt.yaml, or the
```<env>``` folder, and works on the current folder.

`<workspace>` is `--amfelt-dir`, else `$AMFELT_DIR`, else .amfelt, and a
relative value resolves against the current working directory — so by
default the tree lands under ./.amfelt, not under your home directory. The
binding itself is written to projects.yaml under the identity root
(`$AMFELT_DIR`, or ~/.amfelt when unset), which is a different directory
unless `$AMFELT_DIR` points both at the same place.

Refuses to overwrite un-synced local edits: if this host's working copy has
changed since its last recorded sync, the pull is rejected — pass `--force` to
overwrite it anyway.

Examples:

```text
  amfelt pull --project <uuid> --env development
  amfelt pull --project <uuid> --env development --force
```

## Usage

```text
amfelt pull [flags]
```

## Flags

| Flag | Type | Default | Description |
| --- | --- | --- | --- |
| `--env` | `string` | — | DTAP environment slug to pull (required) |
| `--force` | `bool` | `false` | overwrite un-synced local edits instead of refusing |
| `--project` | `string` | — | control-plane project id (uuid) to pull (required) |
{.clidoc-flags-table}

## Global flags

| Flag | Type | Default | Description |
| --- | --- | --- | --- |
| `--amfelt-dir` | `string` | `.amfelt` | directory for workspace files (such as plugins); does not move agent identity (controlled by AMFELT_DIR) |
| `--config` | `string` | — | directory or filename of the application configuration |
| `-f`, `--format` | `string` | `default` | log format to use; either default, pretty, or json |
| `-l`, `--level` | `string` | `info` | minimum log level to display; either error, warn, info, or debug |
| `-v`, `--verbose` | `bool` | `false` | trigger to use verbose logging |
{.clidoc-flags-table}

---

Generated from `amfelt` v5.6.3.
