> 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/jp/commander-cli/commander-installation-setup/configuration/global-options.md).

# グローバルオプション

`keeper` / `keeper-commander.exe` 実行ファイルでは、以下のフラグと引数を指定してコマンダーの動作をカスタマイズできます。

`--server`、`-ks`: Keeperリージョンを事前設定。`server` コマンドと同等 (US、EU、AU、CA、JP、GOV)

`--user`、`-ku`: メールアドレスを事前設定。`login` コマンドと同等

`--password`、`-kp`: ログインするユーザーのマスターパスワード

`--config`: 認証に使用する構成ファイルのパス。[構成ファイル](/keeperpam/jp/commander-cli/commander-installation-setup/configuration/configuration.md)の詳細をご参照ください

`--proxy`: プロキシサーバーを事前設定。`proxy` コマンドと同等

`--debug`: デバッグモードを事前設定 (`debug` コマンドと同等)。シェル利用前のトラブルシューティングに便利

`--silent`: すべてのログ出力と警告をオフにするフラグ。`stdout` からログを記録する際のノイズを抑えるのに便利\
`--batch-mode`: 対話モードなしで複数コマンドをバッチ実行するフラグ。詳細は[こちら](#batch-mode-through-stdin)をご参照ください

`--new-login`: 完全ログインを強制するフラグ (ログイン状態を維持機能をバイパス)

`--version`: バージョンを表示するフラグ

### STDINを使用したバッチモード <a href="#batch-mode-through-stdin" id="batch-mode-through-stdin"></a>

一連のコマンドをまとめて実行し、作成したファイルをコマンダーのSTDINにパイプできます。例えば、以下の内容で `test.cmd` というテキストファイルを作成します。

{% 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 %}

バッチモードでこのファイルを実行する手順は以下のとおりです。

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

または

```
keeper test.cmd
```

**エラー処理:** いずれかのコマンドが失敗すると、バッチ実行は中断されます。コマンドのエラーを無視したい場合は、コマンドの前に `@` を付けて実行してください。

{% 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 %}

**Windowsのバッチモード:** 以下は、Windowsのコマンドラインで3つのコマンドを実行する例です。

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

### バッチモードとログイン状態を維持の組み合わせ

[構成ファイル](/keeperpam/jp/commander-cli/commander-installation-setup/configuration/configuration.md#persistent-login-sessions)のとおり、ファイルベースのログイン状態を維持の構成を設定すれば、以下のようにログインプロンプトなしで一連のバッチコマンドを実行できます。

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

### CLIからのバッチモード

CLI内では、コマンドを順に実行するバッチモードが利用できます。

このコマンドは `run-batch` と呼ばれ、以下のように実行します。

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

この例では、各コマンドは10秒の遅延を挟んで実行されます。

Linux環境では、以下のようにパスを指定することもできます。

```
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:

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

The question should be specific, self-contained, and written in natural language.
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.
