--- layout: docs page_title: "agent generate-config - Vault CLI" description: >- Use vault agent generate-config to generate a basic Vault Agent configuration file from secrets plugin data. --- > [!IMPORTANT] > **Documentation Update:** Product documentation, which were located in this repository under `/website`, are now located in [`hashicorp/web-unified-docs`](https://github.com/hashicorp/web-unified-docs), colocated with all other product documentation. Contributions to this content should be done in the `web-unified-docs` repo, and not this one. Changes made to `/website` content in this repo will not be reflected on the developer.hashicorp.com website. # `agent generate-config` Use secrets plugin data to generate a basic [configuration file](/vault/docs/agent-and-proxy/agent#configuration-file-options) for running Vault Agent in [process supervisor mode](/vault/docs/agent-and-proxy/agent/process-supervisor). ```shell-session $ vault agent generate-config -type [options] [] ``` ## Description `agent generate-config` composes configuration details for Vault Agent based on the configuration `type` and writes a local configuration file for running Vault agent in process supervisor mode. - None ### Limitations and warnings Limitations: - Plugin support limited to KV plugins. - Configuration type limited to environment variable templates. The file created by `agent generate-config` includes an `auto_auth` section configured to use the `token_file` authentication method. Token files are convenient for local testing, but **are not** appropriates for production use. Refer to the full list of Vault Agent [autoAuth methods](/vault/docs/agent-and-proxy/autoauth/methods) for available production-ready authentication methods. ## Arguments
@include 'cli/agent/args/file_path.mdx' ## Options None. ## Command Flags
@include 'cli/agent/flags/exec.mdx'


@include 'cli/agent/flags/path.mdx'


@include 'cli/agent/flags/type.mdx' ## Global flags
@include 'cli/standard-settings/all-standard-flags-but-format.mdx' ## Examples Generate an environment variable template configuration for the `foo` secrets plugin: ```shell-session $ vault agent generate-config \ -type="env-template" \ -exec="./my-app arg1 arg2" \ -path="secret/foo" Command output ``` Generate an environment variable template configuration for more than one secrets plugin: ```shell-session $ vault agent generate-config -type="env-template" \ -exec="./my-app arg1 arg2" \ -path="secret/foo" \ -path="secret/bar" \ -path="secret/my-app/*" ```