<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Plugins on Restish</title><link>https://rest.sh/docs/plugins/</link><description>Recent content in Plugins on Restish</description><generator>Hugo</generator><language>en-US</language><atom:link href="https://rest.sh/docs/plugins/index.xml" rel="self" type="application/rss+xml"/><item><title>Install and Use Plugins</title><link>https://rest.sh/docs/plugins/install-and-use/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://rest.sh/docs/plugins/install-and-use/</guid><description>&lt;p&gt;This is the operator path for using plugins that already exist.&lt;/p&gt;
&lt;p&gt;Plugins are executable programs on your machine. Install and run them at your
own risk, from sources you trust. Restish checks the plugin manifest and
capabilities, but it does not sandbox plugin code or verify publisher identity.&lt;/p&gt;
&lt;h2 id="list-plugins"&gt;List Plugins&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;restish plugin list
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Run this first when an output format, command, auth method, or TLS signer is
missing.&lt;/p&gt;
&lt;h2 id="install-a-plugin"&gt;Install A Plugin&lt;/h2&gt;
&lt;p&gt;Install from the official Restish GitHub releases:&lt;/p&gt;</description></item><item><title>Built-In Example Plugins</title><link>https://rest.sh/docs/plugins/example-plugins/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://rest.sh/docs/plugins/example-plugins/</guid><description>&lt;p&gt;The repository includes plugin binaries that are both useful tools and reference
implementations. Operators can use these to try real plugin behavior. Authors
can read them to see the smallest practical shape for each plugin category.&lt;/p&gt;
&lt;p&gt;If you are only trying to install and run a plugin, start with
&lt;a href="../install-and-use/"&gt;Install and Use Plugins&lt;/a&gt;. If you are writing one, read
the relevant author guide after finding the closest example here.&lt;/p&gt;
&lt;h2 id="operator-facing-plugins"&gt;Operator-Facing Plugins&lt;/h2&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;Plugin&lt;/th&gt;
 &lt;th&gt;Path&lt;/th&gt;
 &lt;th&gt;Use it for&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;restish-csv&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;cmd/restish-csv/main.go&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;Render array responses as CSV.&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;restish-bulk&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;cmd/restish-bulk/main.go&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;Manage API collections as local files.&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;restish-mcp&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;cmd/restish-mcp/main.go&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;Serve registered APIs as MCP tools.&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;restish-pkcs11&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;cmd/restish-pkcs11/main.go&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;Sign mTLS handshakes with PKCS#11-backed keys.&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;These binaries are built like normal Go commands. Once installed where Restish
