$npx -y skills add dvcrn/devonthink-cli --skill devonthinkOperate the DEVONthink CLI for databases, records, search, tags, and AI workflows. Use when requests mention the devonthink, dt, or dt-cli commands, or the npm package devonthink, especially for command construction, schema inspection, JSON output, and record/database ope
| 1 | # DEVONthink CLI |
| 2 | |
| 3 | ## Overview |
| 4 | |
| 5 | Use this skill to run the DEVONthink CLI safely and produce exact commands for the |
| 6 | current command surface. |
| 7 | |
| 8 | Prefer read-only commands first when verifying identifiers or database context. |
| 9 | Use JSON output when the result will be piped to other tools or parsed by code. |
| 10 | |
| 11 | Read `references/commands.md` for the supported command surface. |
| 12 | Read `references/examples.md` for concrete examples. |
| 13 | |
| 14 | ## Exact Command Surface |
| 15 | |
| 16 | Use these exact command names. Do not invent `get_*` variants unless they are listed here. |
| 17 | |
| 18 | ```text |
| 19 | tools |
| 20 | schema <tool> |
| 21 | is_running |
| 22 | open_databases |
| 23 | current_database |
| 24 | selected_records |
| 25 | search [query] |
| 26 | lookup_record [lookupType] |
| 27 | list_group_content [uuid] |
| 28 | record_properties [uuid] |
| 29 | record_content [uuid] |
| 30 | record_by_identifier [uuid] |
| 31 | create_record [name] |
| 32 | create_from_url [url] |
| 33 | rename_record [uuid] |
| 34 | move_record [uuid] |
| 35 | delete_record [uuid] |
| 36 | add_tags [uuid] |
| 37 | remove_tags [uuid] |
| 38 | update_record_content [uuid] |
| 39 | set_record_properties [uuid] |
| 40 | classify [recordUuid] |
| 41 | compare [recordUuid] |
| 42 | replicate_record [uuid] |
| 43 | duplicate_record [uuid] |
| 44 | convert_record [uuid] |
| 45 | check_ai_health |
| 46 | ask_ai_about_documents [question] |
| 47 | create_summary_document |
| 48 | ai_tool_documentation [toolName] |
| 49 | ``` |
| 50 | |
| 51 | ## Runbook |
| 52 | |
| 53 | 1. Confirm DEVONthink is running with `devonthink is_running`. |
| 54 | 2. Confirm the active or target database with `devonthink current_database` or `devonthink open_databases`. |
| 55 | 3. Resolve record UUIDs with read-only commands before write operations. |
| 56 | 4. Prefer `--json` for automation and downstream parsing. |
| 57 | 5. Before mutating records, verify the target with `record_properties`, `record_by_identifier`, `search`, or `lookup_record`. |
| 58 | 6. Use `schema <tool>` when you need exact parameter names. |
| 59 | |
| 60 | ## Installation And Agent Setup |
| 61 | |
| 62 | Install from npm: |
| 63 | |
| 64 | ```bash |
| 65 | npm install -g devonthink |
| 66 | ``` |
| 67 | |
| 68 | After installation, you can use any equivalent executable: |
| 69 | |
| 70 | ```bash |
| 71 | devonthink --help |
| 72 | dt --help |
| 73 | dt-cli --help |
| 74 | ``` |
| 75 | |
| 76 | For Claude Desktop, add `dvcrn/devonthink-cli` as a marketplace plugin, then install the `devonthink` plugin from that marketplace. |
| 77 | |
| 78 | For Claude Code, the equivalent commands are: |
| 79 | |
| 80 | ```bash |
| 81 | claude plugins marketplace add dvcrn/devonthink-cli |
| 82 | claude plugins install devonthink@dvcrn-devonthink-cli --scope user |
| 83 | ``` |
| 84 | |
| 85 | For `npx skills`, run: |
| 86 | |
| 87 | ```bash |
| 88 | npx skills add dvcrn/devonthink-cli |
| 89 | ``` |
| 90 | |
| 91 | ## Output Strategy |
| 92 | |
| 93 | Use default human-readable output for interactive use. |
| 94 | Use `--json` for automation and downstream parsing. |
| 95 | |
| 96 | ```bash |
| 97 | devonthink search invoice --json |
| 98 | devonthink record_properties <uuid> --json |
| 99 | ``` |
| 100 | |
| 101 | ## Positional Arguments |
| 102 | |
| 103 | Many tools support the first obvious required argument positionally. |
| 104 | |
| 105 | ```bash |
| 106 | devonthink search invoice |
| 107 | devonthink record_content <uuid> |
| 108 | devonthink record_properties <uuid> |
| 109 | devonthink rename_record <uuid> --new-name "Renamed note" |
| 110 | devonthink create_record "New Note" --type markdown --content "Hello" |
| 111 | devonthink create_from_url https://example.com --format markdown |
| 112 | ``` |
| 113 | |
| 114 | ## Common Tasks |
| 115 | |
| 116 | Use these as canonical examples: |
| 117 | |
| 118 | ```bash |
| 119 | # verify DEVONthink is running |
| 120 | devonthink is_running |
| 121 | |
| 122 | # list open databases |
| 123 | devonthink open_databases |
| 124 | |
| 125 | # inspect the current database |
| 126 | devonthink current_database |
| 127 | |
| 128 | # search for records |
| 129 | devonthink search invoice --database-name Test |
| 130 | |
| 131 | # get a record by UUID |
| 132 | devonthink record_properties <uuid> |
| 133 | |
| 134 | # read record content |
| 135 | devonthink record_content <uuid> |
| 136 | |
| 137 | # create a note |
| 138 | devonthink create_record "Meeting Notes" --type markdown --content "# Notes" --database-name Test |
| 139 | |
| 140 | # update content |
| 141 | devonthink update_record_content <uuid> --content "Updated body" |
| 142 | |
| 143 | # rename a record |
| 144 | devonthink rename_record <uuid> --new-name "Renamed note" |
| 145 | |
| 146 | # add tags |
| 147 | devonthink add_tags <uuid> --tags work --tags important |
| 148 | |
| 149 | # remove tags |
| 150 | devonthink remove_tags <uuid> --tags old-tag |
| 151 | ``` |
| 152 | |
| 153 | ## Safety Checks |
| 154 | |
| 155 | Before write operations: |
| 156 | |
| 157 | 1. Confirm the target database with `current_database` or `open_databases`. |
| 158 | 2. Confirm the target record with `record_properties`, `record_by_identifier`, `search`, or `lookup_record`. |
| 159 | 3. Confirm the destination group before `move_record`, `duplicate_record`, `replicate_record`, or `convert_record`. |
| 160 | 4. Prefer UUIDs over names when mutating records. |
| 161 | |
| 162 | ## Notes |
| 163 | |
| 164 | - `devonthink`, `dt`, and `dt-cli` are equivalent and map to the same implementation. |
| 165 | - `schema <tool>` prints the exact JSON schema for a tool. |
| 166 | - `tools` lists the available command surface. |