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
Section link for 1. Pull configurationIf you have not authenticated yet, see Authentication to connect the CLI to your Vault. Then, from an empty directory, pull all configuration:
vault config pullThe first pull creates the workspace structure automatically. components/, javasdk/, custom_pages/, and .vault/ directories are created if they do not already exist, along with a .gitignore that excludes .vault/ and a starter .vdxignore. The CLI then pulls all components, Vault Java SDK classes, and Custom Pages from your active Vault. Components are written to components/<Type>/<name>/. Subcomponents, such as picklist entries or object fields, are written to their own files, and large or structured attribute values are extracted into sidecar files (.xml, .json, .txt, .as) so that each file produces clean, readable diffs in source control.
We recommend committing the workspace to source control after each pull.
2. Edit a component
Section link for 2. Edit a componentOpen a component file in your editor. For example:
components/Picklist/color__c/color__c.mdlEdit the MDL as needed, then save the file.
3. Preview the change
Section link for 3. Preview the changeRun vault config push --dry-run to see what would be deployed without making any changes:
vault config push --dry-runThis command lists every component, class, and Custom Page that would be added, modified, or deleted in the vault, followed by number of updated and unchanged components.
Example output:
[dry run] MODIFIED Picklist.color__c
[dry run] Pushed config to myorg.veevavault.com.
[dry run] Components: 1 updated, 1520 unchanged.4. Push the change
Section link for 4. Push the changeDeploy the change to your Vault:
vault config pushThe CLI deploys only what differs between your workspace and the vault. Push does not check whether the vault changed since your last pull. Any change made directly in the vault is overwritten, and anything in the vault that is not in your workspace is deleted after you confirm. Review the --dry-run output before every push.
For the full options reference, including --dry-run, see vault config.