vault config
Manage Vault configuration as code. Pull components, Vault Java SDK classes, and Custom Pages to a local workspace. Edit them, preview and push changes back to Vault.
The vault config subcommands are pull, push, and package. The default target Vault is the active Vault, set by vault login or changed with vault switch. The Vault must be one you have already logged in to with vault login.
pull and push compare the workspace against the target Vault and make one side match the other. They do not track what changed locally since your last pull. Use source control to review local changes.
vault config pull
Section link for vault config pullPull components, Vault Java SDK classes, and Custom Pages from a Vault to the local workspace.
Only assets that differ from the Vault are rewritten. Components are written with large or structured attribute values extracted into typed sidecar files (.xml, .json, .txt, .as) for diff-friendly source control.
Errors for assets that failed to fetch or write are printed after Pull complete, grouped by asset kind. A --dry-run that reports any errored assets exits with code 1. A clean dry run exits 0.
vault config pull [--dir <DIR>] [--dry-run]Options
Section link for Options| Option | Type | Required | Description |
|---|---|---|---|
--dir <DIR> | string | Optional | Workspace root. The directory must already exist. Default: current directory |
--dry-run | flag | Optional | Report what would change without writing to the workspace |
This command also accepts the global options.
Examples
Section link for ExamplesPull all configuration
Section link for Pull all configurationvault config pullPreview without writing
Section link for Preview without writingvault config pull --dry-runvault config push
Section link for vault config pushDeploy local workspace changes to a Vault.
Computes the diff between local files and the target Vault and deploys only what changed. Reassembles sidecar files into full MDL. Components are deployed in dependency order. If one asset fails to deploy, the CLI reports the error and continues with the rest.
Errors for assets that failed to deploy are printed after Push complete, grouped by asset kind. A push dry run always exits 0. Deploy failures surface only when a real push is run.
vault config push [--dir <DIR>] [--dry-run]Options
Section link for Options| Option | Type | Required | Description |
|---|---|---|---|
--dir <DIR> | string | Optional | Workspace root. The directory must already exist. Default: current directory |
--dry-run | flag | Optional | Print the push plan without deploying. Vault does not validate the changes. |
This command also accepts the global options.
Examples
Section link for ExamplesPush changed files
Section link for Push changed filesvault config pushPreview the deploy plan
Section link for Preview the deploy planvault config push --dry-runCI/CD (non-interactive)
Section link for CI/CD (non-interactive)Without --yes, a push that would delete anything exits with code 1 in a non-interactive shell.
vault config push --yesvault config package create
Section link for vault config package createBuild a Configuration Package (VPK) from the differences between the workspace and the target Vault. The package includes components, Vault Java SDK classes, and Custom Pages, and components are ordered the same way vault config push would deploy them.
vault config package create [--dir <DIR>] [--output <FILE>] [--description <TEXT>] [--author <NAME>]Options
Section link for Options| Option | Type | Required | Description |
|---|---|---|---|
--dir <DIR> | string | Optional | Workspace root. Default: current directory |
--output <FILE> | string | Optional | Output Configuration Package (VPK) path. The file name, without extension, becomes the package name. Default: <workspace>/package.vpk |
--description <TEXT> | string | Optional | Description to embed in the package manifest |
--author <NAME> | string | Optional | Author to embed in the manifest. Default: your stored username for the target Vault, if any |
This command also accepts the global options.
Examples
Section link for ExamplesBuild a package from the differences with the active Vault
Section link for Build a package from the differences with the active Vaultvault config package createBuild a package to a specific path
Section link for Build a package to a specific pathvault config package create --output ./releases/mypackage.vpkvault config package deploy
Section link for vault config package deployUpload and deploy a Configuration Package (VPK) to a Vault.
Runs a two-step import and deploy pipeline: uploads the Configuration Package (VPK), polls the import job, then triggers and polls the deploy job. Each job times out after 30 minutes. On completion, the CLI prints SUCCESS deployed (<N> errors) and exits with code 1 if <N> is greater than 0.
vault config package deploy <VPK>Options
Section link for Options| Option | Type | Required | Description |
|---|---|---|---|
<VPK> | string | Required | Path to the Configuration Package (VPK) archive to deploy |
This command also accepts the global options.
Examples
Section link for ExamplesDeploy a Configuration Package (VPK) to the active Vault
Section link for Deploy a Configuration Package (VPK) to the active Vaultvault config package deploy ./releases/mypackage.vpk