Answer: Add a reference in opencode.json or opencode.jsonc under "references" using a "path" for a local directory outside the project, then attach its alias in your client. Relative paths resolve from the directory containing the config file, and absolute and home-relative paths such as ~/docs are supported. Status: Overdue (check was due 2026-11-20T13:37:18Z and has not succeeded) Entry: tool/opencode/settings/add-external-directory-reference Revision: 1 Digest: sha256:13430b86741e18c6 (changes whenever the content changes) Timeline: Created: 2026-11-13T03:58:06Z Last changed: 2026-11-13T03:58:06Z Last verified: 2026-11-19T13:37:18Z Next check: 2026-11-20T13:37:18Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of config file | opencode.json or opencode.jsonc | [1] | 2026-11-19 example path | ../product-docs | [1] | 2026-11-19 relative path resolution | Relative paths resolve from the directory containing the config file. | [1] | 2026-11-19 absolute paths | Absolute paths are supported. | [1] | 2026-11-19 home-relative paths | ~/docs | [1] | 2026-11-19 shorthand example | ../docs | [1] | 2026-11-19 Sources: [1] opencode. "References | OpenCode". https://opencode.ai/docs/references/ Role: primary. Accessed: 2026-11-19T13:37:18Z Quote: "Add one in opencode.json or opencode.jsonc , then attach its alias in your client when you need it." (Supports: config file) Quote: ""path" : "../product-docs"" (Supports: example path) Quote: "Relative paths resolve from the directory containing the config file." (Supports: relative path resolution) Quote: "Absolute paths are supported." (Supports: absolute paths) Quote: "Home-relative paths such as ~/docs are supported." (Supports: home-relative paths) Quote: ""docs" : "../docs"" (Supports: shorthand example) Snapshot SHA-256: c7d00f8bd3cada26d2179651cb9b423e30f0569c773b4907f81c5c9ca322cb02 (captured 2026-11-13T03:58:07Z) Verification: Method: Automated extraction from [1] with deepseek-flash (JSON output, thinking disabled). Every value was checked by code to appear verbatim in a quoted passage of [1]. On this check the text of [1] was unchanged since 2026-11-13T03:58:06Z, so the values verified then were kept. Cross-check: not-available at 2026-11-19T13:37:18Z. No independent second source is configured for this entry Last successful check: 2026-11-19T13:37:18Z Last attempt: 2026-11-19T13:37:18Z Notes and limitations: Extracted automatically from a single official source (section "References"). Related: https://latestn.com/tool/opencode/settings/add-plugin-to-config How do I add a plugin to opencode in opencode.jsonc? https://latestn.com/tool/opencode/settings/change-settings-in-tui How do I change opencode CLI settings from the TUI? https://latestn.com/tool/opencode/settings/change-theme How do I change the theme in opencode? https://latestn.com/tool/opencode/pricing-and-limits/track-spend How do I track spend against opencode budgets? https://latestn.com/tool/opencode/pricing-and-limits/web-search-cost How much does each opencode web search cost and how is it billed? https://latestn.com/tool/opencode/privacy-and-data/web-search-privacy What does opencode do with data from hosted web search? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-13T03:58:06Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/opencode/settings/add-external-directory-reference/latest Challenge this entry: Open challenges: None How: If a value here is wrong or out of date, send what is wrong and a link to evidence. Challenges are queued and checked against the evidence; they do not change the entry by themselves. If the entry changes as a result, the change log says so. Form: https://latestn.com/dispute/tool/opencode/settings/add-external-directory-reference POST: https://latestn.com/dispute/tool/opencode/settings/add-external-directory-reference with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/opencode/settings/add-external-directory-reference?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do I add a reference to a directory outside the current project in opencode? Revision 1, last verified 2026-11-19T13:37:18Z. https://latestn.com/tool/opencode/settings/add-external-directory-reference (accessed 2026-11-21T09:50:43Z). @misc{LatestN_tool_opencode_settings_add_external_directory_reference_r1, title = {How do I add a reference to a directory outside the current project in opencode?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/opencode/settings/add-external-directory-reference}}, note = {Revision 1; digest sha256:13430b86741e18c6; last verified 2026-11-19T13:37:18Z; accessed 2026-11-21T09:50:43Z} } Reuse: License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) Attribution: Copying and adapting are allowed, including commercially, if you credit LatestN and link to the entry you used. Each entry ends with a ready-made citation. URL: https://latestn.com/tool/opencode/settings/add-external-directory-reference