> 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/secrets-manager/secrets-manager-command-line-interface/config-command.md).

# configコマンド

## `config`コマンド

**説明:** CLIのデバッグ出力を設定します。

**パラメータ:**

実行するサブコマンド

形式: **`ksm config <sub-command>`**

**サブコマンド:**

| サブコマンド            | 説明                        |
| ----------------- | ------------------------- |
| `color`           | カラー表示の有効化/無効化             |
| `cache`           | レコードキャッシュの有効化/無効化         |
| `record-type-dir` | カスタムレコードタイプスキーマ用ディレクトリの設定 |
| `editor`          | レコードをGUIで追加するときのエディタ設定    |
| `show`            | 現在のCLI設定の表示               |

### **color**

`ksm config color <--enable | --disable>`

**オプション:**

`--enable` カラー表示を有効化

`--disable` カラー表示を無効化

**例:**

```
$ ksm config color --disable
$ ksm config show
 Config Item            Value
 ---------------------- --------------
 Color Enabled          False
```

### **cache**

CLIからシークレットマネージャーにアクセスできない場合に使用する、レコードのローカルコピーです。コピーは暗号化してローカルストレージに保存されます。

`ksm config cache <--enable | --disable>`

**オプション:**

`--enable` レコードのキャッシュを有効化

`--disable` レコードのキャッシュを無効化

**例:**

```
$ ksm config cache --enable
$ ksm config show
 Config Item            Value
 ---------------------- -----------
 Cache Enabled          True
```

### record-type-dir

カスタムレコードタイプのスキーマファイルを格納するディレクトリを設定します。

`ksm config record-type-dir [-d DIRECTORY PATH] [--clear]`

**オプション:**

`--directory, -d` ディレクトリのパス

`--clear` ディレクトリのパスを削除

**例:**

```
$ ksm config record-type-dir -d /path/to/directory
$ ksm config show
 Config Item            Value
 ---------------------- -----------
 Record Type Directory  /path/to/directory
```

### editor

レコードをGUIで追加するときに使用するエディタを設定します。

`ksm config editor [--app APPLICATION] [--blocking] [--process-name PROCESS NAME]`

**オプション:**

`--application、--app` 起動するエディタ

`--clear` ディレクトリのパスを削除

**アプリケーションのオプション:**

`--application` 設定時に指定できるオプションです。

`--blocking` 編集が完了するまでCLIの処理を待機

`--process-name` `--blocking` 使用時にタスクリストから特定するプロセス名

**例:**

```
 ksm config editor --app Code --blocking --proces-name code.exe
$ ksm config show
 Config Item            Value
 ---------------------- -----------
 Editor                 Code (code.exe)
 Editor Blocking        True

```

{% hint style="info" %}
UI付きエディタなど、起動時にCLIをブロックしないアプリケーションがあります。ブロックされない場合、CLIは編集前のレコードテンプレートを解析しようとします。

macOSでは、アプリケーションが完全に終了するまで待機します。ウィンドウを閉じただけでは終了とはみなされず、プロセスが終了している必要があります。

Windowsでは、プロセスが終了するまでタスクリストを監視します。`.bat` や `.cmd` 経由で起動すると、エディタは別名のプロセスとして動作する場合があります。その場合は `--process-name` で監視対象のプロセス名を指定してください。CLIは起動時のアプリケーション名ではなく、指定したプロセス名を監視します。
{% endhint %}

### **show**

`ksm config show`

**例:**

```
$ ksm config show
 Config Item            Value
 ---------------------- -----------
 Active Profile         all_records
 Cache Enabled          False
 Color Enabled          False
 Record Type Directory  -NOT SET-
 Editor                 vim (NA)
 Editor Blocking        False
```


---

# 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/jp/secrets-manager/secrets-manager-command-line-interface/config-command.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.