can discover them, they participate in the same plugin lifecycle as third-party
plugins.&lt;/p&gt;</description></item><item><title>Plugin Quickstart</title><link>https://rest.sh/docs/plugins/quickstart/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://rest.sh/docs/plugins/quickstart/</guid><description>&lt;p&gt;This author-focused quickstart is for plugin developers. Operators should start
with &lt;a href="../install-and-use/"&gt;Install and Use Plugins&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The quickest way to write a plugin is to start from a working first-party
plugin, verify the manifest and message flow with &lt;code&gt;plugin debug&lt;/code&gt;, and then
change one capability at a time.&lt;/p&gt;
&lt;h2 id="author-path"&gt;Author Path&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Choose the smallest plugin type for the job.&lt;/li&gt;
&lt;li&gt;Build and install a known-good plugin locally.&lt;/li&gt;
&lt;li&gt;Verify discovery with &lt;code&gt;plugin list&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Inspect protocol messages with &lt;code&gt;plugin debug&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Change the manifest and implementation.&lt;/li&gt;
&lt;li&gt;Re-run the same discovery and behavior checks.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id="choose-a-plugin-type"&gt;Choose A Plugin Type&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Formatter hook: easiest way to add an output format.&lt;/li&gt;
&lt;li&gt;Loader hook: add support for an API description format or source that Restish
does not load natively.&lt;/li&gt;
&lt;li&gt;Auth hook: integrate a local credential source that should participate in
Restish&amp;rsquo;s normal request pipeline.&lt;/li&gt;
&lt;li&gt;Request or response middleware: inspect or mutate prepared requests or
interpreted responses.&lt;/li&gt;
&lt;li&gt;Command plugin: add a top-level workflow such as &lt;code&gt;bulk&lt;/code&gt; or &lt;code&gt;mcp&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;TLS signer: sign mTLS handshakes when the private key must stay outside
Restish.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Choose a hook when the plugin should do one focused job inside a request. Choose
a command plugin when the plugin owns a multi-step workflow and needs host
messages such as delegated HTTP, prompts, config reads, or formatted responses.&lt;/p&gt;</description></item><item><title>Hook Plugins</title><link>https://rest.sh/docs/plugins/hook-plugins/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://rest.sh/docs/plugins/hook-plugins/</guid><description>&lt;p&gt;Hook plugins are short-lived extensions. Restish starts them for one focused
job, reads the result, and continues the host request pipeline.&lt;/p&gt;
&lt;h2 id="hook-types"&gt;Hook Types&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;auth&lt;/code&gt;: produce or mutate request auth.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;request-middleware&lt;/code&gt;: inspect or mutate outgoing requests.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;response-middleware&lt;/code&gt;: inspect or mutate incoming responses.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;loader&lt;/code&gt;: load API descriptions from additional content types or sources.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;formatter&lt;/code&gt;: render normalized responses as new output formats.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="formatter-example"&gt;Formatter Example&lt;/h2&gt;
&lt;p&gt;A CSV formatter should receive normalized response data and return terminal or
file output without owning HTTP, auth, retry, cache, or TLS behavior.&lt;/p&gt;</description></item><item><title>Command Plugins</title><link>https://rest.sh/docs/plugins/command-plugins/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://rest.sh/docs/plugins/command-plugins/</guid><description>&lt;p&gt;Command plugins add root commands such as &lt;code&gt;bulk&lt;/code&gt; and &lt;code&gt;mcp&lt;/code&gt;. They can perform
multi-step workflows while delegating HTTP, config, prompts, and output back to
Restish.&lt;/p&gt;
&lt;h2 id="when-to-use-one"&gt;When To Use One&lt;/h2&gt;
&lt;p&gt;Use a command plugin when a feature needs:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;a top-level command&lt;/li&gt;
&lt;li&gt;multiple HTTP requests&lt;/li&gt;
&lt;li&gt;progress messages&lt;/li&gt;
&lt;li&gt;prompts or confirmations&lt;/li&gt;
&lt;li&gt;access to registered APIs and profiles&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Use a hook plugin for one request/response/auth/formatting task.&lt;/p&gt;
&lt;h2 id="delegated-http"&gt;Delegated HTTP&lt;/h2&gt;
&lt;p&gt;Go command plugins should use &lt;code&gt;plugin.CommandClient&lt;/code&gt; helpers instead of
hand-writing CBOR messages. Delegated HTTP uses &lt;code&gt;Do&lt;/code&gt;:&lt;/p&gt;</description></item><item><title>TLS Signer Plugins</title><link>https://rest.sh/docs/plugins/tls-signer-plugins/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://rest.sh/docs/plugins/tls-signer-plugins/</guid><description>&lt;p&gt;TLS signer plugins are for mTLS environments where the client private key lives
in hardware, a secure service, or another process.&lt;/p&gt;
&lt;h2 id="operator-example"&gt;Operator Example&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;restish &lt;span class="se"&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; --rsh-tls-signer pkcs11 &lt;span class="se"&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; --rsh-tls-signer-param &lt;span class="nv"&gt;module&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;/usr/local/lib/opensc-pkcs11.so &lt;span class="se"&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; https://mtls.internal.test/items
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Prerequisites: the signer plugin is installed, the signer can access the client
certificate and signing key material it needs, and the target API requires
mTLS.&lt;/p&gt;
&lt;h2 id="profile-shape"&gt;Profile Shape&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-jsonc" data-lang="jsonc"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;#34;apis&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;#34;secure&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;#34;base_url&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;https://mtls.internal.test&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;#34;profiles&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;#34;default&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;#34;ca_cert&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;/etc/ssl/internal-ca.pem&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;#34;tls_signer&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;pkcs11&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;#34;tls_signer_params&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;#34;module&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;/usr/local/lib/opensc-pkcs11.so&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;#34;token_label&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;Restish&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;#34;pin_env&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;PKCS11_PIN&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Profile-level TLS settings override API-level defaults for that profile. Use
either &lt;code&gt;client_cert&lt;/code&gt;/&lt;code&gt;client_key&lt;/code&gt; files or &lt;code&gt;tls_signer&lt;/code&gt; for one request; Restish
rejects configs that combine both client-certificate files and a TLS signer.&lt;/p&gt;</description></item><item><title>Bulk Management</title><link>https://rest.sh/docs/plugins/bulk-management/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://rest.sh/docs/plugins/bulk-management/</guid><description>&lt;p&gt;&lt;code&gt;restish bulk&lt;/code&gt; is a command-plugin workflow for checking out many API resources
to disk, editing them locally, and pushing changes back through Restish.&lt;/p&gt;
&lt;h2 id="prerequisites"&gt;Prerequisites&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;The &lt;code&gt;restish-bulk&lt;/code&gt; plugin binary is installed and discoverable.&lt;/li&gt;
&lt;li&gt;The target API exposes collection and item URLs.&lt;/li&gt;
&lt;li&gt;You understand the API&amp;rsquo;s update semantics before pushing changes.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Verify discovery:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;restish plugin list
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;restish bulk --help
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="initialize-a-checkout"&gt;Initialize A Checkout&lt;/h2&gt;
&lt;p&gt;The example API has a books collection used for bulk examples:&lt;/p&gt;</description></item><item><title>Serve APIs Over MCP</title><link>https://rest.sh/docs/plugins/mcp/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://rest.sh/docs/plugins/mcp/</guid><description>&lt;p&gt;&lt;code&gt;restish-mcp&lt;/code&gt; is a command plugin that exposes registered OpenAPI operations as
MCP tools. Use it when an MCP client should call APIs through Restish profiles,
auth, TLS, retries, and output normalization.&lt;/p&gt;
&lt;h2 id="prerequisites"&gt;Prerequisites&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;restish api connect example api.rest.sh &lt;span class="s1"&gt;&amp;#39;prompt.api_key: docs-key&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;restish plugin list
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The API must be registered and have a usable spec.&lt;/p&gt;
&lt;h2 id="serve-tools"&gt;Serve Tools&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;restish mcp serve example
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The plugin reads the registered API spec, turns operations into MCP tools, and
delegates HTTP execution back to Restish.&lt;/p&gt;</description></item></channel></rss>