This commit is contained in:
khaneliman
2026-01-08 21:33:30 +00:00
parent 30e2e9f66e
commit fe10247d9c

View File

@@ -62444,12 +62444,12 @@ null or package</p>
</span>
</dt>
<dd>
<p>Custom agents for opencode.
The attribute name becomes the agent filename, and the value is either:</p><div class="itemizedlist"><ul class="itemizedlist " style="list-style-type: disc;"><li class="listitem"><p>Inline content as a string</p></li><li class="listitem"><p>A path to a file containing the agent content
Agents are stored in <code class="filename">$XDG_CONFIG_HOME/opencode/agent/</code> directory.</p></li></ul></div>
<p>Custom agents for opencode.</p><p>This option can either be:</p><div class="itemizedlist"><ul class="itemizedlist " style="list-style-type: disc;"><li class="listitem"><p>An attribute set defining agents</p></li><li class="listitem"><p>A path to a directory containing multiple agent files</p></li></ul></div><p>If an attribute set is used, the attribute name becomes the agent filename,
and the value is either:</p><div class="itemizedlist"><ul class="itemizedlist " style="list-style-type: disc;"><li class="listitem"><p>Inline content as a string (creates <code class="literal">opencode/agent/&lt;name&gt;.md</code>)</p></li><li class="listitem"><p>A path to a file (creates <code class="literal">opencode/agent/&lt;name&gt;.md</code>)</p></li></ul></div><p>If a path is used, it is expected to contain agent files.
The directory is symlinked to <code class="filename">$XDG_CONFIG_HOME/opencode/agent/</code>.</p>
<p><span class="emphasis"><em>Type:</em></span>
attribute set of (strings concatenated with “\n” or absolute path)</p>
(attribute set of (strings concatenated with “\n” or absolute path)) or absolute path</p>
<p><span class="emphasis"><em>Default:</em></span>
<code class="literal">{ }</code></p>
@@ -62488,12 +62488,12 @@ attribute set of (strings concatenated with “\n” or absolute path)</p>
</span>
</dt>
<dd>
<p>Custom commands for opencode.
The attribute name becomes the command filename, and the value is either:</p><div class="itemizedlist"><ul class="itemizedlist " style="list-style-type: disc;"><li class="listitem"><p>Inline content as a string</p></li><li class="listitem"><p>A path to a file containing the command content
Commands are stored in <code class="filename">$XDG_CONFIG_HOME/opencode/command/</code> directory.</p></li></ul></div>
<p>Custom commands for opencode.</p><p>This option can either be:</p><div class="itemizedlist"><ul class="itemizedlist " style="list-style-type: disc;"><li class="listitem"><p>An attribute set defining commands</p></li><li class="listitem"><p>A path to a directory containing multiple command files</p></li></ul></div><p>If an attribute set is used, the attribute name becomes the command filename,
and the value is either:</p><div class="itemizedlist"><ul class="itemizedlist " style="list-style-type: disc;"><li class="listitem"><p>Inline content as a string (creates <code class="literal">opencode/command/&lt;name&gt;.md</code>)</p></li><li class="listitem"><p>A path to a file (creates <code class="literal">opencode/command/&lt;name&gt;.md</code>)</p></li></ul></div><p>If a path is used, it is expected to contain command files.
The directory is symlinked to <code class="filename">$XDG_CONFIG_HOME/opencode/command/</code>.</p>
<p><span class="emphasis"><em>Type:</em></span>
attribute set of (strings concatenated with “\n” or absolute path)</p>
(attribute set of (strings concatenated with “\n” or absolute path)) or absolute path</p>
<p><span class="emphasis"><em>Default:</em></span>
<code class="literal">{ }</code></p>
@@ -62666,18 +62666,65 @@ containing a <code class="filename">SKILL.md</code>. The directory is symlinked
</span>
</dt>
<dd>
<p>Custom themes for opencode. The attribute name becomes the theme
filename, and the value is either:</p><div class="itemizedlist"><ul class="itemizedlist " style="list-style-type: disc;"><li class="listitem"><p>An attribute set, that is converted to a json</p></li><li class="listitem"><p>A path to a file containing the content
Themes are stored in <code class="filename">$XDG_CONFIG_HOME/opencode/themes/</code> directory.
Set <code class="literal">programs.opencode.settings.theme</code> to enable the custom theme.
See <a class="link" href="https://opencode.ai/docs/themes/" target="_top">https://opencode.ai/docs/themes/</a> for the documentation.</p></li></ul></div>
<p>Custom themes for opencode.</p><p>This option can either be:</p><div class="itemizedlist"><ul class="itemizedlist " style="list-style-type: disc;"><li class="listitem"><p>An attribute set defining themes</p></li><li class="listitem"><p>A path to a directory containing multiple theme files</p></li></ul></div><p>If an attribute set is used, the attribute name becomes the theme filename,
and the value is either:</p><div class="itemizedlist"><ul class="itemizedlist " style="list-style-type: disc;"><li class="listitem"><p>An attribute set that is converted to a JSON file (creates <code class="literal">opencode/themes/&lt;name&gt;.json</code>)</p></li><li class="listitem"><p>A path to a file (creates <code class="literal">opencode/themes/&lt;name&gt;.json</code>)</p></li></ul></div><p>If a path is used, it is expected to contain theme files.
The directory is symlinked to <code class="filename">$XDG_CONFIG_HOME/opencode/themes/</code>.</p><p>Set <code class="literal">programs.opencode.settings.theme</code> to enable the custom theme.
See <a class="link" href="https://opencode.ai/docs/themes/" target="_top">https://opencode.ai/docs/themes/</a> for the documentation.</p>
<p><span class="emphasis"><em>Type:</em></span>
attribute set of (JSON value or absolute path)</p>
(attribute set of (JSON value or absolute path)) or absolute path</p>
<p><span class="emphasis"><em>Default:</em></span>
<code class="literal">{ }</code></p>
<p><span class="emphasis"><em>Declared by:</em></span></p>
<table border="0" summary="Simple list" class="simplelist">
<tr><td>
<code class="filename"><a class="filename" href="https://github.com/nix-community/home-manager/blob/master/modules/programs/opencode.nix" target="_top">
&lt;home-manager/modules/programs/opencode.nix&gt;
</a></code>
</td></tr>
</table>
</dd>
<dt>
<span class="term">
<a id="opt-programs.opencode.tools"></a><a class="term" href="options.xhtml#opt-programs.opencode.tools"><code class="option">programs.opencode.tools</code>
</a>
</span>
</dt>
<dd>
<p>Custom tools for opencode.</p><p>This option can either be:</p><div class="itemizedlist"><ul class="itemizedlist " style="list-style-type: disc;"><li class="listitem"><p>An attribute set defining tools</p></li><li class="listitem"><p>A path to a directory containing multiple tool files</p></li></ul></div><p>If an attribute set is used, the attribute name becomes the tool filename,
and the value is either:</p><div class="itemizedlist"><ul class="itemizedlist " style="list-style-type: disc;"><li class="listitem"><p>Inline content as a string (creates <code class="literal">opencode/tool/&lt;name&gt;.ts</code>)</p></li><li class="listitem"><p>A path to a file (creates <code class="literal">opencode/tool/&lt;name&gt;.ts</code> or <code class="literal">opencode/tool/&lt;name&gt;.js</code>)</p></li></ul></div><p>If a path is used, it is expected to contain tool files.
The directory is symlinked to <code class="filename">$XDG_CONFIG_HOME/opencode/tool/</code>.</p><p>See <a class="link" href="https://opencode.ai/docs/tools/" target="_top">https://opencode.ai/docs/tools/</a> for the documentation.</p>
<p><span class="emphasis"><em>Type:</em></span>
(attribute set of (strings concatenated with “\n” or absolute path)) or absolute path</p>
<p><span class="emphasis"><em>Default:</em></span>
<code class="literal">{ }</code></p>
<p><span class="emphasis"><em>Example:</em></span></p><pre><code class="programlisting">{
database-query = &#x27;&#x27;
import { tool } from &quot;@opencode-ai/plugin&quot;
export default tool({
description: &quot;Query the project database&quot;,
args: {
query: tool.schema.string().describe(&quot;SQL query to execute&quot;),
},
async execute(args) {
// Your database logic here
return `Executed query: ${args.query}`
},
})
&#x27;&#x27;;
# Or reference an existing file
api-client = ./tools/api-client.ts;
}
</code></pre>
<p><span class="emphasis"><em>Declared by:</em></span></p>
<table border="0" summary="Simple list" class="simplelist">
<tr><td>