> For the complete documentation index, see [llms.txt](https://docs.keeper.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.keeper.io/keeperpam/commander-cli/commander-installation-setup/configuration/global-options.md).

# Global Options

A number of flags and arguments can be set with the `keeper` / `keeper-commander.exe` executable to customize the Commander experience:

`--server`, `-ks`: Pre-set the Keeper region, equivalent to `server` command (US, EU, AU, CA, JP, GOV).

`--user`, `-ku`: Pre-set email address, equivalent to `login` command.

`--password`, `-kp`: Master password for the user logging in.

`--config`: Location of the config file to authenticate with (see more in [Configuration File](/keeperpam/commander-cli/commander-installation-setup/configuration/configuration.md)).

`--data-dir`: Directory to use for Commander data (config, cache, etc.). Overrides environment variables.

`--proxy`: Pre-set the proxy server, equivalent to `proxy` command.

`--debug`: Flag to pre-set debug mode, equivalent to `debug` command - useful for debugging problems before the shell is available.

`--silent`: Flag to turn off all logging statements and warnings - useful to reduce the noise when recording logs from stdout.\
`--batch-mode`: Flag to run multiple commands in batch without interactive mode. More information [below](#batch-mode-through-stdin).

`--new-login`: Flag to force full login (bypass persistent login).

`--version`: Flag to display version.

`--unmask-all`: Flag to disable default masking of sensitive information (e.g., passwords) in output.

`--fail-on-throttle`: Flag to disable default client-side pausing of command execution and re-sending of requests upon server-side throttling.

`--config-file`: Flag to store credentials in config.json instead of the OS-native keychain.

### Batch Mode through STDIN

You can batch execute a series of commands and pipe the file to STDIN of Commander. For example, create a text file called `test.cmd` with the following lines:

{% code overflow="wrap" %}

```
add --login=user@gmail.com --pass=somemasterpass --url=https://google.com --force "Some Record Title"
upload-attachment --file="/path/to/some/file.txt" "Some Record Title"
share-record --email="user@company.com" --write "Some Record Title"
```

{% endcode %}

To run this file in a batch mode:

```
cat test.cmd | keeper --batch-mode -
```

or

```
keeper test.cmd
```

**Handling Errors**

The batch execution is aborted if some command returns failure. Use `@` in front of the command to suppress the possible command error.

{% code overflow="wrap" %}

```
record-add --title="Sample Login 123" --record-type=login --folder="Personal Folder" login=username password=$GEN url=https://www.google.com "License ID"="9ACB123" url.AlternateURL=https://amazon.com
upload-attachment --file="/path/to/some/file.txt" "Sample Login 123"
share-record --email="user@company.com" --write "Sample Login 123"
```

{% endcode %}

**Batch Mode in Windows**

Following example shows how to execute three commands using Windows command line:

```
(echo ls -l && echo whoami && echo tree) | keeper --batch-mode -
```

### Combining Batch Mode and Persistent Login

By setting up a persistent login configuration (as described in [Configuration File](#persistent-login-sessions)), you can execute a series of batch commands without any prompt for login. For example:

```
$ keeper --config=my_config.json bunch_of_commands.cmd
```

### Batch Mode from the CLI

Keeper supports a batch mode from within the CLI which can conveniently execute commands sequentially.

The command is called "run-batch" and can be executed like below:

```
My Vault> run-batch -d 10 "C:\My Drive\Keeper\commands.txt"
```

In this example, each command is executed with a delay of 10 seconds in between.

On Linux environments, the path can also be specified such as:

```
My Vault> run-batch -d 5 "/path/to/file.txt"
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.keeper.io/keeperpam/commander-cli/commander-installation-setup/configuration/global-options.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
