**Source URL:** https://limited.veevavault.dev/regulatory/vault-dx/cli/getting-started/managing-configuration-as-code

# Managing Configuration as Code

This tutorial walks you through the core config workflow: pull configuration from a Vault, edit a component, preview the change, and push it back.

## 1\. Pull configuration

If you have not authenticated yet, see [Authentication](/regulatory/vault-dx/cli/getting-started/authentication/) to connect the CLI to your Vault. Then pull all configuration:

```sh
vault config pull
```

The first pull creates the workspace structure automatically. `components/`, `javasdk/`, `custom_pages/`, and `.vault/` directories are created if they do not already exist. The CLI then pulls all components, Vault Java SDK classes, and Custom Pages from your active Vault. Components are written to `components/<Type>/<name>/`. Large or structured attribute values are extracted into sidecar files (`.xml`, `.json`, `.txt`) so that each file produces clean, readable diffs in source control.

## 2\. Edit a component

Open a component file in your editor. For example:

```
components/Picklist/color__c/color__c.mdl
```

Edit the MDL as needed, then save the file.

## 3\. Preview the change

Run `vault config push --dry-run` to see what would be deployed without making any changes:

```sh
vault config push --dry-run
```

This shows an unvalidated diff of what would change. It does not contact Vault for validation.

Example output:

```
  ~ update  components/Picklist/color__c.mdl   (1 entry added)

  Summary: 1 update
```

## 4\. Push the change

Deploy the change to your Vault:

```sh
vault config push
```

The CLI deploys only what changed. If the remote Vault was modified since your last pull, the push stops. Run `vault config pull` to reconcile before pushing again.

For the full options reference, including `--dns` and `--dry-run`, see [vault config](/regulatory/vault-dx/cli/reference/config/).

---

**Previous:** [Authentication](/regulatory/vault-dx/cli/getting-started/authentication)  
**Next:** [Guides](/regulatory/vault-dx/cli/guides)