> 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/document.md).

# documentコマンド

サブコマンド

* document create：ドキュメントアイテムをCreateする
* document delete：ドキュメントアイテムを削除またはアーカイブする
* document edit：ドキュメントアイテムを編集する
* document get：ドキュメントをダウンロードする
* document list：ドキュメントのリストを取得する

### **document create** <a href="#twedyjdm6kik" id="twedyjdm6kik"></a>

ドキュメントアイテムをCreateし、アイテムのIDを含むJSONオブジェクトを受け取ります。\
op document create \[{ \<file> | - }] \[flags]

#### **フラグ** <a href="#okunq9fee5d6" id="okunq9fee5d6"></a>

\--file-name name：ファイルネームをセットする。

\--tags tags：タグを指定された（カンマで区切られた）値に設定する。

\--title title：ドキュメントアイテムの名前をセットする。

\--vault vault：対象の保管庫にドキュメントをSaveする。デフォルトではプライベートにする。

デフォルトでは、ドキュメントは組み込みの[個人用](https://support.1password.com/1password-glossary/#personal-vault)、[プライベート](https://support.1password.com/1password-glossary/#private-vault)、または[従業員](https://support.1password.com/1password-glossary/#employee-vault)用の保管庫にSaveされます。--vaultオプションを使えば別の保管庫を指定できます。

**Create a file from standard input**

**標準入力（stdin）からファイルの内容をCreateするには、パスの代わりにハイフン（-）を入力します。--file-nameオプションを使って、ファイル名を変更できます。**

#### **例** <a href="#ocqsotkrsd3t" id="ocqsotkrsd3t"></a>

ファイル パスを指定してドキュメントをCreateします。

op document create "../demos/videos/demo.mkv" --title "2020-06-21 Demo Video"

標準入力からドキュメントをCreateします。

cat auth.log.\* | op document create - --title "Authlogs 2020-06" --file-name "auth.log.2020.06"

### **document delete** <a href="#wwfs6qtpqz7j" id="wwfs6qtpqz7j"></a>

ドキュメントを完全に削除します。削除するドキュメントを名前またはIDで指定します。削除する代わりにアーカイブに移動するには--archiveオプションを使います。

op document delete \[{ \<itemName> | \<itemID> | - }] \[flags]

#### **フラグ** <a href="#tmblu3ukmcpe" id="tmblu3ukmcpe"></a>

\--archive：ドキュメントをアーカイブに移動する。

\--vault vault：対象の保管庫の中のドキュメントを削除する。

**標準入力上のアイテムを指定する**

このコマンドは、標準入力 (stdin) 上の各情報行をオブジェクト指定子として扱います。op helpオブジェクトの指定方法の詳細については、実行してください。

JSONオブジェクトのリストまたは配列を入力することもできます。このコマンドは、IDを持つオブジェクトの項目を取得します。これは、あるopコマンドから別のコマンドに情報を渡す場合に便利です。

#### **例** <a href="#ggqdwg4dnux2" id="ggqdwg4dnux2"></a>

ドキュメントを完全に削除する場合：\
op document delete "2019 Contracts"

ドキュメントをアーカイブに移動する場合:

op document delete "2019 Contracts" --archive

### **document edit** <a href="#agfrxvr210gt" id="agfrxvr210gt"></a>

ドキュメント項目を編集します。編集するドキュメント項目を名前または ID で指定します。\
op document edit { \<itemName> | \<itemID> } \[{ \<file> | - }] \[flags]

#### **フラグ** <a href="#ls0hblfxvnzg" id="ls0hblfxvnzg"></a>

\--file-name name ：ファイル名をセットする。\
\--tags tags：タグを指定された（カンマで区切られた）値に設定する。 空の値を指定すると、全てのタグが削除されます。\
\--title title：ドキュメントアイテムのタイトルをセットする。\
\--vault vault：指定した保管庫の中でドキュメントを参照する

Document 項目のファイル内容を、指定されたファイルまたは標準入力 (stdin) の情報に置き換えます。

**標準入力でファイルを更新する**

標準入力（stdin）からファイルの内容を更新するには、パスの代わりにハイフン（-）を入力します。--file-nameオプションを使って、ファイル名を変更できます。

**document get**\
ドキュメントをダウンロードして内容を印刷します。ドキュメントの名前または ID で指定します。\
op document get { \<itemName> | \<itemID> } \[flags]

#### **フラグ** <a href="#qe7cty6e3q9f" id="qe7cty6e3q9f"></a>

\--file-mode filemode：出力ファイルのファイルモードを設定する。--out-fileフラグを指定しないと無視される。(デフォルト 0600)\
\--force：対話型端末に意味不明な文書を強制的に印刷する。--out-fileが指定された場合、確認のプロンプトを出さずに文書をファイルにSaveする。\
\--include-archive：ドキュメントアイテムをアーカイブに含める。OP\_INCLUDE\_ARCHIVE 環境変数を使って設定することもできる。\
-o, --out-file path：標準出力ではなく、ファイルパスにドキュメントをSaveする。\
\--vault vault：指定した保管庫の中でドキュメントを探す。

デフォルトでは標準出力（stdout）に出力します。ファイルに出力させるには、 --out-file path/to/file.extフラグを使います。

**ファイルにSaveする**

opコマンドでドキュメントをSaveするには、--out-fileオプションを使います。これは、ファイルの元のエンコードを保持する方法として、一部のシェルで役立つ場合があります。

この--out-fileオプションを指定した場合は保存済みのファイルを上書きしません。Save先パスは空のファイルであるか、存在しないファイル名である必要があります。

#### **例** <a href="#rmpaxrrd6tnm" id="rmpaxrrd6tnm"></a>

ドキュメントをsecret-plans.textというファイルにSaveします：

op document get "Top Secret Plan B" --out-file=../documents/secret-plans.text

### **document list** ドキュメントを一覧表示します。 <a href="#t29aiemhnygy" id="t29aiemhnygy"></a>

op document list \[flags]

#### **フラグ** <a href="#isf7815foaut" id="isf7815foaut"></a>

\--include-archive：ドキュメントアイテムをアーカイブに含めます。OP\_INCLUDE\_ARCHIVE環境変数を使って設定することもできる。\
\--vault vault： 指定した保管庫内のドキュメントだけをリストする。

デフォルトではアカウントが読み取りアクセス権を持つ全てのドキュメントのリストを返します。デフォルトではアーカイブ内のアイテムは除外されます。


---

# 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/document.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.
