> ## Documentation Index
> Fetch the complete documentation index at: https://infisical.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Infisical CLI FAQ

> Frequently Asked Questions about the Infisical CLI.

Frequently asked questions about the CLI can be found on this page.
If you can't find the answer you're looking for, please create an issue on the [CLI's GitHub repository](https://github.com/Infisical/cli/issues) or ask in the [Infisical community](https://community.infisical.com/) for additional support.

> [accordion] I'm getting a Keyring-related error message when trying to login
>
> By default, the CLI will choose the most suitable store available on your system.
> If you experience issues with the default store, you can switch to a different one.
> If none of the available stores work for you, you can try using the `file` store type by running `infisical vault set file`, which should work in most cases.
> If you're still experiencing trouble, please seek support.
>
> [Learn more about the vault command](https://infisical.com/docs/cli/reference.md#vault)

> [accordion] How do I keep secret values out of my shell history?
>
> Your shell saves the commands you run to a history file, so a secret value you pass to `infisical secrets-manager secrets create` or `secrets update` stays in that file. To avoid this, pass the values with `--file` or `name=@path`, or configure your shell to skip those commands.
>
> > [tab] Bash
> >
> > Add the pattern to `HISTIGNORE` in `~/.bashrc`:
> >
> > ```bash theme={"dark"}
> > echo 'export HISTIGNORE="*infisical*secrets create*:*infisical*secrets update*:*infisical*secrets set*:$HISTIGNORE"' >> ~/.bashrc && source ~/.bashrc
> > ```
>
> > [tab] Zsh
> >
> > Add the pattern to `HISTORY_IGNORE` in `~/.zshrc`:
> >
> > ```bash theme={"dark"}
> > echo "HISTORY_IGNORE='(*infisical*secrets (create|update|set)*)'" >> ~/.zshrc && source ~/.zshrc
> > ```
> >
> > Zsh applies `HISTORY_IGNORE` when it writes the history file, so the command still appears when you press the up arrow in the current session.
>
> > [tab] Windows
> >
> > If you use WSL, follow the Bash or Zsh steps.
> >
> > In PowerShell, the PSReadLine module saves your command history. To check its version, run `(Get-Module PSReadLine).Version`.
> >
> > PSReadLine 2.2 and later, which ships with PowerShell 7.2 and later, doesn't save commands that contain words such as `secret`, `token`, or `password`, so `infisical secrets-manager secrets create` and `secrets update` are already skipped.
> >
> > Older versions, including the one that ships with Windows PowerShell 5.1, save every command. Add this line to your [PowerShell profile](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_profiles) to skip the commands that write secrets:
> >
> > ```powershell theme={"dark"}
> > Set-PSReadLineOption -AddToHistoryHandler { param($line) $line -notmatch 'infisical.*secrets (create|update|set)' }
> > ```
> >
> > Don't add this line on PSReadLine 2.2 or later, because a custom handler replaces the built-in one that skips commands with sensitive words.
> >
> > Command Prompt keeps history only until you close the window.

> [accordion] Can I fetch secrets with Infisical while I'm offline?
>
> Yes. If you have previously retrieved secrets for a specific project and environment (such as dev, staging, or prod), the  `run`/`secret` command will utilize the saved secrets, even when offline, on subsequent fetch attempts.
>
> Running `infisical login` or `infisical logout` deletes the saved secrets, so they're only available offline again after your next fetch.

> [accordion] Can I upload the `.infisical.yaml` file that was generated?
>
> Yes. This is simply a configuration file and contains no sensitive data.

> [accordion] Where can I find my Project ID?
>
> Run [infisical secrets-manager projects get](https://infisical.com/docs/cli/reference.md#secrets-manager-projects-get) to print the name, slug, and ID of each of your projects.
>
> You can also find the ID in Infisical.
>
> Visit the Infisical website and navigate to a project of your choice. Once on the project page, access the **Project Settings** from the sidebar. Within the Project name section, select the "Copy Project ID" button for copying the current Project ID to clipboard, or simply obtain it from the URL of the current page.
>
> ```
>   https://app.infisical.com/project/<your_project_id>/settings
> ```

> [accordion] How do I use custom headers with the Infisical CLI?
>
> The Infisical CLI supports custom HTTP headers for requests to servers that require additional authentication. Set these headers using the `INFISICAL_CUSTOM_HEADERS` environment variable:
>
> ```bash theme={"dark"}
> export INFISICAL_CUSTOM_HEADERS="Access-Client-Id=your-client-id Access-Client-Secret=your-client-secret"
> ```
>
> After setting this environment variable, run your Infisical commands as usual.

> [accordion] Why would I need to use custom headers?
>
> Custom headers are necessary when your Infisical server is protected by services like Cloudflare Access or other reverse proxies that require specific authentication headers. Without this feature, you would need to implement security workarounds that might compromise your security posture.

> [accordion] What format should I use for the custom headers?
>
> Custom headers should be specified in the format `headername1=headervalue1 headername2=headervalue2`, with spaces separating each header-value pair. For example:
>
> ```bash theme={"dark"}
> export INFISICAL_CUSTOM_HEADERS="Header1=value1 Header2=value2 Header3=value3"
> ```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.