> For the complete documentation index, see [llms.txt](https://manual.dxable.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://manual.dxable.com/1password/use-multiple-accounts.md).

# 複数のアカウントを使用する

### 複数のアカウントを使う <a href="#id-9c5hefdym88u" id="id-9c5hefdym88u"></a>

[1Password アプリの統合](https://developer.1password.com/docs/cli/app-integration/)をオンにすると、1Passwordアプリに追加した全アカウントで 1Password CLIを使用できます。

複数の 1Password アカウントを使用している場合は、 op signinコマンドを使ってサインインおよびサインアウトするか、各コマンドで--accountフラグを使うか、OP\_ACCOUNT環境変数を設定することで、アカウントを切り替えることができます。

### op signinでアカウントを切り替える <a href="#qse7kcvt1x2l" id="qse7kcvt1x2l"></a>

デフォルトでは、--accountフラグでアカウントが指定されていない限り、全ての 1Password CLIコマンドは最後にサインインしたアカウントで実行されます。

別のアカウントにサインインするには、 op signinを実行し、1Passwordアプリに追加されたアカウントのリストからサインインするアカウントを選択します。

### --accountフラグでアカウントを指定する <a href="#shyrx7tyiu84" id="shyrx7tyiu84"></a>

\--accountフラグをアカウントの[サインインアドレス（https:// の有無に無関係）またはID](https://developer.1password.com/docs/cli/use-multiple-accounts/#find-an-account-sign-in-address-or-id)とともに含めることで、特定のアカウントでコマンドを実行できます。

例えば、my.1password.comというサインインアドレスを持つアカウント内の全て保管庫のリストを取得するには、次のようにします。

$ op vault ls --account my.1password.com

\--accountフラグを使って、スクリプト内で異なるアカウントを指定できます。

例:

$ PASSWORD\_1=$(op read --account agilebits-inc.1password.com op\://my-vault/some-item/password)

$ PASSWORD\_2=$(op read --account acme.1password.com op\://other-vault/other-item/password)

### OP\_ACCOUNT環境変数を設定する <a href="#fhncetl6679k" id="fhncetl6679k"></a>

特定のアカウントにのみサインインしたい場合は、OP\_ACCOUNT環境変数をアカウントの[サインインアドレスまたはID](https://developer.1password.com/docs/cli/use-multiple-accounts/#find-an-account-sign-in-address-or-id)に設定できます。これを使用して、スクリプトでアカウントを指定することもできます。

**Bash、Zsh、sh**

$ export OP\_ACCOUNT=my.1password.com

**fish**

$ set -x OP\_ACCOUNT my.1password.com

**PowerShell**

PS C : \\>$Env:OP\_ACCOUNT = "my.1password.com"

### **アカウントのサインインアドレスまたはIDを見つける** <a href="#id-8weaht73hmjh" id="id-8weaht73hmjh"></a>

1Password アプリに追加した全アカウントの詳細を確認するには、op account listを実行します。

入力例：\
$ op account list

結果の例：

URL EMAIL USER ID

my.1password.com <wendy.c.appleseed@gmail.com> JDFU...

agilebits-inc.1password.com <wendy_appleseed@agilebits.com> ASDU...

サインインアドレスまたはユーザーIDを使って、コマンド内の特定のアカウントを参照できます。

### さらに詳しく <a href="#nula14u2o3jv" id="nula14u2o3jv"></a>

* [1Password CLIを1Passwordデスクトップアプリと統合する](https://developer.1password.com/docs/cli/app-integration/)


---

# 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://manual.dxable.com/1password/use-multiple-accounts.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.
