<?xml version="1.0" encoding="UTF-8" ?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/"> <channel><title>Apuntes de eduardófilo</title><description>Apuntes varios sobre algunas de las cosas que necesito recordar, principalmente sobre Desarrollo y Sistemas.</description><link>https://apuntes.eduardofilo.es/</link><atom:link href="https://apuntes.eduardofilo.es/rss.xml" rel="self" type="application/rss+xml" /><managingEditor>Eduardo Moreno Lamana</managingEditor><docs>https://github.com/eduardofilo/eduardofilo.mkdocs</docs><language>es</language> <pubDate>Mon, 02 Nov 2026 18:31:10 -0000</pubDate> <lastBuildDate>Mon, 02 Nov 2026 18:31:10 -0000</lastBuildDate> <ttl>1440</ttl> <generator>MkDocs RSS plugin - v1.15.0</generator> <item> <title>De Meta Quest 3 a Steam Frame con FramePort</title> <description>&lt;p&gt;&lt;img alt=&#34;De Meta Quest 3 a Steam Frame&#34; src=&#34;images/posts/2026-10-15_quest_frameport/quest_frameport.png&#34; /&gt;&lt;/p&gt;&lt;p&gt;Desde que escribí &lt;a href=&#34;2022-04-17_vr.html&#34;&gt;Aventuras en VR&lt;/a&gt; la realidad virtual ha ido ganando peso en mis intereses y tiempo libre. De aquellas Oculus Quest 2 pasé a las Meta Quest 3 y, con ellas, fui comprando en la tienda de Meta una cantidad de juegos/aplicaciones considerable. Ahora estoy en proceso de migración a las Valve Steam Frame y el problema del cambio de plataforma es serio. Desde el punto de vista económico (no quiero perder todo lo invertido) y logístico (no quiero tener dos visores equivalentes e idealmente me gustaría vender las Quest y recuperar parte de la inversión).&lt;/p&gt;&lt;p&gt;Buscando cómo resolverlo o al menos mitigarlo, di con &lt;a href=&#34;https://github.com/spoopyghosty0/frameport&#34;&gt;&lt;strong&gt;FramePort&lt;/strong&gt;&lt;/a&gt;, un proyecto libre que instala juegos de Quest, aplicaciones Android y juegos PC VR en las Steam Frame. No se limita a copiar la aplicación. Convierte sus llamadas de VR al estándar OpenXR y le aplica parches para que arranque en las Frame. Para que haga su magia, uno tiene que aportar los paquetes de los juegos. Y ahí estaba todo el trabajo, sacar del visor los juegos que ya tengo comprados.&lt;/p&gt;&lt;p&gt;De eso se encargaron dos scripts que escribió mi agente (Hermes, el del &lt;a href=&#34;2026-08-23_hermes_agent_vps.html&#34;&gt;hace un par de artículos&lt;/a&gt;). El primero, &lt;code&gt;extract-quest-games.sh&lt;/code&gt;, baja los ficheros de cada juego instalado y los coloca donde FramePort los espera. El segundo, &lt;code&gt;identify-quest-games.py&lt;/code&gt;, averigua a qué juego corresponde cada paquete. En este artículo cuento qué hace FramePort, cómo se preparan el visor y el ordenador, y dejo el procedimiento completo que seguí con Hermes, paso a paso, para llevar una biblioteca comprada en Meta a unas Steam Frame.&lt;/p&gt;&lt;h2 id=&#34;los-juegos-de-quest-por-dentro&#34;&gt;Los juegos de Quest por dentro&lt;a class=&#34;headerlink&#34; href=&#34;#los-juegos-de-quest-por-dentro&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Las Meta Quest funcionan sobre Android (Horizon OS) y eso, para lo que nos ocupa, es una suerte. Cada juego instalado es un paquete de Android como los de cualquier móvil.&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;strong&gt;El APK&lt;/strong&gt;: el programa. A veces es uno solo y a veces viene troceado en un &lt;code&gt;base.apk&lt;/code&gt; más varios &lt;code&gt;split_config.*.apk&lt;/code&gt;.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Los OBB&lt;/strong&gt;: los datos del juego (texturas, niveles, audio) que no van dentro del APK. En el visor viven en &lt;code&gt;/sdcard/Android/obb/&amp;lt;package&amp;gt;/&lt;/code&gt;.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Las gafas no enseñan nada de esto al usuario, pero sí al protocolo de depuración de Android (&lt;code&gt;adb&lt;/code&gt;), la misma herramienta que se usa para interactuar con el sistema de un teléfono Android.&lt;/p&gt;&lt;h2 id=&#34;que-hace-frameport-y-que-no&#34;&gt;Qué hace FramePort (y qué no)&lt;a class=&#34;headerlink&#34; href=&#34;#que-hace-frameport-y-que-no&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;FramePort es software libre (GPL-3.0) y corre en Windows, macOS y Linux. Por dentro encadena varias piezas:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;strong&gt;OVRPort&lt;/strong&gt;: traduce las llamadas de VR propias de Meta al OpenXR estándar que entienden las Steam Frame. Es la conversión que permite que un juego hecho para el visor de Meta se ejecute en el visor de Valve.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Lepton&lt;/strong&gt;: el runtime de Android de Valve en las Frame, que es donde corre el juego ya convertido.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Recetas&lt;/strong&gt;: parches y ajustes probados por la comunidad para más de 120 juegos, que se actualizan solos sin tocar los ficheros del usuario.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Proton&lt;/strong&gt; y &lt;strong&gt;FEX&lt;/strong&gt;: para juegos PC VR y programas de Windows, que no es lo que nos ocupa hoy.&lt;/li&gt;&lt;/ul&gt;&lt;div class=&#34;admonition note&#34;&gt;&lt;p class=&#34;admonition-title&#34;&gt;Juegos comprados&lt;/p&gt;&lt;p&gt;Todo el procedimiento trabaja sobre lo que ya está instalado en mis gafas con mi cuenta: no hay descargas de terceros ni herramientas de desbloqueo. FramePort tampoco las necesita ni las ofrece.&lt;/p&gt;&lt;/div&gt;&lt;h2 id=&#34;preparar-el-visor-modo-desarrollador&#34;&gt;Preparar el visor: modo desarrollador&lt;a class=&#34;headerlink&#34; href=&#34;#preparar-el-visor-modo-desarrollador&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Antes de que las Quest hablen con el ordenador hay que activarles el modo desarrollador. Es un trámite corto, pero tiene un paso que puede dar guerra si no se conoce:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;&lt;strong&gt;Cuenta de desarrollador con organización.&lt;/strong&gt; En &lt;code&gt;developer.oculus.com&lt;/code&gt; hay que crear una organización (gratis). Sin ella el interruptor del modo desarrollador sencillamente no aparece en la aplicación del móvil.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Activar el modo.&lt;/strong&gt; En la aplicación &lt;strong&gt;Meta Horizon&lt;/strong&gt; del teléfono: visor → &lt;em&gt;Headset Settings&lt;/em&gt; → &lt;em&gt;Developer Mode&lt;/em&gt; → activar. El visor pide reiniciarse.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Autorizar el ordenador.&lt;/strong&gt; Con el cable USB-C (de datos, no de solo carga) y el visor puesto, aparece un diálogo de depuración USB. Se acepta y se marca &lt;em&gt;Always allow from this computer&lt;/em&gt;.&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;La comprobación de que todo está en su sitio es &lt;code&gt;adb devices&lt;/code&gt;, que debe responder &lt;code&gt;device&lt;/code&gt;. Si responde &lt;code&gt;unauthorized&lt;/code&gt;, el diálogo del paso 3 no se ha aceptado.&lt;/p&gt;&lt;h2 id=&#34;preparar-el-ordenador-adb&#34;&gt;Preparar el ordenador: adb&lt;a class=&#34;headerlink&#34; href=&#34;#preparar-el-ordenador-adb&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;&lt;code&gt;adb&lt;/code&gt; viene con el paquete &lt;code&gt;android-tools&lt;/code&gt; en Arch y con &lt;code&gt;adb&lt;/code&gt; en Ubuntu. En Linux hace falta además una regla &lt;code&gt;udev&lt;/code&gt;, porque sin ella solo funciona como root:&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;2&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;SUBSYSTEM==&amp;quot;usb&amp;quot;, ATTR{idVendor}==&amp;quot;2833&amp;quot;, MODE=&amp;quot;0666&amp;quot;, GROUP=&amp;quot;plugdev&amp;quot;&amp;#39;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;sudo&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;tee&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;/etc/udev/rules.d/51-android.rulessudo&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;udevadm&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;control&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;--reload-rules&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;&amp;amp;&amp;amp;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;sudo&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;udevadm&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;trigger&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;h2 id=&#34;extraer-los-juegos-del-visor&#34;&gt;Extraer los juegos del visor&lt;a class=&#34;headerlink&#34; href=&#34;#extraer-los-juegos-del-visor&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;A FramePort hay que darle una estructura concreta de ficheros para cada juego. Una carpeta por juego, el APK dentro de ella y una subcarpeta con el nombre exacto del paquete que contiene los OBB:&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;3&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;4&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;5&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;6&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;QuestGames/└── com.Armature.VR4/ ← una carpeta por juego (el nombre da igual) ├── base.apk ← el APK, o varios si va troceado └── com.Armature.VR4/ ← carpeta de datos: EXACTAMENTE el package name ├── main.203.com.Armature.VR4.obb └── patch.203.com.Armature.VR4.obb&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;Los trozos de un mismo juego van juntos (varios APK dentro de una carpeta cuentan como un solo juego) y los OBB no se renombran nunca, porque el juego los busca por su nombre exacto.&lt;/p&gt;&lt;p&gt;El script recorre las aplicaciones del visor, copia todos los APK de cada una y arrastra su carpeta de OBB al sitio correcto.&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 1&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 2&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 3&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 4&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 5&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 6&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 7&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 8&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 9&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;10&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;11&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;12&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;13&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;14&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;15&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;16&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;17&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;18&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;19&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;20&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;21&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;22&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;23&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;24&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;25&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;26&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;27&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;28&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;29&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;30&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;31&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;32&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;33&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;34&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;35&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;36&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;37&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;38&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;39&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;40&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;41&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;42&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;43&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;44&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;45&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&#34;ch&#34;&gt;#!/usr/bin/env bash&lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;# Extrae APK(s) + OBB de los juegos instalados en un Meta Quest y los deja con el&lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;# layout que FramePort escanea:&lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;# &amp;lt;JUEGOS&amp;gt;/&amp;lt;package&amp;gt;/&amp;lt;base.apk y splits&amp;gt; (uno o varios APK por juego)&lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;# &amp;lt;JUEGOS&amp;gt;/&amp;lt;package&amp;gt;/&amp;lt;package&amp;gt;/&amp;lt;*.obb&amp;gt; (carpeta de datos = package name)&lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;#&lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;# Uso: ./extract-quest-games.sh [DESTINO] [PREFIJO_PAQUETE]&lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;# ./extract-quest-games.sh ~/QuestGames com.&lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;#&lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;# ADB se puede sobreescribir (ADB=./mockadb) para probarlo sin visor.&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;set&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-euo&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;pipefail&lt;span class=&#34;nv&#34;&gt;OUT&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;:-&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$PWD&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;/QuestGames&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;FILTER&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;:-&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;ADB&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;ADB&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;:-&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;adb&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;command&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-v&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$ADB&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&amp;gt;/dev/null&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;||&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;adb no está en el PATH&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&amp;gt;&lt;span class=&#34;p&#34;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;exit&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;m&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$ADB&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;get-state&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;m&#34;&gt;2&lt;/span&gt;&amp;gt;/dev/null&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;device&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;se&#34;&gt;\&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;||&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;Quest no autorizado: ejecuta &amp;#39;adb devices&amp;#39; y acepta en el visor&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&amp;gt;&lt;span class=&#34;p&#34;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;exit&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;m&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;}&lt;/span&gt;mkdir&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-p&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$OUT&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;mapfile&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-t&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;PKGS&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&amp;lt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&amp;lt;&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$ADB&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;shell&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;pm&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;list&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;packages&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-3&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;tr&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-d&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;\r&amp;#39;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;sed&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;s/^package://&amp;#39;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;grep&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-v&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;^$&amp;#39;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;if&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-n&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$FILTER&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;then&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;grep&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;^&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$FILTER&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;||&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;true&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;else&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;cat&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;fi&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;sort&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${#&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;PKGS&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[@]&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-gt&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;m&#34;&gt;0&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;||&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;sin apps que coincidan con &amp;#39;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$FILTER&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#39;&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&amp;gt;&lt;span class=&#34;p&#34;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;exit&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;m&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;for&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;pkg&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;in&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;PKGS&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[@]&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;do&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;dest&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$OUT&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;/&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$pkg&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;mkdir&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-p&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$dest&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;n&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;0&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;while&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;IFS&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;read&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-r&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;apk&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;do&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;# base.apk + split_config.*.apk -&amp;gt; dest/&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;apk&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;apk&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;#package:&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-n&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$apk&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;||&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;continue&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$ADB&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;pull&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-a&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$apk&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$dest&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;/&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&amp;gt;/dev/null&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;m&#34;&gt;2&lt;/span&gt;&amp;gt;&lt;span class=&#34;p&#34;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;&amp;amp;&amp;amp;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;n&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$((&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;n&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;+&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;m&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;))&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;done&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&amp;lt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&amp;lt;&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$ADB&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;shell&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;pm&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;path&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$pkg&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;tr&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-d&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;\r&amp;#39;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$n&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-gt&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;m&#34;&gt;0&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;||&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;[skip] &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$pkg&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt; (sin APK accesible)&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;rmdir&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$dest&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;m&#34;&gt;2&lt;/span&gt;&amp;gt;/dev/null&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;||&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;true&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;continue&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;src&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;/sdcard/Android/obb/&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$pkg&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;if&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-n&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$ADB&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;shell&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;ls -A &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$src&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt; 2&amp;gt;/dev/null&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;tr&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-d&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;\r&amp;#39;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;then&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$ADB&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;pull&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$src&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$dest&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;/&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&amp;gt;/dev/null&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;m&#34;&gt;2&lt;/span&gt;&amp;gt;&lt;span class=&#34;p&#34;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;# crea dest/&amp;lt;package&amp;gt;/&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;[ok] &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$pkg&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt; — &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$n&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt; APK + OBB&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;else&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;[ok] &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$pkg&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt; — &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$n&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt; APK (sin OBB)&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;fi&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;done&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;Importa en FramePort: Add games → Scan a folder… → &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$OUT&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;Se guarda en el ordenador, se le da permiso de ejecución y se lanza:&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;3&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;chmod&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;+x&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;extract-quest-games.sh./extract-quest-games.sh&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;~/QuestGames&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;# todos los juegos&lt;/span&gt;./extract-quest-games.sh&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;~/QuestGames&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;com.&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;# solo los que empiecen por &amp;quot;com.&amp;quot;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;&lt;a href=&#34;files/posts/2026-10-15_quest_frameport/extract-quest-games.sh&#34;&gt;Descargar extract-quest-games.sh&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Con eso la carpeta &lt;code&gt;~/QuestGames&lt;/code&gt; ya contiene el material con el layout que FramePort escanea.&lt;/p&gt;&lt;div class=&#34;admonition note&#34;&gt;&lt;p class=&#34;admonition-title&#34;&gt;Descarga por lotes&lt;/p&gt;&lt;p&gt;Mis Quest 3 son la versión de 128GB. Hace mucho tiempo que no puedo tener todos los juegos adquiridos descargados a la vez. Muchas veces para instalar un juego nuevo (o viejo que me apetece rejugar) tenía que desinstalar otro. Ahora para hacer esta descarga de todos los juegos de la biblioteca, he tenido que ejecutar el script varias veces habiendo borrado todos los juegos al principio e instalado un lote de la biblioteca para hacer la descarga.&lt;/p&gt;&lt;/div&gt;&lt;h2 id=&#34;identificar-cada-paquete&#34;&gt;Identificar cada paquete&lt;a class=&#34;headerlink&#34; href=&#34;#identificar-cada-paquete&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Hay paquetes que se explican solos (&lt;code&gt;com.Arvore.Yuki&lt;/code&gt; es Yuki), pero en otros costaba deducir qué juegos eran a partir del paquete.&lt;/p&gt;&lt;p&gt;El nombre está dentro del APK, pero no se puede leer a mano. El &lt;code&gt;AndroidManifest.xml&lt;/code&gt; que aparece al abrir el fichero APK (con cualquier descompresor) no es XML de texto, está en &lt;strong&gt;formato binario&lt;/strong&gt; (AXML), y el nombre de la aplicación es casi siempre una &lt;strong&gt;referencia&lt;/strong&gt; a un recurso (&lt;code&gt;@string/app_name&lt;/code&gt;) que hay que resolver contra la tabla de recursos del APK.&lt;/p&gt;&lt;p&gt;La pieza que hace ese trabajo es &lt;code&gt;androguard&lt;/code&gt;, una biblioteca de Python que no necesita ni el SDK de Android ni Java:&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;2&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;python3&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-m&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;venv&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;~/.venvs/apkid~/.venvs/apkid/bin/pip&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;install&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;androguard&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;El segundo script recorre la carpeta de juegos, elige el APK base de cada uno (el &lt;code&gt;base.apk&lt;/code&gt;, no los &lt;code&gt;split_config.*&lt;/code&gt;), lee su manifiesto y escribe tres cosas:&lt;/p&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Fichero&lt;/th&gt;&lt;th&gt;Contenido&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;mapping.tsv&lt;/code&gt;&lt;/td&gt;&lt;td&gt;paquete, nombre, versión, actividad principal, carpeta y APK&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;icons/&amp;lt;package&amp;gt;.png&lt;/code&gt;&lt;/td&gt;&lt;td&gt;el icono de cada juego a 192 px&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;iconos.html&lt;/code&gt;&lt;/td&gt;&lt;td&gt;listado con icono, nombre y paquete, para poner cara a los dudosos&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;2&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;~/.venvs/apkid/bin/python&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;identify-quest-games.py&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;~/QuestGames&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;# solo informa&lt;/span&gt;~/.venvs/apkid/bin/python&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;identify-quest-games.py&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;~/QuestGames&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;--rename&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;# además renombra&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;El renombrado deja cada carpeta como &lt;code&gt;Nombre [package]&lt;/code&gt;, que se lee mucho mejor, y no toca nada si el destino ya existe, así que se puede repetir sin miedo.&lt;/p&gt;&lt;p&gt;&lt;a href=&#34;files/posts/2026-10-15_quest_frameport/identify-quest-games.py&#34;&gt;Descargar identify-quest-games.py&lt;/a&gt;&lt;/p&gt;&lt;div class=&#34;admonition tip&#34;&gt;&lt;p class=&#34;admonition-title&#34;&gt;El nombre del visor no es el de la tienda&lt;/p&gt;&lt;p&gt;Lo que saca el script es el nombre con el que el juego se presenta en el visor, que no siempre coincide con el de su ficha en la tienda de Meta. Para resolver esas dudas ayuda el listado generado en &lt;code&gt;iconos.html&lt;/code&gt;.&lt;/p&gt;&lt;/div&gt;&lt;h2 id=&#34;instalarlo-en-las-steam-frame&#34;&gt;Instalarlo en las Steam Frame&lt;a class=&#34;headerlink&#34; href=&#34;#instalarlo-en-las-steam-frame&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Con la carpeta preparada, el resto se hace en FramePort: &lt;strong&gt;Add games → Scan a folder...&lt;/strong&gt; apuntando a &lt;code&gt;~/QuestGames&lt;/code&gt; (el escaneo busca hasta cinco niveles de profundidad) o &lt;strong&gt;Add an APK...&lt;/strong&gt; para un juego suelto.&lt;/p&gt;&lt;p&gt;Los juegos aparecen en la biblioteca con su carátula y, desde ahí, &lt;strong&gt;Install on Frame&lt;/strong&gt; los parchea, los sube al visor y los añade a la biblioteca de Steam. Los ficheros que se quedan en el ordenador no se tocan: FramePort trabaja sobre una copia.&lt;/p&gt;&lt;h2 id=&#34;lo-que-no-va-a-funcionar&#34;&gt;Lo que no va a funcionar&lt;a class=&#34;headerlink&#34; href=&#34;#lo-que-no-va-a-funcionar&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Hay límites que ningún parche arregla:&lt;/p&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Caso&lt;/th&gt;&lt;th&gt;Por qué&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Juegos solo de 32 bits&lt;/td&gt;&lt;td&gt;Las Frame no ejecutan aplicaciones de 32 bits. Aunque parece que a partir de la &lt;a href=&#34;https://github.com/spoopyghosty0/frameport/releases/tag/v1.2.0&#34;&gt;versión 1.2.0&lt;/a&gt; se ha incluido un conversor 32-64 bit.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Juegos solo x86&lt;/td&gt;&lt;td&gt;El procesador de las Frame es ARM.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Juegos de los sistemas de Pico o HTC&lt;/td&gt;&lt;td&gt;Usan su propia capa de VR, no la de Meta.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Aplicaciones de Android XR&lt;/td&gt;&lt;td&gt;Otro sistema por debajo.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Juegos que validan la licencia en la aplicación de Oculus&lt;/td&gt;&lt;td&gt;Piden un servicio que las Frame no tienen.&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p&gt;Ninguno de estos límites se detecta al extraer, se ven al instalar y lanzar el juego en el visor, así que la lista de lo que funciona se va descubriendo juego a juego.&lt;/p&gt;&lt;h2 id=&#34;conclusion&#34;&gt;Conclusión&lt;a class=&#34;headerlink&#34; href=&#34;#conclusion&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Con los dos scripts (con el primero en realidad), una biblioteca que estaba atada a las gafas de Meta se convierte en una carpeta de ficheros que puedo instalar en las Steam Frame. La extracción es un rato de terminal, y a partir de ahí FramePort hace el resto.&lt;/p&gt;&lt;p&gt;Queda trabajo por delante. La migración no es copiar y listo. Hay juegos que no van a arrancar nunca por los límites de arriba y otros necesitarán ajustes, y es muy posible que con otra biblioteca aparezcan casos que aquí no cuento. Pero el punto de partida ya está resuelto, y lo que compre a partir de ahora puedo llevarlo a las Frame el mismo día. Además el proyecto FramePort está en continuo desarrollo. Con cada versión se amplía el número de juegos testeados y en los que se garantiza la compatibilidad de la adaptación a las Frame.&lt;/p&gt;&lt;p&gt;Sobre los scripts, reconozco que hoy en día no tiene mérito obtenerlos ni casi difundirlos. Cualquiera puede fabricarlos con un buen agente de programación, pero ya que los tengo generados no cuesta nada ofrecerlos.&lt;/p&gt;&lt;h2 id=&#34;enlaces-de-interes&#34;&gt;Enlaces de interés&lt;a class=&#34;headerlink&#34; href=&#34;#enlaces-de-interes&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;&lt;a href=&#34;https://github.com/spoopyghosty0/frameport&#34;&gt;FramePort&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://github.com/spoopyghosty0/frameport/blob/main/docs/FAQ.md&#34;&gt;Preguntas frecuentes de FramePort&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://github.com/spoopyghosty0/frameport/blob/main/docs/COMPATIBILITY.md&#34;&gt;Compatibilidad de FramePort con los juegos de Quest&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://github.com/androguard/androguard&#34;&gt;androguard&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://sidequestvr.com/&#34;&gt;SideQuest&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;2022-04-17_vr.html&#34;&gt;Aventuras en VR&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;</description><link>https://apuntes.eduardofilo.es/2026-10-15_quest_frameport.html</link> <pubDate>Thu, 15 Oct 2026 20:30:00 +0200</pubDate><source url="https://apuntes.eduardofilo.es/rss.xml">Apuntes de eduardófilo</source><guid isPermaLink="true">https://apuntes.eduardofilo.es/2026-10-15_quest_frameport.html</guid> </item> <item> <title>From Meta Quest 3 to Steam Frame with FramePort</title> <description>&lt;p&gt;&lt;img alt=&#34;From Meta Quest 3 to Steam Frame&#34; src=&#34;../images/posts/2026-10-15_quest_frameport/quest_frameport.png&#34; /&gt;&lt;/p&gt;&lt;p&gt;Since I wrote &lt;a href=&#34;2022-04-17_vr.html&#34;&gt;Adventures in VR&lt;/a&gt; virtual reality has been gaining weight among my interests and my free time. From those Oculus Quest 2 I moved on to the Meta Quest 3 and, with them, I bought a considerable number of games/apps in the Meta store. I am now in the middle of a migration to the Valve Steam Frame and the problem of changing platform is a serious one. From the economic point of view (I do not want to lose everything I have invested) and from the logistical one (I do not want to have two equivalent headsets, and ideally I would like to sell the Quest and recover part of the investment).&lt;/p&gt;&lt;p&gt;Looking for a way to solve it, or at least to mitigate it, I came across &lt;a href=&#34;https://github.com/spoopyghosty0/frameport&#34;&gt;&lt;strong&gt;FramePort&lt;/strong&gt;&lt;/a&gt;, a free project that installs Quest games, Android apps and PC VR games on the Steam Frame. It does not limit itself to copying the app. It converts its VR calls to the OpenXR standard and applies patches so that it starts on the Frame. For it to work its magic, you have to supply the game packages. And that was all the work, getting the games I already own out of the headset.&lt;/p&gt;&lt;p&gt;Two scripts my agent wrote took care of that (Hermes, the one from &lt;a href=&#34;2026-08-23_hermes_agent_vps.html&#34;&gt;a couple of articles ago&lt;/a&gt;). The first one, &lt;code&gt;extract-quest-games.sh&lt;/code&gt;, downloads the files of every installed game and puts them where FramePort expects them. The second one, &lt;code&gt;identify-quest-games.py&lt;/code&gt;, works out which game each package belongs to. In this article I describe what FramePort does, how the headset and the computer are prepared, and I leave the complete procedure I followed with Hermes, step by step, to move a library bought in Meta to a Steam Frame.&lt;/p&gt;&lt;h2 id=&#34;quest-games-from-the-inside&#34;&gt;Quest games from the inside&lt;a class=&#34;headerlink&#34; href=&#34;#quest-games-from-the-inside&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;The Meta Quest run on Android (Horizon OS) and that, for what concerns us here, is a stroke of luck. Every installed game is an Android package like those on any phone.&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;strong&gt;The APK&lt;/strong&gt;: the program. Sometimes it is a single one and sometimes it comes split into a &lt;code&gt;base.apk&lt;/code&gt; plus several &lt;code&gt;split_config.*.apk&lt;/code&gt;.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;The OBB files&lt;/strong&gt;: the game data (textures, levels, audio) that does not go inside the APK. On the headset they live in &lt;code&gt;/sdcard/Android/obb/&amp;lt;package&amp;gt;/&lt;/code&gt;.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;The headset does not show any of this to the user, but it does to Android&#39;s debugging protocol (&lt;code&gt;adb&lt;/code&gt;), the same tool used to interact with the system of an Android phone.&lt;/p&gt;&lt;h2 id=&#34;what-frameport-does-and-what-it-does-not&#34;&gt;What FramePort does (and what it does not)&lt;a class=&#34;headerlink&#34; href=&#34;#what-frameport-does-and-what-it-does-not&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;FramePort is free software (GPL-3.0) and runs on Windows, macOS and Linux. Inside it chains several pieces together:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;strong&gt;OVRPort&lt;/strong&gt;: translates Meta&#39;s own VR calls into the standard OpenXR that the Steam Frame understands. It is the conversion that allows a game made for Meta&#39;s headset to run on Valve&#39;s headset.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Lepton&lt;/strong&gt;: Valve&#39;s Android runtime on the Frame, which is where the converted game runs.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Recipes&lt;/strong&gt;: patches and settings tested by the community for more than 120 games, which update themselves without touching the user&#39;s files.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Proton&lt;/strong&gt; and &lt;strong&gt;FEX&lt;/strong&gt;: for PC VR games and Windows programs, which is not what concerns us today.&lt;/li&gt;&lt;/ul&gt;&lt;div class=&#34;admonition note&#34;&gt;&lt;p class=&#34;admonition-title&#34;&gt;Games I own&lt;/p&gt;&lt;p&gt;The whole procedure works on what is already installed on my headset with my account: there are no downloads from third parties and no unlocking tools. FramePort does not need or offer them either.&lt;/p&gt;&lt;/div&gt;&lt;h2 id=&#34;preparing-the-headset-developer-mode&#34;&gt;Preparing the headset: developer mode&lt;a class=&#34;headerlink&#34; href=&#34;#preparing-the-headset-developer-mode&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Before the Quest talk to the computer you have to turn on developer mode. It is a short procedure, but it has a step that can be a nuisance if you do not know about it:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;&lt;strong&gt;A developer account with an organisation.&lt;/strong&gt; On &lt;code&gt;developer.oculus.com&lt;/code&gt; you have to create an organisation (free of charge). Without it the developer mode switch simply does not appear in the phone app.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Turn the mode on.&lt;/strong&gt; In the &lt;strong&gt;Meta Horizon&lt;/strong&gt; app on the phone: headset → &lt;em&gt;Headset Settings&lt;/em&gt; → &lt;em&gt;Developer Mode&lt;/em&gt; → enable it. The headset asks to restart.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Authorise the computer.&lt;/strong&gt; With the USB-C cable (a data one, not charge-only) and the headset on, a USB debugging dialogue appears. Accept it and tick &lt;em&gt;Always allow from this computer&lt;/em&gt;.&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;The check that everything is in place is &lt;code&gt;adb devices&lt;/code&gt;, which should answer &lt;code&gt;device&lt;/code&gt;. If it answers &lt;code&gt;unauthorized&lt;/code&gt;, the dialogue from step 3 has not been accepted.&lt;/p&gt;&lt;h2 id=&#34;preparing-the-computer-adb&#34;&gt;Preparing the computer: adb&lt;a class=&#34;headerlink&#34; href=&#34;#preparing-the-computer-adb&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;&lt;code&gt;adb&lt;/code&gt; comes with the &lt;code&gt;android-tools&lt;/code&gt; package on Arch and with &lt;code&gt;adb&lt;/code&gt; on Ubuntu. On Linux you also need a &lt;code&gt;udev&lt;/code&gt; rule, because without it it only works as root:&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;2&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;SUBSYSTEM==&amp;quot;usb&amp;quot;, ATTR{idVendor}==&amp;quot;2833&amp;quot;, MODE=&amp;quot;0666&amp;quot;, GROUP=&amp;quot;plugdev&amp;quot;&amp;#39;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;sudo&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;tee&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;/etc/udev/rules.d/51-android.rulessudo&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;udevadm&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;control&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;--reload-rules&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;&amp;amp;&amp;amp;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;sudo&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;udevadm&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;trigger&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;h2 id=&#34;extracting-the-games-from-the-headset&#34;&gt;Extracting the games from the headset&lt;a class=&#34;headerlink&#34; href=&#34;#extracting-the-games-from-the-headset&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;FramePort needs a specific file structure for each game. One folder per game, the APK inside it and a subfolder with the exact package name that holds the OBB files:&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;3&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;4&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;5&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;6&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;QuestGames/└── com.Armature.VR4/ ← one folder per game (the name does not matter) ├── base.apk ← the APK, or several if it is split └── com.Armature.VR4/ ← data folder: EXACTLY the package name ├── main.203.com.Armature.VR4.obb └── patch.203.com.Armature.VR4.obb&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;The pieces of one game go together (several APKs inside one folder count as a single game) and the OBB files are never renamed, because the game looks for them by their exact name.&lt;/p&gt;&lt;p&gt;The script walks the headset&#39;s apps, copies every APK of each one and pulls its OBB folder to the right place.&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 1&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 2&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 3&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 4&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 5&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 6&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 7&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 8&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 9&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;10&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;11&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;12&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;13&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;14&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;15&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;16&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;17&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;18&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;19&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;20&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;21&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;22&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;23&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;24&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;25&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;26&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;27&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;28&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;29&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;30&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;31&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;32&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;33&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;34&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;35&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;36&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;37&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;38&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;39&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;40&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;41&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;42&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;43&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;44&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;45&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&#34;ch&#34;&gt;#!/usr/bin/env bash&lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;# Extracts APK(s) + OBB from the games installed on a Meta Quest and leaves them with the&lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;# layout FramePort scans:&lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;# &amp;lt;GAMES&amp;gt;/&amp;lt;package&amp;gt;/&amp;lt;base.apk and splits&amp;gt; (one or more APKs per game)&lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;# &amp;lt;GAMES&amp;gt;/&amp;lt;package&amp;gt;/&amp;lt;package&amp;gt;/&amp;lt;*.obb&amp;gt; (data folder = package name)&lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;#&lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;# Usage: ./extract-quest-games.sh [DESTINATION] [PACKAGE_PREFIX]&lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;# ./extract-quest-games.sh ~/QuestGames com.&lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;#&lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;# ADB can be overridden (ADB=./mockadb) to test it without a headset.&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;set&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-euo&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;pipefail&lt;span class=&#34;nv&#34;&gt;OUT&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;:-&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$PWD&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;/QuestGames&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;FILTER&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;:-&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;ADB&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;ADB&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;:-&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;adb&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;command&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-v&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$ADB&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&amp;gt;/dev/null&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;||&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;adb no está en el PATH&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&amp;gt;&lt;span class=&#34;p&#34;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;exit&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;m&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$ADB&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;get-state&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;m&#34;&gt;2&lt;/span&gt;&amp;gt;/dev/null&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;device&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;se&#34;&gt;\&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;||&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;Quest no autorizado: ejecuta &amp;#39;adb devices&amp;#39; y acepta en el visor&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&amp;gt;&lt;span class=&#34;p&#34;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;exit&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;m&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;}&lt;/span&gt;mkdir&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-p&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$OUT&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;mapfile&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-t&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;PKGS&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&amp;lt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&amp;lt;&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$ADB&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;shell&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;pm&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;list&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;packages&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-3&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;tr&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-d&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;\r&amp;#39;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;sed&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;s/^package://&amp;#39;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;grep&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-v&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;^$&amp;#39;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;if&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-n&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$FILTER&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;then&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;grep&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;^&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$FILTER&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;||&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;true&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;else&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;cat&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;fi&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;sort&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${#&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;PKGS&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[@]&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-gt&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;m&#34;&gt;0&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;||&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;sin apps que coincidan con &amp;#39;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$FILTER&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#39;&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&amp;gt;&lt;span class=&#34;p&#34;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;exit&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;m&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;for&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;pkg&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;in&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;PKGS&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[@]&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;do&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;dest&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$OUT&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;/&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$pkg&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;mkdir&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-p&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$dest&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;n&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;0&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;while&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;IFS&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;read&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-r&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;apk&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;do&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;# base.apk + split_config.*.apk -&amp;gt; dest/&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;apk&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;apk&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;#package:&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-n&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$apk&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;||&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;continue&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$ADB&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;pull&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-a&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$apk&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$dest&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;/&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&amp;gt;/dev/null&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;m&#34;&gt;2&lt;/span&gt;&amp;gt;&lt;span class=&#34;p&#34;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;&amp;amp;&amp;amp;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;n&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$((&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;n&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;+&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;m&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;))&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;done&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&amp;lt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&amp;lt;&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$ADB&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;shell&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;pm&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;path&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$pkg&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;tr&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-d&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;\r&amp;#39;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$n&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-gt&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;m&#34;&gt;0&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;||&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;[skip] &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$pkg&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt; (sin APK accesible)&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;rmdir&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$dest&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;m&#34;&gt;2&lt;/span&gt;&amp;gt;/dev/null&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;||&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;true&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;continue&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;src&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;/sdcard/Android/obb/&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$pkg&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;if&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-n&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$ADB&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;shell&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;ls -A &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$src&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt; 2&amp;gt;/dev/null&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;tr&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-d&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;\r&amp;#39;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;then&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$ADB&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;pull&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$src&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$dest&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;/&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&amp;gt;/dev/null&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;m&#34;&gt;2&lt;/span&gt;&amp;gt;&lt;span class=&#34;p&#34;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;# creates dest/&amp;lt;package&amp;gt;/&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;[ok] &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$pkg&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt; — &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$n&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt; APK + OBB&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;else&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;[ok] &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$pkg&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt; — &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$n&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt; APK (sin OBB)&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;fi&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;done&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;Importa en FramePort: Add games → Scan a folder… → &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$OUT&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;It is saved on the computer, given execution permission and run:&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;3&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;chmod&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;+x&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;extract-quest-games.sh./extract-quest-games.sh&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;~/QuestGames&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;# all the games&lt;/span&gt;./extract-quest-games.sh&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;~/QuestGames&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;com.&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;# only those starting with &amp;quot;com.&amp;quot;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;&lt;a href=&#34;../files/posts/2026-10-15_quest_frameport/extract-quest-games.sh&#34;&gt;Download extract-quest-games.sh&lt;/a&gt;&lt;/p&gt;&lt;p&gt;With that the &lt;code&gt;~/QuestGames&lt;/code&gt; folder already holds the material with the layout FramePort scans.&lt;/p&gt;&lt;div class=&#34;admonition note&#34;&gt;&lt;p class=&#34;admonition-title&#34;&gt;Batch downloads&lt;/p&gt;&lt;p&gt;My Quest 3 are the 128GB version. I have not been able to keep every game I own downloaded at once for a long time. Many times, to install a new game (or an old one I felt like replaying), I had to uninstall another. Now, to download every game in the library, I have had to run the script several times, after wiping all the games at the start and installing a batch of the library to download them.&lt;/p&gt;&lt;/div&gt;&lt;h2 id=&#34;identifying-each-package&#34;&gt;Identifying each package&lt;a class=&#34;headerlink&#34; href=&#34;#identifying-each-package&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Some packages explain themselves (&lt;code&gt;com.Arvore.Yuki&lt;/code&gt; is Yuki), but with others it was hard to work out which games they were from the package alone.&lt;/p&gt;&lt;p&gt;The name is inside the APK, but it cannot be read by hand. The &lt;code&gt;AndroidManifest.xml&lt;/code&gt; you see when you open the APK file (with any decompressor) is not text XML, it is in &lt;strong&gt;binary format&lt;/strong&gt; (AXML), and the app name is almost always a &lt;strong&gt;reference&lt;/strong&gt; to a resource (&lt;code&gt;@string/app_name&lt;/code&gt;) that has to be resolved against the APK&#39;s resource table.&lt;/p&gt;&lt;p&gt;The piece that does that job is &lt;code&gt;androguard&lt;/code&gt;, a Python library that needs neither the Android SDK nor Java:&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;2&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;python3&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-m&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;venv&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;~/.venvs/apkid~/.venvs/apkid/bin/pip&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;install&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;androguard&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;The second script walks the games folder, picks the base APK of each game (the &lt;code&gt;base.apk&lt;/code&gt;, not the &lt;code&gt;split_config.*&lt;/code&gt;), reads its manifest and writes three things:&lt;/p&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;File&lt;/th&gt;&lt;th&gt;Content&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;mapping.tsv&lt;/code&gt;&lt;/td&gt;&lt;td&gt;package, name, version, main activity, folder and APK&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;icons/&amp;lt;package&amp;gt;.png&lt;/code&gt;&lt;/td&gt;&lt;td&gt;each game&#39;s icon at 192 px&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;iconos.html&lt;/code&gt;&lt;/td&gt;&lt;td&gt;a listing with icon, name and package, to put a face to the doubtful ones&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;2&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;~/.venvs/apkid/bin/python&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;identify-quest-games.py&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;~/QuestGames&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;# it only reports&lt;/span&gt;~/.venvs/apkid/bin/python&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;identify-quest-games.py&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;~/QuestGames&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;--rename&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;# it also renames&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;The renaming leaves each folder as &lt;code&gt;Name [package]&lt;/code&gt;, which reads much better, and it touches nothing if the destination already exists, so it can be repeated without fear.&lt;/p&gt;&lt;p&gt;&lt;a href=&#34;../files/posts/2026-10-15_quest_frameport/identify-quest-games.py&#34;&gt;Download identify-quest-games.py&lt;/a&gt;&lt;/p&gt;&lt;div class=&#34;admonition tip&#34;&gt;&lt;p class=&#34;admonition-title&#34;&gt;The headset&#39;s name is not the store&#39;s&lt;/p&gt;&lt;p&gt;What the script gets is the name the game presents itself with on the headset, which does not always match the one on its page in the Meta store. To settle those doubts the listing generated in &lt;code&gt;iconos.html&lt;/code&gt; helps.&lt;/p&gt;&lt;/div&gt;&lt;h2 id=&#34;installing-it-on-the-steam-frame&#34;&gt;Installing it on the Steam Frame&lt;a class=&#34;headerlink&#34; href=&#34;#installing-it-on-the-steam-frame&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;With the folder ready, the rest is done in FramePort: &lt;strong&gt;Add games → Scan a folder...&lt;/strong&gt; pointing at &lt;code&gt;~/QuestGames&lt;/code&gt; (the scan looks up to five levels deep) or &lt;strong&gt;Add an APK...&lt;/strong&gt; for a single game.&lt;/p&gt;&lt;p&gt;The games appear in the library with their artwork and, from there, &lt;strong&gt;Install on Frame&lt;/strong&gt; patches them, uploads them to the headset and adds them to the Steam library. The files left on the computer are not touched: FramePort works on a copy.&lt;/p&gt;&lt;h2 id=&#34;what-is-not-going-to-work&#34;&gt;What is not going to work&lt;a class=&#34;headerlink&#34; href=&#34;#what-is-not-going-to-work&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;There are limits that no patch fixes:&lt;/p&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Case&lt;/th&gt;&lt;th&gt;Why&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;32-bit-only games&lt;/td&gt;&lt;td&gt;The Frame does not run 32-bit apps. However, it appears that starting with &lt;a href=&#34;https://github.com/spoopyghosty0/frameport/releases/tag/v1.2.0&#34;&gt;version 1.2.0&lt;/a&gt;, a 32-64-bit translator has been included.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;x86-only games&lt;/td&gt;&lt;td&gt;The Frame&#39;s processor is ARM.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Games from the Pico or HTC systems&lt;/td&gt;&lt;td&gt;They use their own VR layer, not Meta&#39;s.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Android XR apps&lt;/td&gt;&lt;td&gt;A different system underneath.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Games that validate the licence in the Oculus app&lt;/td&gt;&lt;td&gt;They ask for a service the Frame does not have.&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p&gt;None of these limits is detected while extracting, they show up when installing and launching the game on the headset, so the list of what works gets discovered game by game.&lt;/p&gt;&lt;h2 id=&#34;conclusion&#34;&gt;Conclusion&lt;a class=&#34;headerlink&#34; href=&#34;#conclusion&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;With the two scripts (with the first one, really), a library that was tied to Meta&#39;s headset becomes a folder of files I can install on the Steam Frame. Extracting is a while in the terminal, and from there on FramePort does the rest.&lt;/p&gt;&lt;p&gt;There is work ahead. The migration is not copying and done. There are games that will never start because of the limits above and others that will need adjustments, and it is quite possible that another library throws up cases I do not tell here. But the starting point is already solved, and whatever I buy from now on I can take to the Frame the same day. On top of that, the FramePort project is under continuous development. Every version increases the number of tested games and of those where the compatibility of the adaptation to the Frame is guaranteed.&lt;/p&gt;&lt;p&gt;About the scripts, I admit that nowadays there is little merit in producing them, or almost in sharing them. Anyone can build them with a good programming agent, but since I already have them generated it costs nothing to offer them.&lt;/p&gt;&lt;h2 id=&#34;interesting-links&#34;&gt;Interesting links&lt;a class=&#34;headerlink&#34; href=&#34;#interesting-links&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;&lt;a href=&#34;https://github.com/spoopyghosty0/frameport&#34;&gt;FramePort&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://github.com/spoopyghosty0/frameport/blob/main/docs/FAQ.md&#34;&gt;FramePort FAQ&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://github.com/spoopyghosty0/frameport/blob/main/docs/COMPATIBILITY.md&#34;&gt;FramePort compatibility with Quest games&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://github.com/androguard/androguard&#34;&gt;androguard&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://sidequestvr.com/&#34;&gt;SideQuest&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;2022-04-17_vr.html&#34;&gt;Adventures in VR&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;</description><link>https://apuntes.eduardofilo.es/en/2026-10-15_quest_frameport.html</link> <pubDate>Thu, 15 Oct 2026 20:30:00 +0200</pubDate><source url="https://apuntes.eduardofilo.es/rss.xml">Apuntes de eduardófilo</source><guid isPermaLink="true">https://apuntes.eduardofilo.es/en/2026-10-15_quest_frameport.html</guid> </item> <item> <title>Segundo cerebro en Obsidian con el patrón LLM Wiki</title> <description>&lt;p&gt;&lt;img alt=&#34;LLM Wiki en Obsidian&#34; src=&#34;images/posts/2026-09-19_llm_wiki_obsidian/llm_wiki_obsidian.png&#34; /&gt;&lt;/p&gt;&lt;p&gt;El artículo anterior terminaba con un agente de IA viviendo en un VPS: encendido las 24 horas, accesible desde cualquier dispositivo por una red privada Tailscale y capaz de leer y escribir ficheros, ejecutar comandos y hablar por Telegram. Hermes destaca sobre otros agentes por su capacidad para mantener una memoria que cruza sesiones y va guardando &lt;em&gt;skills&lt;/em&gt; con los procedimientos que aprende. Pero esas capacidades de memoria están enfocadas al agente, no a mi. Si lo que voy aprendiendo vive en el contexto del agente, dependeré de él para volver a encontrarlo.&lt;/p&gt;&lt;p&gt;Ese es el hueco que viene a cubrir lo que se suele llamar un &lt;strong&gt;segundo cerebro&lt;/strong&gt;: una memoria externa, en ficheros de texto plano, que puedo abrir y consultar directamente (se va a almacenar en Obsidian) y que además el agente puede leer y mantener. En un principio tenía pensado usar el sistema &lt;strong&gt;PARA&lt;/strong&gt; de Tiago Forte en el vault de Obsidian, pero luego llegué al &lt;em&gt;gist&lt;/em&gt; de Andrej Karpathy sobre el patrón &lt;strong&gt;LLM Wiki&lt;/strong&gt;, y cambié de idea. No tuve que montarlo desde cero: Hermes Agent trae preinstalada una &lt;em&gt;skill&lt;/em&gt; &lt;code&gt;llm-wiki&lt;/code&gt; que implementa ese mismo patrón con algunos añadidos, así que fue mi punto de partida. En este artículo cuento cómo quedó el montaje, qué es el patrón, en qué se aparta la &lt;em&gt;skill&lt;/em&gt; del gist original, cómo se ha montado en Obsidian, cómo se conecta con el agente, y qué he aprendido en las primeras semanas de uso.&lt;/p&gt;&lt;h2 id=&#34;el-problema-con-preguntar-a-las-fuentes&#34;&gt;El problema con &#34;preguntar a las fuentes&#34;&lt;a class=&#34;headerlink&#34; href=&#34;#el-problema-con-preguntar-a-las-fuentes&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;La forma habitual de trabajar con un LLM y tus documentos se llama &lt;strong&gt;RAG&lt;/strong&gt;: le das una colección de ficheros, el modelo busca los fragmentos relevantes en el momento de la pregunta y compone una respuesta. Funciona, pero tiene una pega de fondo: el modelo vuelve a descubrir el conocimiento desde cero en cada consulta. Pregunta algo que exija sintetizar cinco documentos y tendrá que localizar y encajar los fragmentos cada vez. No hay consolidación y organización del conocimiento.&lt;/p&gt;&lt;p&gt;La idea de Karpathy es distinta. En lugar de recuperar de los documentos brutos en el momento de la pregunta, el agente &lt;strong&gt;va construyendo y manteniendo un wiki permanente&lt;/strong&gt;, un conjunto de ficheros markdown estructurados y enlazados entre sí, que se coloca entre tú y las fuentes. Cuando entra una fuente nueva, el agente no se limita a indexarla. La lee, extrae lo relevante y lo integra en el wiki, actualizando páginas, anotando dónde lo nuevo contradice lo viejo y reforzando o matizando la síntesis existente.&lt;/p&gt;&lt;p&gt;El resultado es un artefacto que se compone. Las referencias cruzadas ya están puestas, las contradicciones ya están señaladas, la síntesis ya refleja todo lo leído. Y hay un reparto de papeles muy claro: tú eliges las fuentes y haces las preguntas; el agente resume, enlaza, archiva y lleva la contabilidad. En palabras del propio Karpathy, &lt;em&gt;Obsidian es el IDE, el LLM es el programador y el wiki es el código&lt;/em&gt;.&lt;/p&gt;&lt;h2 id=&#34;el-patron-en-tres-capas&#34;&gt;El patrón, en tres capas&lt;a class=&#34;headerlink&#34; href=&#34;#el-patron-en-tres-capas&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;La arquitectura es simple. Son tres capas y dos ficheros de navegación:&lt;/p&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Capa&lt;/th&gt;&lt;th&gt;Qué es&lt;/th&gt;&lt;th&gt;Quién escribe&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;1. Fuentes (&lt;code&gt;raw/&lt;/code&gt;)&lt;/td&gt;&lt;td&gt;El material original: artículos, vídeos, papers, notas propias, transcripciones de reuniones&lt;/td&gt;&lt;td&gt;Yo&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;2. Wiki (&lt;code&gt;entities/&lt;/code&gt;, &lt;code&gt;concepts/&lt;/code&gt;, &lt;code&gt;comparisons/&lt;/code&gt;, &lt;code&gt;queries/&lt;/code&gt;)&lt;/td&gt;&lt;td&gt;Las páginas de conocimiento enlazadas&lt;/td&gt;&lt;td&gt;El agente&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;3. Esquema (&lt;code&gt;SCHEMA.md&lt;/code&gt;)&lt;/td&gt;&lt;td&gt;Las reglas de funcionamiento y las convenciones&lt;/td&gt;&lt;td&gt;Los dos, co-evoluciona&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Navegación (&lt;code&gt;index.md&lt;/code&gt;, &lt;code&gt;log.md&lt;/code&gt;)&lt;/td&gt;&lt;td&gt;El catálogo de contenido y el registro de acciones&lt;/td&gt;&lt;td&gt;El agente&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Capa 1, inmutable.&lt;/strong&gt; Los ficheros de &lt;code&gt;raw/&lt;/code&gt; se leen, nunca se modifican. Son el origen de la información. Si una página del wiki afirma algo, siempre se puede ir a comprobar qué decía exactamente el original.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Capa 2, propiedad del agente.&lt;/strong&gt; Yo leo las páginas; las escribe él. Lo que en un wiki tradicional haríamos a mano, aquí se delega al agente con su superior capacidad de situar la información en el lugar adecuado y relacionarla con el contenido ya existente.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Capa 3, el fichero clave.&lt;/strong&gt; Es lo que le da las reglas al agente para convertirlo en un bibliotecario con mi estilo propio. Es el fichero &lt;code&gt;SCHEMA.md&lt;/code&gt; (en el gist de Karpathy está asociado a agentes concretos, pero aquí está generalizado) que se puede considerar como la skill de mi wiki particular.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Los dos ficheros de navegación merecen una explicación, porque son los que hacen que esto escale sin base de datos vectorial:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;strong&gt;&lt;code&gt;index.md&lt;/code&gt;&lt;/strong&gt; está orientado al contenido: un catálogo con cada página del wiki, su enlace y una línea de resumen. Cuando hago una consulta, el agente empieza por leer el índice y desde ahí baja a las páginas que tocan.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;&lt;code&gt;log.md&lt;/code&gt;&lt;/strong&gt; es cronológico y &lt;strong&gt;append-only&lt;/strong&gt;: cada ingesta, cada consulta archivada, cada lint queda registrado al final, sin reordenar lo anterior.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Y las tres operaciones del patrón:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Ingesta&lt;/strong&gt;: entra una fuente y se convierte en páginas nuevas o actualizadas del wiki.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Consulta&lt;/strong&gt;: una pregunta se responde leyendo el wiki y citando las páginas de las que sale la respuesta.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Lint&lt;/strong&gt;: una revisión de salud del wiki (enlaces rotos, páginas huérfanas, frontmatter incompleto, contradicciones).&lt;/li&gt;&lt;/ul&gt;&lt;h2 id=&#34;el-punto-de-partida-la-skill-llm-wiki-de-hermes&#34;&gt;El punto de partida: la &lt;em&gt;skill&lt;/em&gt; &lt;code&gt;llm-wiki&lt;/code&gt; de Hermes&lt;a class=&#34;headerlink&#34; href=&#34;#el-punto-de-partida-la-skill-llm-wiki-de-hermes&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;El gist de Karpathy es conceptual. Comunica la idea a alto nivel y espera que tu agente vaya concretando los detalles contigo, aunque en manos de un buen agente se puede convertir fácilmente en algo operativo. Pero &lt;strong&gt;Hermes Agent trae preinstalada una &lt;em&gt;skill&lt;/em&gt; &lt;code&gt;llm-wiki&lt;/code&gt;&lt;/strong&gt; que ya implementa el patrón entero (mismo origen y misma licencia MIT) y que lo amplía justo en los puntos donde el gist se queda corto o es genérico. Fue mi base, y estas son las diferencias que puedo señalar:&lt;/p&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;&lt;/th&gt;&lt;th&gt;&lt;em&gt;Gist&lt;/em&gt; de Karpathy&lt;/th&gt;&lt;th&gt;&lt;em&gt;Skill&lt;/em&gt; &lt;code&gt;llm-wiki&lt;/code&gt;&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Esquema&lt;/td&gt;&lt;td&gt;&lt;code&gt;CLAUDE.md&lt;/code&gt; / &lt;code&gt;AGENTS.md&lt;/code&gt;, atado al agente&lt;/td&gt;&lt;td&gt;&lt;code&gt;SCHEMA.md&lt;/code&gt;, independiente del agente&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Forma&lt;/td&gt;&lt;td&gt;Manifiesto: la idea&lt;/td&gt;&lt;td&gt;Procedimiento paso a paso (ingesta, consulta, lint)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Fuentes en &lt;code&gt;raw/&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Sin metadatos&lt;/td&gt;&lt;td&gt;Frontmatter con &lt;code&gt;sha256&lt;/code&gt; del cuerpo (el detalle, en la sección de la ingesta)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Estructura&lt;/td&gt;&lt;td&gt;Sugerida y libre&lt;/td&gt;&lt;td&gt;Directorios fijos, taxonomía de etiquetas cerrada y umbrales de página&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Auditoría&lt;/td&gt;&lt;td&gt;Descrita, no automatizada&lt;/td&gt;&lt;td&gt;Comprobaciones concretas de lint (huérfanas, enlaces rotos, frontmatter)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Arranque de sesión&lt;/td&gt;&lt;td&gt;-&lt;/td&gt;&lt;td&gt;Regla de leer esquema → índice → log antes de tocar nada. Es lo que evita duplicar páginas y repetir trabajo ya hecho en cada sesión nueva&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p&gt;Además de esto, me siento particularmente más seguro utilizando patrones rígidos donde siempre está claro cómo hay que trabajar. Así que lo que hice fue &lt;strong&gt;adaptar, no inventar&lt;/strong&gt;: partí de la &lt;em&gt;skill&lt;/em&gt;, dejé el gist como referencia de la idea original y fui ajustando las convenciones de &lt;em&gt;mi&lt;/em&gt; vault en un &lt;code&gt;SCHEMA.md&lt;/code&gt; propio, que es lo que cuento unas líneas más abajo.&lt;/p&gt;&lt;h2 id=&#34;la-instalacion&#34;&gt;La instalación&lt;a class=&#34;headerlink&#34; href=&#34;#la-instalacion&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Aquí no hay un programa que instalar ni un servicio que arrancar, y esa sencillez fue una de las cosas que más me convenció del enfoque. El procedimiento completo, tal como lo hice, es este:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;&lt;strong&gt;Un vault de Obsidian cualquiera.&lt;/strong&gt; El wiki &lt;em&gt;es&lt;/em&gt; la carpeta: no hace falta un formato previo ni plugins especiales, solo abrirla como vault en Obsidian.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;La &lt;em&gt;skill&lt;/em&gt; ya estaba en Hermes.&lt;/strong&gt; Le expliqué que quería empezar a utilizarlo y que sabía que existía una &lt;em&gt;skill&lt;/em&gt; preinstalada para ello; trae &lt;code&gt;llm-wiki&lt;/code&gt; de fábrica, así que no hubo nada que descargar.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Declarar dónde vive el vault&lt;/strong&gt; en el fichero de entorno del perfil, para que la &lt;em&gt;skill&lt;/em&gt; no caiga en su directorio por defecto. Lo cuento unas líneas más abajo.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Pedirle la estructura inicial.&lt;/strong&gt; Con eso le bastó para crear el andamiaje de las tres capas: &lt;code&gt;SCHEMA.md&lt;/code&gt;, &lt;code&gt;index.md&lt;/code&gt;, &lt;code&gt;log.md&lt;/code&gt; y los directorios de &lt;code&gt;raw/&lt;/code&gt; y de las páginas, que es el árbol que aparece en el apartado de la arquitectura.&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;Y ya está. Lo que queda no es instalación, sino acordar cómo se trabaja, que es lo que recoge el &lt;code&gt;SCHEMA.md&lt;/code&gt; y lo que ha ido cambiando con el uso.&lt;/p&gt;&lt;h2 id=&#34;de-para-a-llm-wiki&#34;&gt;De PARA a LLM Wiki&lt;a class=&#34;headerlink&#34; href=&#34;#de-para-a-llm-wiki&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;PARA organiza por carpetas y por horizonte temporal (Proyectos, Áreas, Recursos, Archivo). Es un buen sistema, pero está pensado para &lt;em&gt;clasificar cosas&lt;/em&gt;, y la pregunta &#34;¿dónde archivo esto?&#34; aparece una y otra vez. El patrón LLM Wiki resuelve otra cosa: no ordena documentos, &lt;strong&gt;compila conocimiento&lt;/strong&gt;. Una fuente puede tocar diez o quince páginas, y ese efecto cruzado es justamente el que se busca.&lt;/p&gt;&lt;p&gt;El cambio de mentalidad más útil que hice al migrar fue separar tres mundos que tendemos a mezclar:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Acción&lt;/strong&gt; (&lt;code&gt;tareas/&lt;/code&gt;): lo que hay que hacer. Lista con checkboxes, en un fichero único, legible en el móvil sin conexión.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Reflexión personal&lt;/strong&gt; (&lt;code&gt;diario/&lt;/code&gt;): la bitácora del día a día. Mi territorio, el agente no lo toca.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Conocimiento&lt;/strong&gt; (el wiki): lo que se compila, se enlaza y se consulta.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Ni las tareas ni el diario entran en el wiki: no hay frontmatter que darles, no se indexan, no se lintean. El agente solo los toca cuando se lo pido explícitamente. La excepción interesante es la &lt;strong&gt;promoción&lt;/strong&gt;: si un día anoto en el diario una configuración que funcionó o una conclusión sobre un tema, esa anotación puede ascender al wiki como fuente de primera persona, citada en &lt;code&gt;sources:&lt;/code&gt;. El fichero del diario queda intacto.&lt;/p&gt;&lt;h2 id=&#34;la-arquitectura-del-vault&#34;&gt;La arquitectura del vault&lt;a class=&#34;headerlink&#34; href=&#34;#la-arquitectura-del-vault&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Así queda el vault en disco. Los subdirectorios de &lt;code&gt;raw/&lt;/code&gt; clasifican la fuente por su &lt;strong&gt;naturaleza&lt;/strong&gt;, no por tema (el tema lo resuelven las páginas del wiki):&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 1&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 2&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 3&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 4&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 5&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 6&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 7&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 8&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 9&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;10&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;11&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;12&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;13&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;14&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;15&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;~/obsidian/├── SCHEMA.md # reglas: flujo, convenciones, taxonomía, umbrales├── index.md # catálogo de contenido (lo que el agente lee primero)├── log.md # registro cronológico de acciones (append-only)├── raw/ # CAPA 1: fuentes inmutables│ ├── articles/ # webs, documentación, gists, vídeos con transcripción│ ├── papers/ # papers, PDFs, especificaciones│ ├── transcripts/ # notas propias, recetas, actas, apuntes│ └── assets/ # imágenes que referencian las fuentes├── entities/ # CAPA 2: personas, organizaciones, productos, servicios├── concepts/ # CAPA 2: temas y conceptos├── comparisons/ # CAPA 2: análisis lado a lado├── queries/ # CAPA 2: respuestas archivadas que costaría re-derivar├── tareas/ # fuera del wiki - acción└── diario/ # fuera del wiki - bitácora personal&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;div class=&#34;admonition tip&#34;&gt;&lt;p class=&#34;admonition-title&#34;&gt;Un detalle de git&lt;/p&gt;&lt;p&gt;El vault se sincroniza con git (lo cuento más abajo), y &lt;strong&gt;git no versiona directorios vacíos&lt;/strong&gt;. Los cinco directorios del andamiaje que aún no tenían contenido no aparecían en los demás dispositivos, con la sensación de que el vault se estaba creando a medias. La solución clásica es un fichero &lt;code&gt;.gitkeep&lt;/code&gt; dentro de cada uno. No es markdown, así que no lo indexa el wiki, no interfiere en el lint y Obsidian no lo muestra.&lt;/p&gt;&lt;/div&gt;&lt;h2 id=&#34;como-se-conecta-el-agente-con-obsidian&#34;&gt;Cómo se conecta el agente con Obsidian&lt;a class=&#34;headerlink&#34; href=&#34;#como-se-conecta-el-agente-con-obsidian&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;El agente no necesita interaccionar con la aplicación Obsidian, es decir no hay conexión. &lt;strong&gt;El vault &lt;em&gt;es&lt;/em&gt; la carpeta de trabajo del agente&lt;/strong&gt;. Obsidian es simplemente una aplicación que abre y renderiza esos ficheros markdown en los dispositivos donde me interese.&lt;/p&gt;&lt;p&gt;Lo que sí hay que declarar de cara a Hermes es dónde vive el vault, en el fichero de entorno del perfil con el que trabajo con él:&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;3&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&#34;c1&#34;&gt;# ~/.hermes/profiles/personal/.env&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;OBSIDIAN_VAULT_PATH&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;/home/usuario/obsidian&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;# lo usa la skill de Obsidian&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;WIKI_PATH&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;/home/usuario/obsidian&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;# lo usa la skill del patrón LLM Wiki&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;Las dos variables apuntan al &lt;strong&gt;mismo directorio&lt;/strong&gt;. Con el vault de Obsidian y el wiki compartiendo raíz, el grafo, las vistas y la sincronización del móvil trabajan sobre el mismo material.&lt;/p&gt;&lt;p&gt;Sobre las &lt;em&gt;skills&lt;/em&gt; (los procedimientos que el agente carga cuando la tarea las necesita) hay tres piezas:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;strong&gt;&lt;code&gt;llm-wiki&lt;/code&gt;&lt;/strong&gt;: la &lt;em&gt;skill&lt;/em&gt; preinstalada de Hermes que implementa el patrón entero.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;&lt;code&gt;obsidian&lt;/code&gt;&lt;/strong&gt;: el manejo de ficheros del vault (leer, buscar, crear, enlazar).&lt;/li&gt;&lt;li&gt;Las convenciones concretas de &lt;em&gt;mi&lt;/em&gt; vault implementadas en &lt;code&gt;SCHEMA.md&lt;/code&gt;.&lt;/li&gt;&lt;/ul&gt;&lt;h2 id=&#34;schemamd&#34;&gt;&lt;code&gt;SCHEMA.md&lt;/code&gt;&lt;a class=&#34;headerlink&#34; href=&#34;#schemamd&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Es el fichero que decide si esto funciona o degenera en un montón de notas sueltas. Contiene:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;El &lt;strong&gt;dominio&lt;/strong&gt; del wiki y el &lt;strong&gt;flujo de trabajo&lt;/strong&gt; (captura, ingesta, consulta, lint) paso a paso.&lt;/li&gt;&lt;li&gt;Las &lt;strong&gt;reglas de respuesta&lt;/strong&gt; del agente: si la información no está en las fuentes del wiki, &lt;strong&gt;decirlo expresamente&lt;/strong&gt;, sin inventarla ni rellenarla con conocimiento del exterior sin marcarlo como tal.&lt;/li&gt;&lt;li&gt;Las &lt;strong&gt;zonas exclusionadas&lt;/strong&gt; (&lt;code&gt;tareas/&lt;/code&gt;, &lt;code&gt;diario/&lt;/code&gt;) con sus reglas comunes.&lt;/li&gt;&lt;li&gt;La &lt;strong&gt;estructura de &lt;code&gt;raw/&lt;/code&gt;&lt;/strong&gt;, con las dos reglas que más me importan: &lt;strong&gt;permanencia&lt;/strong&gt; (una fuente no se borra tras ingerirla) e &lt;strong&gt;inmutabilidad&lt;/strong&gt; (el agente añade frontmatter, pero nunca toca el cuerpo).&lt;/li&gt;&lt;li&gt;El &lt;strong&gt;frontmatter&lt;/strong&gt; obligatorio de las páginas, la &lt;strong&gt;taxonomía de etiquetas&lt;/strong&gt; (cerrada: para usar una nueva hay que añadirla antes) y los &lt;strong&gt;umbrales de página&lt;/strong&gt;.&lt;/li&gt;&lt;li&gt;La &lt;strong&gt;política ante contradicciones&lt;/strong&gt;: no sobrescribir en silencio; anotar ambas posiciones con fecha y fuente.&lt;/li&gt;&lt;li&gt;Y una sección final de &lt;strong&gt;qué NO entra en el wiki&lt;/strong&gt;.&lt;/li&gt;&lt;/ul&gt;&lt;div class=&#34;admonition tip&#34;&gt;&lt;p class=&#34;admonition-title&#34;&gt;El esquema, corto; el conocimiento, en el wiki&lt;/p&gt;&lt;p&gt;Cuando le pedí ejemplos concretos de cada caso de uso de los mencionados en el gist de Karpathy, la tentación era meterlos en &lt;code&gt;SCHEMA.md&lt;/code&gt;. Es un error. El esquema es &lt;em&gt;cómo se trabaja aquí&lt;/em&gt; (reglas, cortas y estables), y una guía de casos de uso es &lt;em&gt;conocimiento sobre el patrón&lt;/em&gt;, que pertenece a una página de &lt;code&gt;concepts/&lt;/code&gt; con su frontmatter, su entrada en el índice y sus enlaces.&lt;/p&gt;&lt;/div&gt;&lt;p&gt;Esta sección es la que peor se documenta en los tutoriales y la que más vale: las reglas se escriben para que el agente se autocontenga, no para que quede bonito el repositorio.&lt;/p&gt;&lt;h2 id=&#34;la-captura-el-web-clipper-como-puerta-de-entrada&#34;&gt;La captura: el &lt;em&gt;Web Clipper&lt;/em&gt; como puerta de entrada&lt;a class=&#34;headerlink&#34; href=&#34;#la-captura-el-web-clipper-como-puerta-de-entrada&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Para que el wiki crezca hace falta que meter fuentes sea sencillo. La pieza que uso es la extensión de navegador &lt;strong&gt;Web Clipper&lt;/strong&gt; de Obsidian. Un clic en el navegador y el contenido de la página (o la transcripción completa con &lt;em&gt;timestamps&lt;/em&gt;, si es un vídeo de YouTube) aterriza en el vault como markdown con su frontmatter.&lt;/p&gt;&lt;p&gt;La configuración que tengo de la plantilla es la siguiente:&lt;/p&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Campo de la plantilla&lt;/th&gt;&lt;th&gt;Valor&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;em&gt;Nombre de la nota&lt;/em&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;{{title|lower|replace:&#34; &#34;:&#34;-&#34;|trim}}&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;em&gt;Ubicación de la nota&lt;/em&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;raw/articles&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;em&gt;Propiedades&lt;/em&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;source_url: {{url}}&lt;/code&gt;, &lt;code&gt;ingested: {{date:YYYY-MM-DD HH:mm}}&lt;/code&gt;, &lt;code&gt;tags: [&#39;clippings&#39;]&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;em&gt;Contenido de la nota&lt;/em&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;{{content}}&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p&gt;El clipping de vídeos de YouTube es especialmente práctico. El &lt;em&gt;clipper&lt;/em&gt; extrae la transcripción entera, así que un medio efímero se convierte en texto consultable y citable por marca de tiempo. Cuando el agente afirma que el vídeo dice tal cosa, se puede ir a comprobarlo.&lt;/p&gt;&lt;div class=&#34;admonition warning&#34;&gt;&lt;p class=&#34;admonition-title&#34;&gt;El &lt;em&gt;clipper&lt;/em&gt; no es el wiki&lt;/p&gt;&lt;p&gt;La extensión guarda ficheros; no indexa, no enlaza, no calcula hashes y no escribe en el log. Lo que convierte un clip en conocimiento es la ingesta posterior.&lt;/p&gt;&lt;/div&gt;&lt;p&gt;Tomé la decisión de &lt;strong&gt;no clippear todo lo que me interesa&lt;/strong&gt;. Sigo usando mi cuenta de marcadores en Diigo para la cola ligera de enlaces, los típicos que pienso me pueden interesar en algún momento futuro. El clip se reserva para el contenido que ya me importa, y la promoción natural es precisamente esa; cuando un marcador madura (lo he leído, lo usaría, lo citaría), se &lt;em&gt;clippea&lt;/em&gt; y entra en &lt;code&gt;raw/&lt;/code&gt;. Así el wiki acumula solo lo digerido.&lt;/p&gt;&lt;h2 id=&#34;la-ingesta-el-ciclo-de-trabajo&#34;&gt;La ingesta: el ciclo de trabajo&lt;a class=&#34;headerlink&#34; href=&#34;#la-ingesta-el-ciclo-de-trabajo&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;La ingesta &lt;strong&gt;nunca es automática&lt;/strong&gt;, se pide. Yo acumulo fuentes cuando las veo y el procesado espera. Cuando quiero, se lo digo a Hermes (&#34;ingesta lo que hay en &lt;code&gt;raw/&lt;/code&gt;&#34;) y él hace esto:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Añadir al fichero de &lt;code&gt;raw/&lt;/code&gt; el frontmatter que le falta (&lt;code&gt;source_url&lt;/code&gt;, &lt;code&gt;ingested&lt;/code&gt; y un &lt;code&gt;sha256&lt;/code&gt; del cuerpo) y renombrarlo a la convención si hace falta.&lt;/li&gt;&lt;li&gt;Comprobar qué páginas existen ya, leyendo &lt;code&gt;index.md&lt;/code&gt; y buscando en el vault, antes de crear nada.&lt;/li&gt;&lt;li&gt;Crear o actualizar páginas aplicando los umbrales del esquema.&lt;/li&gt;&lt;li&gt;Actualizar &lt;code&gt;index.md&lt;/code&gt; y anexar la entrada en &lt;code&gt;log.md&lt;/code&gt;.&lt;/li&gt;&lt;li&gt;Informarme de cada fichero creado o modificado.&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;Del frontmatter de las fuentes, lo único que merece una línea aparte es el hash:&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;3&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;4&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;5&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&#34;nn&#34;&gt;---&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;source_url&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;l l-Scalar l-Scalar-Plain&#34;&gt;https://ejemplo.com/articulo&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;ingested&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;l l-Scalar l-Scalar-Plain&#34;&gt;2026-09-18&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;sha256&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;l l-Scalar l-Scalar-Plain&#34;&gt;5f2c1a9b7e4d3c8f6a1b0e9d8c7b6a5f4e3d2c1b0a9f8e7d6c5b4a3f2e1d0c9b&lt;/span&gt;&lt;span class=&#34;nn&#34;&gt;---&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;Ese &lt;code&gt;sha256&lt;/code&gt; se calcula sobre el cuerpo, no sobre el frontmatter, y sirve para dos cosas: si vuelvo a procesar la misma URL y el hash no ha cambiado, se salta el trabajo; si ha cambiado, salta la señal de que &lt;strong&gt;la fuente original se ha editado&lt;/strong&gt; por debajo. En un wiki donde las páginas citan fuentes, enterarse de que la fuente cambió es la mitad del mantenimiento.&lt;/p&gt;&lt;p&gt;Una recomendación de Karpathy que he adoptado es &lt;strong&gt;ingerir las fuentes de una en una y conmigo mirando&lt;/strong&gt;. La ingesta por lotes existe y es tentadora cuando acumulas veinte clips, pero es el camino más corto a un wiki degradado.&lt;/p&gt;&lt;p&gt;Quisiera hacer hincapié en algo importante. El wiki tiene que ser un repositorio de lo que he aprendido y quiero retener: material que he leído, entendido y sobre el que tengo algo que decir. No un vertedero de enlaces o documentación que no he asimilado. Lo que sí delego sin problema es la parte tediosa, que es justo la que hacía que abandonara sistemas anteriores: mantener los enlaces, actualizar el índice, avisar de las contradicciones, no dejar páginas huérfanas. La diferencia es que el agente ordena y propone, mientras el criterio y el entendimiento siguen siendo míos.&lt;/p&gt;&lt;h2 id=&#34;la-consulta&#34;&gt;La consulta&lt;a class=&#34;headerlink&#34; href=&#34;#la-consulta&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Consultar es la parte que justifica todo lo anterior. El agente lee el índice, identifica las páginas relevantes, las lee y compone una respuesta &lt;strong&gt;citando de dónde sale cada cosa&lt;/strong&gt;. Y hay una regla que me pareció tan sensata que la dejé escrita en el esquema como regla permanente: si la respuesta no está en el wiki, se dice. Nada de rellenar huecos con la web o con lo que el modelo haya aprendido en su entrenamiento, que es exactamente lo contrario de tener un segundo cerebro.&lt;/p&gt;&lt;p&gt;La otra mitad de la idea es que &lt;strong&gt;una buena respuesta puede archivarse&lt;/strong&gt; como página nueva del wiki. Una comparativa, un análisis, una conexión que no habíamos visto. Si re-derivarlo costaría trabajo, va a &lt;code&gt;queries/&lt;/code&gt; o a &lt;code&gt;comparisons/&lt;/code&gt; y deja de perderse en el historial de un chat.&lt;/p&gt;&lt;h2 id=&#34;el-mantenimiento-el-lint&#34;&gt;El mantenimiento: el lint&lt;a class=&#34;headerlink&#34; href=&#34;#el-mantenimiento-el-lint&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Un wiki que crece también se degrada. Para eso está el &lt;strong&gt;lint&lt;/strong&gt;, una pasada de salud que comprueba, entre otras cosas: enlaces rotos, páginas huérfanas (sin ningún enlace entrante), coherencia entre &lt;code&gt;index.md&lt;/code&gt; y el sistema de ficheros, frontmatter completo, etiquetas fuera de la taxonomía, páginas demasiado largas y hashes de &lt;code&gt;raw/&lt;/code&gt; alterados.&lt;/p&gt;&lt;p&gt;Mi primera pasada de lint encontró lo siguiente:&lt;/p&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Comprobación&lt;/th&gt;&lt;th&gt;Resultado&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Etiquetas fuera de taxonomía&lt;/td&gt;&lt;td&gt;&lt;strong&gt;1&lt;/strong&gt; (una etiqueta inventada sobre la marcha) → corregida y categoría añadida a la taxonomía&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Páginas con menos de 2 enlaces salientes&lt;/td&gt;&lt;td&gt;&lt;strong&gt;6&lt;/strong&gt; → referencias cruzadas reforzadas&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Páginas huérfanas&lt;/td&gt;&lt;td&gt;&lt;strong&gt;2&lt;/strong&gt; → enlazadas desde otras páginas&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Fuente en &lt;code&gt;raw/&lt;/code&gt; sin &lt;code&gt;sha256&lt;/code&gt;&lt;/td&gt;&lt;td&gt;&lt;strong&gt;1&lt;/strong&gt; (un clip guardado con toda la chatarra de la página alrededor) → recortada al contenido real&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Páginas de más de 200 líneas&lt;/td&gt;&lt;td&gt;&lt;strong&gt;1&lt;/strong&gt; → excepción documentada en el esquema&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p&gt;La última es mi favorita porque es una regla que decidí no cumplir. En ese caso lo honesto es documentar la excepción en lugar de trocear. Las reglas del esquema no son dogma, son decisiones, y las que se incumplen a conciencia se anotan.&lt;/p&gt;&lt;h2 id=&#34;la-sincronizacion-entre-dispositivos-git-no-obsidian-sync&#34;&gt;La sincronización entre dispositivos: git, no Obsidian Sync&lt;a class=&#34;headerlink&#34; href=&#34;#la-sincronizacion-entre-dispositivos-git-no-obsidian-sync&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Como he comentado al principio, la idea del wiki es que pueda ser consultado directamente por un humano (en este caso por mi) y en cualquier lugar, no solo en el VPS que es donde se construye. Además, el Web clipping y la aportación de contenido raw se hará desde distintas máquinas (el móvil, los ordenadores personal y del trabajo).&lt;/p&gt;&lt;p&gt;Obsidian ofrece un servicio de sincronización de pago, pero para el montaje que he hecho, una de cuyas &#34;patas&#34; más importantes es la instancia en el VPS, resulta más conveniente montar la sincronización de forma manual. Elegí hacerlo mediante un repositorio privado git que mantengo en GitLab.&lt;/p&gt;&lt;p&gt;El circuito tiene tres tipos de dispositivo y todos convergen en el mismo repositorio remoto:&lt;/p&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Dispositivo&lt;/th&gt;&lt;th&gt;Mecanismo&lt;/th&gt;&lt;th&gt;Cuándo sincroniza&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Móvil Android&lt;/td&gt;&lt;td&gt;Termux con una función propia&lt;/td&gt;&lt;td&gt;manual, o cada 15 minutos&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Portátiles&lt;/td&gt;&lt;td&gt;plugin de la comunidad &lt;code&gt;Git&lt;/code&gt; (por Vinzent)&lt;/td&gt;&lt;td&gt;automático cada 5 minutos&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;VPS&lt;/td&gt;&lt;td&gt;&lt;code&gt;git pull&lt;/code&gt; / &lt;code&gt;push&lt;/code&gt; a demanda y mediante daemon systemd&lt;/td&gt;&lt;td&gt;cuando lee o escribe y cada 5 minutos&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p&gt;El daemon systemd montado en el VPS para hacer &lt;em&gt;commit&lt;/em&gt; y sincronizar es el siguiente:&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 1&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 2&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 3&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 4&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 5&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 6&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 7&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 8&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 9&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;10&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;11&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;12&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;13&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;14&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;15&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;16&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;17&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;18&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;19&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;20&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;21&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;22&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;23&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;24&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;25&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;26&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;27&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;28&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;29&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;30&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;31&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;32&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;33&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;34&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&#34;c1&#34;&gt;# ~/.local/bin/obsidian-sync.sh&lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;#!/bin/bash&lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;# Sync del vault Obsidian (~/obsidian) contra GitLab.&lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;# Equivalente VPS al script &amp;#39;ob&amp;#39; de Termux en Android (skill obsidian-sync).&lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;# Política de log: solo se escribe en ~/obsidian-sync.log cuando hay problemas.&lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;# El detalle de cada pasada queda en el journal: journalctl --user -u obsidian-sync&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;set&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-u&lt;span class=&#34;nv&#34;&gt;VAULT&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$HOME&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;/obsidian&amp;quot;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;LOG&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$HOME&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;/obsidian-sync/obsidian-sync.log&amp;quot;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;LOCK&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;/tmp/obsidian-sync.lock&lt;span class=&#34;nb&#34;&gt;exec&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;m&#34;&gt;9&lt;/span&gt;&amp;gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$LOCK&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;flock&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-n&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;m&#34;&gt;9&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;||&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;exit&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;m&#34;&gt;0&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;# si ya hay una pasada en curso, no solapar&lt;/span&gt;err&lt;span class=&#34;o&#34;&gt;()&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;date&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;+%F %T&amp;#39;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$1&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&amp;gt;&amp;gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$LOG&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;cd&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$VAULT&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;||&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;err&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;ERROR: no existe &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$VAULT&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;exit&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;m&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;# En un servicio systemd no hay ssh-agent: usar la clave directamente&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;export&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;GIT_SSH_COMMAND&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;ssh -i &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$HOME&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;/.ssh/id_ed25519 -o IdentitiesOnly=yes -o BatchMode=yes&amp;quot;&lt;/span&gt;git&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;add&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-A&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;m&#34;&gt;2&lt;/span&gt;&amp;gt;&amp;gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$LOG&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;||&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;exit&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;m&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;if&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;!&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;git&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;diff&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;--cached&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;--quiet&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;then&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;git&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;commit&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-m&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;vault backup (VPS): &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;date&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;+%F %T&amp;#39;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&amp;gt;/dev/null&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;m&#34;&gt;2&lt;/span&gt;&amp;gt;&lt;span class=&#34;p&#34;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;||&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;err&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;ERROR en commit&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;exit&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;m&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;fi&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;if&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;!&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;out&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;git&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;pull&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;--no-edit&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;origin&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;main&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;m&#34;&gt;2&lt;/span&gt;&amp;gt;&lt;span class=&#34;p&#34;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;then&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;err&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;ERROR en pull: &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$out&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;exit&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;m&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;fi&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;if&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;!&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;out&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;git&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;push&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;origin&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;main&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;m&#34;&gt;2&lt;/span&gt;&amp;gt;&lt;span class=&#34;p&#34;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;then&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;err&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;ERROR en push: &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$out&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;exit&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;m&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;fi&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;exit&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;m&#34;&gt;0&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;3&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;4&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;5&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;6&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;7&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&#34;c1&#34;&gt;# ~/.config/systemd/user/obsidian-sync.service&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;[Unit]&lt;/span&gt;&lt;span class=&#34;na&#34;&gt;Description&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;Sync vault Obsidian (git add/commit/pull/push)&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;[Service]&lt;/span&gt;&lt;span class=&#34;na&#34;&gt;Type&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;oneshot&lt;/span&gt;&lt;span class=&#34;na&#34;&gt;ExecStart&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;%h/.local/bin/obsidian-sync.sh&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 1&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 2&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 3&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 4&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 5&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 6&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 7&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 8&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 9&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;10&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;11&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&#34;c1&#34;&gt;# ~/.config/systemd/user/obsidian-sync.timer&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;[Unit]&lt;/span&gt;&lt;span class=&#34;na&#34;&gt;Description&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;Sync vault Obsidian cada 5 minutos&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;[Timer]&lt;/span&gt;&lt;span class=&#34;na&#34;&gt;OnCalendar&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;*:0/5&lt;/span&gt;&lt;span class=&#34;na&#34;&gt;RandomizedDelaySec&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;30&lt;/span&gt;&lt;span class=&#34;na&#34;&gt;Persistent&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;[Install]&lt;/span&gt;&lt;span class=&#34;na&#34;&gt;WantedBy&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;timers.target&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;3&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;systemctl&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;--user&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;daemon-reloadsystemctl&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;--user&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;enable&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;--now&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;obsidian-sync.timersudo&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;loginctl&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;enable-linger&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$USER&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;# para que siga funcionando sin sesión abierta&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;h2 id=&#34;la-sincronizacion-en-android&#34;&gt;La sincronización en Android&lt;a class=&#34;headerlink&#34; href=&#34;#la-sincronizacion-en-android&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;En el móvil el plugin Obsidian Git no sirve, ya que la extensión no tiene acceso al cliente &lt;code&gt;git&lt;/code&gt;. El intermediario allí es &lt;strong&gt;Termux&lt;/strong&gt;, un emulador de terminal para Android, y un script propio que hace el trabajo.&lt;/p&gt;&lt;ol&gt;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Instalar Termux&lt;/strong&gt; desde F-Droid (no desde Google Play, que hace tiempo que no lo distribuye), junto con &lt;strong&gt;Termux:Widget&lt;/strong&gt;, que añade un botón para sincronizar en un escritorio.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Preparar Termux:&lt;/strong&gt;&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;3&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;pkg&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;update&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;&amp;amp;&amp;amp;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;pkg&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;upgrade&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-ypkg&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;install&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;git&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;openssh&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-ytermux-setup-storage&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;# acceso al almacenamiento compartido&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Identidad de git y directorio de confianza.&lt;/strong&gt; El &lt;code&gt;safe.directory&lt;/code&gt; es obligatorio porque el repositorio vive fuera del &lt;em&gt;home&lt;/em&gt; de Termux, que es el único directorio en el que git confía por defecto:&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;3&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;git&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;config&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;--global&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;user.name&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;Tu Nombre&amp;quot;&lt;/span&gt;git&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;config&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;--global&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;user.email&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;tu@correo.example&amp;quot;&lt;/span&gt;git&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;config&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;--global&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;--add&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;safe.directory&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;*&amp;#39;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Una clave SSH propia del móvil.&lt;/strong&gt; Una por dispositivo, porque el servicio las guarda como claves independientes:&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;2&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;ssh-keygen&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-t&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;ed25519&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-C&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;android@ejemplo&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-f&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;~/.ssh/id_ed25519&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-N&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&amp;quot;&lt;/span&gt;cat&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;~/.ssh/id_ed25519.pub&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;La clave pública se pega en GitLab, en &lt;em&gt;Preferencias → Claves SSH&lt;/em&gt;.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Clonar el vault y ajustar tres cosas.&lt;/strong&gt; El vault va al almacenamiento compartido (&lt;code&gt;~/storage/shared/&lt;/code&gt;, que es &lt;code&gt;/storage/emulated/0/&lt;/code&gt;) para que Obsidian pueda abrirlo:&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;3&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;4&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;5&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;6&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&#34;nb&#34;&gt;cd&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;~/storage/shared/Documentsgit&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;clone&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;git@gitlab.com:usuario/mi-vault.git&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;mi-vault&lt;span class=&#34;nb&#34;&gt;cd&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;mi-vaultgit&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;config&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;core.filemode&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;false&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;# Android no guarda permisos unix: evita diffs fantasma&lt;/span&gt;git&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;config&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;core.symlinks&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;false&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;# el almacenamiento compartido no soporta symlinks&lt;/span&gt;git&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;config&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;pull.rebase&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;false&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Abrir la carpeta como vault en Obsidian&lt;/strong&gt; (&lt;em&gt;Open folder as vault&lt;/em&gt;) y &lt;strong&gt;desactivar el plugin Obsidian Git&lt;/strong&gt; en el móvil. No funciona y hará que aparezcan errores continuamente.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;strong&gt;El script de sincronización.&lt;/strong&gt; Una función en el &lt;code&gt;.bashrc&lt;/code&gt; que hace commit, pull y push de una vez:&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;1&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;ob&lt;span class=&#34;o&#34;&gt;(){&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;cd&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;~/storage/shared/Documents/mi-vault&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;&amp;amp;&amp;amp;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;git&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;add&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-A&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;&amp;amp;&amp;amp;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;git&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;commit&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-m&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;Android &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;date&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;+%F-%T&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;&amp;amp;&amp;amp;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;git&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;pull&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;--no-edit&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;&amp;amp;&amp;amp;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;git&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;push&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;A partir de ahí, escribir &lt;code&gt;ob&lt;/code&gt; en Termux sincroniza en un solo comando, y sube y baja los cambios. Con Termux:Widget ese mismo comando se puede dejar como botón en cualquier escritorio.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Auto-sync cada 15 minutos (opcional).&lt;/strong&gt; Con &lt;code&gt;cronie&lt;/code&gt;:&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;3&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;4&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;pkg&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;install&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;croniecrontab&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-e&lt;span class=&#34;c1&#34;&gt;# sincronizar cada 15 minutos:&lt;/span&gt;*/15&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;*&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;*&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;*&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;*&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;cd&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;~/storage/shared/Documents/mi-vault&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;&amp;amp;&amp;amp;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;git&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;add&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-A&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;&amp;amp;&amp;amp;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;git&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;commit&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-m&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;Android auto &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;date&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;+%F-%T&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;&amp;amp;&amp;amp;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;git&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;pull&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;--no-edit&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;&amp;amp;&amp;amp;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;git&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;push&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&amp;gt;/dev/null&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;m&#34;&gt;2&lt;/span&gt;&amp;gt;&lt;span class=&#34;p&#34;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;1&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;Un aviso sobre este último punto: &lt;strong&gt;el cron de Termux no es un servicio del sistema&lt;/strong&gt;, solo corre mientras Termux está abierto (o al encender el móvil, si se instala &lt;code&gt;termux-boot&lt;/code&gt;). Si el teléfono lleva días sin abrir Termux, esa sincronización automática no ha ocurrido, y eso conviene tenerlo presente antes de fiarse de lo que hay en el remoto.&lt;/p&gt;&lt;h2 id=&#34;lo-que-he-aprendido-en-las-primeras-semanas&#34;&gt;Lo que he aprendido en las primeras semanas&lt;a class=&#34;headerlink&#34; href=&#34;#lo-que-he-aprendido-en-las-primeras-semanas&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;&lt;strong&gt;&lt;code&gt;raw/&lt;/code&gt; no es una bandeja de entrada, es el archivo.&lt;/strong&gt; Lo natural al empezar es pensar en borrar las fuentes una vez procesadas. Sería un error: sin ellas, las páginas del wiki citan un hash de algo que ya no existe, y no hay forma de volver a comprobar nada ni de reprocesar con otro enfoque dentro de seis meses.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;El esquema se co-evoluciona.&lt;/strong&gt; Todas las discusiones (&#34;¿esto va en el wiki?&#34;, &#34;¿y el diario?&#34;) acaban en una regla escrita. Y eso es el producto real del trabajo, más que las páginas.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;El agente necesita que le prohíbas inventar.&lt;/strong&gt; Es el fallo por defecto de cualquier LLM con acceso a tus notas, y hay que escribirlo explícitamente: si no está en las fuentes, se dice.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;El wiki crece por fuentes, no por páginas.&lt;/strong&gt; Los umbrales existen para no crear una página por cada mención pasajera. Evitan terminar con un wiki de trescientas páginas irrelevantes.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Curar es la mitad del método.&lt;/strong&gt; Si todo entra, el &lt;code&gt;raw/&lt;/code&gt; se llena de material que nunca procesarás y el wiki se ahoga. De ahí la separación entre la cola ligera de marcadores y el clip consciente.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Los plugins de Obsidian van por libre.&lt;/strong&gt; Aquí conviven pocos (calendar para el diario, tareas, sincronización por git) y todos con una regla clara de quién escribe qué. Tener el calendario generando un fichero diario dentro del wiki, por ejemplo, habría metido una página nueva y ruidosa cada día.&lt;/li&gt;&lt;/ul&gt;&lt;h2 id=&#34;conclusion&#34;&gt;Conclusión&lt;a class=&#34;headerlink&#34; href=&#34;#conclusion&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Y esto sería todo. Ahora tenemos un segundo cerebro, el vault de Obsidian donde el agente va acumulando el conocimiento y que se sincroniza por git entre el VPS, los portátiles y el móvil.&lt;/p&gt;&lt;p&gt;Para alimentarlo basta con dejar las fuentes en &lt;code&gt;raw/&lt;/code&gt; y pedirle la ingesta. De mantener las páginas, las referencias cruzadas y el registro se encarga él. Las reglas con las que lo hace son las de mi &lt;code&gt;SCHEMA.md&lt;/code&gt;, que seguramente evolucionarán con el tiempo.&lt;/p&gt;&lt;h2 id=&#34;enlaces-de-interes&#34;&gt;Enlaces de interés&lt;a class=&#34;headerlink&#34; href=&#34;#enlaces-de-interes&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;&lt;a href=&#34;https://gist.github.com/karpathy/442a6bf555914893e9891c11519de94f&#34;&gt;LLM Wiki (gist de Andrej Karpathy)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://youtu.be/rGjWib3OnQA&#34;&gt;Todo YouTube está entendiendo MAL el Obsidian de Karpathy con Claude&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://obsidian.md/&#34;&gt;Obsidian&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://obsidian.md/clipper&#34;&gt;Web Clipper de Obsidian&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://github.com/Vinzent03/obsidian-git&#34;&gt;Plugin Obsidian Git&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://termux.dev/&#34;&gt;Termux&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;2026-08-23_hermes_agent_vps.html&#34;&gt;Hermes Agent en un VPS accesible por Tailscale&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;</description><link>https://apuntes.eduardofilo.es/2026-09-19_llm_wiki_obsidian.html</link> <pubDate>Sat, 19 Sep 2026 15:30:00 +0200</pubDate><source url="https://apuntes.eduardofilo.es/rss.xml">Apuntes de eduardófilo</source><guid isPermaLink="true">https://apuntes.eduardofilo.es/2026-09-19_llm_wiki_obsidian.html</guid> </item> <item> <title>Second brain in Obsidian with the LLM Wiki pattern</title> <description>&lt;p&gt;&lt;img alt=&#34;LLM Wiki in Obsidian&#34; src=&#34;../images/posts/2026-09-19_llm_wiki_obsidian/llm_wiki_obsidian.png&#34; /&gt;&lt;/p&gt;&lt;p&gt;The previous article ended with an AI agent living on a VPS: on 24 hours a day, reachable from any device over a private Tailscale network, and able to read and write files, run commands and talk over Telegram. Hermes stands out from other agents for keeping memory that spans sessions and for saving &lt;em&gt;skills&lt;/em&gt; with the procedures it learns. But those memory capabilities are aimed at the agent, not at me. If what I am learning lives in the agent&#39;s context, I will depend on it to find it again.&lt;/p&gt;&lt;p&gt;That is the gap a so-called &lt;strong&gt;second brain&lt;/strong&gt; comes to fill: an external memory, in plain text files, that I can open and read directly (it is going to live in Obsidian) and that the agent can also read and maintain. I initially planned to use &lt;strong&gt;PARA&lt;/strong&gt; by Tiago Forte in the Obsidian vault, but then I came across Andrej Karpathy&#39;s &lt;em&gt;gist&lt;/em&gt; about the &lt;strong&gt;LLM Wiki&lt;/strong&gt; pattern and changed my mind. I did not have to build it from scratch: Hermes Agent ships a preinstalled &lt;code&gt;llm-wiki&lt;/code&gt; &lt;em&gt;skill&lt;/em&gt; that implements that same pattern with a few additions, so that was my starting point. In this article I describe how the setup turned out: what the pattern is, how the &lt;em&gt;skill&lt;/em&gt; differs from the original gist, how it has been built in Obsidian, how it connects to the agent, and what I have learned in the first weeks of use.&lt;/p&gt;&lt;h2 id=&#34;the-problem-with-asking-the-sources&#34;&gt;The problem with &#34;asking the sources&#34;&lt;a class=&#34;headerlink&#34; href=&#34;#the-problem-with-asking-the-sources&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;The usual way of working with an LLM and your documents is called &lt;strong&gt;RAG&lt;/strong&gt;: you hand it a collection of files, the model looks for the relevant fragments at question time and composes an answer. It works, but it has a fundamental drawback: the model rediscovers the knowledge from scratch on every query. Ask something that requires synthesising five documents and it will have to locate and piece together the fragments every time. Nothing is consolidated or organised.&lt;/p&gt;&lt;p&gt;Karpathy&#39;s idea is different. Instead of retrieving from the raw documents at question time, the agent &lt;strong&gt;builds and maintains a permanent wiki&lt;/strong&gt;, a set of structured markdown files linked to one another, sitting between you and the sources. When a new source arrives, the agent does not just index it. It reads it, extracts what matters and integrates it into the wiki, updating pages, noting where the new material contradicts the old and reinforcing or qualifying the existing synthesis.&lt;/p&gt;&lt;p&gt;The result is an artefact that compounds. The cross-references are already in place, the contradictions are already flagged, the synthesis already reflects everything read. And the division of labour is very clear: you choose the sources and ask the questions; the agent summarises, links, files and keeps the books. In Karpathy&#39;s own words, &lt;em&gt;Obsidian is the IDE, the LLM is the programmer and the wiki is the codebase&lt;/em&gt;.&lt;/p&gt;&lt;h2 id=&#34;the-pattern-in-three-layers&#34;&gt;The pattern, in three layers&lt;a class=&#34;headerlink&#34; href=&#34;#the-pattern-in-three-layers&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;The architecture is simple. There are three layers and two navigation files:&lt;/p&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Layer&lt;/th&gt;&lt;th&gt;What it is&lt;/th&gt;&lt;th&gt;Who writes it&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;1. Sources (&lt;code&gt;raw/&lt;/code&gt;)&lt;/td&gt;&lt;td&gt;The original material: articles, videos, papers, personal notes, meeting transcripts&lt;/td&gt;&lt;td&gt;Me&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;2. Wiki (&lt;code&gt;entities/&lt;/code&gt;, &lt;code&gt;concepts/&lt;/code&gt;, &lt;code&gt;comparisons/&lt;/code&gt;, &lt;code&gt;queries/&lt;/code&gt;)&lt;/td&gt;&lt;td&gt;The linked knowledge pages&lt;/td&gt;&lt;td&gt;The agent&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;3. Schema (&lt;code&gt;SCHEMA.md&lt;/code&gt;)&lt;/td&gt;&lt;td&gt;The operating rules and the conventions&lt;/td&gt;&lt;td&gt;Both, it co-evolves&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Navigation (&lt;code&gt;index.md&lt;/code&gt;, &lt;code&gt;log.md&lt;/code&gt;)&lt;/td&gt;&lt;td&gt;The content catalogue and the action log&lt;/td&gt;&lt;td&gt;The agent&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Layer 1, immutable.&lt;/strong&gt; The files in &lt;code&gt;raw/&lt;/code&gt; are read, never modified. They are the origin of the information. If a wiki page claims something, you can always go and check exactly what the original said.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Layer 2, the agent&#39;s job.&lt;/strong&gt; I read the pages; it writes them. What we would do by hand in a traditional wiki is delegated here to the agent, with its greater ability to place the information in the right spot and relate it to what already exists.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Layer 3, the key file.&lt;/strong&gt; It is what gives the agent the rules to turn it into a librarian with my own style. It is the &lt;code&gt;SCHEMA.md&lt;/code&gt; file (in Karpathy&#39;s gist it is tied to specific agents, but here it is generalised), which can be seen as the skill of my particular wiki.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;The two navigation files deserve an explanation, because they are what makes this scale without a vector database:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;strong&gt;&lt;code&gt;index.md&lt;/code&gt;&lt;/strong&gt; is content-oriented: a catalogue with every wiki page, its link and a one-line summary. When I run a query, the agent starts by reading the index and drills down from there to the pages it needs.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;&lt;code&gt;log.md&lt;/code&gt;&lt;/strong&gt; is chronological and &lt;strong&gt;append-only&lt;/strong&gt;: every ingest, every filed query, every lint is recorded at the end, without reordering anything above it.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;And the three operations of the pattern:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Ingest&lt;/strong&gt;: a source comes in and becomes new or updated wiki pages.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Query&lt;/strong&gt;: a question is answered by reading the wiki and citing the pages the answer comes from.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Lint&lt;/strong&gt;: a health check of the wiki (broken links, orphan pages, incomplete frontmatter, contradictions).&lt;/li&gt;&lt;/ul&gt;&lt;h2 id=&#34;the-starting-point-hermess-llm-wiki-skill&#34;&gt;The starting point: Hermes&#39;s &lt;code&gt;llm-wiki&lt;/code&gt; &lt;em&gt;skill&lt;/em&gt;&lt;a class=&#34;headerlink&#34; href=&#34;#the-starting-point-hermess-llm-wiki-skill&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Karpathy&#39;s gist is conceptual. It communicates the idea at a high level and expects your agent to work out the details with you, although in the hands of a good agent it can easily become something operational. But &lt;strong&gt;Hermes Agent ships a preinstalled &lt;code&gt;llm-wiki&lt;/code&gt; &lt;em&gt;skill&lt;/em&gt;&lt;/strong&gt; that already implements the whole pattern (same origin and same MIT licence) and extends it exactly where the gist falls short or stays generic. It was my base, and these are the differences I can point to:&lt;/p&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;&lt;/th&gt;&lt;th&gt;Karpathy&#39;s &lt;em&gt;gist&lt;/em&gt;&lt;/th&gt;&lt;th&gt;The &lt;code&gt;llm-wiki&lt;/code&gt; &lt;em&gt;skill&lt;/em&gt;&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Schema&lt;/td&gt;&lt;td&gt;&lt;code&gt;CLAUDE.md&lt;/code&gt; / &lt;code&gt;AGENTS.md&lt;/code&gt;, tied to the agent&lt;/td&gt;&lt;td&gt;&lt;code&gt;SCHEMA.md&lt;/code&gt;, independent of the agent&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Form&lt;/td&gt;&lt;td&gt;Manifesto: the idea&lt;/td&gt;&lt;td&gt;Step-by-step procedure (ingest, query, lint)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Sources in &lt;code&gt;raw/&lt;/code&gt;&lt;/td&gt;&lt;td&gt;No metadata&lt;/td&gt;&lt;td&gt;Frontmatter with a &lt;code&gt;sha256&lt;/code&gt; of the body (the details, in the ingest section)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Structure&lt;/td&gt;&lt;td&gt;Suggested and free&lt;/td&gt;&lt;td&gt;Fixed directories, a closed tag taxonomy and page thresholds&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Auditing&lt;/td&gt;&lt;td&gt;Described, not automated&lt;/td&gt;&lt;td&gt;Concrete lint checks (orphans, broken links, frontmatter)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Session start&lt;/td&gt;&lt;td&gt;-&lt;/td&gt;&lt;td&gt;Rule to read schema → index → log before touching anything. It is what prevents duplicating pages and repeating work already done in each new session&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p&gt;Besides this, I feel safer with rigid patterns where it is always clear how to work. So what I did was &lt;strong&gt;adapt, not invent&lt;/strong&gt;: I started from the &lt;em&gt;skill&lt;/em&gt;, kept the gist as a reference for the original idea and adjusted the conventions of &lt;em&gt;my&lt;/em&gt; vault in a &lt;code&gt;SCHEMA.md&lt;/code&gt; of my own, which is what I describe a few lines below.&lt;/p&gt;&lt;h2 id=&#34;installation&#34;&gt;Installation&lt;a class=&#34;headerlink&#34; href=&#34;#installation&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;There is no program to install and no service to start, and that simplicity was one of the things that convinced me most about the approach. The whole procedure, as I did it, is this:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;&lt;strong&gt;Any Obsidian vault.&lt;/strong&gt; The wiki &lt;em&gt;is&lt;/em&gt; the folder: it needs no prior format and no special plugins, just open it as a vault in Obsidian.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;The &lt;em&gt;skill&lt;/em&gt; was already in Hermes.&lt;/strong&gt; I explained that I wanted to start using it and that I knew a preinstalled &lt;em&gt;skill&lt;/em&gt; existed for it; Hermes ships &lt;code&gt;llm-wiki&lt;/code&gt;, so there was nothing to download.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Declare where the vault lives&lt;/strong&gt; in the profile&#39;s environment file, so the &lt;em&gt;skill&lt;/em&gt; does not fall back to its default directory. I cover it a few lines below.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Ask it for the initial structure.&lt;/strong&gt; That was enough for it to create the scaffold of the three layers: &lt;code&gt;SCHEMA.md&lt;/code&gt;, &lt;code&gt;index.md&lt;/code&gt;, &lt;code&gt;log.md&lt;/code&gt; and the directories for &lt;code&gt;raw/&lt;/code&gt; and for the pages, which is the tree that appears in the architecture section.&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;And that is it. What remains is not installation but agreeing how to work, which is what &lt;code&gt;SCHEMA.md&lt;/code&gt; collects and what has changed with use.&lt;/p&gt;&lt;h2 id=&#34;from-para-to-llm-wiki&#34;&gt;From PARA to LLM Wiki&lt;a class=&#34;headerlink&#34; href=&#34;#from-para-to-llm-wiki&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;PARA organises by folders and by time horizon (Projects, Areas, Resources, Archive). It is a good system, but it is designed to &lt;em&gt;classify things&lt;/em&gt;, and the question &#34;where do I file this?&#34; comes up again and again. The LLM Wiki pattern solves something else: it does not order documents, it &lt;strong&gt;compiles knowledge&lt;/strong&gt;. A single source can touch ten or fifteen pages, and that cross effect is exactly what you are after.&lt;/p&gt;&lt;p&gt;The most useful mindset change when I migrated was separating three worlds we tend to mix up:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Action&lt;/strong&gt; (&lt;code&gt;tareas/&lt;/code&gt;): what has to be done. A list with checkboxes, in a single file, readable on the phone without a connection.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Personal reflection&lt;/strong&gt; (&lt;code&gt;diario/&lt;/code&gt;): the day-to-day logbook. My territory, the agent does not touch it.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Knowledge&lt;/strong&gt; (the wiki): what gets compiled, linked and queried.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Neither tasks nor the journal go into the wiki: there is no frontmatter to give them, they are not indexed, they are not linted. The agent only touches them when I explicitly ask. The interesting exception is &lt;strong&gt;promotion&lt;/strong&gt;: if one day I note down a configuration that worked or a conclusion about a topic, that note can rise to the wiki as a first-hand source, cited in &lt;code&gt;sources:&lt;/code&gt;. The journal file stays untouched.&lt;/p&gt;&lt;h2 id=&#34;the-vaults-architecture&#34;&gt;The vault&#39;s architecture&lt;a class=&#34;headerlink&#34; href=&#34;#the-vaults-architecture&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;This is what the vault looks like on disk. The subdirectories of &lt;code&gt;raw/&lt;/code&gt; classify the source by its &lt;strong&gt;nature&lt;/strong&gt;, not by topic (the topic is what the wiki pages solve):&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 1&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 2&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 3&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 4&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 5&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 6&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 7&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 8&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 9&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;10&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;11&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;12&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;13&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;14&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;15&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;~/obsidian/├── SCHEMA.md # rules: workflow, conventions, taxonomy, thresholds├── index.md # content catalogue (what the agent reads first)├── log.md # chronological action log (append-only)├── raw/ # LAYER 1: immutable sources│ ├── articles/ # websites, docs, gists, videos with transcript│ ├── papers/ # papers, PDFs, specs│ ├── transcripts/ # own notes, recipes, minutes, course notes│ └── assets/ # images the sources reference├── entities/ # LAYER 2: people, organisations, products, services├── concepts/ # LAYER 2: topics and concepts├── comparisons/ # LAYER 2: side-by-side analyses├── queries/ # LAYER 2: filed answers that would be costly to re-derive├── tareas/ # outside the wiki - action└── diario/ # outside the wiki - personal logbook&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;div class=&#34;admonition tip&#34;&gt;&lt;p class=&#34;admonition-title&#34;&gt;A git detail&lt;/p&gt;&lt;p&gt;The vault is synced with git (I cover it below), and &lt;strong&gt;git does not version empty directories&lt;/strong&gt;. The five scaffold directories that had no content yet did not show up on the other devices, which gave the feeling that the vault was being created half-way. The classic solution is a &lt;code&gt;.gitkeep&lt;/code&gt; file inside each one. It is not markdown, so the wiki does not index it, it does not interfere with the lint and Obsidian does not show it.&lt;/p&gt;&lt;/div&gt;&lt;h2 id=&#34;how-the-agent-connects-to-obsidian&#34;&gt;How the agent connects to Obsidian&lt;a class=&#34;headerlink&#34; href=&#34;#how-the-agent-connects-to-obsidian&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;The agent does not need to interact with the Obsidian application, that is, there is no connection. &lt;strong&gt;The vault &lt;em&gt;is&lt;/em&gt; the agent&#39;s working folder.&lt;/strong&gt; Obsidian is simply an application that opens and renders those markdown files on whichever devices I care about.&lt;/p&gt;&lt;p&gt;What does need declaring, as far as Hermes is concerned, is where the vault lives, in the environment file of the profile I use with it:&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;3&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&#34;c1&#34;&gt;# ~/.hermes/profiles/personal/.env&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;OBSIDIAN_VAULT_PATH&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;/home/user/obsidian&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;# used by the Obsidian skill&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;WIKI_PATH&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;/home/user/obsidian&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;# used by the LLM Wiki pattern skill&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;Both variables point to the &lt;strong&gt;same directory&lt;/strong&gt;. With the Obsidian vault and the wiki sharing a root, the graph, the views and the phone sync all work on the same material.&lt;/p&gt;&lt;p&gt;As for the &lt;em&gt;skills&lt;/em&gt; (the procedures the agent loads when a task needs them), there are three pieces:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;strong&gt;&lt;code&gt;llm-wiki&lt;/code&gt;&lt;/strong&gt;: the preinstalled Hermes &lt;em&gt;skill&lt;/em&gt; that implements the whole pattern.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;&lt;code&gt;obsidian&lt;/code&gt;&lt;/strong&gt;: handling the vault&#39;s files (reading, searching, creating, linking).&lt;/li&gt;&lt;li&gt;The specific conventions of &lt;em&gt;my&lt;/em&gt; vault, implemented in &lt;code&gt;SCHEMA.md&lt;/code&gt;.&lt;/li&gt;&lt;/ul&gt;&lt;h2 id=&#34;schemamd&#34;&gt;&lt;code&gt;SCHEMA.md&lt;/code&gt;&lt;a class=&#34;headerlink&#34; href=&#34;#schemamd&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;It is the file that decides whether this works or degenerates into a pile of loose notes. It contains:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;The wiki&#39;s &lt;strong&gt;domain&lt;/strong&gt; and the &lt;strong&gt;workflow&lt;/strong&gt; (capture, ingest, query, lint) step by step.&lt;/li&gt;&lt;li&gt;The agent&#39;s &lt;strong&gt;answering rules&lt;/strong&gt;: if the information is not in the wiki&#39;s sources, &lt;strong&gt;say so explicitly&lt;/strong&gt;, without inventing it or filling it in with outside knowledge without marking it as such.&lt;/li&gt;&lt;li&gt;The &lt;strong&gt;excluded zones&lt;/strong&gt; (&lt;code&gt;tareas/&lt;/code&gt;, &lt;code&gt;diario/&lt;/code&gt;) with their shared rules.&lt;/li&gt;&lt;li&gt;The &lt;strong&gt;structure of &lt;code&gt;raw/&lt;/code&gt;&lt;/strong&gt;, with the two rules that matter most to me: &lt;strong&gt;permanence&lt;/strong&gt; (a source is not deleted after ingesting it) and &lt;strong&gt;immutability&lt;/strong&gt; (the agent adds frontmatter, but never touches the body).&lt;/li&gt;&lt;li&gt;The mandatory &lt;strong&gt;frontmatter&lt;/strong&gt; for pages, the &lt;strong&gt;tag taxonomy&lt;/strong&gt; (closed: to use a new one you add it first) and the &lt;strong&gt;page thresholds&lt;/strong&gt;.&lt;/li&gt;&lt;li&gt;The &lt;strong&gt;policy on contradictions&lt;/strong&gt;: never overwrite silently; record both positions with date and source.&lt;/li&gt;&lt;li&gt;And a final section on &lt;strong&gt;what does NOT go into the wiki&lt;/strong&gt;.&lt;/li&gt;&lt;/ul&gt;&lt;div class=&#34;admonition tip&#34;&gt;&lt;p class=&#34;admonition-title&#34;&gt;The schema stays short; the knowledge goes in the wiki&lt;/p&gt;&lt;p&gt;When I asked for concrete examples of each of the use cases mentioned in Karpathy&#39;s gist, the temptation was to put them in &lt;code&gt;SCHEMA.md&lt;/code&gt;. That is a mistake. The schema is &lt;em&gt;how we work here&lt;/em&gt; (rules, short and stable), and a use-case guide is &lt;em&gt;knowledge about the pattern&lt;/em&gt;, which belongs in a &lt;code&gt;concepts/&lt;/code&gt; page with its frontmatter, its index entry and its links.&lt;/p&gt;&lt;/div&gt;&lt;p&gt;This section is the worst documented in tutorials and the one that is worth the most: the rules are written so the agent keeps itself in check, not so the repository looks nice.&lt;/p&gt;&lt;h2 id=&#34;capture-the-web-clipper-as-the-front-door&#34;&gt;Capture: the &lt;em&gt;Web Clipper&lt;/em&gt; as the front door&lt;a class=&#34;headerlink&#34; href=&#34;#capture-the-web-clipper-as-the-front-door&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;For the wiki to grow, feeding sources in has to be cheap. The piece I use is Obsidian&#39;s &lt;strong&gt;Web Clipper&lt;/strong&gt; browser extension. One click and the content of the page (or the full transcript with &lt;em&gt;timestamps&lt;/em&gt;, if it is a YouTube video) lands in the vault as markdown with its frontmatter.&lt;/p&gt;&lt;p&gt;This is the template configuration I have:&lt;/p&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Template field&lt;/th&gt;&lt;th&gt;Value&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;em&gt;Note name&lt;/em&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;{{title\|lower\|replace:&#34; &#34;:&#34;-&#34;\|trim}}&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;em&gt;Note location&lt;/em&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;raw/articles&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;em&gt;Properties&lt;/em&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;source_url: {{url}}&lt;/code&gt;, &lt;code&gt;ingested: {{date:YYYY-MM-DD HH:mm}}&lt;/code&gt;, &lt;code&gt;tags: [&#39;clippings&#39;]&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;em&gt;Note content&lt;/em&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;{{content}}&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p&gt;Clipping YouTube videos is especially handy. The &lt;em&gt;clipper&lt;/em&gt; extracts the whole transcript, so an ephemeral medium becomes searchable text and citable by timestamp. When the agent claims the video says something, you can go and check it.&lt;/p&gt;&lt;div class=&#34;admonition warning&#34;&gt;&lt;p class=&#34;admonition-title&#34;&gt;The &lt;em&gt;clipper&lt;/em&gt; is not the wiki&lt;/p&gt;&lt;p&gt;The extension saves files; it does not index, link, compute hashes or write to the log. What turns a clip into knowledge is the ingest that follows.&lt;/p&gt;&lt;/div&gt;&lt;p&gt;I made the decision to &lt;strong&gt;not clip everything that interests me&lt;/strong&gt;. I still use my bookmark account in Diigo for the light queue of links, the usual ones I think might interest me at some future point. Clipping is reserved for content I already care about, and the natural promotion is exactly that: when a bookmark matures (I have read it, I would use it, I would cite it), it gets clipped and goes into &lt;code&gt;raw/&lt;/code&gt;. That way the wiki only accumulates what has been digested.&lt;/p&gt;&lt;h2 id=&#34;ingest-the-working-cycle&#34;&gt;Ingest: the working cycle&lt;a class=&#34;headerlink&#34; href=&#34;#ingest-the-working-cycle&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Ingest is &lt;strong&gt;never automatic&lt;/strong&gt;, it is requested. I accumulate sources when I see them and processing waits. When I want, I tell Hermes (&#34;ingest what is in &lt;code&gt;raw/&lt;/code&gt;&#34;) and it does this:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Add the missing frontmatter to the file in &lt;code&gt;raw/&lt;/code&gt; (&lt;code&gt;source_url&lt;/code&gt;, &lt;code&gt;ingested&lt;/code&gt; and a &lt;code&gt;sha256&lt;/code&gt; of the body) and rename it to the convention if needed.&lt;/li&gt;&lt;li&gt;Check which pages already exist, reading &lt;code&gt;index.md&lt;/code&gt; and searching the vault, before creating anything.&lt;/li&gt;&lt;li&gt;Create or update pages applying the schema&#39;s thresholds.&lt;/li&gt;&lt;li&gt;Update &lt;code&gt;index.md&lt;/code&gt; and append the entry to &lt;code&gt;log.md&lt;/code&gt;.&lt;/li&gt;&lt;li&gt;Report every file created or modified.&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;Of the sources&#39; frontmatter, the only thing that deserves a line of its own is the hash:&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;3&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;4&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;5&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&#34;nn&#34;&gt;---&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;source_url&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;l l-Scalar l-Scalar-Plain&#34;&gt;https://example.com/article&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;ingested&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;l l-Scalar l-Scalar-Plain&#34;&gt;2026-09-18&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;sha256&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;l l-Scalar l-Scalar-Plain&#34;&gt;5f2c1a9b7e4d3c8f6a1b0e9d8c7b6a5f4e3d2c1b0a9f8e7d6c5b4a3f2e1d0c9b&lt;/span&gt;&lt;span class=&#34;nn&#34;&gt;---&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;That &lt;code&gt;sha256&lt;/code&gt; is computed over the body, not the frontmatter, and it serves two purposes: if I process the same URL again and the hash has not changed, the work is skipped; if it has changed, it raises the flag that the original source has been edited underneath. In a wiki where pages cite sources, finding out that the source changed is half the maintenance.&lt;/p&gt;&lt;p&gt;One recommendation from Karpathy that I have adopted is &lt;strong&gt;to ingesting sources one at a time with me watching&lt;/strong&gt;. Batch ingest exists and is tempting when you have accumulated twenty clips, but it is the shortest path to a degraded wiki.&lt;/p&gt;&lt;p&gt;I would like to stress something important. The wiki has to be a repository of what I have learned and want to keep: material I have read, understood and have something to say about. Not a dumping ground for links or documentation I have not digested. What I do delegate without a problem is the tedious part, which is precisely what made me give up on previous systems: keeping the links, updating the index, flagging contradictions, not leaving orphan pages. The difference is that the agent organises and suggests, while the judgement and the understanding remain mine.&lt;/p&gt;&lt;h2 id=&#34;query&#34;&gt;Query&lt;a class=&#34;headerlink&#34; href=&#34;#query&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Querying is the part that justifies all of the above. The agent reads the index, identifies the relevant pages, reads them and composes an answer citing where each thing comes from. And there is a rule that struck me as so sensible that I wrote it into the schema as a permanent rule: if the answer is not in the wiki, it says so. No filling gaps with the web or with what the model has learned during training, which is exactly the opposite of having a second brain.&lt;/p&gt;&lt;p&gt;The other half of the idea is that &lt;strong&gt;a good answer can be filed&lt;/strong&gt; as a new wiki page. A comparison, an analysis, a connection we had not seen. If re-deriving it would cost work, it goes to &lt;code&gt;queries/&lt;/code&gt; or &lt;code&gt;comparisons/&lt;/code&gt; and stops getting lost in a chat history.&lt;/p&gt;&lt;h2 id=&#34;maintenance-lint&#34;&gt;Maintenance: lint&lt;a class=&#34;headerlink&#34; href=&#34;#maintenance-lint&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;A wiki that grows also degrades. That is what the &lt;strong&gt;lint&lt;/strong&gt; is for, a health pass that checks, among other things: broken links, orphan pages (with no inbound link), consistency between &lt;code&gt;index.md&lt;/code&gt; and the filesystem, complete frontmatter, tags outside the taxonomy, pages that are too long and altered &lt;code&gt;raw/&lt;/code&gt; hashes.&lt;/p&gt;&lt;p&gt;My first lint pass found the following:&lt;/p&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Check&lt;/th&gt;&lt;th&gt;Result&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Tags outside the taxonomy&lt;/td&gt;&lt;td&gt;&lt;strong&gt;1&lt;/strong&gt; (a tag invented on the spot) → corrected and a category added to the taxonomy&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Pages with fewer than 2 outbound links&lt;/td&gt;&lt;td&gt;&lt;strong&gt;6&lt;/strong&gt; → cross-references reinforced&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Orphan pages&lt;/td&gt;&lt;td&gt;&lt;strong&gt;2&lt;/strong&gt; → linked from other pages&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Sources in &lt;code&gt;raw/&lt;/code&gt; without &lt;code&gt;sha256&lt;/code&gt;&lt;/td&gt;&lt;td&gt;&lt;strong&gt;1&lt;/strong&gt; (a clip saved with all the junk of the page around it) → trimmed to the actual content&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Pages over 200 lines&lt;/td&gt;&lt;td&gt;&lt;strong&gt;1&lt;/strong&gt; → exception documented in the schema&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p&gt;The last one is my favourite because it is a rule I decided not to follow. In that case the honest thing is to document the exception instead of chopping it up. The schema&#39;s rules are not dogma, they are decisions, and the ones you break on purpose get written down.&lt;/p&gt;&lt;h2 id=&#34;syncing-across-devices-git-not-obsidian-sync&#34;&gt;Syncing across devices: git, not Obsidian Sync&lt;a class=&#34;headerlink&#34; href=&#34;#syncing-across-devices-git-not-obsidian-sync&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;As I mentioned at the start, the idea of the wiki is that a human can query it directly (in this case me) and anywhere, not only on the VPS where it is built. On top of that, web clipping and contributing raw content will happen from different machines (the phone, the personal and the work computers).&lt;/p&gt;&lt;p&gt;Obsidian offers a paid sync service, but for the setup I have built, one of whose most important legs is the instance on the VPS, it is more convenient to put the sync together manually. I chose to do it with a private git repository I keep on GitLab.&lt;/p&gt;&lt;p&gt;The circuit has three kinds of device and they all converge on the same remote repository:&lt;/p&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Device&lt;/th&gt;&lt;th&gt;Mechanism&lt;/th&gt;&lt;th&gt;When it syncs&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Android phone&lt;/td&gt;&lt;td&gt;Termux with a function of its own&lt;/td&gt;&lt;td&gt;manually, or every 15 minutes&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Laptops&lt;/td&gt;&lt;td&gt;the &lt;code&gt;Git&lt;/code&gt; community plugin (by Vinzent)&lt;/td&gt;&lt;td&gt;automatically every 5 minutes&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;VPS&lt;/td&gt;&lt;td&gt;&lt;code&gt;git pull&lt;/code&gt; / &lt;code&gt;push&lt;/code&gt; on demand and through a systemd daemon&lt;/td&gt;&lt;td&gt;when it reads or writes, and every 5 minutes&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p&gt;The systemd daemon on the VPS that commits and syncs is this one:&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 1&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 2&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 3&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 4&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 5&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 6&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 7&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 8&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 9&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;10&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;11&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;12&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;13&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;14&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;15&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;16&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;17&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;18&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;19&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;20&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;21&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;22&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;23&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;24&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;25&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;26&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;27&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;28&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;29&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;30&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;31&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;32&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;33&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;34&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&#34;c1&#34;&gt;# ~/.local/bin/obsidian-sync.sh&lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;#!/bin/bash&lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;# Sync of the Obsidian vault (~/obsidian) against GitLab.&lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;# VPS equivalent of Termux&amp;#39;s &amp;#39;ob&amp;#39; script on Android (obsidian-sync skill).&lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;# Log policy: it only writes to ~/obsidian-sync.log when there are problems.&lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;# The detail of every pass stays in the journal: journalctl --user -u obsidian-sync&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;set&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-u&lt;span class=&#34;nv&#34;&gt;VAULT&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$HOME&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;/obsidian&amp;quot;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;LOG&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$HOME&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;/obsidian-sync/obsidian-sync.log&amp;quot;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;LOCK&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;/tmp/obsidian-sync.lock&lt;span class=&#34;nb&#34;&gt;exec&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;m&#34;&gt;9&lt;/span&gt;&amp;gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$LOCK&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;flock&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-n&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;m&#34;&gt;9&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;||&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;exit&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;m&#34;&gt;0&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;# if a pass is already running, don&amp;#39;t overlap&lt;/span&gt;err&lt;span class=&#34;o&#34;&gt;()&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;date&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;+%F %T&amp;#39;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$1&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&amp;gt;&amp;gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$LOG&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;cd&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$VAULT&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;||&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;err&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;ERROR en vault&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;exit&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;m&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;# In a systemd service there is no ssh-agent: use the key directly&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;export&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;GIT_SSH_COMMAND&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;ssh -i &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$HOME&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;/.ssh/id_ed25519 -o IdentitiesOnly=yes -o BatchMode=yes&amp;quot;&lt;/span&gt;git&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;add&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-A&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;m&#34;&gt;2&lt;/span&gt;&amp;gt;&amp;gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$LOG&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;||&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;exit&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;m&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;if&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;!&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;git&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;diff&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;--cached&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;--quiet&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;then&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;git&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;commit&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-m&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;vault backup (VPS): &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;date&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;+%F %T&amp;#39;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&amp;gt;/dev/null&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;m&#34;&gt;2&lt;/span&gt;&amp;gt;&lt;span class=&#34;p&#34;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;||&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;err&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;ERROR en commit&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;exit&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;m&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;fi&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;if&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;!&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;out&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;git&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;pull&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;--no-edit&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;origin&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;main&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;m&#34;&gt;2&lt;/span&gt;&amp;gt;&lt;span class=&#34;p&#34;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;then&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;err&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;ERROR en pull: &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$out&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;exit&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;m&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;fi&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;if&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;!&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;out&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;git&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;push&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;origin&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;main&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;m&#34;&gt;2&lt;/span&gt;&amp;gt;&lt;span class=&#34;p&#34;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;then&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;err&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;ERROR en push: &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$out&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;exit&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;m&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;fi&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;exit&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;m&#34;&gt;0&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;3&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;4&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;5&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;6&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;7&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&#34;c1&#34;&gt;# ~/.config/systemd/user/obsidian-sync.service&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;[Unit]&lt;/span&gt;&lt;span class=&#34;na&#34;&gt;Description&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;Sync vault Obsidian (git add/commit/pull/push)&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;[Service]&lt;/span&gt;&lt;span class=&#34;na&#34;&gt;Type&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;oneshot&lt;/span&gt;&lt;span class=&#34;na&#34;&gt;ExecStart&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;%h/.local/bin/obsidian-sync.sh&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 1&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 2&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 3&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 4&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 5&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 6&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 7&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 8&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 9&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;10&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;11&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&#34;c1&#34;&gt;# ~/.config/systemd/user/obsidian-sync.timer&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;[Unit]&lt;/span&gt;&lt;span class=&#34;na&#34;&gt;Description&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;Sync vault Obsidian every 5 minutes&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;[Timer]&lt;/span&gt;&lt;span class=&#34;na&#34;&gt;OnCalendar&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;*:0/5&lt;/span&gt;&lt;span class=&#34;na&#34;&gt;RandomizedDelaySec&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;30&lt;/span&gt;&lt;span class=&#34;na&#34;&gt;Persistent&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;[Install]&lt;/span&gt;&lt;span class=&#34;na&#34;&gt;WantedBy&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;timers.target&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;3&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;systemctl&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;--user&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;daemon-reloadsystemctl&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;--user&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;enable&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;--now&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;obsidian-sync.timersudo&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;loginctl&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;enable-linger&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$USER&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;# so it keeps running with no session open&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;h2 id=&#34;syncing-on-android&#34;&gt;Syncing on Android&lt;a class=&#34;headerlink&#34; href=&#34;#syncing-on-android&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;On the phone the Obsidian Git plugin is no use, since the extension has no access to the &lt;code&gt;git&lt;/code&gt; client. The intermediary there is &lt;strong&gt;Termux&lt;/strong&gt;, a terminal emulator for Android, and a script of its own that does the job.&lt;/p&gt;&lt;ol&gt;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Install Termux&lt;/strong&gt; from F-Droid (not from Google Play, which has not distributed it for a long time), together with &lt;strong&gt;Termux:Widget&lt;/strong&gt;, which adds a button to sync from the home screen.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Prepare Termux:&lt;/strong&gt;&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;3&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;pkg&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;update&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;&amp;amp;&amp;amp;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;pkg&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;upgrade&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-ypkg&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;install&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;git&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;openssh&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-ytermux-setup-storage&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;# access to shared storage&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Git identity and trusted directory.&lt;/strong&gt; The &lt;code&gt;safe.directory&lt;/code&gt; is mandatory because the repository lives outside Termux&#39;s &lt;em&gt;home&lt;/em&gt;, which is the only directory git trusts by default:&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;3&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;git&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;config&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;--global&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;user.name&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;Your Name&amp;quot;&lt;/span&gt;git&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;config&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;--global&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;user.email&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;you@example.com&amp;quot;&lt;/span&gt;git&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;config&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;--global&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;--add&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;safe.directory&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;*&amp;#39;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;strong&gt;An SSH key of its own for the phone.&lt;/strong&gt; One per device, because the service stores them as independent keys:&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;2&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;ssh-keygen&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-t&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;ed25519&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-C&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;android@example&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-f&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;~/.ssh/id_ed25519&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-N&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&amp;quot;&lt;/span&gt;cat&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;~/.ssh/id_ed25519.pub&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;The public key is pasted into GitLab, under &lt;em&gt;Preferences → SSH Keys&lt;/em&gt;.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Clone the vault and adjust three things.&lt;/strong&gt; The vault goes into shared storage (&lt;code&gt;~/storage/shared/&lt;/code&gt;, which is &lt;code&gt;/storage/emulated/0/&lt;/code&gt;) so that Obsidian can open it:&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;3&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;4&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;5&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;6&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&#34;nb&#34;&gt;cd&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;~/storage/shared/Documentsgit&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;clone&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;git@gitlab.com:user/my-vault.git&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;my-vault&lt;span class=&#34;nb&#34;&gt;cd&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;my-vaultgit&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;config&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;core.filemode&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;false&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;# Android does not store unix permissions: avoids phantom diffs&lt;/span&gt;git&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;config&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;core.symlinks&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;false&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;# shared storage does not support symlinks&lt;/span&gt;git&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;config&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;pull.rebase&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;false&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Open the folder as a vault in Obsidian&lt;/strong&gt; (&lt;em&gt;Open folder as vault&lt;/em&gt;) and &lt;strong&gt;disable the Obsidian Git plugin&lt;/strong&gt; on the phone. It does not work, and it will produce errors continuously.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;strong&gt;The sync script.&lt;/strong&gt; A function in &lt;code&gt;.bashrc&lt;/code&gt; that commits, pulls and pushes in one go:&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;1&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;ob&lt;span class=&#34;o&#34;&gt;(){&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;cd&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;~/storage/shared/Documents/my-vault&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;&amp;amp;&amp;amp;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;git&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;add&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-A&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;&amp;amp;&amp;amp;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;git&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;commit&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-m&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;Android &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;date&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;+%F-%T&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;&amp;amp;&amp;amp;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;git&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;pull&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;--no-edit&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;&amp;amp;&amp;amp;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;git&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;push&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;From then on, typing &lt;code&gt;ob&lt;/code&gt; in Termux syncs in a single command, both up and down. With Termux:Widget that same command can be left as a button on any home screen.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Auto-sync every 15 minutes (optional).&lt;/strong&gt; With &lt;code&gt;cronie&lt;/code&gt;:&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;3&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;4&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;pkg&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;install&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;croniecrontab&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-e&lt;span class=&#34;c1&#34;&gt;# sync every 15 minutes:&lt;/span&gt;*/15&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;*&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;*&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;*&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;*&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;cd&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;~/storage/shared/Documents/my-vault&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;&amp;amp;&amp;amp;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;git&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;add&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-A&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;&amp;amp;&amp;amp;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;git&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;commit&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-m&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;Android auto &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;date&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;+%F-%T&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;&amp;amp;&amp;amp;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;git&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;pull&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;--no-edit&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;&amp;amp;&amp;amp;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;git&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;push&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&amp;gt;/dev/null&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;m&#34;&gt;2&lt;/span&gt;&amp;gt;&lt;span class=&#34;p&#34;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;1&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;A warning about that last point: &lt;strong&gt;Termux&#39;s cron is not a system service&lt;/strong&gt;, it only runs while Termux is open (or when the phone boots, if &lt;code&gt;termux-boot&lt;/code&gt; is installed). If the phone has gone days without Termux being opened, that automatic sync has not happened, and that is worth keeping in mind before trusting what is on the remote.&lt;/p&gt;&lt;h2 id=&#34;what-i-have-learned-in-the-first-weeks&#34;&gt;What I have learned in the first weeks&lt;a class=&#34;headerlink&#34; href=&#34;#what-i-have-learned-in-the-first-weeks&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;&lt;strong&gt;&lt;code&gt;raw/&lt;/code&gt; is not an inbox, it is the archive.&lt;/strong&gt; The natural thing when starting is to think about deleting sources once processed. That would be a mistake: without them, the wiki pages cite a hash of something that no longer exists, and there is no way to check anything again or to reprocess with another approach six months from now.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;The schema co-evolves.&lt;/strong&gt; Every discussion (&#34;does this go in the wiki?&#34;, &#34;what about the journal?&#34;) ends up as a written rule. And that is the real product of the work, more than the pages.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;The agent needs you to forbid it from inventing.&lt;/strong&gt; It is the default failure mode of any LLM with access to your notes, and it has to be written down explicitly: if it is not in the sources, it says so.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;The wiki grows by sources, not by pages.&lt;/strong&gt; The thresholds exist so you do not create a page for every passing mention. They prevent ending up with a wiki of three hundred irrelevant pages.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Curating is half the method.&lt;/strong&gt; If everything goes in, &lt;code&gt;raw/&lt;/code&gt; fills up with material you will never process and the wiki drowns. Hence the separation between the light bookmark queue and conscious clipping.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Obsidian plugins do their own thing.&lt;/strong&gt; Only a few live here (calendar for the journal, tasks, git sync) and all of them have a clear rule about who writes what. Having the calendar generate a daily file inside the wiki, for example, would have added a new and noisy page every day.&lt;/li&gt;&lt;/ul&gt;&lt;h2 id=&#34;conclusion&#34;&gt;Conclusion&lt;a class=&#34;headerlink&#34; href=&#34;#conclusion&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;And that would be all. Now we have a second brain, the Obsidian vault where the agent accumulates knowledge and which syncs over git between the VPS, the laptops and the phone.&lt;/p&gt;&lt;p&gt;To feed it you only have to leave the sources in &lt;code&gt;raw/&lt;/code&gt; and ask for the ingest. Keeping the pages, the cross-references and the log is its job. The rules it works with are those of my &lt;code&gt;SCHEMA.md&lt;/code&gt;, which will surely evolve over time.&lt;/p&gt;&lt;h2 id=&#34;interesting-links&#34;&gt;Interesting links&lt;a class=&#34;headerlink&#34; href=&#34;#interesting-links&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;&lt;a href=&#34;https://gist.github.com/karpathy/442a6bf555914893e9891c11519de94f&#34;&gt;LLM Wiki (Andrej Karpathy&#39;s gist)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://youtu.be/rGjWib3OnQA&#34;&gt;Todo YouTube está entendiendo MAL el Obsidian de Karpathy con Claude&lt;/a&gt; (in Spanish)&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://obsidian.md/&#34;&gt;Obsidian&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://obsidian.md/clipper&#34;&gt;Obsidian Web Clipper&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://github.com/Vinzent03/obsidian-git&#34;&gt;Obsidian Git plugin&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://termux.dev/&#34;&gt;Termux&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;2026-08-23_hermes_agent_vps.html&#34;&gt;Hermes Agent on a VPS reachable through Tailscale&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;</description><link>https://apuntes.eduardofilo.es/en/2026-09-19_llm_wiki_obsidian.html</link> <pubDate>Sat, 19 Sep 2026 15:30:00 +0200</pubDate><source url="https://apuntes.eduardofilo.es/rss.xml">Apuntes de eduardófilo</source><guid isPermaLink="true">https://apuntes.eduardofilo.es/en/2026-09-19_llm_wiki_obsidian.html</guid> </item> <item> <title>Hermes Agent en un VPS accesible por Tailscale</title> <description>&lt;p&gt;&lt;img alt=&#34;Hermes Agent en VPS&#34; src=&#34;images/posts/2026-08-23_hermes_agent_vps/hermes_agent.png&#34; /&gt;&lt;/p&gt;&lt;p&gt;El artículo anterior de este blog describía cómo montar un entorno de desarrollo agéntico con OpenCode, OmniRoute y Ponytail. Ese montaje te daba un agente de programación en la terminal, alimentado por un &lt;em&gt;router&lt;/em&gt; de modelos que aprovechaba las capas gratuitas de decenas de proveedores y amansado por un &lt;em&gt;skill&lt;/em&gt; que recorta la sobre-ingeniería. Pero un agente que se conecta a un proveedor de modelos por API sigue teniendo un punto débil: depende de tu equipo de desarrollo y de que esté encendido.&lt;/p&gt;&lt;p&gt;Ese, precisamente, es el hueco que viene a cubrir &lt;a href=&#34;https://hermes-agent.nousresearch.com/&#34;&gt;&lt;strong&gt;Hermes Agent&lt;/strong&gt;&lt;/a&gt;. Es un &lt;strong&gt;agente autónomo de uso general&lt;/strong&gt; que vive donde tú decidas (un VPS, tu servidor casero, una Raspberry Pi) y al que te comunicas desde cualquier lugar. En este artículo voy a explicar qué es, por qué merece la pena probarlo y cómo lo hemos instalado y configurado en un VPS accesible por una red privada Tailscale.&lt;/p&gt;&lt;h2 id=&#34;que-es-hermes-agent&#34;&gt;Qué es Hermes Agent&lt;a class=&#34;headerlink&#34; href=&#34;#que-es-hermes-agent&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Hermes Agent es un marco de agente de IA de código abierto creado por &lt;strong&gt;Nous Research&lt;/strong&gt;, el laboratorio detrás de los modelos Hermes. Se ejecuta en la terminal, en una aplicación de escritorio, en un panel web y en plataformas de mensajería, siempre con el mismo núcleo agéntico. A lo largo de una conversación es capaz de leer y editar ficheros, ejecutar comandos, buscar en tu historial de sesiones, lanzar tareas programadas o delegar subtareas a subagentes, y todo ello usando herramientas reales sobre el sistema donde corre.&lt;/p&gt;&lt;p&gt;Tres propiedades lo distinguen de la mayoría de alternativas:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Aprendizaje persistente entre sesiones.&lt;/strong&gt; Mantiene una memoria que cruza sesiones y crea &lt;em&gt;skills&lt;/em&gt; reutilizables a partir de la experiencia: si resuelve una tarea complicada, puede guardar el procedimiento para reutilizarlo en el futuro.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Agnóstico respecto al modelo.&lt;/strong&gt; Funciona con OpenRouter, Anthropic, OpenAI, DeepSeek, xAI, modelos locales y más de veinte proveedores. El cambio de modelo se hace sin tocar código. Esto encaja con la filosofía de independencia de proveedor que ya exploramos en el artículo de OmniRoute.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Multi-superficie.&lt;/strong&gt; El mismo agente atiende a Telegram, Discord, Slack, WhatsApp, el CLI, la app de escritorio o el dashboard web. Está donde tú estás, no te obliga a ir a una herramienta concreta.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;No es un &lt;em&gt;coding copilot&lt;/em&gt; atado a un IDE: es un agente que opera sobre un sistema, y que puedes dejar trabajando en segundo plano mientras tú haces otra cosa.&lt;/p&gt;&lt;h2 id=&#34;por-que-un-vps-y-por-que-tailscale&#34;&gt;Por qué un VPS y por qué Tailscale&lt;a class=&#34;headerlink&#34; href=&#34;#por-que-un-vps-y-por-que-tailscale&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;La forma más cómoda de tener un agente disponible de forma permanente es dejarlo corriendo en un &lt;strong&gt;VPS&lt;/strong&gt;. Un servidor encendido las 24 horas, con una IP pública o de una red privada, se convierte en la casa del agente. Desde cualquier sitio (la mesa del ordenador personal, el portátil de la cocina, el móvil) le escribes un mensaje y trabaja, aunque ese equipo concreto se apague a continuación.&lt;/p&gt;&lt;p&gt;El problema es el acceso. El panel web de administración con el que se controla el agente no conviene exponerlo a la red pública sin más: quien lo conozca podría intentar usarlo. Aquí es donde entra &lt;strong&gt;Tailscale&lt;/strong&gt;, una red privada (VPN) basada en WireGuard que une varios equipos tuyos como si todos estuvieran en la misma LAN. La elección es sencilla:&lt;/p&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Opción&lt;/th&gt;&lt;th&gt;Problema&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Exponer el dashboard en &lt;code&gt;0.0.0.0&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Cualquiera con la IP y el puerto puede intentar entrar. Mal plan.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Escuchar solo en &lt;code&gt;localhost&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Solo accesible desde el propio VPS; puede llegar a usarse estableciendo un túnel SSH, pero es incómodo para el día a día.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;strong&gt;Tailscale&lt;/strong&gt;&lt;/td&gt;&lt;td&gt;Solo los equipos de tu &lt;em&gt;tailnet&lt;/em&gt; alcanzan el dashboard. Secreto de red por defecto.&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p&gt;Con Tailscale el agente se usa por &lt;code&gt;http://&amp;lt;IP-privada&amp;gt;:9119&lt;/code&gt; desde cualquier dispositivo tuyo, y nada más. La seguridad la pone la red privada, no la esperanza de que nadie encuentre un puerto.&lt;/p&gt;&lt;h2 id=&#34;como-se-ha-configurado&#34;&gt;Cómo se ha configurado&lt;a class=&#34;headerlink&#34; href=&#34;#como-se-ha-configurado&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;En este apartado resumo lo esencial del montaje. En mi experiencia la parte más delicada no es instalar, sino entender qué pieza habla con quién.&lt;/p&gt;&lt;h3 id=&#34;el-modelo-principal-y-las-tools&#34;&gt;El modelo principal y las &lt;em&gt;tools&lt;/em&gt;&lt;a class=&#34;headerlink&#34; href=&#34;#el-modelo-principal-y-las-tools&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;Un punto que conviene tener claro desde el principio: el modelo de razonamiento y las herramientas delegadas son dos cosas separadas. El agente usa un modelo para razonar, pero muchas de sus herramientas (búsqueda web, generación de imágenes, texto a voz, automatización de navegador) se sirven a través de servicios externos.&lt;/p&gt;&lt;p&gt;En esta configuración:&lt;/p&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Pieza&lt;/th&gt;&lt;th&gt;De dónde sale&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Modelo de razonamiento&lt;/td&gt;&lt;td&gt;&lt;strong&gt;OpenCode Go&lt;/strong&gt;, como &lt;em&gt;router&lt;/em&gt; de modelos, con una sola API key.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Tools delegadas (web, imagen, voz, navegador)&lt;/td&gt;&lt;td&gt;&lt;strong&gt;Nous Portal&lt;/strong&gt;, la cuenta de Nous, que actúa como puerta de acceso (&lt;em&gt;gateway&lt;/em&gt;) a Firecrawl, FAL, OpenAI Audio y Browser Use.&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p&gt;Ambas conviven sin conflicto: el modelo razona desde un sitio y las herramientas se sirven desde otro. Es un matiz que merece la pena conocer porque, si se prescinde de la cuenta de Nous, las herramientas delegadas dejan de funcionar y hay que reconfigurarlas con otros servicios. Es posible, pero obliga a explorar numerosas alternativas gratuitas que en mi experiencia no han rendido tan bien (sobre todo el TTS) como las tools predeterminadas que carga la cuenta Free de Nous.&lt;/p&gt;&lt;h3 id=&#34;los-pasos-en-una-sola-pasada&#34;&gt;Los pasos, en una sola pasada&lt;a class=&#34;headerlink&#34; href=&#34;#los-pasos-en-una-sola-pasada&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;Me gusta dejar también el procedimiento condensado para poder repetirlo en otra máquina sin pensarlo dos veces:&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 1&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 2&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 3&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 4&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 5&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 6&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 7&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 8&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 9&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;10&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;11&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;12&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;13&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;14&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;15&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;16&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;17&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;18&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;19&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;20&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;21&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;22&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;23&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;24&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;25&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;26&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;27&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;28&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;29&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;30&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&#34;c1&#34;&gt;# 1. Instalar Hermes Agent&lt;/span&gt;curl&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-fsSL&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;https://hermes-agent.nousresearch.com/install.sh&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;bash&lt;span class=&#34;c1&#34;&gt;# 2. Modelo + terminal local (editar ~/.hermes/config.yaml)&lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;# model.provider: opencode-go, model.base_url: https://opencode.ai/zen/go/v1&lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;# terminal.backend: local, proxy.enabled: false&lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;# 3. Tailscale&lt;/span&gt;curl&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-fsSL&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;https://tailscale.com/install.sh&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;shsudo&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;tailscale&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;up&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;# → abrir la URL y confirmar el dispositivo&lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;# 4. Cuenta de Nous para las tools delegadas&lt;/span&gt;hermes&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;auth&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;add&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;nous&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;--no-browserhermes&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;config&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;set&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;web.backend&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;noushermes&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;config&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;set&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;tts.provider&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;noushermes&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;config&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;set&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;browser.cloud_provider&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;nous&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;--forcehermes&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;config&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;set&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;image_gen.provider&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;nous&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;--force&lt;span class=&#34;c1&#34;&gt;# 5. Credenciales del dashboard (en ~/.hermes/.env)&lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;# HERMES_DASHBOARD_BASIC_AUTH_USERNAME, _PASSWORD y _SECRET&lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;# 6. Dependencias del dashboard&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;cd&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;~/.hermes/hermes-agent.venv/bin/pip&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;install&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;hermes-agent[web,pty]&amp;quot;&lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;# 7. Servicio systemd (escucha solo en la IP de Tailscale, puerto 9119)&lt;/span&gt;systemctl&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;--user&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;daemon-reloadsystemctl&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;--user&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;enable&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;hermes-dashboard.servicesystemctl&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;--user&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;start&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;hermes-dashboard.servicesudo&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;loginctl&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;enable-linger&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$USER&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;El agente queda accesible en &lt;code&gt;http://&amp;lt;IP-de-Tailscale&amp;gt;:9119&lt;/code&gt;, protegido por una autenticación básica de usuario y contraseña.&lt;/p&gt;&lt;h3 id=&#34;el-dashboard-web&#34;&gt;El dashboard web&lt;a class=&#34;headerlink&#34; href=&#34;#el-dashboard-web&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;Hermes tiene un &lt;strong&gt;dashboard web&lt;/strong&gt; de administración desde donde se controla todo: canales de mensajería, catálogo de herramientas, memoria, y un chat incrustado. Se configura para que escuche únicamente en la IP de Tailscale del VPS, con lo que solo los dispositivos de tu &lt;em&gt;tailnet&lt;/em&gt; pueden alcanzarlo.&lt;/p&gt;&lt;div class=&#34;admonition tip&#34;&gt;&lt;p class=&#34;admonition-title&#34;&gt;El secreto de la autenticación&lt;/p&gt;&lt;p&gt;El dashboard usa una clave secreta (&lt;code&gt;HERMES_DASHBOARD_BASIC_AUTH_SECRET&lt;/code&gt;) para firmar las sesiones. Es obligatoria cuando el servidor escucha en una dirección que no es &lt;code&gt;localhost&lt;/code&gt;, y se genera con &lt;code&gt;openssl rand -base64 32&lt;/code&gt;. Si se cambia, hay que volver a iniciar sesión.&lt;/p&gt;&lt;/div&gt;&lt;div class=&#34;admonition warning&#34;&gt;&lt;p class=&#34;admonition-title&#34;&gt;Un detalle del navegador con acentos&lt;/p&gt;&lt;p&gt;Con Firefox, al escribir en el chat del dashboard las vocales acentuadas aparecían sueltas (el acento sin combinarse). Era un problema de composición de teclado (dead keys) con xterm.js, no del agente. Usar Brave resolvió el tema de forma fiable con el teclado español. Aunque poco después empecé a utilizar Hermes Desktop, así que tampoco fue un problema.&lt;/p&gt;&lt;/div&gt;&lt;h3 id=&#34;la-app-de-escritorio&#34;&gt;La app de escritorio&lt;a class=&#34;headerlink&#34; href=&#34;#la-app-de-escritorio&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;Además del navegador, existe &lt;strong&gt;Hermes Desktop&lt;/strong&gt;, una aplicación nativa (Electron) con chat, lista de sesiones, explorador de ficheros y soporte de arrastrar y soltar. Actúa como un cliente: se conecta al mismo backend que sirve el dashboard web del VPS y hereda la sesión y las credenciales, de modo que no es una instalación aislada sino una ventana más hacia el mismo agente.&lt;/p&gt;&lt;div class=&#34;admonition warning&#34;&gt;&lt;p class=&#34;admonition-title&#34;&gt;Un poco de terminología&lt;/p&gt;&lt;p&gt;En Hermes, &#34;gateway&#34; se usa en dos sentidos que conviene no confundir. El &lt;em&gt;gateway de mensajería&lt;/em&gt; (&lt;code&gt;hermes gateway&lt;/code&gt;) es el que integra Telegram, Discord, WhatsApp, etc. En cambio, cuando en Hermes Desktop se habla de &lt;em&gt;Remote gateway&lt;/em&gt; se refiere al propio backend que sirve el dashboard web. La app de escritorio se conecta al mismo host y puerto del dashboard; no hay un puerto separado.&lt;/p&gt;&lt;/div&gt;&lt;h4 id=&#34;instalacion&#34;&gt;Instalación&lt;a class=&#34;headerlink&#34; href=&#34;#instalacion&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h4&gt;&lt;p&gt;La instalación es la misma que la del agente, con el instalador oficial:&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;1&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;curl&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-fsSL&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;https://hermes-agent.nousresearch.com/install.sh&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;bash&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;El instalador gestiona el &lt;em&gt;venv&lt;/em&gt; y las dependencias de Python, y deja el ejecutable &lt;code&gt;hermes&lt;/code&gt; en &lt;code&gt;~/.local/bin&lt;/code&gt;. Un detalle que conviene vigilar es la versión de &lt;strong&gt;Node.js&lt;/strong&gt; que exigen las dependencias de la aplicación: deben ser &lt;strong&gt;22.18 o superior, o 24&lt;/strong&gt;, y Node 23 no vale. Si el equipo aporta un Node inadecuado (p. ej. el que instala &lt;code&gt;nvm&lt;/code&gt; por defecto), el instalador puede fallar con un error &lt;code&gt;EBADENGINE&lt;/code&gt;; la solución es fijar la versión válida con &lt;code&gt;nvm&lt;/code&gt; antes de proseguir:&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;1&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;nvm&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;install&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;m&#34;&gt;22&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;&amp;amp;&amp;amp;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;nvm&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;use&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;m&#34;&gt;22&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;h4 id=&#34;conexion-al-gateway-del-vps&#34;&gt;Conexión al gateway del VPS&lt;a class=&#34;headerlink&#34; href=&#34;#conexion-al-gateway-del-vps&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h4&gt;&lt;p&gt;Una vez arrancada con &lt;code&gt;hermes desktop&lt;/code&gt;, la conexión se declara desde &lt;strong&gt;Settings → Gateways → Add connection → Remote gateway&lt;/strong&gt;. Se rellena:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Name&lt;/strong&gt;: un nombre único, p. ej. &lt;code&gt;VPS Contabo&lt;/code&gt;.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Gateway URL&lt;/strong&gt;: &lt;code&gt;http://&amp;lt;IP-de-Tailscale-del-VPS&amp;gt;:9119&lt;/code&gt;.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;La ventaja de ir sobre Tailscale es que esa URL solo es alcanzable desde tu &lt;em&gt;tailnet&lt;/em&gt;; no hay que abrir ningún puerto al exterior. Tras pulsar &lt;strong&gt;Test&lt;/strong&gt; (debe responder &#34;Reachable&#34;) se inicia sesión con las mismas credenciales del dashboard.&lt;/p&gt;&lt;h4 id=&#34;el-lanzador-desktop-y-un-problema-en-linux&#34;&gt;El lanzador &lt;code&gt;.desktop&lt;/code&gt; y un problema en Linux&lt;a class=&#34;headerlink&#34; href=&#34;#el-lanzador-desktop-y-un-problema-en-linux&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h4&gt;&lt;p&gt;Hermes Desktop instala una entrada en el menú de aplicaciones (&lt;code&gt;~/.local/share/applications/hermes.desktop&lt;/code&gt;) con un icono, para poder arrancarla desde el cajón en lugar de la terminal. En las instalaciones Linux este lanzador me dio dos problemas que he tenido que corregir a mano, y que en el momento de escribir estas líneas siguen presentes en la versión que uso (quizá se resuelvan en el futuro, de modo que conviene documentarlos por si reaparecen).&lt;/p&gt;&lt;p&gt;El primero: el &lt;code&gt;.desktop&lt;/code&gt; que genera el propio Hermes apuntaba al intérprete de Python que instala &lt;code&gt;uv&lt;/code&gt; (&lt;code&gt;~/.local/share/uv/python/...&lt;/code&gt;), que no tiene las dependencias, en lugar de al &lt;em&gt;venv&lt;/em&gt; que sí las tiene; al ejecutarlo fallaba con &lt;code&gt;ModuleNotFoundError&lt;/code&gt;. Y como Hermes regenera el &lt;code&gt;.desktop&lt;/code&gt; en cada arranque, cualquier edición manual se perdía. La solución fue quitar el bit de ejecución del &lt;em&gt;script&lt;/em&gt; &lt;code&gt;hermes&lt;/code&gt; del repositorio para que el generador escogiera el &lt;em&gt;wrapper&lt;/em&gt; de &lt;code&gt;~/.local/bin&lt;/code&gt; (persistente, que ya resuelve el &lt;code&gt;venv&lt;/code&gt; correcto):&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;1&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;chmod&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-x&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;~/.hermes/hermes-agent/hermes&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;El segundo: el lanzador del menú ejecuta la aplicación sin cargar tu shell, así que el &lt;code&gt;PATH&lt;/code&gt; no tenía Node (el que aporta &lt;code&gt;nvm&lt;/code&gt;). Hermes Desktop necesitaba Node y abortaba en silencio. La corrección fue hacer que el &lt;em&gt;wrapper&lt;/em&gt; &lt;code&gt;hermes&lt;/code&gt; cargara &lt;code&gt;nvm&lt;/code&gt; (y fijara la versión 22) antes de invocar su intérprete:&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 1&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 2&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 3&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 4&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 5&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 6&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 7&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 8&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 9&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;10&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;cat&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&amp;gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;~/.local/bin/hermes&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;lt;&amp;lt;&amp;#39;EOF&amp;#39;&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;#!/usr/bin/env bash&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;unset PYTHONPATH&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;unset PYTHONHOME&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;export NVM_DIR=&amp;quot;$HOME/.nvm&amp;quot;&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;[ -s &amp;quot;$NVM_DIR/nvm.sh&amp;quot; ] &amp;amp;&amp;amp; . &amp;quot;$NVM_DIR/nvm.sh&amp;quot;&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;nvm use 22 --silent &amp;gt;/dev/null 2&amp;gt;&amp;amp;1 || true&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;exec &amp;quot;$HOME/.hermes/hermes-agent/venv/bin/python&amp;quot; &amp;quot;$HOME/.hermes/hermes-agent/hermes&amp;quot; &amp;quot;$@&amp;quot;&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;EOF&lt;/span&gt;chmod&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;m&#34;&gt;755&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;~/.local/bin/hermes&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;Tras esos dos pasos, el &lt;code&gt;Exec=&lt;/code&gt; del &lt;code&gt;.desktop&lt;/code&gt; queda apuntando al &lt;em&gt;wrapper&lt;/em&gt; (visible con &lt;code&gt;cat ~/.local/share/applications/hermes.desktop&lt;/code&gt;), que es lo que hace que el lanzador del menú funcione igual que la terminal.&lt;/p&gt;&lt;div class=&#34;admonition warning&#34;&gt;&lt;p class=&#34;admonition-title&#34;&gt;Tras cada &lt;code&gt;hermes update&lt;/code&gt;&lt;/p&gt;&lt;p&gt;La actualización hace &lt;code&gt;git checkout&lt;/code&gt; y restaura el bit de ejecución del &lt;em&gt;script&lt;/em&gt; &lt;code&gt;hermes&lt;/code&gt; del repositorio, con lo que el problema del &lt;code&gt;Exec&lt;/code&gt; puede volver. Basta con repetir el &lt;code&gt;chmod -x ~/.hermes/hermes-agent/hermes&lt;/code&gt;.&lt;/p&gt;&lt;/div&gt;&lt;h2 id=&#34;que-puedes-hacer-con-el&#34;&gt;Qué puedes hacer con él&lt;a class=&#34;headerlink&#34; href=&#34;#que-puedes-hacer-con-el&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Una vez montado, el agente deja de ser una curiosidad a la que se le pregunta de todo y pasa a ser un compañero de trabajo que:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Redacta y publica.&lt;/strong&gt; Puede tomar la documentación de una instalación, convertirla en un post para un blog y realizar el despliegue en el servidor.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Gestiona el sistema.&lt;/strong&gt; Deja que audite servicios, busque residuos de configuración (como una unidad de systemd huérfana) o limpie credenciales obsoletas.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Programa.&lt;/strong&gt; Edita código en el repositorio, genera o corrige ficheros y ejecuta los comandos de prueba.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Automatiza.&lt;/strong&gt; Lanza tareas programadas con entrega a las plataformas que tengas conectadas (un informe diario, una copia de seguridad, una comprobación periódica).&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Te habla.&lt;/strong&gt; Con síntesis de voz de calidad en español y transcripción de notas de voz, desde Telegram olvidas que detrás hay un servidor en un datacenter.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Todo eso se le pide en lenguaje natural, y trabaja mientras tú haces cualquier otra cosa.&lt;/p&gt;&lt;h2 id=&#34;conclusion&#34;&gt;Conclusión&lt;a class=&#34;headerlink&#34; href=&#34;#conclusion&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Hermes Agent es la pieza que completa el rompecabezas que empezamos en el artículo de OpenCode: si allí montamos un agente de programación &lt;em&gt;sobre tu equipo&lt;/em&gt;, aquí tenemos un agente autónomo &lt;em&gt;siempre disponible&lt;/em&gt; que vive en un VPS y atiende desde tus plataformas habituales. Es software libre, agnóstico respecto al modelo y con un circuito de aprendizaje que lo hace más útil con el paso de las sesiones.&lt;/p&gt;&lt;p&gt;El coste de entrada es cero (el agente en sí es gratuito y el modelo puede salir de una capa gratuita o de un router barato), a cambio de un panel de administración, una memoria persistente y la posibilidad de hablar con tu agente desde cualquier sitio. Si te gusta el desarrollo agéntico y no quieres depender de que tu equipo esté encendido, vale la pena dedicarle una tarde.&lt;/p&gt;</description><link>https://apuntes.eduardofilo.es/2026-08-23_hermes_agent_vps.html</link> <pubDate>Sun, 23 Aug 2026 20:30:00 +0200</pubDate><source url="https://apuntes.eduardofilo.es/rss.xml">Apuntes de eduardófilo</source><guid isPermaLink="true">https://apuntes.eduardofilo.es/2026-08-23_hermes_agent_vps.html</guid> </item> <item> <title>Hermes Agent on a VPS reachable through Tailscale</title> <description>&lt;p&gt;&lt;img alt=&#34;Hermes Agent on a VPS&#34; src=&#34;../images/posts/2026-08-23_hermes_agent_vps/hermes_agent.png&#34; /&gt;&lt;/p&gt;&lt;p&gt;The previous article on this blog described how to build a complete agentic development environment with OpenCode, OmniRoute, and Ponytail. That setup gave you a coding agent in the terminal, powered by a model &lt;em&gt;router&lt;/em&gt; that drew on the free tiers of dozens of providers and tamed by a &lt;em&gt;skill&lt;/em&gt; that trims over-engineering. But an agent that connects to a model provider over the API still has a weak point: it depends on your development machine and on that machine being turned on.&lt;/p&gt;&lt;p&gt;That is precisely the gap that &lt;a href=&#34;https://hermes-agent.nousresearch.com/&#34;&gt;&lt;strong&gt;Hermes Agent&lt;/strong&gt;&lt;/a&gt; fills. It is an &lt;strong&gt;autonomous, general-purpose agent&lt;/strong&gt; that lives wherever you decide (a VPS, your home server, a Raspberry Pi) and that you talk to from anywhere. In this article I will explain what it is, why it is worth trying, and how we have installed and configured it on a VPS reachable through a private Tailscale network.&lt;/p&gt;&lt;h2 id=&#34;what-hermes-agent-is&#34;&gt;What Hermes Agent is&lt;a class=&#34;headerlink&#34; href=&#34;#what-hermes-agent-is&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Hermes Agent is an open-source AI agent framework created by &lt;strong&gt;Nous Research&lt;/strong&gt;, the lab behind the Hermes models. It runs in the terminal, in a desktop application, in a web dashboard, and on messaging platforms, always with the same agentic core. Across a conversation it can read and edit files, run commands, search your session history, launch scheduled tasks, or delegate subtasks to subagents, all using real tools over the system where it runs.&lt;/p&gt;&lt;p&gt;Three properties set it apart from most alternatives:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Persistent learning across sessions.&lt;/strong&gt; It keeps memory that spans sessions and creates reusable &lt;em&gt;skills&lt;/em&gt; from experience: if it solves a tricky task, it can save the procedure to reuse later.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Model-agnostic.&lt;/strong&gt; It works with OpenRouter, Anthropic, OpenAI, DeepSeek, xAI, local models, and more than twenty providers. Switching models requires no code changes. This fits the provider-independence philosophy we explored in the OmniRoute article.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Multi-surface.&lt;/strong&gt; The same agent serves Telegram, Discord, Slack, WhatsApp, the CLI, the desktop app, or the web dashboard. It is where you are; it does not force you into a specific tool.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;It is not a &lt;em&gt;coding copilot&lt;/em&gt; tied to an IDE: it is an agent that operates on a system, and that you can leave working in the background while you do something else.&lt;/p&gt;&lt;h2 id=&#34;why-a-vps-and-why-tailscale&#34;&gt;Why a VPS and why Tailscale&lt;a class=&#34;headerlink&#34; href=&#34;#why-a-vps-and-why-tailscale&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;The most comfortable way to have an always-available agent is to run it on a &lt;strong&gt;VPS&lt;/strong&gt;. A server running 24/7, with a public or private-network IP, becomes the agent&#39;s home. From anywhere (your desktop, the laptop in the kitchen, your phone) you send it a message and it works, even if that particular device is off.&lt;/p&gt;&lt;p&gt;The issue is access. The web admin panel used to control the agent should not be exposed to the public internet casually: anyone who knows it could try to use it. This is where &lt;strong&gt;Tailscale&lt;/strong&gt; comes in, a private network (VPN) based on WireGuard that joins several of your machines as if they were all on the same LAN. The choice is simple:&lt;/p&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Option&lt;/th&gt;&lt;th&gt;Problem&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Expose the dashboard on &lt;code&gt;0.0.0.0&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Anyone with the IP and port can try to get in. Bad idea.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Listen only on &lt;code&gt;localhost&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Reachable only from the VPS itself; can be accessed remotely by setting up an SSH tunnel, but it is inconvenient for daily use.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;strong&gt;Tailscale&lt;/strong&gt;&lt;/td&gt;&lt;td&gt;Only the devices in your &lt;em&gt;tailnet&lt;/em&gt; can reach the dashboard. Network secrecy by default.&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p&gt;With Tailscale the agent is used at &lt;code&gt;http://&amp;lt;private-IP&amp;gt;:9119&lt;/code&gt; from any of your devices, and nothing else. The security is provided by the private network, not by the hope that nobody finds a port.&lt;/p&gt;&lt;h2 id=&#34;how-it-has-been-configured&#34;&gt;How it has been configured&lt;a class=&#34;headerlink&#34; href=&#34;#how-it-has-been-configured&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;In this section I summarize the essentials of the setup. In my experience the trickiest part is not installing but understanding which piece talks to which.&lt;/p&gt;&lt;h3 id=&#34;the-main-model-and-the-tools&#34;&gt;The main model and the &lt;em&gt;tools&lt;/em&gt;&lt;a class=&#34;headerlink&#34; href=&#34;#the-main-model-and-the-tools&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;A point worth clarifying from the start: the reasoning model and the delegated tools are two separate things. The agent uses a model to reason, but many of its tools (web search, image generation, text-to-speech, browser automation) are served through external services.&lt;/p&gt;&lt;p&gt;In this configuration:&lt;/p&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Piece&lt;/th&gt;&lt;th&gt;Where it comes from&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Reasoning model&lt;/td&gt;&lt;td&gt;&lt;strong&gt;OpenCode Go&lt;/strong&gt;, as a model &lt;em&gt;router&lt;/em&gt;, with a single API key.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Delegated tools (web, image, voice, browser)&lt;/td&gt;&lt;td&gt;&lt;strong&gt;Nous Portal&lt;/strong&gt;, the Nous account, which acts as a &lt;em&gt;gateway&lt;/em&gt; to Firecrawl, FAL, OpenAI Audio, and Browser Use.&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p&gt;Both coexist without conflict: the model reasons from one place and the tools are served from another. This is a nuance worth knowing because, if you drop the Nous account, the delegated tools stop working and must be reconfigured with alternative services. It is possible, but it forces you to explore numerous free alternatives that, in my experience, have not performed as well (especially the TTS) as the default tools loaded by the Nous Free account.&lt;/p&gt;&lt;h3 id=&#34;the-steps-in-one-pass&#34;&gt;The steps, in one pass&lt;a class=&#34;headerlink&#34; href=&#34;#the-steps-in-one-pass&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;I also like to leave the procedure condensed so I can repeat it on another machine without thinking twice:&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 1&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 2&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 3&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 4&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 5&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 6&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 7&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 8&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 9&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;10&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;11&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;12&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;13&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;14&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;15&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;16&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;17&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;18&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;19&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;20&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;21&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;22&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;23&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;24&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;25&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;26&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;27&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;28&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;29&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;30&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&#34;c1&#34;&gt;# 1. Install Hermes Agent&lt;/span&gt;curl&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-fsSL&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;https://hermes-agent.nousresearch.com/install.sh&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;bash&lt;span class=&#34;c1&#34;&gt;# 2. Model + local terminal (edit ~/.hermes/config.yaml)&lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;# model.provider: opencode-go, model.base_url: https://opencode.ai/zen/go/v1&lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;# terminal.backend: local, proxy.enabled: false&lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;# 3. Tailscale&lt;/span&gt;curl&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-fsSL&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;https://tailscale.com/install.sh&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;shsudo&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;tailscale&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;up&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;# → open the URL and confirm the device&lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;# 4. Nous account for the delegated tools&lt;/span&gt;hermes&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;auth&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;add&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;nous&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;--no-browserhermes&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;config&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;set&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;web.backend&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;noushermes&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;config&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;set&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;tts.provider&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;noushermes&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;config&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;set&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;browser.cloud_provider&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;nous&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;--forcehermes&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;config&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;set&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;image_gen.provider&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;nous&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;--force&lt;span class=&#34;c1&#34;&gt;# 5. Dashboard credentials (in ~/.hermes/.env)&lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;# HERMES_DASHBOARD_BASIC_AUTH_USERNAME, _PASSWORD and _SECRET&lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;# 6. Dashboard dependencies&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;cd&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;~/.hermes/hermes-agent.venv/bin/pip&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;install&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;hermes-agent[web,pty]&amp;quot;&lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;# 7. systemd service (listens only on the Tailscale IP, port 9119)&lt;/span&gt;systemctl&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;--user&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;daemon-reloadsystemctl&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;--user&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;enable&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;hermes-dashboard.servicesystemctl&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;--user&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;start&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;hermes-dashboard.servicesudo&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;loginctl&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;enable-linger&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$USER&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;The agent ends up reachable at &lt;code&gt;http://&amp;lt;Tailscale-IP&amp;gt;:9119&lt;/code&gt;, protected by basic username/password authentication.&lt;/p&gt;&lt;h3 id=&#34;the-web-dashboard&#34;&gt;The web dashboard&lt;a class=&#34;headerlink&#34; href=&#34;#the-web-dashboard&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;Hermes has a &lt;strong&gt;web dashboard&lt;/strong&gt; for administration where you control everything: messaging channels, tool catalog, memory, and an embedded chat. It is configured to listen only on the VPS&#39;s Tailscale IP, so only the devices on your &lt;em&gt;tailnet&lt;/em&gt; can reach it.&lt;/p&gt;&lt;div class=&#34;admonition tip&#34;&gt;&lt;p class=&#34;admonition-title&#34;&gt;The authentication secret&lt;/p&gt;&lt;p&gt;The dashboard uses a secret key (&lt;code&gt;HERMES_DASHBOARD_BASIC_AUTH_SECRET&lt;/code&gt;) to sign sessions. It is required when the server listens on a non-&lt;code&gt;localhost&lt;/code&gt; address, and is generated with &lt;code&gt;openssl rand -base64 32&lt;/code&gt;. If it changes, you must log in again.&lt;/p&gt;&lt;/div&gt;&lt;div class=&#34;admonition warning&#34;&gt;&lt;p class=&#34;admonition-title&#34;&gt;A browser detail with accented characters&lt;/p&gt;&lt;p&gt;With Firefox, typing accented vowels in the dashboard chat produced detached accents (the accent without combining). It was a keyboard composition (dead keys) problem with xterm.js, not the agent. Using Brave fixed it reliably with the Spanish layout. Later I started using Hermes Desktop, so it wasn&#39;t a problem anymore.&lt;/p&gt;&lt;/div&gt;&lt;h3 id=&#34;the-desktop-app&#34;&gt;The desktop app&lt;a class=&#34;headerlink&#34; href=&#34;#the-desktop-app&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;Beyond the browser, there is &lt;strong&gt;Hermes Desktop&lt;/strong&gt;, a native (Electron) application with chat, a session list, a file browser, and drag-and-drop support. It acts as a client: it connects to the same backend that serves the VPS web dashboard and inherits the session and credentials, so it is not an isolated install but one more window onto the same agent.&lt;/p&gt;&lt;div class=&#34;admonition warning&#34;&gt;&lt;p class=&#34;admonition-title&#34;&gt;A touch of terminology&lt;/p&gt;&lt;p&gt;In Hermes, &#34;gateway&#34; is used in two senses worth not confusing. The &lt;em&gt;messaging gateway&lt;/em&gt; (&lt;code&gt;hermes gateway&lt;/code&gt;) is what integrates Telegram, Discord, WhatsApp, etc. On the other hand, when Hermes Desktop talks about a &lt;em&gt;Remote gateway&lt;/em&gt; it refers to the very backend that serves the web dashboard. The desktop app connects to the same host and port as the dashboard; there is no separate port.&lt;/p&gt;&lt;/div&gt;&lt;h4 id=&#34;installation&#34;&gt;Installation&lt;a class=&#34;headerlink&#34; href=&#34;#installation&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h4&gt;&lt;p&gt;Installation is the same as the agent itself, using the official installer:&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;1&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;curl&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-fsSL&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;https://hermes-agent.nousresearch.com/install.sh&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;bash&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;The installer manages the &lt;em&gt;venv&lt;/em&gt; and Python dependencies, and leaves the &lt;code&gt;hermes&lt;/code&gt; executable in &lt;code&gt;~/.local/bin&lt;/code&gt;. One detail worth watching is the &lt;strong&gt;Node.js&lt;/strong&gt; version required by the application dependencies: they need &lt;strong&gt;22.18 or newer, or 24&lt;/strong&gt;, and Node 23 does not work. If the machine provides an unsuitable Node (e.g. the one &lt;code&gt;nvm&lt;/code&gt; installs by default), the installer may fail with an &lt;code&gt;EBADENGINE&lt;/code&gt; error; the fix is to pin a valid version with &lt;code&gt;nvm&lt;/code&gt; before continuing:&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;1&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;nvm&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;install&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;m&#34;&gt;22&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;&amp;amp;&amp;amp;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;nvm&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;use&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;m&#34;&gt;22&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;h4 id=&#34;connecting-to-the-vps-gateway&#34;&gt;Connecting to the VPS gateway&lt;a class=&#34;headerlink&#34; href=&#34;#connecting-to-the-vps-gateway&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h4&gt;&lt;p&gt;Once launched with &lt;code&gt;hermes desktop&lt;/code&gt;, the connection is declared from &lt;strong&gt;Settings → Gateways → Add connection → Remote gateway&lt;/strong&gt;. Fill in:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Name&lt;/strong&gt;: a unique name, e.g. &lt;code&gt;VPS Contabo&lt;/code&gt;.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Gateway URL&lt;/strong&gt;: &lt;code&gt;http://&amp;lt;Tailscale-IP-of-VPS&amp;gt;:9119&lt;/code&gt;.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;The advantage of going over Tailscale is that this URL is only reachable from your &lt;em&gt;tailnet&lt;/em&gt;; no port needs to be opened to the outside. After pressing &lt;strong&gt;Test&lt;/strong&gt; (it should answer &#34;Reachable&#34;) you sign in with the same dashboard credentials.&lt;/p&gt;&lt;h4 id=&#34;the-desktop-launcher-and-a-linux-issue&#34;&gt;The &lt;code&gt;.desktop&lt;/code&gt; launcher and a Linux issue&lt;a class=&#34;headerlink&#34; href=&#34;#the-desktop-launcher-and-a-linux-issue&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h4&gt;&lt;p&gt;Hermes Desktop installs a launcher entry in the application menu (&lt;code&gt;~/.local/share/applications/hermes.desktop&lt;/code&gt;) with an icon, so you can start it from the application dock instead of the terminal. On Linux installs this launcher gave me two problems that I had to fix by hand, and which at the time of writing are still present in the version I use (they may be resolved in the future, so it is worth documenting them in case they come back).&lt;/p&gt;&lt;p&gt;The first: the &lt;code&gt;.desktop&lt;/code&gt; generated by Hermes itself pointed to the Python interpreter that &lt;code&gt;uv&lt;/code&gt; installs (&lt;code&gt;~/.local/share/uv/python/...&lt;/code&gt;), which does not have the dependencies, instead of to the &lt;em&gt;venv&lt;/em&gt; that does; running it failed with &lt;code&gt;ModuleNotFoundError&lt;/code&gt;. And because Hermes regenerates the &lt;code&gt;.desktop&lt;/code&gt; on every launch, any manual edit was lost. The fix was to remove the execute bit from the &lt;em&gt;script&lt;/em&gt; &lt;code&gt;hermes&lt;/code&gt; in the repository so the generator picks the persistent &lt;code&gt;~/.local/bin&lt;/code&gt; &lt;em&gt;wrapper&lt;/em&gt; (which already resolves the correct &lt;em&gt;venv&lt;/em&gt;):&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;1&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;chmod&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-x&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;~/.hermes/hermes-agent/hermes&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;The second: the menu launcher runs the application without loading your shell, so the &lt;code&gt;PATH&lt;/code&gt; had no Node (the one provided by &lt;code&gt;nvm&lt;/code&gt;). Hermes Desktop needed Node and aborted silently. The fix was to make the &lt;code&gt;hermes&lt;/code&gt; &lt;em&gt;wrapper&lt;/em&gt; load &lt;code&gt;nvm&lt;/code&gt; (and pin version 22) before calling its interpreter:&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 1&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 2&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 3&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 4&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 5&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 6&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 7&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 8&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 9&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;10&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;cat&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&amp;gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;~/.local/bin/hermes&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;lt;&amp;lt;&amp;#39;EOF&amp;#39;&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;#!/usr/bin/env bash&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;unset PYTHONPATH&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;unset PYTHONHOME&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;export NVM_DIR=&amp;quot;$HOME/.nvm&amp;quot;&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;[ -s &amp;quot;$NVM_DIR/nvm.sh&amp;quot; ] &amp;amp;&amp;amp; . &amp;quot;$NVM_DIR/nvm.sh&amp;quot;&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;nvm use 22 --silent &amp;gt;/dev/null 2&amp;gt;&amp;amp;1 || true&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;exec &amp;quot;$HOME/.hermes/hermes-agent/venv/bin/python&amp;quot; &amp;quot;$HOME/.hermes/hermes-agent/hermes&amp;quot; &amp;quot;$@&amp;quot;&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;EOF&lt;/span&gt;chmod&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;m&#34;&gt;755&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;~/.local/bin/hermes&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;After those two steps the &lt;code&gt;Exec=&lt;/code&gt; of the &lt;code&gt;.desktop&lt;/code&gt; ends up pointing at the &lt;em&gt;wrapper&lt;/em&gt; (visible with &lt;code&gt;cat ~/.local/share/applications/hermes.desktop&lt;/code&gt;), which is what makes the menu launcher work just like the terminal.&lt;/p&gt;&lt;div class=&#34;admonition warning&#34;&gt;&lt;p class=&#34;admonition-title&#34;&gt;After every &lt;code&gt;hermes update&lt;/code&gt;&lt;/p&gt;&lt;p&gt;The update does a &lt;code&gt;git checkout&lt;/code&gt; and restores the execute bit of the &lt;code&gt;hermes&lt;/code&gt; script in the repository, so the &lt;code&gt;Exec&lt;/code&gt; problem can return. Simply repeat &lt;code&gt;chmod -x ~/.hermes/hermes-agent/hermes&lt;/code&gt;.&lt;/p&gt;&lt;/div&gt;&lt;h2 id=&#34;what-you-can-do-with-it&#34;&gt;What you can do with it&lt;a class=&#34;headerlink&#34; href=&#34;#what-you-can-do-with-it&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Once set up, the agent stops being a curiosity you ask about everything and becomes a workmate that:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Writes and publishes.&lt;/strong&gt; It can take the documentation of an installation and turn it into a post for a blog and deploy it to the server.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Manages the system.&lt;/strong&gt; Have it audit services, look for configuration residue (such as an orphaned systemd unit) or clean up stale credentials.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Programs.&lt;/strong&gt; It edits code in the repository, generates or fixes files, and runs the test commands.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Automates.&lt;/strong&gt; It launches scheduled tasks delivered to the platforms you have connected (a daily report, a backup, a periodic check).&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Talks to you.&lt;/strong&gt; With quality Spanish text-to-speech and voice-note transcription, from Telegram you forget that behind it there is a server in a datacenter.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;All of this is requested in natural language, and it works while you do anything else.&lt;/p&gt;&lt;h2 id=&#34;conclusion&#34;&gt;Conclusion&lt;a class=&#34;headerlink&#34; href=&#34;#conclusion&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Hermes Agent is the piece that completes the puzzle we started in the OpenCode article: if there we built a coding agent &lt;em&gt;on your machine&lt;/em&gt;, here we have an autonomous, &lt;em&gt;always-available&lt;/em&gt; agent that lives on a VPS and answers from your usual platforms. It is free software, model-agnostic, and with a learning loop that makes it more useful as sessions go by.&lt;/p&gt;&lt;p&gt;The entry cost is zero (the agent itself is free and the model can come from a free tier or a cheap router), in exchange for an admin panel, persistent memory, and the ability to talk to your agent from anywhere. If you like agentic development and do not want to depend on your machine being on, it is worth an afternoon.&lt;/p&gt;</description><link>https://apuntes.eduardofilo.es/en/2026-08-23_hermes_agent_vps.html</link> <pubDate>Sun, 23 Aug 2026 20:30:00 +0200</pubDate><source url="https://apuntes.eduardofilo.es/rss.xml">Apuntes de eduardófilo</source><guid isPermaLink="true">https://apuntes.eduardofilo.es/en/2026-08-23_hermes_agent_vps.html</guid> </item> <item> <title>Instalación OpenCode, OmniRoute y Ponytail</title> <description>&lt;p&gt;&lt;img alt=&#34;OpenCode + OmniRoute&#34; src=&#34;images/posts/2026-07-26_opencode_omniroute/opencode_omniroute.png&#34; /&gt;&lt;/p&gt;&lt;div class=&#34;admonition note&#34;&gt;&lt;p class=&#34;admonition-title&#34;&gt;FreeLLMAPI&lt;/p&gt;&lt;p&gt;Una alternativa, también ejecutable en nuestra máquina, conocida después de escribir el artículo y especializada en enrutar modelos gratuitos, es &lt;a href=&#34;https://freellmapi.co/es/&#34;&gt;FreeLLMAPI&lt;/a&gt;. En &lt;a href=&#34;https://youtu.be/7Oez8kmknOA&#34;&gt;este vídeo&lt;/a&gt; puede verse una descripción y tutorial de configuración.&lt;/p&gt;&lt;/div&gt;&lt;p&gt;El desarrollo asistido por IA empezó siendo un autocompletado inteligente del código a nivel de línea. Pasó a ser una &#34;segunda opinión&#34; que revisaba el código a nivel de fichero y sugería cambios. En los últimos dos años se ha dado un importante paso más allá hasta llegar al paradigma actual, el &lt;em&gt;desarrollo agéntico&lt;/em&gt;: un agente que trabaja a nivel de proyecto, edita ficheros, ejecuta comandos, realiza por sí solo los cambios que antes solo se sugerían, lanza los tests e itera hasta cerrar la tarea. El problema es que todas las herramientas comerciales de este tipo (Claude Code, Cursor, Devin, Copilot, Codex, etc.) comparten dos limitaciones: una suscripción mensual y unas cuotas que se agotan justo cuando la sesión se está poniendo interesante. Porque aquí no consideramos el uso por medio de API que para el ámbito personal resulta inasequible.&lt;/p&gt;&lt;p&gt;Hay además un tercer problema, más silencioso pero también caro: los agentes tienden a &lt;strong&gt;sobre-construir&lt;/strong&gt;. Se les pide un selector de fechas y acaban instalando una librería, escribiendo un componente envoltorio y una hoja de estilos. Cada línea de más se paga dos veces, en tokens al generarla y en tokens cada vez que vuelve a entrar en el contexto.&lt;/p&gt;&lt;p&gt;En este artículo se describe cómo montar un entorno de desarrollo agéntico completo combinando tres proyectos de código abierto que resuelven precisamente estas limitaciones:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;a href=&#34;https://opencode.ai/&#34;&gt;&lt;strong&gt;OpenCode&lt;/strong&gt;&lt;/a&gt;: el agente de programación en terminal.&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://omniroute.online/&#34;&gt;&lt;strong&gt;OmniRoute&lt;/strong&gt;&lt;/a&gt;: el router/gateway de modelos que alimenta al agente.&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://github.com/DietrichGebert/ponytail&#34;&gt;&lt;strong&gt;Ponytail&lt;/strong&gt;&lt;/a&gt;: el &lt;em&gt;skill&lt;/em&gt; que impone al agente disciplina de código mínimo.&lt;/li&gt;&lt;/ul&gt;&lt;h2 id=&#34;descripcion-de-los-productos&#34;&gt;Descripción de los productos&lt;a class=&#34;headerlink&#34; href=&#34;#descripcion-de-los-productos&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;&lt;h3 id=&#34;opencode&#34;&gt;OpenCode&lt;a class=&#34;headerlink&#34; href=&#34;#opencode&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;OpenCode es un agente de programación que se ejecuta en la terminal (TUI), de código abierto y, lo más importante para nuestro propósito, agnóstico respecto al proveedor de modelos. A diferencia de Claude Code (atado a Anthropic) o Codex (atado a OpenAI), OpenCode permite configurar cualquier proveedor, incluidos los que exponen una API compatible con OpenAI, que a día de hoy son prácticamente todos.&lt;/p&gt;&lt;p&gt;Sus características principales:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Interfaz de terminal con sesiones persistentes, gestión de contexto y &lt;em&gt;undo&lt;/em&gt; de los cambios aplicados.&lt;/li&gt;&lt;li&gt;Acceso a herramientas: lectura y escritura de ficheros, ejecución de comandos, búsqueda en el repositorio, control de versiones.&lt;/li&gt;&lt;li&gt;Fichero de contexto por proyecto (&lt;code&gt;AGENTS.md&lt;/code&gt;) que se genera con &lt;code&gt;/init&lt;/code&gt; y que sirve para instruir al agente sobre las convenciones del repositorio.&lt;/li&gt;&lt;li&gt;Soporte de MCP (&lt;em&gt;Model Context Protocol&lt;/em&gt;) para añadir herramientas externas.&lt;/li&gt;&lt;li&gt;Modo CLI no interactivo (&lt;code&gt;opencode run &#34;...&#34;&lt;/code&gt;) para automatizaciones y scripts.&lt;/li&gt;&lt;li&gt;Agentes especializados y modos de trabajo (por ejemplo un modo &lt;em&gt;plan&lt;/em&gt; que no hace cambios pensado para la fase de planificación previa).&lt;/li&gt;&lt;/ul&gt;&lt;h3 id=&#34;omniroute&#34;&gt;OmniRoute&lt;a class=&#34;headerlink&#34; href=&#34;#omniroute&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;OmniRoute es un &lt;em&gt;gateway&lt;/em&gt; de IA local y de código abierto. Se instala en la propia máquina (o en un VPS), levanta un endpoint compatible con la API de OpenAI y un panel web de administración, y desde ahí enruta cada petición hacia cualquiera de los cientos de proveedores que tiene catalogados, de los que unos 90 disponen de capa gratuita.&lt;/p&gt;&lt;p&gt;Lo interesante es lo que hace con el catálogo:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Enrutado automático&lt;/strong&gt;: usando el modelo virtual &lt;code&gt;auto&lt;/code&gt;, OmniRoute construye un &lt;em&gt;combo&lt;/em&gt; con los proveedores que tengamos conectados y elige uno en cada petición según su puntuación en vivo. Existen variantes: &lt;code&gt;auto/coding&lt;/code&gt; (calidad para generar código), &lt;code&gt;auto/fast&lt;/code&gt; (menor latencia), &lt;code&gt;auto/cheap&lt;/code&gt; (menor coste por token) y &lt;code&gt;auto/offline&lt;/code&gt; (mayor margen de cuota disponible).&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Fallback en cascada&lt;/strong&gt;: cuando un proveedor devuelve un error de cuota, un &lt;em&gt;rate limit&lt;/em&gt; o un 4xx-5xx, la petición se reintenta contra el siguiente proveedor de la lista de forma transparente para el cliente. Esto es lo que evita el clásico &#34;se acabó tu cuota, vuelve en cinco horas&#34;.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Compresión de contexto&lt;/strong&gt;: una batería de motores que recortan el prompt (deduplicación, poda de historial, compactado de ficheros) y que permiten ahorros importantes de tokens, especialmente valiosos cuando se trabaja contra capas gratuitas medidas en tokens/día.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Panel de control&lt;/strong&gt; en &lt;code&gt;http://localhost:20128&lt;/code&gt; con estadísticas de uso por proveedor, gestión de claves API y configuración asistida de las herramientas CLI más habituales.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Local-first&lt;/strong&gt;: las claves de los proveedores y el tráfico se quedan en la máquina; OmniRoute no es un servicio en la nube al que haya que suscribirse.&lt;/li&gt;&lt;/ul&gt;&lt;h3 id=&#34;ponytail&#34;&gt;Ponytail&lt;a class=&#34;headerlink&#34; href=&#34;#ponytail&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;Ponytail es un &lt;strong&gt;&lt;em&gt;skill&lt;/em&gt;&lt;/strong&gt;, es decir un conjunto de instrucciones que se inyectan en el contexto del agente en cada turno para modificar su comportamiento. Su cometido es uno solo, combatir la sobre-ingeniería, y lo hace obligando al agente a recorrer una escalera de decisión antes de escribir una sola línea, deteniéndose en el primer peldaño que resuelva el problema:&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;3&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;4&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;5&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;6&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;7&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;1. ¿Esto necesita existir? → no: no lo hagas (YAGNI)2. ¿Ya está en este repositorio? → reutilízalo, no lo reescribas3. ¿Lo hace la librería estándar? → úsala4. ¿Es una función nativa de la plataforma? → úsala5. ¿Hay una dependencia ya instalada? → úsala6. ¿Cabe en una línea? → una línea7. Solo entonces: lo mínimo que funcione&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;El ejemplo canónico del proyecto, al que hacíamos referencia en la introducción, lo resume bien: ante la petición de un selector de fechas, el resultado deja de ser una librería más un componente y pasa a ser, gracias a Ponytail, &lt;code&gt;&amp;lt;input type=&#34;date&#34;&amp;gt;&lt;/code&gt;.&lt;/p&gt;&lt;p&gt;Dos matices:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;La escalera se aplica &lt;strong&gt;después&lt;/strong&gt; de entender el problema, no en lugar de entenderlo. El agente sigue obligado a leer el código afectado y a seguir el flujo real antes de elegir peldaño. Perezoso con la solución, nunca con la lectura.&lt;/li&gt;&lt;li&gt;Hay cuatro cosas que nunca se recortan: validación en las fronteras de confianza, gestión de pérdida de datos, seguridad y accesibilidad. La regla es &#34;solo lo que la tarea necesita&#34;.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Según el &lt;em&gt;benchmark&lt;/em&gt; que publica el proyecto (sesiones reales de un agente sobre un repositorio FastAPI + React, con y sin el &lt;em&gt;skill&lt;/em&gt;), los resultados frente a la línea base son un 54% menos de líneas de código, un 22% menos de tokens, un 20% menos de coste y un 27% menos de tiempo, sin penalización en las comprobaciones de seguridad. Como siempre con los &lt;em&gt;benchmarks&lt;/em&gt;, conviene tomarlos como orden de magnitud y no como promesa: el ahorro es enorme donde hay una trampa clara de sobre-construcción y casi nulo donde el código ya era mínimo.&lt;/p&gt;&lt;p&gt;Ponytail funciona en un buen número de agentes (Claude Code, Codex, Copilot CLI, Gemini CLI, Cursor, Devin...), y OpenCode es uno de los que tiene soporte de primera clase mediante &lt;em&gt;plugin&lt;/em&gt;.&lt;/p&gt;&lt;h3 id=&#34;el-valor-de-la-combinacion&#34;&gt;El valor de la combinación&lt;a class=&#34;headerlink&#34; href=&#34;#el-valor-de-la-combinacion&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;Por separado cada pieza es útil, pero es al combinarlas cuando desaparecen las limitaciones que mencionábamos al principio. Cada una cubre una capa distinta y no se solapan: OmniRoute decide quién responde, OpenCode decide qué se hace, y Ponytail decide cuánto código se escribe.&lt;/p&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Problema&lt;/th&gt;&lt;th&gt;Cómo lo resuelve la combinación&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Suscripción mensual&lt;/td&gt;&lt;td&gt;OpenCode es gratuito y OmniRoute se conecta a capas gratuitas de decenas de proveedores. El coste de entrada es 0 €.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Agotamiento de cuota&lt;/td&gt;&lt;td&gt;El fallback de OmniRoute salta al siguiente proveedor sin interrumpir la sesión del agente.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Dependencia de un proveedor&lt;/td&gt;&lt;td&gt;El agente solo conoce un endpoint (&lt;code&gt;localhost:20128/v1&lt;/code&gt;); cambiar de modelo o de proveedor no requiere tocar el agente.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Consumo excesivo de tokens&lt;/td&gt;&lt;td&gt;Los motores de compresión de OmniRoute reducen el tamaño de los prompts que envía el agente, que suelen ser grandes por el contexto del repositorio.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Falta de visibilidad del gasto&lt;/td&gt;&lt;td&gt;El panel de OmniRoute centraliza el consumo de todos los proveedores y de todas las herramientas conectadas.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Código sobredimensionado&lt;/td&gt;&lt;td&gt;Ponytail recorta lo que el agente construye, lo que a su vez reduce el código a revisar, mantener y volver a meter en el contexto en las siguientes sesiones.&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p&gt;Las tres piezas se refuerzan entre sí sobre la cuota disponible: Ponytail reduce los tokens de salida (menos código generado), la compresión de OmniRoute reduce los de entrada (menos contexto enviado) y el fallback aprovecha la cuota de todos los proveedores conectados.&lt;/p&gt;&lt;p&gt;Un beneficio adicional: como OmniRoute expone un endpoint estándar, el mismo gateway sirve simultáneamente a OpenCode en la terminal, a una extensión de VSCode o a cualquier otro cliente compatible con la API de OpenAI. Se configura una vez y lo aprovecha todo el entorno.&lt;/p&gt;&lt;div class=&#34;admonition tip&#34;&gt;&lt;p class=&#34;admonition-title&#34;&gt;Modelos modestos, mejores resultados&lt;/p&gt;&lt;p&gt;Un efecto colateral interesante de Ponytail es que hace más viable trabajar con los modelos gratuitos, que suelen ser más pequeños. Cuanto menor es el volumen de código que se le pide generar a un modelo, menos oportunidades tiene de equivocarse; el &lt;em&gt;skill&lt;/em&gt; reduce precisamente el tamaño de lo que se le encarga en cada paso.&lt;/p&gt;&lt;/div&gt;&lt;div class=&#34;admonition warning&#34;&gt;&lt;p class=&#34;admonition-title&#34;&gt;Sobre las capas gratuitas&lt;/p&gt;&lt;p&gt;Las condiciones de las capas gratuitas de los proveedores cambian con frecuencia y algunas desaparecen sin previo aviso. La ventaja del enfoque con OmniRoute es que esos cambios se absorben en el gateway (conectando otro proveedor) sin tocar la configuración del agente. Conviene también revisar las políticas de privacidad de cada proveedor gratuito antes de enviarles el código de un proyecto sensible.&lt;/p&gt;&lt;/div&gt;&lt;h2 id=&#34;instalacion&#34;&gt;Instalación&lt;a class=&#34;headerlink&#34; href=&#34;#instalacion&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Todo el procedimiento se ha realizado sobre Linux. En Windows y MacOS los pasos son equivalentes, cambiando la forma de instalar los requisitos.&lt;/p&gt;&lt;p&gt;Los tres proyectos se distribuyen vía npm, así que el único requisito común es disponer de Node.js reciente (versión 22 o superior).&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;1&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;node&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;--version&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;h3 id=&#34;instalacion-de-opencode&#34;&gt;Instalación de OpenCode&lt;a class=&#34;headerlink&#34; href=&#34;#instalacion-de-opencode&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;La forma recomendada es el script oficial de instalación:&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;1&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;curl&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-fsSL&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;https://opencode.ai/install&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;bash&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;Alternativamente, según el sistema:&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;3&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;4&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;npm&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;install&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-g&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;opencode-ai&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;# npm (también bun, pnpm o yarn)&lt;/span&gt;brew&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;install&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;anomalyco/tap/opencode&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;# MacOS / Linux con Homebrew&lt;/span&gt;sudo&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;pacman&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-S&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;opencode&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;# Arch Linux (repositorios oficiales)&lt;/span&gt;paru&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-S&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;opencode-bin&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;# Arch Linux (AUR, última versión)&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;Comprobamos la instalación lanzando el agente dentro de cualquier directorio:&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;1&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;opencode&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;En este punto OpenCode arrancará pero pedirá credenciales de algún proveedor. No hace falta darle ninguna todavía: ese hueco lo va a ocupar OmniRoute. Por ahora simplemente salimos del programa.&lt;/p&gt;&lt;h3 id=&#34;instalacion-de-omniroute&#34;&gt;Instalación de OmniRoute&lt;a class=&#34;headerlink&#34; href=&#34;#instalacion-de-omniroute&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h3&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;2&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;npm&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;install&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-g&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;omnirouteomniroute&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;El comando &lt;code&gt;omniroute&lt;/code&gt; levanta a la vez la API y el panel web en el puerto &lt;code&gt;20128&lt;/code&gt;:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Panel: &lt;code&gt;http://localhost:20128&lt;/code&gt;&lt;/li&gt;&lt;li&gt;API compatible con OpenAI: &lt;code&gt;http://localhost:20128/v1&lt;/code&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Existen también otras formas de despliegue, útiles si se quiere dejar el gateway funcionando de forma permanente:&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;1&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;docker&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;run&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;omniroute&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;# contenedor&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;Además del paquete npm y el contenedor, el proyecto distribuye una aplicación de escritorio (Electron), imágenes para arm64 (funciona en una Raspberry Pi) y es ejecutable en Android bajo Termux. Una opción interesante es dejar OmniRoute corriendo en un VPS o en un servidor casero y apuntar contra él desde todos los equipos de desarrollo.&lt;/p&gt;&lt;h3 id=&#34;instalacion-de-ponytail&#34;&gt;Instalación de Ponytail&lt;a class=&#34;headerlink&#34; href=&#34;#instalacion-de-ponytail&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;Ponytail no se instala en el sistema, se declara como &lt;em&gt;plugin&lt;/em&gt; de OpenCode. Basta con añadir esta entrada al fichero de configuración &lt;code&gt;opencode.json&lt;/code&gt; (en el apartado siguiente se muestra el fichero completo con esta y el resto de piezas):&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;1&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;&amp;quot;plugin&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;@dietrichgebert/ponytail&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;OpenCode descarga el paquete desde npm la primera vez que arranca con esa configuración. Si se prefiere trabajar sobre una copia local del repositorio, para poder modificar las reglas, se clona y se apunta al fichero del &lt;em&gt;plugin&lt;/em&gt;:&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;1&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;git&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;clone&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;https://github.com/DietrichGebert/ponytail.git&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;~/ponytail&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;1&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;&amp;quot;plugin&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;/home/usuario/ponytail/.opencode/plugins/ponytail.mjs&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;Las rutas relativas (del tipo &lt;code&gt;./.opencode/plugins/ponytail.mjs&lt;/code&gt;) se resuelven respecto al &lt;code&gt;opencode.json&lt;/code&gt; que las declara, de modo que para compartir un mismo &lt;em&gt;checkout&lt;/em&gt; entre varios proyectos hay que usar la ruta absoluta, como en el ejemplo.&lt;/p&gt;&lt;div class=&#34;admonition tip&#34;&gt;&lt;p class=&#34;admonition-title&#34;&gt;Sin plugin también funciona&lt;/p&gt;&lt;p&gt;El repositorio incluye las reglas en formato &lt;code&gt;AGENTS.md&lt;/code&gt; y en los formatos de rules de Cursor, Devin, Cline, Kiro, Copilot, etc. Copiando ese fichero al proyecto se obtiene el comportamiento siempre activo en prácticamente cualquier agente. Lo que añade el &lt;em&gt;plugin&lt;/em&gt; de OpenCode son los comandos &lt;code&gt;/ponytail&lt;/code&gt; y los niveles de intensidad.&lt;/p&gt;&lt;/div&gt;&lt;h2 id=&#34;configuracion-conjunta&#34;&gt;Configuración conjunta&lt;a class=&#34;headerlink&#34; href=&#34;#configuracion-conjunta&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;La integración consiste en que OpenCode deje de hablar con los proveedores y hable únicamente con OmniRoute, y en que Ponytail se inyecte en cada turno de la conversación. Son cinco pasos.&lt;/p&gt;&lt;h3 id=&#34;1-conectar-proveedores-en-omniroute&#34;&gt;1. Conectar proveedores en OmniRoute&lt;a class=&#34;headerlink&#34; href=&#34;#1-conectar-proveedores-en-omniroute&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;Con &lt;code&gt;omniroute&lt;/code&gt; en marcha, abrimos &lt;code&gt;http://localhost:20128&lt;/code&gt; y vamos a la sección &lt;strong&gt;Providers&lt;/strong&gt; (recomiendo configurar el interfaz en idioma &lt;code&gt;English&lt;/code&gt; ya que si no aparecen numerosas cadenas precedidas de la partícula &lt;code&gt;__MISSING__&lt;/code&gt;; también utilizar el campo de búsqueda, ya que el número de grupos de configuración de OmniRoute es enorme). Ahí aparece el catálogo con un indicador de cuáles tienen capa gratuita. Conviene conectar varios, ya que el valor del sistema está justamente en la redundancia: cuando uno agota su cuota, el resto siguen disponibles. Los proveedores sin necesidad de clave (&lt;code&gt;No Auth&lt;/code&gt;) están conectados por defecto.&lt;/p&gt;&lt;p&gt;El catálogo está clasificado por categorías, y la categoría marca el procedimiento de conexión:&lt;/p&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Categoría&lt;/th&gt;&lt;th&gt;Cómo se conecta&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;em&gt;No Auth&lt;/em&gt;&lt;/td&gt;&lt;td&gt;Están activos desde el primer arranque. Aunque desactivaremos algunos como luego veremos.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;em&gt;Free Tier&lt;/em&gt;&lt;/td&gt;&lt;td&gt;Capa gratuita que sí requiere darse de alta en el proveedor y pegar una clave de API.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;em&gt;OAuth&lt;/em&gt;&lt;/td&gt;&lt;td&gt;Botón de inicio de sesión para proveedores en los que ya tengamos cuenta: OmniRoute abre el flujo del proveedor y guarda el &lt;em&gt;token&lt;/em&gt; resultante.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;em&gt;API Key&lt;/em&gt;&lt;/td&gt;&lt;td&gt;Proveedores de pago (algunos con crédito inicial de regalo); se pega la clave.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;em&gt;Local&lt;/em&gt;&lt;/td&gt;&lt;td&gt;Modelos que corren en la propia máquina (Ollama, LM Studio, vLLM…); se indica la URL local.&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p&gt;El filtro de la parte superior de la pantalla permite quedarse solo con las que interesan, y el buscador acepta el nombre o el identificador del proveedor.&lt;/p&gt;&lt;h4 id=&#34;proveedores-sin-autenticacion&#34;&gt;Proveedores sin autenticación&lt;a class=&#34;headerlink&#34; href=&#34;#proveedores-sin-autenticacion&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h4&gt;&lt;p&gt;En general la elección y configuración de los proveedores es la parte más complicada, farragosa y que más tiempo consume de todo el proceso descrito en este artículo.&lt;/p&gt;&lt;p&gt;Algunos de los proveedores activados por defecto, como los de la categoría &#34;No Auth&#34;, pueden provocar problemas. Durante las primeras sesiones de uso de OpenCode observé que la mayoría de las peticiones obtenían una respuesta vacía. Tras investigar encontré que el problema era la intervención de proveedor &#34;Augment (Auggie CLI)&#34; que por tanto recomiendo desactivar.&lt;/p&gt;&lt;p&gt;Mirando los logs de la consola de OmniRoute (&lt;code&gt;Monitoring &amp;gt; Logs&lt;/code&gt;) encontré que los proveedores &#34;Chipotle Pepper AI (Free)&#34; y &#34;DuckDuckGo AI Chat&#34; fallaban siempre, por lo que aunque no introducen respuestas incorrectas como &#34;Augment (Auggie CLI)&#34;, retrasan el recorrido de la cascada de proveedores, por lo que recomiendo desactivarlos también. El proveedor &#34;Veo AI Free&#34; lo desactivaremos, dado que solo ofrece modelos de vídeo que no nos van a servir para codificar.&lt;/p&gt;&lt;h4 id=&#34;proveedores-con-clave-de-api-gratuita&#34;&gt;Proveedores con clave de API gratuita&lt;a class=&#34;headerlink&#34; href=&#34;#proveedores-con-clave-de-api-gratuita&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h4&gt;&lt;p&gt;El procedimiento es siempre el mismo, cambiando únicamente el sitio del que se obtiene la clave:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Darse de alta en el proveedor y generar una clave de API en su panel (el enlace suele estar en la propia ficha del proveedor en OmniRoute).&lt;/li&gt;&lt;li&gt;En OmniRoute, &lt;strong&gt;Providers&lt;/strong&gt; → buscar el proveedor → botón de conectar/configurar.&lt;/li&gt;&lt;li&gt;Pegar la clave en el formulario y guardar.&lt;/li&gt;&lt;li&gt;Pulsar el botón de &lt;strong&gt;Test&lt;/strong&gt; de la tarjeta del proveedor. Si responde correctamente, sus modelos pasan a formar parte del catálogo del gateway y entran automáticamente en el &lt;em&gt;pool&lt;/em&gt; del modelo &lt;code&gt;auto&lt;/code&gt;.&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;Los proveedores de esta categoría son los que más nos van a permitir aprovechar las ventajas de OmniRoute. Son numerosos, pero como se comentaba en el apartado anterior, requiere bastante trabajo configurarlos (obtención de API Keys de distintos proveedores) y mantenerse al día de cuáles cambian en operativa o son más o menos recomendables en un momento dado.&lt;/p&gt;&lt;p&gt;Algunos documentos que seguir para mantener en buena forma la lista de proveedores gratuitos son los siguientes:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;a href=&#34;https://github.com/diegosouzapw/OmniRoute/wiki/Providers-Guide#best-free-providers&#34;&gt;Providers Guide - Best Free Providers&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://github.com/diegosouzapw/OmniRoute/blob/release/v3.8.49/docs/getting-started/FREE-TIERS-GUIDE.md&#34;&gt;FREE TIERS GUIDE&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://github.com/diegosouzapw/OmniRoute/blob/release/v3.8.49/docs/reference/FREE_TIERS.md&#34;&gt;FREE TIERS&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Algunos de los proveedores de este tipo que me parecen recomendables en el momento de escribir este artículo son:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;a href=&#34;https://aistudio.google.com/api-keys&#34;&gt;Gemini (Google AI Studio)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://groq.com/&#34;&gt;Groq&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://console.mistral.ai/&#34;&gt;Mistral&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://dash.cloudflare.com/&#34;&gt;Cloudflare Workers AI&lt;/a&gt;: Tras introducir la API Key, se produce el intento de conexión con los modelos que fallará indicando que hace falta un &#34;Account ID&#34; además. El &#34;Account ID&#34; es el hash que aparece a continuación de la URL &lt;code&gt;https://dash.cloudflare.com&lt;/code&gt; una vez creada e iniciada la sesión. Introduciremos ese hash en el campo &#34;Account ID&#34; de los ajustes del provider.&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://enter.pollinations.ai/&#34;&gt;Pollinations AI&lt;/a&gt;: Aunque en el cuadro de conexión se indica que la API Key es opcional, es mejor crear una.&lt;/li&gt;&lt;/ul&gt;&lt;h4 id=&#34;proveedores-oauth&#34;&gt;Proveedores OAuth&lt;a class=&#34;headerlink&#34; href=&#34;#proveedores-oauth&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h4&gt;&lt;p&gt;Con estos no hay clave que copiar: se pulsa el botón de conexión de la tarjeta, se abre el flujo de inicio de sesión del proveedor en el navegador, y al terminar OmniRoute guarda las credenciales cifradas en su base de datos local. Es el caso de las cuentas de herramientas que ya se estén usando (Copilot, Cursor, Kilo Code, Qoder, etc.).&lt;/p&gt;&lt;div class=&#34;admonition warning&#34;&gt;&lt;p class=&#34;admonition-title&#34;&gt;Revisa los términos de servicio&lt;/p&gt;&lt;p&gt;Varios de estos proveedores son en realidad servicios pensados para consumirse desde su propio cliente, y algunos prohíben expresamente en sus condiciones el uso a través de &lt;em&gt;proxies&lt;/em&gt; o clientes de terceros. La ficha del proveedor en OmniRoute lo advierte cuando es el caso. Conviene leer esos avisos antes de conectar una cuenta que interese conservar.&lt;/p&gt;&lt;/div&gt;&lt;h4 id=&#34;depurar-el-pool-para-uso-agentico&#34;&gt;Depurar el pool para uso agéntico&lt;a class=&#34;headerlink&#34; href=&#34;#depurar-el-pool-para-uso-agentico&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h4&gt;&lt;p&gt;Hay una cuestión que no aparece en la documentación de OmniRoute y que, en mi experiencia, ha resultado fundamental para que el montaje resulte operativo. Se trata de que no todos los proveedores del catálogo sirven para alimentar a un agente.&lt;/p&gt;&lt;p&gt;La razón es que un agente como OpenCode no se limita a pedir texto: envía en cada petición la lista de &lt;em&gt;herramientas&lt;/em&gt; de las que dispone (leer ficheros, ejecutar comandos, buscar en el repositorio…) y espera que el modelo responda con llamadas a esas herramientas. Los proveedores que son la API oficial de un modelo devuelven esas llamadas al cliente, que es lo correcto. Pero el catálogo incluye también dos tipos de entradas que no se comportan así:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Proxies de un cliente web&lt;/strong&gt; (los que se conectan con la cookie de sesión de un chat, en lugar de con una clave de API). El servicio del otro lado tiene su propio motor de herramientas e intenta ejecutarlas él, en su entorno, en lugar de devolverlas.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Front-ends de agentes&lt;/strong&gt; (servicios pensados para consumirse desde su propia herramienta de línea de comandos). Traen su propio catálogo de herramientas y no encajan como motor de otro agente.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;El síntoma es desconcertante, porque el agente no da ningún error: simplemente devuelve una respuesta vacía, o un texto en el que el modelo explica que no ha podido explorar el repositorio y nos pide, por ejemplo, que le peguemos nosotros el contenido de los ficheros.&lt;/p&gt;&lt;h5 id=&#34;un-test-de-admision&#34;&gt;Un test de admisión&lt;a class=&#34;headerlink&#34; href=&#34;#un-test-de-admision&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h5&gt;&lt;p&gt;La forma fiable de decidir si un proveedor entra o no en el pool es preguntárselo al gateway: enviar una petición con una herramienta y comprobar si el modelo la invoca. La respuesta debe contener un bloque &lt;code&gt;tool_calls&lt;/code&gt; con el nombre de la herramienta y sus argumentos; si en su lugar llega prosa, ese proveedor no sirve.&lt;/p&gt;&lt;p&gt;No basta con lanzar una petición contra &lt;code&gt;auto/coding&lt;/code&gt; y dar por bueno el pool. El enrutado de &lt;code&gt;auto&lt;/code&gt; tiende a pegarse al último proveedor que funcionó y no garantiza que todos los candidatos reciban tráfico. Hay que probar cada proveedor por separado.&lt;/p&gt;&lt;p&gt;El comportamiento problemático que queremos detectar (proxies que ejecutan las herramientas ellos mismos, front-ends con su propio catálogo) es una propiedad del proveedor, no del modelo individual: un proxy o pasa las &lt;code&gt;tool_calls&lt;/code&gt; al cliente o no las pasa, independientemente del modelo que tenga detrás. Por eso basta con probar un modelo representativo por proveedor, identificable por el prefijo antes de la barra (&lt;code&gt;groq/&lt;/code&gt;, &lt;code&gt;mistral/&lt;/code&gt;, &lt;code&gt;cf/&lt;/code&gt;...), en lugar de los cientos de modelos del catálogo. En realidad probaremos los 5 primeros modelos de cada proveedor por si alguno falla por alguna razón específica. El filtro de &lt;code&gt;jq&lt;/code&gt; excluye solo los modelos virtuales &lt;code&gt;auto/*&lt;/code&gt;:&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 1&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 2&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 3&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 4&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 5&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 6&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 7&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 8&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 9&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;10&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;11&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;12&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;13&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;14&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;15&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;16&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;17&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;18&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;19&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;20&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;21&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;22&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;23&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;24&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;25&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;26&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;27&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;28&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;29&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;30&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;31&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;32&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;33&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;34&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;35&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;36&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;37&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;38&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;39&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;40&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&#34;nv&#34;&gt;API&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;http://localhost:20128/v1&amp;quot;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;KEY&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;sk-tu-clave-omniroute&amp;quot;&lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;# Lista de proveedores (excluyendo auto/*)&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;providers&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;curl&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-s&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$API&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;/models&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-H&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;Authorization: Bearer &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$KEY&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;se&#34;&gt;\&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;jq&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-r&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;[.data[].id | select(startswith(&amp;quot;auto/&amp;quot;) | not)]&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt; | group_by(split(&amp;quot;/&amp;quot;)[0]) | map(.[0]) | .[]&amp;#39;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;se&#34;&gt;\&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;cut&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-d/&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-f1&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;sort&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-u&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;for&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;prov&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;in&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$providers&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;do&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;# Hasta 5 modelos de este proveedor&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;prov_models&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;curl&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-s&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$API&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;/models&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-H&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;Authorization: Bearer &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$KEY&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;se&#34;&gt;\&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;jq&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-r&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;--arg&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;p&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$prov&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;[.data[].id | select(startswith($p+&amp;quot;/&amp;quot;))][:5][]&amp;#39;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;status&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;tested&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;for&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;model&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;in&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$prov_models&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;do&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;tested&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$model&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;resp&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;curl&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-s&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-i&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$API&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;/chat/completions&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;se&#34;&gt;\&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-H&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;Authorization: Bearer &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$KEY&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;se&#34;&gt;\&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-H&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;Content-Type: application/json&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;se&#34;&gt;\&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-d&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;{\&amp;quot;model\&amp;quot;:\&amp;quot;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$model&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;\&amp;quot;,\&amp;quot;stream\&amp;quot;:false,\&amp;quot;messages\&amp;quot;:[{\&amp;quot;role\&amp;quot;:\&amp;quot;user\&amp;quot;,\&amp;quot;content\&amp;quot;:\&amp;quot;Lee el fichero /etc/hostname\&amp;quot;}],\&amp;quot;tools\&amp;quot;:[{\&amp;quot;type\&amp;quot;:\&amp;quot;function\&amp;quot;,\&amp;quot;function\&amp;quot;:{\&amp;quot;name\&amp;quot;:\&amp;quot;read\&amp;quot;,\&amp;quot;description\&amp;quot;:\&amp;quot;Lee un fichero\&amp;quot;,\&amp;quot;parameters\&amp;quot;:{\&amp;quot;type\&amp;quot;:\&amp;quot;object\&amp;quot;,\&amp;quot;properties\&amp;quot;:{\&amp;quot;path\&amp;quot;:{\&amp;quot;type\&amp;quot;:\&amp;quot;string\&amp;quot;}},\&amp;quot;required\&amp;quot;:[\&amp;quot;path\&amp;quot;]}}}]}&amp;quot;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;http_code&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;printf&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;%s&amp;#39;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$resp&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;head&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-1&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;grep&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-o&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;[0-9][0-9][0-9]&amp;#39;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;body&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;printf&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;%s&amp;#39;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$resp&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;sed&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-n&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;/^\r\?$/,$p&amp;#39;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;tail&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-n&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;+2&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;if&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$http_code&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;200&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;then&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;if&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;printf&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;%s&amp;#39;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$body&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;jq&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-e&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;.choices[0].message.tool_calls[0].function.name&amp;#39;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&amp;gt;/dev/null&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;m&#34;&gt;2&lt;/span&gt;&amp;gt;&lt;span class=&#34;p&#34;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;then&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;status&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;OK&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;else&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;status&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;FALLA (sin tool_calls)&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;fi&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;break&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;elif&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$http_code&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;401&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;||&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$http_code&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;403&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;then&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;status&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;FALLA (auth &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$http_code&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;)&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;break&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;else&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;continue&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;# 404, 400... modelo no disponible, probar el siguiente&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;fi&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;done&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-z&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$status&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;&amp;amp;&amp;amp;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;status&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;FALLA (sin modelos válidos)&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;printf&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;%-24s %-45s %s\n&amp;#39;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$status&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$prov&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$tested&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;done&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;Requiere &lt;code&gt;jq&lt;/code&gt;. El script distingue tres causas de fallo:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;strong&gt;&lt;code&gt;FALLA (sin tool_calls)&lt;/code&gt;&lt;/strong&gt;: el proveedor respondió con un 200 pero devolvió prosa en lugar de una llamada a la herramienta. Es el problema que venimos buscando: proxy que ejecuta las tools él mismo o front-end con su propio catálogo. =&amp;gt; Desconectar.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;&lt;code&gt;FALLA (auth 401/403)&lt;/code&gt;&lt;/strong&gt;: la clave del proveedor está caducada, mal configurada o sin cuota. No es un problema de &lt;em&gt;tools&lt;/em&gt;, sino de configuración. =&amp;gt; Hay que arreglar la conexión en &lt;strong&gt;Providers&lt;/strong&gt; (o desconectarla si ya no tiene remedio).&lt;/li&gt;&lt;li&gt;&lt;strong&gt;&lt;code&gt;FALLA (sin modelos válidos)&lt;/code&gt;&lt;/strong&gt;: todos los modelos probados devolvieron 404 o 400. El proveedor está caído o su catálogo ha cambiado. =&amp;gt; Revisar en &lt;strong&gt;Providers&lt;/strong&gt;.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;En la salida, la columna de la derecha muestra el modelo con el que se obtuvo el resultado. Es un trabajo que se hace una vez, y que hay que repetir solo al conectar un proveedor nuevo.&lt;/p&gt;&lt;h5 id=&#34;dos-sintomas-que-reconocer-en-los-logs&#34;&gt;Dos síntomas que reconocer en los logs&lt;a class=&#34;headerlink&#34; href=&#34;#dos-sintomas-que-reconocer-en-los-logs&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h5&gt;&lt;p&gt;En &lt;code&gt;Monitoring &amp;gt; Logs&lt;/code&gt; hay dos patrones que delatan a un proveedor que conviene retirar:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;strong&gt;&lt;code&gt;200&lt;/code&gt; con &lt;code&gt;TO: 0&lt;/code&gt;&lt;/strong&gt; en unos pocos milisegundos: el proveedor ha devuelto una respuesta vacía con estado de éxito. Una inferencia real nunca tarda 15 ms.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Respuestas lentas cuyo contenido es texto&lt;/strong&gt; donde debería haber &lt;code&gt;tool_calls&lt;/code&gt;, a menudo con mensajes de error del propio servicio remoto explicando que las herramientas no existen.&lt;/li&gt;&lt;/ul&gt;&lt;div class=&#34;admonition warning&#34;&gt;&lt;p class=&#34;admonition-title&#34;&gt;El fallback no salta con los fallos disfrazados de éxito&lt;/p&gt;&lt;p&gt;Conviene entender bien el límite del sistema. La cascada de reintentos de OmniRoute funciona con los fallos explícitos: un 429 por cuota, un 502 o un timeout hacen que la petición se reintente contra el siguiente proveedor, y eso se aprecia perfectamente en el registro. Pero los dos casos anteriores llegan al gateway como respuestas correctas: un &lt;code&gt;200&lt;/code&gt; con un cuerpo vacío es, para un router, una respuesta válida. Ningún &lt;em&gt;gateway&lt;/em&gt; puede arbitrar eso sin inspeccionar semánticamente el contenido de cada respuesta.&lt;/p&gt;&lt;p&gt;De ahí que la curación del pool sea responsabilidad nuestra, y que sea un paso que conviene no saltarse. Dicho de otro modo: el enrutado automático es tan bueno como el peor proveedor aparentemente sano del pool.&lt;/p&gt;&lt;/div&gt;&lt;h3 id=&#34;2-crear-una-clave-de-api-de-omniroute&#34;&gt;2. Crear una clave de API de OmniRoute&lt;a class=&#34;headerlink&#34; href=&#34;#2-crear-una-clave-de-api-de-omniroute&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;En el panel, sección &lt;strong&gt;API Manager&lt;/strong&gt; → &lt;strong&gt;Create API Key&lt;/strong&gt;. Le damos un nombre descriptivo (por ejemplo &lt;code&gt;opencode&lt;/code&gt;) y copiamos la clave generada, con formato &lt;code&gt;sk-xxxxxxxx-xxxxxxxx&lt;/code&gt;.&lt;/p&gt;&lt;p&gt;Esta clave es local: es la que usarán nuestros clientes (OpenCode en este caso) para autenticarse contra OmniRoute, y no tiene nada que ver con las claves de los proveedores, que quedan custodiadas por OmniRoute.&lt;/p&gt;&lt;p&gt;Podemos verificar que el gateway responde y ver qué modelos ofrece:&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;1&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;curl&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;http://localhost:20128/v1/models&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-H&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;Authorization: Bearer sk-tu-clave-omniroute&amp;quot;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;h3 id=&#34;3-declarar-omniroute-como-proveedor-en-opencode&#34;&gt;3. Declarar OmniRoute como proveedor en OpenCode&lt;a class=&#34;headerlink&#34; href=&#34;#3-declarar-omniroute-como-proveedor-en-opencode&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;OpenCode admite cualquier proveedor compatible con OpenAI declarándolo en su fichero de configuración. Para que la configuración aplique a todos los proyectos, la escribimos en &lt;code&gt;~/.config/opencode/opencode.json&lt;/code&gt;:&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 1&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 2&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 3&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 4&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 5&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 6&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 7&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 8&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 9&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;10&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;11&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;12&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;13&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;14&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;15&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;16&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;17&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;18&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;19&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;20&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;21&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;22&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;&amp;quot;$schema&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;https://opencode.ai/config.json&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;&amp;quot;plugin&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;@dietrichgebert/ponytail&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;],&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;&amp;quot;provider&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;&amp;quot;omniroute&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;&amp;quot;npm&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;@ai-sdk/openai-compatible&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;&amp;quot;name&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;OmniRoute&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;&amp;quot;options&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;&amp;quot;baseURL&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;http://localhost:20128/v1&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;&amp;quot;apiKey&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;sk-tu-clave-omniroute&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;},&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;&amp;quot;models&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;&amp;quot;auto&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;&amp;quot;name&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;Auto (equilibrado)&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;},&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;&amp;quot;auto/coding&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;&amp;quot;name&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;Auto (calidad para código)&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;},&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;&amp;quot;auto/cheap&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;&amp;quot;name&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;Auto (menor coste)&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;},&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;&amp;quot;auto/fast&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;&amp;quot;name&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;Auto (menor latencia)&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;},&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;&amp;quot;auto/offline&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;&amp;quot;name&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;Auto (máxima cuota disponible)&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;},&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;&amp;quot;model&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;omniroute/auto/coding&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;Los puntos importantes de esta configuración:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;code&gt;npm&lt;/code&gt;: el adaptador &lt;code&gt;@ai-sdk/openai-compatible&lt;/code&gt; es el que se usa con endpoints &lt;code&gt;/v1/chat/completions&lt;/code&gt;, que es el caso de OmniRoute.&lt;/li&gt;&lt;li&gt;&lt;code&gt;options.baseURL&lt;/code&gt;: el endpoint del gateway. Si OmniRoute está en otra máquina, aquí va su IP o dominio.&lt;/li&gt;&lt;li&gt;&lt;code&gt;options.apiKey&lt;/code&gt;: la clave de API que creamos en OmniRoute.&lt;/li&gt;&lt;li&gt;&lt;code&gt;models&lt;/code&gt;: no hace falta enumerar modelos concretos de proveedores; basta con declarar los modelos virtuales &lt;code&gt;auto&lt;/code&gt;, que son los que activan el enrutado inteligente y el fallback. Si se quiere fijar un modelo concreto, se puede añadir con el identificador que devuelve &lt;code&gt;/v1/models&lt;/code&gt;, la consulta del &lt;a href=&#34;#2-crear-una-clave-de-api-de-omniroute&#34;&gt;punto anterior&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;&lt;code&gt;model&lt;/code&gt;: modelo por defecto al arrancar. &lt;code&gt;auto/coding&lt;/code&gt; es una buena elección para desarrollo; &lt;code&gt;auto/offline&lt;/code&gt; resulta útil cuando lo prioritario es no quedarse sin cuota.&lt;/li&gt;&lt;li&gt;&lt;code&gt;plugin&lt;/code&gt;: la lista de &lt;em&gt;plugins&lt;/em&gt; de OpenCode, donde entra Ponytail.&lt;/li&gt;&lt;/ul&gt;&lt;div class=&#34;admonition tip&#34;&gt;&lt;p class=&#34;admonition-title&#34;&gt;Clave fuera del fichero de configuración&lt;/p&gt;&lt;p&gt;Si el fichero de configuración se va a versionar (por ejemplo en un repositorio de &lt;em&gt;dotfiles&lt;/em&gt;), es preferible no escribir la clave en él. OpenCode permite almacenar credenciales con el comando &lt;code&gt;/connect&lt;/code&gt; (opción &lt;em&gt;Other&lt;/em&gt;, id &lt;code&gt;omniroute&lt;/code&gt;), en cuyo caso se puede omitir &lt;code&gt;options.apiKey&lt;/code&gt; del JSON.&lt;/p&gt;&lt;/div&gt;&lt;p&gt;También es posible ubicar el fichero como &lt;code&gt;opencode.json&lt;/code&gt; en la raíz de un proyecto concreto, en cuyo caso su configuración se combina con la global. Esto resulta práctico para forzar un modelo distinto en un proyecto determinado.&lt;/p&gt;&lt;h3 id=&#34;4-ajustar-el-nivel-de-ponytail&#34;&gt;4. Ajustar el nivel de Ponytail&lt;a class=&#34;headerlink&#34; href=&#34;#4-ajustar-el-nivel-de-ponytail&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;Ponytail no necesita fichero de configuración: funciona nada más declararlo como &lt;em&gt;plugin&lt;/em&gt;. Lo único que conviene decidir es el nivel de intensidad, que se cambia en caliente desde la TUI:&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;3&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;4&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;5&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;/ponytail → informa del nivel actual/ponytail lite → recorte suave/ponytail full → nivel por defecto/ponytail ultra → recorte agresivo/ponytail off → desactivado para esta sesión&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;El nivel por defecto es &lt;code&gt;full&lt;/code&gt;. Para fijar otro en todas las sesiones nuevas se usa la variable de entorno &lt;code&gt;PONYTAIL_DEFAULT_MODE&lt;/code&gt; o el campo &lt;code&gt;defaultMode&lt;/code&gt; de &lt;code&gt;~/.config/ponytail/config.json&lt;/code&gt;:&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;1&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&#34;nb&#34;&gt;export&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;PONYTAIL_DEFAULT_MODE&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;full&amp;quot;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;Mientras está activo, el conjunto de reglas se inyecta también en los subagentes que lance el agente principal. Si interesa excluir a alguno (por ejemplo los subagentes de búsqueda, que no escriben código), se puede acotar con una expresión regular contra el tipo de subagente definida en la siguiente variable de entorno:&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;1&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&#34;nb&#34;&gt;export&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;PONYTAIL_SUBAGENT_MATCHER&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;build|code&amp;quot;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;h3 id=&#34;5-verificar-la-integracion&#34;&gt;5. Verificar la integración&lt;a class=&#34;headerlink&#34; href=&#34;#5-verificar-la-integracion&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;Arrancamos el agente y comprobamos que aparece el proveedor:&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;1&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;opencode&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;Dentro de la TUI, el comando &lt;code&gt;/models&lt;/code&gt; debe mostrar las entradas de OmniRoute.&lt;/p&gt;&lt;p&gt;Desde un directorio que contenga un repositorio o un proyecto, ejecutamos una prueba rápida en modo CLI no interactivo:&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;1&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;opencode&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;run&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;Resume en tres líneas qué hace este repositorio&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;--model&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;omniroute/auto/coding&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;Mientras se ejecuta, en el panel de OmniRoute puede verse en tiempo real qué proveedor ha atendido la petición (&lt;code&gt;Monitoring &amp;gt; Logs&lt;/code&gt;), cuántos tokens se han consumido y cuántos ha ahorrado la compresión. Si un proveedor falla, en el registro se aprecia el salto automático al siguiente.&lt;/p&gt;&lt;p&gt;Para comprobar que Ponytail está cargado basta con ejecutar &lt;code&gt;/ponytail&lt;/code&gt; en la TUI, que responde con el nivel activo, o &lt;code&gt;/ponytail-help&lt;/code&gt;, que lista sus comandos.&lt;/p&gt;&lt;div class=&#34;admonition warning&#34;&gt;&lt;p class=&#34;admonition-title&#34;&gt;Aparente ERROR de arranque de Ponytail&lt;/p&gt;&lt;p&gt;Si se arranca OpenCode con &lt;code&gt;--print-logs&lt;/code&gt; puede aparecer esta línea al cargar la configuración:&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;1&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;ERROR message=&amp;quot;failed to load plugin&amp;quot; path=@dietrichgebert/ponytail error=&amp;quot;path must be a string or a file descriptor&amp;quot;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;Es engañosa: OpenCode intenta cargar el plugin por dos rutas y una de ellas falla, pero la otra lo carga correctamente. La prueba de que Ponytail está operativo es que &lt;code&gt;/ponytail&lt;/code&gt; responda con el nivel activo. Hay que tener en cuenta además que el nivel se persiste entre sesiones (en &lt;code&gt;~/.config/opencode/.ponytail-active&lt;/code&gt;): un &lt;code&gt;/ponytail off&lt;/code&gt; de una prueba anterior deja el plugin cargado pero desactivado. Ante la duda: &lt;code&gt;/ponytail full&lt;/code&gt; y preguntar al agente qué dice su &lt;em&gt;system prompt&lt;/em&gt; sobre &lt;code&gt;PONYTAIL&lt;/code&gt;.&lt;/p&gt;&lt;/div&gt;&lt;div class=&#34;admonition tip&#34;&gt;&lt;p class=&#34;admonition-title&#34;&gt;Variables de entorno para el resto de herramientas&lt;/p&gt;&lt;p&gt;Exportando estas variables en el &lt;code&gt;.bashrc&lt;/code&gt; o &lt;code&gt;.zshrc&lt;/code&gt;, cualquier otra herramienta que respete la convención de OpenAI usará también el gateway sin configuración adicional:&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;2&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&#34;nb&#34;&gt;export&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;OPENAI_BASE_URL&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;http://localhost:20128/v1&amp;quot;&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;export&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;OPENAI_API_KEY&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;sk-tu-clave-omniroute&amp;quot;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;/div&gt;&lt;h2 id=&#34;tipos-de-proyectos-y-operativa&#34;&gt;Tipos de proyectos y operativa&lt;a class=&#34;headerlink&#34; href=&#34;#tipos-de-proyectos-y-operativa&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Una vez montado el entorno, la operativa es esencialmente la misma con independencia del lenguaje, del tamaño del proyecto o la naturaleza de la tarea. Lo que cambia entre unos casos y otros es el modelo que conviene seleccionar, el nivel de recorte que interesa y la cantidad de contexto que hay que preparar. Por eso describimos primero el flujo común y después los ajustes por tipo de proyecto.&lt;/p&gt;&lt;h3 id=&#34;operativa-comun&#34;&gt;Operativa común&lt;a class=&#34;headerlink&#34; href=&#34;#operativa-comun&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h3&gt;&lt;ol&gt;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Situarse en el repositorio y arrancar el agente&lt;/strong&gt;:&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;2&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&#34;nb&#34;&gt;cd&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;mi-proyectoopencode&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Generar el fichero de contexto&lt;/strong&gt; la primera vez, con el comando &lt;code&gt;/init&lt;/code&gt; dentro de la TUI. OpenCode explora el repositorio y escribe un &lt;code&gt;AGENTS.md&lt;/code&gt; con la descripción del proyecto, los comandos de compilación y test y las convenciones detectadas. Merece la pena revisarlo y completarlo a mano: es el documento que más influye en la calidad de los resultados posteriores, y conviene versionarlo con el proyecto.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Planificar antes de ejecutar&lt;/strong&gt;. Para cualquier cambio que no sea trivial, pedir primero un plan en lugar de la implementación directa. OpenCode dispone de un modo de planificación que no escribe en disco, y revisar el plan cuesta mucho menos que revisar un &lt;em&gt;diff&lt;/em&gt; equivocado de 400 líneas.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Iterar en pasos pequeños&lt;/strong&gt;, validando con las herramientas del propio proyecto (compilador, &lt;em&gt;linter&lt;/em&gt;, tests) tras cada paso. El agente puede ejecutar esos comandos por sí mismo si están documentados en &lt;code&gt;AGENTS.md&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Pasar la revisión de Ponytail&lt;/strong&gt; antes de dar la tarea por buena, con &lt;code&gt;/ponytail-review&lt;/code&gt;. Analiza el &lt;em&gt;diff&lt;/em&gt; actual buscando sobre-ingeniería y devuelve una lista de cosas a borrar. Es el paso que más rápido amortiza el tiempo invertido.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Revisar el &lt;code&gt;diff&lt;/code&gt; y confirmar&lt;/strong&gt; con el control de versiones. Conviene trabajar siempre sobre una rama y hacer &lt;em&gt;commits&lt;/em&gt; pequeños: es la red de seguridad natural cuando quien escribe el código es un agente.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Limpiar el contexto entre tareas&lt;/strong&gt; con &lt;code&gt;/new&lt;/code&gt;. Arrastrar el contexto de una tarea terminada empeora los resultados y dispara el consumo de tokens. En el apartado siguiente se detalla la gestión de sesiones.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Vigilar el panel de OmniRoute&lt;/strong&gt; de vez en cuando para ver qué proveedores se están usando, cuáles se han agotado y si el ahorro por compresión es el esperado.&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;h3 id=&#34;gestion-de-sesiones-en-opencode&#34;&gt;Gestión de sesiones en OpenCode&lt;a class=&#34;headerlink&#34; href=&#34;#gestion-de-sesiones-en-opencode&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;Al empezar a trabajar con OpenCode sorprende comprobar que, por mucho que se salga de la TUI con &lt;code&gt;Ctrl-d&lt;/code&gt; o con &lt;code&gt;/exit&lt;/code&gt;, las sesiones siguen apareciendo en el listado. No es un problema de cierre incompleto ni un proceso que se quede colgado: es que &lt;strong&gt;una sesión no es un proceso, es una conversación persistida&lt;/strong&gt;. Salir de la TUI termina la interfaz, pero el historial de la conversación (mensajes, herramientas ejecutadas, ficheros tocados, consumo de tokens) se guarda en la base de datos local de OpenCode para poder retomarlo después. Y como cada invocación de &lt;code&gt;opencode&lt;/code&gt; sin argumentos abre una sesión nueva, en un par de días de uso el listado tiene decenas de entradas.&lt;/p&gt;&lt;p&gt;Dicho de otra forma: &#34;cerrar&#34; no significa &#34;borrar&#34;. Lo que hay que adquirir es la costumbre de reutilizar y de podar.&lt;/p&gt;&lt;h4 id=&#34;retomar-en-lugar-de-crear&#34;&gt;Retomar en lugar de crear&lt;a class=&#34;headerlink&#34; href=&#34;#retomar-en-lugar-de-crear&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h4&gt;&lt;p&gt;Lo primero es dejar de arrancar siempre en blanco. Estas son las tres formas de continuar un trabajo previo:&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;3&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;opencode&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;--continue&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;# retoma la última sesión del proyecto actual (-c)&lt;/span&gt;opencode&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;--session&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&amp;lt;sessionID&amp;gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;# retoma una sesión concreta (-s)&lt;/span&gt;opencode&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;--session&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&amp;lt;sessionID&amp;gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;--fork&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;# la bifurca en una copia, dejando la original intacta&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;Y desde dentro de la TUI, el comando &lt;code&gt;/sessions&lt;/code&gt; (alias &lt;code&gt;/resume&lt;/code&gt; y &lt;code&gt;/continue&lt;/code&gt;, atajo &lt;code&gt;Ctrl-x l&lt;/code&gt;) abre el selector para saltar de una sesión a otra sin salir del programa.&lt;/p&gt;&lt;p&gt;La opción &lt;code&gt;--fork&lt;/code&gt; es especialmente útil cuando una conversación ha llegado a un punto interesante y se quiere probar dos caminos distintos: se bifurca y cada rama sigue por su lado, igual que con &lt;code&gt;git branch&lt;/code&gt;.&lt;/p&gt;&lt;h4 id=&#34;cerrar-bien-cada-tarea&#34;&gt;Cerrar bien cada tarea&lt;a class=&#34;headerlink&#34; href=&#34;#cerrar-bien-cada-tarea&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h4&gt;&lt;p&gt;Dentro de la TUI hay dos comandos que marcan el final de una tarea:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;code&gt;/new&lt;/code&gt; (alias &lt;code&gt;/clear&lt;/code&gt;, atajo &lt;code&gt;Ctrl-x n&lt;/code&gt;): abre una sesión nueva y limpia. Es lo que hay que usar al cambiar de tarea, en lugar de seguir escribiendo en la conversación anterior.&lt;/li&gt;&lt;li&gt;&lt;code&gt;/compact&lt;/code&gt; (alias &lt;code&gt;/summarize&lt;/code&gt;, atajo &lt;code&gt;Ctrl-x c&lt;/code&gt;): resume la conversación actual para liberar ventana de contexto sin perder el hilo. Es la alternativa cuando se quiere continuar con la misma tarea pero el contexto se ha vuelto pesado.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Si de una sesión interesa conservar el resultado, &lt;code&gt;/export&lt;/code&gt; vuelca la conversación a Markdown y la abre en el editor, y &lt;code&gt;opencode export &amp;lt;sessionID&amp;gt;&lt;/code&gt; hace lo propio en JSON desde la línea de comandos.&lt;/p&gt;&lt;h4 id=&#34;inventariar-y-podar&#34;&gt;Inventariar y podar&lt;a class=&#34;headerlink&#34; href=&#34;#inventariar-y-podar&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h4&gt;&lt;p&gt;Desde fuera de la TUI se gestiona el inventario completo:&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;3&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;4&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;opencode&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;session&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;list&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;# listado de sesiones&lt;/span&gt;opencode&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;session&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;list&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-n&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;m&#34;&gt;20&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;# limitar el número de entradas&lt;/span&gt;opencode&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;session&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;list&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;--format&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;json&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;# salida procesable por script&lt;/span&gt;opencode&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;session&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;delete&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&amp;lt;sessionID&amp;gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;# eliminar una sesión&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;Y para ver el coste de lo acumulado, que en este montaje es lo que determina cuánta cuota gratuita se está quemando:&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;3&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;opencode&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;stats&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;# consumo de tokens y coste&lt;/span&gt;opencode&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;stats&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;--days&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;m&#34;&gt;7&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;--models&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;# últimos 7 días, desglosado por modelo&lt;/span&gt;opencode&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;stats&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;--project&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;# solo el proyecto actual&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;h4 id=&#34;flujo-de-trabajo&#34;&gt;Flujo de trabajo&lt;a class=&#34;headerlink&#34; href=&#34;#flujo-de-trabajo&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h4&gt;&lt;p&gt;Reuniendo lo anterior, la rutina que mantiene el listado bajo control es:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;&lt;strong&gt;Una sesión por tarea&lt;/strong&gt;, no por jornada ni por proyecto. La unidad natural es lo que acaba en un &lt;em&gt;commit&lt;/em&gt;.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Retomar con &lt;code&gt;-c&lt;/code&gt;&lt;/strong&gt; cuando se vuelve a una tarea a medias, en vez de arrancar &lt;code&gt;opencode&lt;/code&gt; a secas y volver a explicar el contexto (que además se paga en tokens).&lt;/li&gt;&lt;li&gt;&lt;strong&gt;&lt;code&gt;/new&lt;/code&gt; al cambiar de tarea&lt;/strong&gt; y &lt;code&gt;/compact&lt;/code&gt; si la tarea se alarga pero sigue siendo la misma.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Exportar lo que merezca la pena&lt;/strong&gt; antes de dar por cerrada una sesión con conclusiones valiosas.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Poda periódica&lt;/strong&gt;, por ejemplo semanal, revisando &lt;code&gt;opencode session list&lt;/code&gt; y borrando con &lt;code&gt;opencode session delete&lt;/code&gt; todo lo que ya esté commiteado y no aporte nada.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Revisar &lt;code&gt;opencode stats&lt;/code&gt;&lt;/strong&gt; en esa misma poda, para tener la foto del consumo junto a la del panel de OmniRoute.&lt;/li&gt;&lt;/ol&gt;&lt;div class=&#34;admonition tip&#34;&gt;&lt;p class=&#34;admonition-title&#34;&gt;Las sesiones van por proyecto&lt;/p&gt;&lt;p&gt;OpenCode asocia las sesiones al directorio de trabajo desde el que se lanzó, así que &lt;code&gt;--continue&lt;/code&gt; o &lt;code&gt;-c&lt;/code&gt; retoma la última sesión &lt;em&gt;de ese proyecto&lt;/em&gt;, no la última en términos absolutos. Es un detalle que ayuda: trabajar siempre desde la raíz del repositorio mantiene los listados ordenados por proyecto de forma natural.&lt;/p&gt;&lt;/div&gt;&lt;h3 id=&#34;comandos-de-ponytail&#34;&gt;Comandos de Ponytail&lt;a class=&#34;headerlink&#34; href=&#34;#comandos-de-ponytail&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;Más allá del nivel de intensidad, el &lt;em&gt;skill&lt;/em&gt; aporta un puñado de comandos que encajan en distintos momentos del flujo anterior:&lt;/p&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Comando&lt;/th&gt;&lt;th&gt;Para qué sirve&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;/ponytail [lite \| full \| ultra \| off]&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Ajusta la intensidad o la desactiva. Sin argumento informa del nivel actual.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;/ponytail-review&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Revisa el &lt;em&gt;diff&lt;/em&gt; actual en busca de sobre-ingeniería y devuelve una lista de borrado.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;/ponytail-audit&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Lo mismo, pero sobre todo el repositorio en lugar de sobre el &lt;em&gt;diff&lt;/em&gt;.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;/ponytail-debt&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Recopila en un registro los atajos marcados con &lt;code&gt;ponytail:&lt;/code&gt; que se hayan ido aplazando.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;/ponytail-gain&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Muestra el marcador de impacto medido (menos código, menos coste, más velocidad).&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;/ponytail-help&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Referencia rápida de los comandos anteriores.&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p&gt;Cuando el agente decide no construir algo, deja un comentario del tipo &lt;code&gt;ponytail: browser has one&lt;/code&gt; explicando el peldaño de la escalera en el que se detuvo. Esos comentarios son los que después recoge &lt;code&gt;/ponytail-debt&lt;/code&gt;, de forma que las decisiones de &#34;esto ya se hará si hace falta&#34; quedan registradas en lugar de perderse.&lt;/p&gt;&lt;h3 id=&#34;ajustes-segun-el-tipo-de-proyecto&#34;&gt;Ajustes según el tipo de proyecto&lt;a class=&#34;headerlink&#34; href=&#34;#ajustes-segun-el-tipo-de-proyecto&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;Lo único que varía de forma apreciable entre escenarios es la elección de modelo y la preparación del contexto:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Proyectos nuevos desde cero (&lt;em&gt;greenfield&lt;/em&gt;)&lt;/strong&gt;. Hay poco contexto que cargar y mucho código que generar. Es el escenario ideal para las capas gratuitas: &lt;code&gt;auto/cheap&lt;/code&gt; o &lt;code&gt;auto/offline&lt;/code&gt; dan buen resultado y el consumo de tokens de entrada es bajo. Conviene empezar pidiendo el andamiaje del proyecto y el fichero de dependencias, y solo después las funcionalidades. También es donde más se nota Ponytail, porque es donde el agente tiene más libertad para inventar estructura de más.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Mantenimiento y evolución de código existente&lt;/strong&gt;. Aquí el cuello de botella es el contexto: el agente necesita leer bastante código antes de tocar nada. Interesa un &lt;code&gt;AGENTS.md&lt;/code&gt; detallado, activar la compresión de contexto de OmniRoute y usar &lt;code&gt;auto/coding&lt;/code&gt; para las tareas de modificación. Es también el caso donde más se nota el fallback, porque las sesiones son largas. El peldaño &#34;¿ya está en este repositorio?&#34; de Ponytail resulta especialmente valioso, ya que evita el clásico duplicado de un helper que ya existía tres directorios más allá.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Depuración de errores&lt;/strong&gt;. El flujo es el mismo, pero funciona mucho mejor si se le proporciona al agente una forma de reproducir el fallo (un test que falle, la traza completa, el comando exacto). Modelos con capacidad de razonamiento explícito dan mejores resultados; en OmniRoute se pueden seleccionar las variantes &lt;em&gt;thinking&lt;/em&gt; de los modelos que las ofrezcan. Un nivel &lt;code&gt;lite&lt;/code&gt; de Ponytail, o incluso &lt;code&gt;off&lt;/code&gt;, puede ser preferible aquí: al depurar interesa entender, no recortar.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Scripting y automatización&lt;/strong&gt;. Aquí interesa el modo CLI no interactivo, que permite integrar el agente en scripts, &lt;em&gt;hooks&lt;/em&gt; de git o tareas programadas:&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;2&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;opencode&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;run&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;Actualiza el CHANGELOG con los commits desde la última etiqueta&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;se&#34;&gt;\&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;--model&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;omniroute/auto/fast&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Refactorizaciones amplias y repetitivas&lt;/strong&gt;. Trocear el trabajo en tareas independientes y lanzarlas por separado, en lugar de pedir un cambio masivo en una sola sesión. Además de dar mejores resultados, evita agotar la ventana de contexto y la cuota de un proveedor de una sentada. Si lo que se busca es precisamente adelgazar código heredado, &lt;code&gt;/ponytail-audit&lt;/code&gt; sobre el repositorio completo y &lt;code&gt;/ponytail ultra&lt;/code&gt; son el punto de partida natural.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Proyectos con código sensible&lt;/strong&gt;. Si no se puede enviar el código a terceros, la misma configuración sirve conectando en OmniRoute un proveedor local (Ollama o LM Studio en la propia máquina) en lugar de los servicios gratuitos. Cambia el proveedor conectado en el panel; ni OpenCode ni el flujo de trabajo se tocan.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h2 id=&#34;conclusion&#34;&gt;Conclusión&lt;a class=&#34;headerlink&#34; href=&#34;#conclusion&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;La combinación de OpenCode, OmniRoute y Ponytail proporciona un entorno de desarrollo agéntico completo con coste de entrada nulo y sin las interrupciones por cuota agotada que caracterizan a las alternativas comerciales. Cada pieza ataca un frente distinto: el agente aporta las capacidades, el gateway la cuota y la independencia de proveedor, y el &lt;em&gt;skill&lt;/em&gt; la disciplina para que el código generado sea el mínimo necesario. Y las tres se declaran en un único fichero de configuración de unas veinte líneas.&lt;/p&gt;&lt;p&gt;El precio a pagar es una configuración inicial algo más laboriosa que la de un producto cerrado y la necesidad de revisar de vez en cuando qué proveedores gratuitos siguen operativos. A cambio se obtiene algo que las suscripciones no dan: independencia respecto al proveedor, visibilidad completa de lo que consume el agente y menos código del que arrepentirse.&lt;/p&gt;</description><link>https://apuntes.eduardofilo.es/2026-07-26_opencode_omniroute.html</link> <pubDate>Sun, 26 Jul 2026 12:00:00 +0200</pubDate><source url="https://apuntes.eduardofilo.es/rss.xml">Apuntes de eduardófilo</source><guid isPermaLink="true">https://apuntes.eduardofilo.es/2026-07-26_opencode_omniroute.html</guid> </item> <item> <title>OpenCode, OmniRoute, and Ponytail Installation</title> <description>&lt;p&gt;&lt;img alt=&#34;OpenCode + OmniRoute&#34; src=&#34;../images/posts/2026-07-26_opencode_omniroute/opencode_omniroute.png&#34; /&gt;&lt;/p&gt;&lt;div class=&#34;admonition note&#34;&gt;&lt;p class=&#34;admonition-title&#34;&gt;FreeLLMAPI&lt;/p&gt;&lt;p&gt;An alternative, also runnable on our own machine, discovered after the article was written and specialized in routing free models, is &lt;a href=&#34;https://freellmapi.co/es/&#34;&gt;FreeLLMAPI&lt;/a&gt;.&lt;/p&gt;&lt;/div&gt;&lt;p&gt;AI-assisted development began as intelligent line-level code completion. It evolved into a &#34;second opinion&#34; that reviewed file-level code and suggested changes. In the last two years the field has moved on again to what we call &lt;em&gt;agentic development&lt;/em&gt;: an agent that works at the project-level, edits files, executes commands, performs changes that were previously only suggested, runs tests, and iterates until the task is complete. The problem is that all commercial tools of this type (Claude Code, Cursor, Devin, Copilot, Codex, etc.) share two limitations: a monthly subscription and quotas that run out just when the session is getting interesting. Because here we don&#39;t consider the use via API, which for the personal scope is unaffordable.&lt;/p&gt;&lt;p&gt;There is also a third, quieter but also expensive problem: agents tend to &lt;strong&gt;over-build&lt;/strong&gt;. They are asked for a date picker and end up installing a library, writing a wrapper component, and adding a stylesheet. Every extra line is paid for twice: in tokens when generating it and in tokens every time it re-enters the context.&lt;/p&gt;&lt;p&gt;This article describes how to set up a complete agentic development environment by combining three open-source projects that address these exact limitations:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;a href=&#34;https://opencode.ai/&#34;&gt;&lt;strong&gt;OpenCode&lt;/strong&gt;&lt;/a&gt;: the terminal-based programming agent.&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://omniroute.online/&#34;&gt;&lt;strong&gt;OmniRoute&lt;/strong&gt;&lt;/a&gt;: the model router/gateway that powers the agent.&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://github.com/DietrichGebert/ponytail&#34;&gt;&lt;strong&gt;Ponytail&lt;/strong&gt;&lt;/a&gt;: the &lt;em&gt;skill&lt;/em&gt; that enforces minimal code discipline on the agent.&lt;/li&gt;&lt;/ul&gt;&lt;h2 id=&#34;product-description&#34;&gt;Product Description&lt;a class=&#34;headerlink&#34; href=&#34;#product-description&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;&lt;h3 id=&#34;opencode&#34;&gt;OpenCode&lt;a class=&#34;headerlink&#34; href=&#34;#opencode&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;OpenCode is an open-source programming agent that runs in the terminal (TUI) and, most importantly for our purpose, is model-provider agnostic. Unlike Claude Code (tied to Anthropic) or Codex (tied to OpenAI), OpenCode allows configuring any provider, including those exposing an OpenAI-compatible API, which today is practically all of them.&lt;/p&gt;&lt;p&gt;Main capabilities:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Terminal interface with persistent sessions, context management, and &lt;em&gt;undo&lt;/em&gt; for applied changes.&lt;/li&gt;&lt;li&gt;Access to tools: file reading and writing, command execution, repository search, version control.&lt;/li&gt;&lt;li&gt;Per-project context file (&lt;code&gt;AGENTS.md&lt;/code&gt;) generated with &lt;code&gt;/init&lt;/code&gt; to instruct the agent on repository conventions.&lt;/li&gt;&lt;li&gt;MCP (&lt;em&gt;Model Context Protocol&lt;/em&gt;) support to add external tools.&lt;/li&gt;&lt;li&gt;Non-interactive CLI mode (&lt;code&gt;opencode run &#34;...&#34;&lt;/code&gt;) for automations and scripts.&lt;/li&gt;&lt;li&gt;Specialized agents and work modes (e.g., a &lt;em&gt;plan&lt;/em&gt; mode that makes no changes, designed for the pre-planning phase).&lt;/li&gt;&lt;/ul&gt;&lt;h3 id=&#34;omniroute&#34;&gt;OmniRoute&lt;a class=&#34;headerlink&#34; href=&#34;#omniroute&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;OmniRoute is a local, open-source AI &lt;em&gt;gateway&lt;/em&gt;. It is installed on your own machine (or a VPS), sets up an OpenAI-compatible API endpoint and a web administration panel, and from there routes each request to any of the hundreds of cataloged providers, about 90 of which have a free tier.&lt;/p&gt;&lt;p&gt;The interesting thing is what it does with the catalog:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Automatic routing&lt;/strong&gt;: using the &lt;code&gt;auto&lt;/code&gt; virtual model, OmniRoute builds a &lt;em&gt;combo&lt;/em&gt; of your connected providers and chooses one for each request based on live scoring. Variants exist: &lt;code&gt;auto/coding&lt;/code&gt; (quality for code generation), &lt;code&gt;auto/fast&lt;/code&gt; (lowest latency), &lt;code&gt;auto/cheap&lt;/code&gt; (cheapest per token), and &lt;code&gt;auto/offline&lt;/code&gt; (most available quota margin).&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Cascading fallback&lt;/strong&gt;: when a provider returns a quota error, rate limit, or 4xx-5xx, the request is transparently retried against the next provider in the list. This prevents the classic &#34;quota exceeded, come back in five hours&#34; message.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Context compression&lt;/strong&gt;: a set of engines that trim the prompt (deduplication, history pruning, file compacting), enabling significant token savings, especially valuable when working with free tiers measured in tokens/day.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Control panel&lt;/strong&gt; at &lt;code&gt;http://localhost:20128&lt;/code&gt; with per-provider usage stats, API key management, and assisted configuration for common CLI tools.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Local-first&lt;/strong&gt;: provider keys and traffic stay on your machine; OmniRoute is not a cloud service requiring a subscription.&lt;/li&gt;&lt;/ul&gt;&lt;h3 id=&#34;ponytail&#34;&gt;Ponytail&lt;a class=&#34;headerlink&#34; href=&#34;#ponytail&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;Ponytail is a &lt;strong&gt;&lt;em&gt;skill&lt;/em&gt;&lt;/strong&gt;, a set of instructions injected into the agent&#39;s context every turn to modify its behavior. Its sole mission is to combat over-engineering by forcing the agent to go through a decision ladder before writing a single line, stopping at the first rung that solves the problem:&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;3&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;4&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;5&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;6&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;7&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;1. Does this need to exist? → no: don&amp;#39;t do it (YAGNI)2. Already in this codebase? → reuse it, don&amp;#39;t rewrite3. Stdlib does it? → use it4. Native platform feature? → use it5. Installed dependency? → use it6. One line? → one line7. Only then: the minimum that works&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;The project&#39;s canonical example, which we referenced in the introduction, sums it up well: when asked for a date picker, the result is no longer a library plus a component but, thanks to Ponytail, &lt;code&gt;&amp;lt;input type=&#34;date&#34;&amp;gt;&lt;/code&gt;.&lt;/p&gt;&lt;p&gt;Two nuances:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;The ladder is applied &lt;strong&gt;after&lt;/strong&gt; understanding the problem, not instead of it. The agent is still required to read the affected code and trace the actual flow before picking a rung. Lazy about the solution, never about reading.&lt;/li&gt;&lt;li&gt;Four things are never cut: trust-boundary validation, data-loss handling, security, and accessibility. The rule is &#34;only what the task needs.&#34;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;According to the project&#39;s published &lt;em&gt;benchmark&lt;/em&gt; (real agent sessions on a FastAPI + React repo, with and without the &lt;em&gt;skill&lt;/em&gt;), results vs. the baseline show 54% fewer lines of code, 22% fewer tokens, 20% lower cost, and 27% less time, with no penalty to security checks. As always with &lt;em&gt;benchmarks&lt;/em&gt;, take them as an order of magnitude rather than a promise: savings are huge where there&#39;s a clear over-build trap and near zero where code was already minimal.&lt;/p&gt;&lt;p&gt;Ponytail works with a good number of agents (Claude Code, Codex, Copilot CLI, Gemini CLI, Cursor, Devin...), and OpenCode is one of those with first-class &lt;em&gt;plugin&lt;/em&gt; support.&lt;/p&gt;&lt;h3 id=&#34;the-value-of-the-combination&#34;&gt;The Value of the Combination&lt;a class=&#34;headerlink&#34; href=&#34;#the-value-of-the-combination&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;Separately each piece is useful, but combined, the limitations mentioned at the beginning vanish. Each covers a different layer and they don&#39;t overlap: OmniRoute decides who responds, OpenCode decides what is done, and Ponytail decides how much code is written.&lt;/p&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Problem&lt;/th&gt;&lt;th&gt;How the combination solves it&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Monthly subscription&lt;/td&gt;&lt;td&gt;OpenCode is free and OmniRoute connects to dozens of providers&#39; free tiers. The entry cost is €0.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Quota exhaustion&lt;/td&gt;&lt;td&gt;OmniRoute&#39;s fallback jumps to the next provider without interrupting the agent&#39;s session.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Provider dependence&lt;/td&gt;&lt;td&gt;The agent only knows one endpoint (&lt;code&gt;localhost:20128/v1&lt;/code&gt;); changing models or providers requires no changes to the agent.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Excessive token consumption&lt;/td&gt;&lt;td&gt;OmniRoute&#39;s compression engines reduce the size of agent prompts, which are typically large due to repository context.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Lack of spending visibility&lt;/td&gt;&lt;td&gt;The OmniRoute panel centralizes consumption across all providers and connected tools.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Oversized code&lt;/td&gt;&lt;td&gt;Ponytail trims what the agent builds, reducing code to review, maintain, and re-enter context in future sessions.&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p&gt;The three pieces reinforce each other on available quota: Ponytail reduces output tokens (less code generated), OmniRoute compression reduces input tokens (less context sent), and the fallback draws on the quota of every connected provider.&lt;/p&gt;&lt;p&gt;An additional benefit: since OmniRoute exposes a standard endpoint, the same gateway simultaneously serves OpenCode in the terminal, a VSCode extension, or any other OpenAI-compatible client. Configure once, use everywhere.&lt;/p&gt;&lt;div class=&#34;admonition tip&#34;&gt;&lt;p class=&#34;admonition-title&#34;&gt;Modest models, better results&lt;/p&gt;&lt;p&gt;An interesting side effect of Ponytail is that it makes working with free (typically smaller) models more viable. The less code a model is asked to generate, the fewer chances it has to make a mistake; the &lt;em&gt;skill&lt;/em&gt; specifically reduces the size of the task in each step.&lt;/p&gt;&lt;/div&gt;&lt;div class=&#34;admonition warning&#34;&gt;&lt;p class=&#34;admonition-title&#34;&gt;About Free Tiers&lt;/p&gt;&lt;p&gt;Provider free tier conditions change frequently and some disappear without notice. The advantage of the OmniRoute approach is that these changes are absorbed by the gateway (by connecting another provider) without touching the agent&#39;s configuration. It&#39;s also wise to review each free provider&#39;s privacy policy before sending them code from a sensitive project.&lt;/p&gt;&lt;/div&gt;&lt;h2 id=&#34;installation&#34;&gt;Installation&lt;a class=&#34;headerlink&#34; href=&#34;#installation&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;The entire procedure was performed on Linux. On Windows and MacOS, the steps are equivalent, only the method of installing requirements changes.&lt;/p&gt;&lt;p&gt;All three projects are distributed via npm, so the only common requirement is a recent version of Node.js (v22 or higher).&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;1&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;node&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;--version&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;h3 id=&#34;opencode-installation&#34;&gt;OpenCode Installation&lt;a class=&#34;headerlink&#34; href=&#34;#opencode-installation&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;The recommended way is through the official install script:&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;1&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;curl&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-fsSL&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;https://opencode.ai/install&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;bash&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;Alternatively, depending on the system:&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;3&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;4&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;npm&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;install&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-g&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;opencode-ai&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;# npm (also bun, pnpm, or yarn)&lt;/span&gt;brew&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;install&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;anomalyco/tap/opencode&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;# MacOS / Linux with Homebrew&lt;/span&gt;sudo&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;pacman&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-S&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;opencode&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;# Arch Linux (official repos)&lt;/span&gt;paru&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-S&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;opencode-bin&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;# Arch Linux (AUR, latest version)&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;Verify the installation by launching the agent in any directory:&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;1&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;opencode&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;At this point, OpenCode will start but ask for provider credentials. No need to provide any yet: OmniRoute will fill that gap. For now, simply exit the program.&lt;/p&gt;&lt;h3 id=&#34;omniroute-installation&#34;&gt;OmniRoute Installation&lt;a class=&#34;headerlink&#34; href=&#34;#omniroute-installation&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h3&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;2&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;npm&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;install&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-g&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;omnirouteomniroute&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;The &lt;code&gt;omniroute&lt;/code&gt; command starts both the API and the web panel on port &lt;code&gt;20128&lt;/code&gt;:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Panel: &lt;code&gt;http://localhost:20128&lt;/code&gt;&lt;/li&gt;&lt;li&gt;OpenAI-compatible API: &lt;code&gt;http://localhost:20128/v1&lt;/code&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Other deployment methods exist, useful if you want to keep the gateway running permanently:&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;1&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;docker&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;run&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;omniroute&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;# container&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;Besides the npm package and container, the project distributes a desktop app (Electron), arm64 images (works on a Raspberry Pi), and is executable on Android via Termux. An interesting option is to leave OmniRoute running on a VPS or home server and point all development machines at it.&lt;/p&gt;&lt;h3 id=&#34;ponytail-installation&#34;&gt;Ponytail Installation&lt;a class=&#34;headerlink&#34; href=&#34;#ponytail-installation&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;Ponytail isn&#39;t installed on the system; it&#39;s declared as an OpenCode &lt;em&gt;plugin&lt;/em&gt;. Simply add this entry to your &lt;code&gt;opencode.json&lt;/code&gt; configuration file (the next section shows the full file with this and the other pieces):&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;1&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;&amp;quot;plugin&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;@dietrichgebert/ponytail&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;OpenCode downloads the package from npm the first time it starts with this configuration. If you prefer working with a local repo copy to modify rules, clone it and point to the &lt;em&gt;plugin&lt;/em&gt; file:&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;1&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;git&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;clone&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;https://github.com/DietrichGebert/ponytail.git&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;~/ponytail&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;1&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;&amp;quot;plugin&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;/home/user/ponytail/.opencode/plugins/ponytail.mjs&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;Relative paths (like &lt;code&gt;./.opencode/plugins/ponytail.mjs&lt;/code&gt;) resolve relative to the &lt;code&gt;opencode.json&lt;/code&gt; declaring them; to share a single &lt;em&gt;checkout&lt;/em&gt; across projects, use the absolute path, as shown in the example.&lt;/p&gt;&lt;div class=&#34;admonition tip&#34;&gt;&lt;p class=&#34;admonition-title&#34;&gt;Works Without a Plugin Too&lt;/p&gt;&lt;p&gt;The repo includes rules in &lt;code&gt;AGENTS.md&lt;/code&gt; format and rule formats for Cursor, Devin, Cline, Kiro, Copilot, etc. Copying that file to your project yields the same always-on behavior in almost any agent. The OpenCode &lt;em&gt;plugin&lt;/em&gt; specifically adds the &lt;code&gt;/ponytail&lt;/code&gt; commands and intensity levels.&lt;/p&gt;&lt;/div&gt;&lt;h2 id=&#34;joint-configuration&#34;&gt;Joint Configuration&lt;a class=&#34;headerlink&#34; href=&#34;#joint-configuration&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;The integration involves OpenCode stopping direct talk to providers to speak only to OmniRoute, while Ponytail is injected at every turn of the conversation. There are five steps.&lt;/p&gt;&lt;h3 id=&#34;1-connect-providers-in-omniroute&#34;&gt;1. Connect Providers in OmniRoute&lt;a class=&#34;headerlink&#34; href=&#34;#1-connect-providers-in-omniroute&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;With &lt;code&gt;omniroute&lt;/code&gt; running, open &lt;code&gt;http://localhost:20128&lt;/code&gt; and go to the &lt;strong&gt;Providers&lt;/strong&gt; section (I recommend setting the interface to &lt;code&gt;English&lt;/code&gt;, otherwise you&#39;ll see many strings prefixed with &lt;code&gt;__MISSING__&lt;/code&gt;; also use the search field, as the number of configuration groups in OmniRoute is huge). The catalog appears there with an indicator for free tiers. Connect several, as the system&#39;s value lies in redundancy: when one runs out of quota, the others remain available. Providers requiring no key (&lt;code&gt;No Auth&lt;/code&gt;) are connected by default.&lt;/p&gt;&lt;p&gt;The catalog is classified by categories, and the category determines the connection procedure:&lt;/p&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Category&lt;/th&gt;&lt;th&gt;How to connect&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;em&gt;No Auth&lt;/em&gt;&lt;/td&gt;&lt;td&gt;They are active from the start. Although we will deactivate some as we see later.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;em&gt;Free Tier&lt;/em&gt;&lt;/td&gt;&lt;td&gt;Free tier that requires signing up with the provider and pasting an API key.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;em&gt;OAuth&lt;/em&gt;&lt;/td&gt;&lt;td&gt;Sign-in button for providers where you already have an account: OmniRoute opens the provider flow and saves the resulting &lt;em&gt;token&lt;/em&gt;.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;em&gt;API Key&lt;/em&gt;&lt;/td&gt;&lt;td&gt;Paid providers (some with initial free credits); paste the key.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;em&gt;Local&lt;/em&gt;&lt;/td&gt;&lt;td&gt;Models running on your own machine (Ollama, LM Studio, vLLM…); specify the local URL.&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p&gt;The top filter allows you to narrow down to your interests, and the search bar accepts the provider&#39;s name or ID.&lt;/p&gt;&lt;h4 id=&#34;no-auth-providers&#34;&gt;No Auth Providers&lt;a class=&#34;headerlink&#34; href=&#34;#no-auth-providers&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h4&gt;&lt;p&gt;In general, the selection and configuration of providers is the most complicated, cumbersome, and time-consuming part of the entire process described in this article.&lt;/p&gt;&lt;p&gt;Some of the providers activated by default, such as those in the &#34;No Auth&#34; category, can cause problems. During the first sessions of using OpenCode, I observed that most requests returned empty responses. After investigating, I found that the issue was caused by the intervention of the &#34;Augment (Auggie CLI)&#34; provider, which I therefore recommend deactivating.&lt;/p&gt;&lt;p&gt;Checking the logs in the OmniRoute console (&lt;code&gt;Monitoring &amp;gt; Logs&lt;/code&gt;) I found that the providers &#34;Chipotle Pepper AI (Free)&#34; and &#34;DuckDuckGo AI Chat&#34; always failed, so although they don&#39;t introduce incorrect responses like &#34;Augment (Auggie CLI)&#34;, they delay the provider cascade traversal, so I recommend deactivating them as well. We will deactivate the &#34;Veo AI Free&#34; provider, as it only offers video models that we won&#39;t use for coding.&lt;/p&gt;&lt;h4 id=&#34;free-api-key-providers&#34;&gt;Free API Key Providers&lt;a class=&#34;headerlink&#34; href=&#34;#free-api-key-providers&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h4&gt;&lt;p&gt;The procedure is always the same, only the site for obtaining the key changes:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Sign up with the provider and generate an API key in their panel (the link is usually in the provider&#39;s own card in OmniRoute).&lt;/li&gt;&lt;li&gt;In OmniRoute, go to &lt;strong&gt;Providers&lt;/strong&gt; → search for the provider → click connect/configure.&lt;/li&gt;&lt;li&gt;Paste the key into the form and save.&lt;/li&gt;&lt;li&gt;Click the &lt;strong&gt;Test&lt;/strong&gt; button on the provider card. If it responds correctly, its models join the gateway catalog and automatically enter the &lt;code&gt;auto&lt;/code&gt; model pool.&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;The providers in this category are those that will allow us to take full advantage of OmniRoute. They are numerous, but as mentioned in the previous section, it requires quite a bit of work to configure them (obtaining API keys from different providers) and to stay up to date with which ones change in operation or are more or less recommended at a given time.&lt;/p&gt;&lt;p&gt;Some documents to follow to keep the list of free providers in good shape are the following:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;a href=&#34;https://github.com/diegosouzapw/OmniRoute/wiki/Providers-Guide#best-free-providers&#34;&gt;Providers Guide - Best Free Providers&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://github.com/diegosouzapw/OmniRoute/blob/release/v3.8.49/docs/getting-started/FREE-TIERS-GUIDE.md&#34;&gt;FREE TIERS GUIDE&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://github.com/diegosouzapw/OmniRoute/blob/release/v3.8.49/docs/reference/FREE_TIERS.md&#34;&gt;FREE TIERS&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Some of the providers in this type that I find recommendable at the time of writing this article are:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;a href=&#34;https://aistudio.google.com/api-keys&#34;&gt;Gemini (Google AI Studio)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://groq.com/&#34;&gt;Groq&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://console.mistral.ai/&#34;&gt;Mistral&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://dash.cloudflare.com/&#34;&gt;Cloudflare Workers AI&lt;/a&gt;: After entering the API Key, the attempt to connect to the models will fail, indicating that an &#34;Account ID&#34; is also required. The &#34;Account ID&#34; is the hash that appears below the URL &lt;code&gt;https://dash.cloudflare.com&lt;/code&gt; once the session is created and started. We will enter that hash in the &#34;Account ID&#34; field of the provider settings.&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://enter.pollinations.ai/&#34;&gt;Pollinations AI&lt;/a&gt;: Although the connection box indicates that the API Key is optional, it is better to create one.&lt;/li&gt;&lt;/ul&gt;&lt;h4 id=&#34;oauth-providers&#34;&gt;OAuth Providers&lt;a class=&#34;headerlink&#34; href=&#34;#oauth-providers&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h4&gt;&lt;p&gt;With these, there&#39;s no key to copy: click the connection button, sign in through the provider&#39;s browser flow, and OmniRoute will save encrypted credentials in its local database. This applies to existing tool accounts (Copilot, Cursor, Kilo Code, Qoder, etc.).&lt;/p&gt;&lt;div class=&#34;admonition warning&#34;&gt;&lt;p class=&#34;admonition-title&#34;&gt;Review Terms of Service&lt;/p&gt;&lt;p&gt;Several of these providers are services designed for their own clients; some expressly prohibit use via proxies or third-party clients. The OmniRoute provider card includes a warning when this is the case. It&#39;s wise to read these notices before connecting an account you want to keep.&lt;/p&gt;&lt;/div&gt;&lt;h4 id=&#34;curating-the-pool-for-agentic-use&#34;&gt;Curating the Pool for Agentic Use&lt;a class=&#34;headerlink&#34; href=&#34;#curating-the-pool-for-agentic-use&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h4&gt;&lt;p&gt;There is one issue that isn&#39;t mentioned in the OmniRoute documentation and that, in my experience, has been essential to getting the setup up and running. The point is that not all providers in the catalog are suitable for feeding an agent.&lt;/p&gt;&lt;p&gt;The reason is that an agent like OpenCode doesn&#39;t just ask for text: every request carries the list of &lt;em&gt;tools&lt;/em&gt; at its disposal (read files, run commands, search the repository…) and it expects the model to reply with calls to those tools. Providers that are the official API of a model return those calls to the client, which is the correct behaviour. But the catalog also includes two kinds of entries that behave differently:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Proxies of a web client&lt;/strong&gt; (those you connect to with a chat session cookie rather than an API key). The service on the other end has its own tool engine and tries to execute the tools itself, in its own environment, instead of returning them.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Agent front-ends&lt;/strong&gt; (services designed to be consumed from their own command line tool). They ship their own tool catalog and don&#39;t fit as the engine behind another agent.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;The symptom is baffling, because the agent reports no error at all: it simply returns an empty response, or a text in which the model explains that it could not explore the repository and asks us, for example, to paste the contents of the files ourselves.&lt;/p&gt;&lt;h5 id=&#34;an-admission-test&#34;&gt;An Admission Test&lt;a class=&#34;headerlink&#34; href=&#34;#an-admission-test&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h5&gt;&lt;p&gt;The reliable way to decide whether a provider belongs in the pool is to ask the gateway: send a request with a tool and check whether the model invokes it. The response must contain a &lt;code&gt;tool_calls&lt;/code&gt; block with the tool name and its arguments; if prose arrives instead, that provider is no good.&lt;/p&gt;&lt;p&gt;A single request against &lt;code&gt;auto/coding&lt;/code&gt; is not enough to validate the pool. &lt;code&gt;auto&lt;/code&gt; routing tends to stick to the last working provider and does not guarantee that all candidates receive traffic. Each provider must be tested separately.&lt;/p&gt;&lt;p&gt;The problematic behavior we want to detect (proxies that execute tools themselves, front-ends with their own tool catalog) is a property of the provider, not of the individual model: a proxy either passes &lt;code&gt;tool_calls&lt;/code&gt; back to the client or it doesn&#39;t, regardless of which model sits behind it. That is why it is enough to test one representative model per provider, identified by the prefix before the slash (&lt;code&gt;groq/&lt;/code&gt;, &lt;code&gt;mistral/&lt;/code&gt;, &lt;code&gt;cf/&lt;/code&gt;...), instead of the hundreds of models in the catalog. In reality we will test the first 5 models of each provider in case one fails for some specific reason. The &lt;code&gt;jq&lt;/code&gt; filter excludes only the virtual &lt;code&gt;auto/*&lt;/code&gt; models:&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 1&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 2&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 3&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 4&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 5&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 6&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 7&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 8&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 9&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;10&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;11&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;12&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;13&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;14&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;15&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;16&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;17&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;18&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;19&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;20&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;21&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;22&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;23&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;24&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;25&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;26&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;27&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;28&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;29&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;30&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;31&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;32&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;33&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;34&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;35&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;36&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;37&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;38&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;39&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;40&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&#34;nv&#34;&gt;API&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;http://localhost:20128/v1&amp;quot;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;KEY&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;sk-your-omniroute-key&amp;quot;&lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;# List of providers (excluding auto/*)&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;providers&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;curl&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-s&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$API&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;/models&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-H&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;Authorization: Bearer &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$KEY&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;se&#34;&gt;\&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;jq&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-r&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;[.data[].id | select(startswith(&amp;quot;auto/&amp;quot;) | not)]&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt; | group_by(split(&amp;quot;/&amp;quot;)[0]) | map(.[0]) | .[]&amp;#39;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;se&#34;&gt;\&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;cut&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-d/&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-f1&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;sort&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-u&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;for&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;prov&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;in&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$providers&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;do&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;# Up to 5 models from this provider&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;prov_models&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;curl&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-s&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$API&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;/models&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-H&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;Authorization: Bearer &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$KEY&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;se&#34;&gt;\&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;jq&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-r&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;--arg&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;p&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$prov&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;[.data[].id | select(startswith($p+&amp;quot;/&amp;quot;))][:5][]&amp;#39;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;status&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;tested&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;for&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;model&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;in&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$prov_models&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;do&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;tested&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$model&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;resp&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;curl&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-s&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-i&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$API&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;/chat/completions&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;se&#34;&gt;\&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-H&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;Authorization: Bearer &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$KEY&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;se&#34;&gt;\&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-H&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;Content-Type: application/json&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;se&#34;&gt;\&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-d&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;{\&amp;quot;model\&amp;quot;:\&amp;quot;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$model&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;\&amp;quot;,\&amp;quot;stream\&amp;quot;:false,\&amp;quot;messages\&amp;quot;:[{\&amp;quot;role\&amp;quot;:\&amp;quot;user\&amp;quot;,\&amp;quot;content\&amp;quot;:\&amp;quot;Read the file /etc/hostname\&amp;quot;}],\&amp;quot;tools\&amp;quot;:[{\&amp;quot;type\&amp;quot;:\&amp;quot;function\&amp;quot;,\&amp;quot;function\&amp;quot;:{\&amp;quot;name\&amp;quot;:\&amp;quot;read\&amp;quot;,\&amp;quot;description\&amp;quot;:\&amp;quot;Reads a file\&amp;quot;,\&amp;quot;parameters\&amp;quot;:{\&amp;quot;type\&amp;quot;:\&amp;quot;object\&amp;quot;,\&amp;quot;properties\&amp;quot;:{\&amp;quot;path\&amp;quot;:{\&amp;quot;type\&amp;quot;:\&amp;quot;string\&amp;quot;}},\&amp;quot;required\&amp;quot;:[\&amp;quot;path\&amp;quot;]}}}]}&amp;quot;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;http_code&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;printf&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;%s&amp;#39;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$resp&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;head&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-1&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;grep&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-o&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;[0-9][0-9][0-9]&amp;#39;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;body&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;printf&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;%s&amp;#39;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$resp&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;sed&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-n&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;/^\r\?$/,$p&amp;#39;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;tail&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-n&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;+2&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;if&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$http_code&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;200&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;then&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;if&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;printf&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;%s&amp;#39;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$body&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;jq&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-e&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;.choices[0].message.tool_calls[0].function.name&amp;#39;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&amp;gt;/dev/null&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;m&#34;&gt;2&lt;/span&gt;&amp;gt;&lt;span class=&#34;p&#34;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;then&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;status&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;OK&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;else&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;status&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;FAIL (no tool_calls)&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;fi&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;break&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;elif&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$http_code&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;401&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;||&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$http_code&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;403&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;then&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;status&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;FAIL (auth &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$http_code&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;)&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;break&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;else&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;continue&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;# 404, 400... model unavailable, try the next one&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;fi&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;done&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-z&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$status&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;&amp;amp;&amp;amp;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;status&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;FAIL (no valid models)&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;printf&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;%-24s %-45s %s\n&amp;#39;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$status&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$prov&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$tested&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;done&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;Requires &lt;code&gt;jq&lt;/code&gt;. The script distinguishes three failure causes:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;strong&gt;&lt;code&gt;FAIL (no tool_calls)&lt;/code&gt;&lt;/strong&gt;: the provider returned a 200 but with prose instead of a tool call. This is the problem we are after: a proxy that runs the tools itself or a front-end with its own catalog. =&amp;gt; Disconnect it.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;&lt;code&gt;FAIL (auth 401/403)&lt;/code&gt;&lt;/strong&gt;: the provider&#39;s key is expired, misconfigured, or out of quota. This is not a &lt;em&gt;tools&lt;/em&gt; problem but a configuration one. =&amp;gt; Fix the connection in &lt;strong&gt;Providers&lt;/strong&gt; (or disconnect it if there&#39;s no remedy).&lt;/li&gt;&lt;li&gt;&lt;strong&gt;&lt;code&gt;FAIL (no valid models)&lt;/code&gt;&lt;/strong&gt;: every model tested returned 404 or 400. The provider is down or its catalog has changed. =&amp;gt; Review it in &lt;strong&gt;Providers&lt;/strong&gt;.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;In the output, the right-hand column shows the model that produced the result. This is a one-time setup step that you only need to repeat when adding a new provider.&lt;/p&gt;&lt;h5 id=&#34;two-symptoms-to-spot-in-the-logs&#34;&gt;Two Symptoms to Spot in the Logs&lt;a class=&#34;headerlink&#34; href=&#34;#two-symptoms-to-spot-in-the-logs&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h5&gt;&lt;p&gt;In &lt;code&gt;Monitoring &amp;gt; Logs&lt;/code&gt; there are two patterns that give away a provider worth retiring:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;strong&gt;&lt;code&gt;200&lt;/code&gt; with &lt;code&gt;TO: 0&lt;/code&gt;&lt;/strong&gt; in a few milliseconds: the provider returned an empty response with a success status. A real inference never takes 15 ms.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Slow responses whose content is text&lt;/strong&gt; where &lt;code&gt;tool_calls&lt;/code&gt; should be, often carrying error messages from the remote service itself explaining that the tools don&#39;t exist.&lt;/li&gt;&lt;/ul&gt;&lt;div class=&#34;admonition warning&#34;&gt;&lt;p class=&#34;admonition-title&#34;&gt;Fallback doesn&#39;t trigger on failures disguised as success&lt;/p&gt;&lt;p&gt;It&#39;s worth understanding the limits of the system. OmniRoute&#39;s retry cascade works with explicit failures: a 429 for quota, a 502 or a timeout cause the request to be retried against the next provider, and this is perfectly visible in the log. But the two cases above reach the gateway as correct responses: a &lt;code&gt;200&lt;/code&gt; with an empty body is, to a router, a valid response. No gateway can arbitrate that without semantically inspecting the content of every response.&lt;/p&gt;&lt;p&gt;Hence curating the pool is our responsibility, and it&#39;s a step that shouldn&#39;t be skipped. Put another way: automatic routing is only as good as the worst apparently healthy provider in the pool.&lt;/p&gt;&lt;/div&gt;&lt;h3 id=&#34;2-create-an-omniroute-api-key&#34;&gt;2. Create an OmniRoute API Key&lt;a class=&#34;headerlink&#34; href=&#34;#2-create-an-omniroute-api-key&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;In the panel, go to &lt;strong&gt;API Manager&lt;/strong&gt; → &lt;strong&gt;Create API Key&lt;/strong&gt;. Give it a descriptive name (e.g., &lt;code&gt;opencode&lt;/code&gt;) and copy the generated key, which looks like &lt;code&gt;sk-xxxxxxxx-xxxxxxxx&lt;/code&gt;.&lt;/p&gt;&lt;p&gt;This is a local key: it&#39;s used by your clients (OpenCode in this case) to authenticate against OmniRoute and has nothing to do with provider keys, which are held by OmniRoute.&lt;/p&gt;&lt;p&gt;You can verify the gateway is responding and see available models:&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;1&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;curl&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;http://localhost:20128/v1/models&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-H&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;Authorization: Bearer sk-your-omniroute-key&amp;quot;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;h3 id=&#34;3-declare-omniroute-as-a-provider-in-opencode&#34;&gt;3. Declare OmniRoute as a Provider in OpenCode&lt;a class=&#34;headerlink&#34; href=&#34;#3-declare-omniroute-as-a-provider-in-opencode&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;OpenCode supports any OpenAI-compatible provider by declaring it in its config file. To apply configuration globally, write it to &lt;code&gt;~/.config/opencode/opencode.json&lt;/code&gt;:&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 1&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 2&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 3&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 4&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 5&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 6&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 7&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 8&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 9&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;10&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;11&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;12&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;13&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;14&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;15&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;16&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;17&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;18&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;19&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;20&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;21&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;22&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;&amp;quot;$schema&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;https://opencode.ai/config.json&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;&amp;quot;plugin&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;@dietrichgebert/ponytail&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;],&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;&amp;quot;provider&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;&amp;quot;omniroute&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;&amp;quot;npm&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;@ai-sdk/openai-compatible&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;&amp;quot;name&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;OmniRoute&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;&amp;quot;options&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;&amp;quot;baseURL&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;http://localhost:20128/v1&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;&amp;quot;apiKey&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;sk-your-omniroute-key&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;},&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;&amp;quot;models&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;&amp;quot;auto&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;&amp;quot;name&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;Auto (balanced)&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;},&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;&amp;quot;auto/coding&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;&amp;quot;name&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;Auto (coding quality)&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;},&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;&amp;quot;auto/cheap&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;&amp;quot;name&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;Auto (cheapest)&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;},&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;&amp;quot;auto/fast&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;&amp;quot;name&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;Auto (fastest)&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;},&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;&amp;quot;auto/offline&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;&amp;quot;name&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;Auto (max quota)&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;},&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;&amp;quot;model&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;omniroute/auto/coding&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;Important points of this configuration:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;code&gt;npm&lt;/code&gt;: the &lt;code&gt;@ai-sdk/openai-compatible&lt;/code&gt; adapter is used for &lt;code&gt;/v1/chat/completions&lt;/code&gt; endpoints, which OmniRoute uses.&lt;/li&gt;&lt;li&gt;&lt;code&gt;options.baseURL&lt;/code&gt;: the gateway endpoint. If OmniRoute is on another machine, use its IP or domain here.&lt;/li&gt;&lt;li&gt;&lt;code&gt;options.apiKey&lt;/code&gt;: the API key created in OmniRoute.&lt;/li&gt;&lt;li&gt;&lt;code&gt;models&lt;/code&gt;: no need to list specific provider models; simply declare the &lt;code&gt;auto&lt;/code&gt; virtual models to enable smart routing and fallback. To fix a specific model, add it using the ID returned by &lt;code&gt;/v1/models&lt;/code&gt; (see &lt;a href=&#34;#2-create-an-omniroute-api-key&#34;&gt;previous point&lt;/a&gt;).&lt;/li&gt;&lt;li&gt;&lt;code&gt;model&lt;/code&gt;: default model at startup. &lt;code&gt;auto/coding&lt;/code&gt; is a good choice for development; &lt;code&gt;auto/offline&lt;/code&gt; is useful when quota headroom is the priority.&lt;/li&gt;&lt;li&gt;&lt;code&gt;plugin&lt;/code&gt;: the list of OpenCode &lt;em&gt;plugins&lt;/em&gt;, where Ponytail belongs.&lt;/li&gt;&lt;/ul&gt;&lt;div class=&#34;admonition tip&#34;&gt;&lt;p class=&#34;admonition-title&#34;&gt;Key Outside the Config File&lt;/p&gt;&lt;p&gt;If the config file will be versioned (e.g., in a &lt;em&gt;dotfiles&lt;/em&gt; repo), it&#39;s better not to write the key in it. OpenCode allows storing credentials with &lt;code&gt;/connect&lt;/code&gt; (choose &lt;em&gt;Other&lt;/em&gt;, ID &lt;code&gt;omniroute&lt;/code&gt;), in which case you can omit &lt;code&gt;options.apiKey&lt;/code&gt; from the JSON.&lt;/p&gt;&lt;/div&gt;&lt;p&gt;You can also place an &lt;code&gt;opencode.json&lt;/code&gt; file in a specific project&#39;s root, merging its settings with the global ones. This is practical for forcing a different model for a specific project.&lt;/p&gt;&lt;h3 id=&#34;4-adjust-ponytail-level&#34;&gt;4. Adjust Ponytail Level&lt;a class=&#34;headerlink&#34; href=&#34;#4-adjust-ponytail-level&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;Ponytail needs no config file: it works as soon as it&#39;s declared as a &lt;em&gt;plugin&lt;/em&gt;. The only thing to decide is the intensity level, which can be changed on the fly from the TUI:&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;3&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;4&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;5&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;/ponytail → reports current level/ponytail lite → mild trimming/ponytail full → default level/ponytail ultra → aggressive trimming/ponytail off → disabled for this session&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;The default level is &lt;code&gt;full&lt;/code&gt;. To set a different default for all new sessions, use the &lt;code&gt;PONYTAIL_DEFAULT_MODE&lt;/code&gt; environment variable or the &lt;code&gt;defaultMode&lt;/code&gt; field in &lt;code&gt;~/.config/ponytail/config.json&lt;/code&gt;:&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;1&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&#34;nb&#34;&gt;export&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;PONYTAIL_DEFAULT_MODE&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;full&amp;quot;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;While active, the ruleset is also injected into subagents spawned by the main agent. To exclude some (e.g., read-only search agents), use a regex against the subagent type defined in the following environment variable:&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;1&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&#34;nb&#34;&gt;export&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;PONYTAIL_SUBAGENT_MATCHER&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;build|code&amp;quot;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;h3 id=&#34;5-verify-integration&#34;&gt;5. Verify Integration&lt;a class=&#34;headerlink&#34; href=&#34;#5-verify-integration&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;Start the agent and verify the provider appears:&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;1&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;opencode&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;Within the TUI, the &lt;code&gt;/models&lt;/code&gt; command should show OmniRoute entries.&lt;/p&gt;&lt;p&gt;From a directory containing a repository or project, run a quick test in CLI non-interactive mode:&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;1&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;opencode&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;run&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;Summarize this repo in three lines&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;--model&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;omniroute/auto/coding&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;While it runs, the OmniRoute panel (&lt;code&gt;Monitoring &amp;gt; Logs&lt;/code&gt;) shows in real-time which provider handled the request, tokens consumed, and compression savings. If a provider fails, the log shows the automatic jump to the next.&lt;/p&gt;&lt;p&gt;To check if Ponytail is loaded, simply run &lt;code&gt;/ponytail&lt;/code&gt; in the TUI (it returns the active level) or &lt;code&gt;/ponytail-help&lt;/code&gt; (lists its commands).&lt;/p&gt;&lt;div class=&#34;admonition warning&#34;&gt;&lt;p class=&#34;admonition-title&#34;&gt;Apparent Ponytail Startup ERROR&lt;/p&gt;&lt;p&gt;If OpenCode is started with &lt;code&gt;--print-logs&lt;/code&gt;, this line may appear when loading the configuration:&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;1&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;ERROR message=&amp;quot;failed to load plugin&amp;quot; path=@dietrichgebert/ponytail error=&amp;quot;path must be a string or a file descriptor&amp;quot;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;It&#39;s misleading: OpenCode tries to load the plugin by two paths and one of them fails, but the other loads it correctly. The test that Ponytail is operational is that &lt;code&gt;/ponytail&lt;/code&gt; responds with the active level. Note that the level is persisted between sessions (in &lt;code&gt;~/.config/opencode/.ponytail-active&lt;/code&gt;): a &lt;code&gt;/ponytail off&lt;/code&gt; from a previous test leaves the plugin loaded but disabled. When in doubt: &lt;code&gt;/ponytail full&lt;/code&gt; and ask the agent what its &lt;em&gt;system prompt&lt;/em&gt; says about &lt;code&gt;PONYTAIL&lt;/code&gt;.&lt;/p&gt;&lt;/div&gt;&lt;div class=&#34;admonition tip&#34;&gt;&lt;p class=&#34;admonition-title&#34;&gt;Environment Variables for Other Tools&lt;/p&gt;&lt;p&gt;Exporting these variables in your &lt;code&gt;.bashrc&lt;/code&gt; or &lt;code&gt;.zshrc&lt;/code&gt; makes any other OpenAI-convention-respecting tool use the gateway without further configuration:&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;2&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&#34;nb&#34;&gt;export&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;OPENAI_BASE_URL&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;http://localhost:20128/v1&amp;quot;&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;export&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;OPENAI_API_KEY&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;sk-your-omniroute-key&amp;quot;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;/div&gt;&lt;h2 id=&#34;project-types-and-operations&#34;&gt;Project Types and Operations&lt;a class=&#34;headerlink&#34; href=&#34;#project-types-and-operations&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Once the environment is set up, the workflow is essentially the same regardless of language, project size, or task nature. What changes between cases is the choice of model, trimming level, and context preparation. Thus, we first describe the common flow and then the adjustments per project type.&lt;/p&gt;&lt;h3 id=&#34;common-operations&#34;&gt;Common Operations&lt;a class=&#34;headerlink&#34; href=&#34;#common-operations&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h3&gt;&lt;ol&gt;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Navigate to the repository and start the agent&lt;/strong&gt;:&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;2&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&#34;nb&#34;&gt;cd&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;my-projectopencode&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Generate the context file&lt;/strong&gt; the first time using the &lt;code&gt;/init&lt;/code&gt; command in the TUI. OpenCode explores the repo and writes an &lt;code&gt;AGENTS.md&lt;/code&gt; with the project description, build/test commands, and detected conventions. It&#39;s worth reviewing and manual completion; it&#39;s the most influential document for result quality and should be versioned with the project.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Plan before executing&lt;/strong&gt;. For any non-trivial change, ask for a plan first rather than direct implementation. OpenCode has a planning mode that doesn&#39;t write to disk; reviewing a plan costs much less than reviewing a 400-line incorrect &lt;em&gt;diff&lt;/em&gt;.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Iterate in small steps&lt;/strong&gt;, validating with your project tools (compiler, &lt;em&gt;linter&lt;/em&gt;, tests) after each step. The agent can execute these commands itself if documented in &lt;code&gt;AGENTS.md&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Pass the Ponytail review&lt;/strong&gt; before finalizing the task with &lt;code&gt;/ponytail-review&lt;/code&gt;. It analyzes the current &lt;em&gt;diff&lt;/em&gt; for over-engineering and returns a delete-list. This step quickly pays off in saved time.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Review the &lt;code&gt;diff&lt;/code&gt; and commit&lt;/strong&gt; using version control. Always work on a branch and make small &lt;em&gt;commits&lt;/em&gt;: it&#39;s the natural safety net when an agent writes the code.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Clear context between tasks&lt;/strong&gt; with &lt;code&gt;/new&lt;/code&gt;. Dragging context from a finished task worsens results and spikes token consumption. The next section details session management.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Monitor the OmniRoute panel&lt;/strong&gt; occasionally to see which providers are in use, which are exhausted, and if compression savings are as expected.&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;h3 id=&#34;session-management-in-opencode&#34;&gt;Session Management in OpenCode&lt;a class=&#34;headerlink&#34; href=&#34;#session-management-in-opencode&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;When starting with OpenCode, it&#39;s surprising to find that sessions remain listed even after exiting the TUI with &lt;code&gt;Ctrl-d&lt;/code&gt; or &lt;code&gt;/exit&lt;/code&gt;. It&#39;s not a hang or incomplete closure: &lt;strong&gt;a session is not a process, it&#39;s a persisted conversation&lt;/strong&gt;. Exiting the TUI ends the interface, but the conversation history (messages, tools, files, token usage) is stored in OpenCode&#39;s local database for later resumption. Since each &lt;code&gt;opencode&lt;/code&gt; call without arguments starts a new session, you&#39;ll have dozens of entries in a few days.&lt;/p&gt;&lt;p&gt;In other words: &#34;closing&#34; doesn&#39;t mean &#34;deleting.&#34; You must build the habit of reusing and pruning.&lt;/p&gt;&lt;h4 id=&#34;resume-instead-of-create&#34;&gt;Resume Instead of Create&lt;a class=&#34;headerlink&#34; href=&#34;#resume-instead-of-create&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h4&gt;&lt;p&gt;First, stop starting from scratch. Here are three ways to continue previous work:&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;3&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;opencode&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;--continue&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;# resumes the last session of the current project (-c)&lt;/span&gt;opencode&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;--session&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&amp;lt;sessionID&amp;gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;# resumes a specific session (-s)&lt;/span&gt;opencode&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;--session&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&amp;lt;sessionID&amp;gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;--fork&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;# forks it into a copy, leaving the original intact&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;From within the TUI, the &lt;code&gt;/sessions&lt;/code&gt; command (aliases: &lt;code&gt;/resume&lt;/code&gt;, &lt;code&gt;/continue&lt;/code&gt;; shortcut: &lt;code&gt;Ctrl+x l&lt;/code&gt;) opens a selector to switch sessions without exiting.&lt;/p&gt;&lt;p&gt;The &lt;code&gt;--fork&lt;/code&gt; option is particularly useful when a conversation reaches an interesting point and you want to test two different paths: it forks, and each branch goes its own way, much like a &lt;code&gt;git branch&lt;/code&gt;.&lt;/p&gt;&lt;h4 id=&#34;closing-tasks-properly&#34;&gt;Closing Tasks Properly&lt;a class=&#34;headerlink&#34; href=&#34;#closing-tasks-properly&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h4&gt;&lt;p&gt;Two TUI commands mark the end of a task:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;code&gt;/new&lt;/code&gt; (alias: &lt;code&gt;/clear&lt;/code&gt;, shortcut: &lt;code&gt;Ctrl+x n&lt;/code&gt;): opens a new, clean session. Use this when switching tasks instead of continuing in the old conversation.&lt;/li&gt;&lt;li&gt;&lt;code&gt;/compact&lt;/code&gt; (alias: &lt;code&gt;/summarize&lt;/code&gt;, shortcut: &lt;code&gt;Ctrl+x c&lt;/code&gt;): summarizes the current conversation to free up the context window without losing the thread. Use this if the same task is getting too &#34;heavy&#34; context-wise.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;To keep a session&#39;s result, &lt;code&gt;/export&lt;/code&gt; dumps the conversation to Markdown and opens your editor, while &lt;code&gt;opencode export &amp;lt;sessionID&amp;gt;&lt;/code&gt; does the same in JSON from the CLI.&lt;/p&gt;&lt;h4 id=&#34;inventory-and-pruning&#34;&gt;Inventory and Pruning&lt;a class=&#34;headerlink&#34; href=&#34;#inventory-and-pruning&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h4&gt;&lt;p&gt;From outside the TUI, you manage the complete inventory:&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;3&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;4&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;opencode&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;session&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;list&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;# list sessions&lt;/span&gt;opencode&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;session&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;list&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-n&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;m&#34;&gt;20&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;# limit number of entries&lt;/span&gt;opencode&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;session&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;list&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;--format&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;json&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;# script-processable output&lt;/span&gt;opencode&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;session&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;delete&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&amp;lt;sessionID&amp;gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;# delete a session&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;To see cumulative cost, which in this setup determines how much free quota you&#39;re burning:&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;3&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;opencode&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;stats&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;# token usage and cost&lt;/span&gt;opencode&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;stats&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;--days&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;m&#34;&gt;7&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;--models&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;# last 7 days, per-model breakdown&lt;/span&gt;opencode&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;stats&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;--project&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;# current project only&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;h4 id=&#34;workflow&#34;&gt;Workflow&lt;a class=&#34;headerlink&#34; href=&#34;#workflow&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h4&gt;&lt;p&gt;Putting it all together, the routine to keep the list under control is:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;&lt;strong&gt;One session per task&lt;/strong&gt;, not per day or project. The natural unit is whatever ends in a &lt;em&gt;commit&lt;/em&gt;.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Resume with &lt;code&gt;-c&lt;/code&gt;&lt;/strong&gt; when returning to a partial task, instead of starting &lt;code&gt;opencode&lt;/code&gt; fresh and re-explaining context (which costs tokens).&lt;/li&gt;&lt;li&gt;&lt;strong&gt;&lt;code&gt;/new&lt;/code&gt; when switching tasks&lt;/strong&gt; and &lt;code&gt;/compact&lt;/code&gt; if the task grows but remains the same.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Export what&#39;s worth keeping&lt;/strong&gt; before closing a session with valuable conclusions.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Periodic pruning&lt;/strong&gt; (e.g., weekly), reviewing &lt;code&gt;opencode session list&lt;/code&gt; and deleting anything already committed that adds no value with &lt;code&gt;opencode session delete&lt;/code&gt;.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Review &lt;code&gt;opencode stats&lt;/code&gt;&lt;/strong&gt; during the same prune to get the consumption picture alongside the OmniRoute panel.&lt;/li&gt;&lt;/ol&gt;&lt;div class=&#34;admonition tip&#34;&gt;&lt;p class=&#34;admonition-title&#34;&gt;Sessions Are Per Project&lt;/p&gt;&lt;p&gt;OpenCode associates sessions with the working directory they were launched from; thus, &lt;code&gt;--continue&lt;/code&gt; or &lt;code&gt;-c&lt;/code&gt; resumes the last session &lt;em&gt;of that project&lt;/em&gt;, not the last overall. This helps: always working from the repo root naturally keeps lists project-ordered.&lt;/p&gt;&lt;/div&gt;&lt;h3 id=&#34;ponytail-commands&#34;&gt;Ponytail Commands&lt;a class=&#34;headerlink&#34; href=&#34;#ponytail-commands&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;Beyond intensity levels, the &lt;em&gt;skill&lt;/em&gt; provides a few commands fitting different workflow stages:&lt;/p&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Command&lt;/th&gt;&lt;th&gt;Purpose&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;/ponytail [lite \| full \| ultra \| off]&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Adjusts intensity or disables it. Reports current level if no argument is provided.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;/ponytail-review&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Reviews the current &lt;em&gt;diff&lt;/em&gt; for over-engineering and returns a delete-list.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;/ponytail-audit&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Same, but for the entire repo instead of just the &lt;em&gt;diff&lt;/em&gt;.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;/ponytail-debt&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Harvests &lt;code&gt;ponytail:&lt;/code&gt; shortcuts deferred into a ledger.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;/ponytail-gain&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Shows the measured impact scoreboard (less code/cost, more speed).&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;/ponytail-help&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Quick reference for the above commands.&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p&gt;When the agent decides not to build something, it leaves a comment like &lt;code&gt;ponytail: browser has one&lt;/code&gt;, explaining the ladder rung where it stopped. These comments are what &lt;code&gt;/ponytail-debt&lt;/code&gt; harvests, so &#34;defer for now&#34; decisions are recorded rather than lost.&lt;/p&gt;&lt;h3 id=&#34;adjustments-by-project-type&#34;&gt;Adjustments by Project Type&lt;a class=&#34;headerlink&#34; href=&#34;#adjustments-by-project-type&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;The only significant variation between scenarios is model choice and context preparation:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;&lt;strong&gt;New projects from scratch (&lt;em&gt;greenfield&lt;/em&gt;)&lt;/strong&gt;. Little context to load and lots of code to generate. Ideal for free tiers: &lt;code&gt;auto/cheap&lt;/code&gt; or &lt;code&gt;auto/offline&lt;/code&gt; yield good results and input token consumption is low. Start by asking for project scaffolding and dependency files, then functionalities. Ponytail shines here, as agents have more freedom to invent extra structure.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Maintenance and evolution of existing code&lt;/strong&gt;. Context is the bottleneck here; the agent needs to read significant code before touching anything. A detailed &lt;code&gt;AGENTS.md&lt;/code&gt;, active OmniRoute context compression, and &lt;code&gt;auto/coding&lt;/code&gt; for modifications are key. Fallback is most noticeable here due to long sessions. Ponytail&#39;s &#34;Already in this codebase?&#34; rung is especially valuable, preventing duplicate helpers.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Error debugging&lt;/strong&gt;. The flow is the same but works much better if you provide a way to reproduce the failure (failing test, full trace, exact command). Explicit reasoning models yield better results; choose &lt;em&gt;thinking&lt;/em&gt; variants in OmniRoute. A &lt;code&gt;lite&lt;/code&gt; or &lt;code&gt;off&lt;/code&gt; Ponytail level might be preferable here: debugging is about understanding, not trimming.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Scripting and automation&lt;/strong&gt;. CLI non-interactive mode is useful here for integration into scripts, git hooks, or scheduled tasks:&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;2&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;opencode&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;run&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;Update CHANGELOG with commits since the last tag&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;se&#34;&gt;\&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;--model&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;omniroute/auto/fast&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Large, repetitive refactors&lt;/strong&gt;. Break work into independent tasks and launch them separately instead of one massive change. This yields better results and avoids exhausting context windows or provider quotas in one go. If slimming down legacy code is the goal, &lt;code&gt;/ponytail-audit&lt;/code&gt; on the whole repo and &lt;code&gt;/ponytail ultra&lt;/code&gt; are the natural starting point.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Sensitive code projects&lt;/strong&gt;. If code cannot be sent to third parties, the same setup works by connecting a local provider in OmniRoute (Ollama, LM Studio) instead of free services. Only the provider in the panel changes; OpenCode and the workflow remain the same.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h2 id=&#34;conclusion&#34;&gt;Conclusion&lt;a class=&#34;headerlink&#34; href=&#34;#conclusion&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;The combination of OpenCode, OmniRoute, and Ponytail provides a complete agentic development environment with zero entry cost and no quota interruptions. Each piece attacks a different front: the agent provides capabilities, the gateway provides quota and provider independence, and the &lt;em&gt;skill&lt;/em&gt; provides discipline for minimal code generation. All three are declared in a single 20-line config file.&lt;/p&gt;&lt;p&gt;The price is a slightly more laborious initial setup compared to closed products and the need to occasionally check active free providers. In return, you get what subscriptions don&#39;t offer: provider independence, full consumption visibility, and less code to regret.&lt;/p&gt;</description><link>https://apuntes.eduardofilo.es/en/2026-07-26_opencode_omniroute.html</link> <pubDate>Sun, 26 Jul 2026 12:00:00 +0200</pubDate><source url="https://apuntes.eduardofilo.es/rss.xml">Apuntes de eduardófilo</source><guid isPermaLink="true">https://apuntes.eduardofilo.es/en/2026-07-26_opencode_omniroute.html</guid> </item> <item> <title>G&amp;W Zelda hack</title> <description>&lt;p&gt;&lt;img alt=&#34;Zelda G&amp;amp;W&#34; src=&#34;images/posts/2026-03-08_zelda_gw/zelda_gnw.png&#34; /&gt;&lt;/p&gt;&lt;p&gt;Un conocido fabricante japonés de videojuegos empezó a comercializar a finales de 2022, un par de máquinas replicando el aspecto de algunas de las viejas G&amp;amp;W, sobre la base de un microcontrolador STM32H7 que ejecuta un firmware baremetal con emuladores de NES y GB, tres juegos clásicos y una aplicación reloj inspirados en la franquicia Zelda. La máquina resulta muy interesante por las virtudes de estar basada en un microcontrolador, en lugar de un microprocesador, es decir gran duración de la pequeña batería que contiene (la de un joycon de Switch), arranque y modo suspensión instantáneos. El soporte de datos es un pequeño chip flash NOR de 4MB (en el caso del modelo Zelda), suficiente para alojar los emuladores y juegos mencionados, pero muy escaso si se quiere sacar partido de la máquina y de su relativamente potente CPU.&lt;/p&gt;&lt;p&gt;El firmware original sirve para comprobar la solvencia de la plataforma para emular al menos las máquinas de 8 bit que funcionan originalmente, por lo que en seguida el dispositivo resultó atractivo para la comunidad hacker. Al poco tiempo de empezar a comercializarse ya &lt;a href=&#34;https://www.youtube.com/watch?v=Rsi8p5gbaps&#34;&gt;aparecieron procedimientos para desbloquear y modificar la máquina&lt;/a&gt; de manera que se pudieran instalar más emuladores y juegos.&lt;/p&gt;&lt;p&gt;La primera modificación importante propuesta por la comunidad consistía en sustituir el chip flash por otro de 64MB para disponer de más espacio para juegos y emuladores. Tiempo después la modificación evolucionó para incluir un slot de tarjetas microSD donde almacenar los juegos y savestates, así como para simplificar enormemente el proceso de actualización, convirtiendo a la máquina así modificada en una máquina de emulación portátil inigualable en aspectos como portabilidad, tamaño, duración de la batería y tiempos de arranque.&lt;/p&gt;&lt;p&gt;Con cualquiera de las dos modificaciones se consigue emular las siguientes máquinas:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Amstrad CPC6128 (beta)&lt;/li&gt;&lt;li&gt;Atari 2600&lt;/li&gt;&lt;li&gt;Atari 7800&lt;/li&gt;&lt;li&gt;ColecoVision&lt;/li&gt;&lt;li&gt;Gameboy / Gameboy Color&lt;/li&gt;&lt;li&gt;Game &amp;amp; Watch / LCD Games&lt;/li&gt;&lt;li&gt;MSX1/2/2+&lt;/li&gt;&lt;li&gt;Nintendo Entertainment System&lt;/li&gt;&lt;li&gt;PC Engine / TurboGrafx-16&lt;/li&gt;&lt;li&gt;Pokémon Mini&lt;/li&gt;&lt;li&gt;Sega Game Gear&lt;/li&gt;&lt;li&gt;Sega Genesis / Megadrive&lt;/li&gt;&lt;li&gt;Sega Master System&lt;/li&gt;&lt;li&gt;Sega SG-1000&lt;/li&gt;&lt;li&gt;Tamagotchi P1&lt;/li&gt;&lt;li&gt;Watara Supervision&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;En este artículo vamos a describir los pasos para realizar las dos modificaciones. La modificación para añadir el slot microSD requiere también la sustitución de la flash, ya que cada vez que carguemos un juego nuevo de la microSD se grabará en el chip flash, y el original de 4MB soporta pocos ciclos de escritura dado que no estaba previsto que se utilizara de esta forma.&lt;/p&gt;&lt;p&gt;Todo el proceso ha sido realizado sobre un sistema Linux. En principio el desarrollo sobre sistemas Windows y MacOS X también es posible, pero los pasos para instalar los requerimientos y el software que utilizaremos necesariamente cambiarán.&lt;/p&gt;&lt;h2 id=&#34;conexion-al-puerto-swd&#34;&gt;Conexión al puerto SWD&lt;a class=&#34;headerlink&#34; href=&#34;#conexion-al-puerto-swd&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;El desbloqueo del procesador y la modificación del firmware se hacen a través del puerto SWD que habitualmente tienen los microcontroladores STM32 para programar su memoria flash interna y depurar los desarrollos. Este puerto SWD se encuentra en la PCB sin poblar, es decir sin pines o conectores soldados.&lt;/p&gt;&lt;p&gt;&lt;img alt=&#34;SWD&#34; src=&#34;images/posts/2026-03-08_zelda_gw/swd.jpg&#34; /&gt;&lt;/p&gt;&lt;p&gt;Para hacer la conexión con dicho puerto hay varias opciones:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Soldar cables directamente.&lt;/li&gt;&lt;li&gt;Introducir cables limpios o cables de pin macho, inclinándolos para forzar el contacto.&lt;/li&gt;&lt;li&gt;Utilizar &lt;a href=&#34;https://www.amazon.es/gp/product/B009UOHE1K/&#34;&gt;pinzas sonda de conexión&lt;/a&gt; especializadas.&lt;/li&gt;&lt;li&gt;Utilizar &lt;a href=&#34;https://es.aliexpress.com/item/1005007602295920.html&#34;&gt;pinzas pogo pin&lt;/a&gt; (Single row 5pin).&lt;/li&gt;&lt;li&gt;Rutear los pines SWDIO y SWCLK hacia el puerto USB-C.&lt;/li&gt;&lt;/ul&gt;&lt;h4 id=&#34;version-dificil&#34;&gt;Versión difícil&lt;a class=&#34;headerlink&#34; href=&#34;#version-dificil&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h4&gt;&lt;p&gt;Como empecé a cacharrear con la máquina antes de que apareciera el mod de microSD, en su momento realicé el ruteado del puerto SWD al USB-C. Si se va a terminar realizando el mod de microSD no merece la pena el esfuerzo, dado que a partir de entonces el flasheo del firmware se realizará desde la propia microSD. De todas formas, a propósitos de documentación vamos a describir cómo se haría el ruteado.&lt;/p&gt;&lt;p&gt;El puerto USB-C solo tiene conectados los pines de alimentación ya que está previsto únicamente para cargar la máquina. Por tanto se pueden utilizar los pines D+ y D- que están libres para cablearlos a los pines SWDIO y SWCLK que son los únicos imprescindibles del puerto SWD. Necesitaremos también conectar a 5V y GND, pero estos ya se encuentran cableados en el puerto USB-C. El ruteado se hace con un fino cable barnizado (enamel) de los que se utilizan para construir bobinas. La soldadura a los dos pines centrales del puerto USB-C que son los que corresponden a D+ y D- es complicada al tener un paso muy pequeño, pero con paciencia y flux puede lograrse.&lt;/p&gt;&lt;p&gt;&lt;img alt=&#34;Ruteado USB-C&#34; src=&#34;images/posts/2026-03-08_zelda_gw/ruteado_usb-c_1.jpg&#34; /&gt;&lt;/p&gt;&lt;p&gt;Una vez resuelto la única parte difícil del procedimiento, es decir soldar los cables al puerto USB, estos se van sujetando cada cierta distancia con cinta Kapton y dirigiendo hacia la zona de la batería por donde se aprovecha el rebaje a ambos lados que hay del alojamiento que la rodea para pasar uno de los cables. El otro se conduce por el espacio que hay entre alojamiento de la batería y la PCB. De esta forma se consigue que ambos cables no puedan tocarse, aunque en teoría al estar barnizados no debería haber problema, se adopta este camino separado como precaución adicional.&lt;/p&gt;&lt;p&gt;&lt;img alt=&#34;Ruteado USB-C&#34; src=&#34;images/posts/2026-03-08_zelda_gw/ruteado_usb-c_2.jpg&#34; /&gt;&lt;/p&gt;&lt;p&gt;Una vez que los cables alcanzan las proximidades del puerto SWD, se utilizan los dos test pads que pueden verse en la foto para realizar las soldaduras.&lt;/p&gt;&lt;p&gt;&lt;img alt=&#34;Ruteado USB-C&#34; src=&#34;images/posts/2026-03-08_zelda_gw/ruteado_usb-c_3.jpg&#34; /&gt;&lt;/p&gt;&lt;p&gt;La correspondencia entre D+ y D- en el puerto USB-C con los SWDIO y SWCLK del puerto SWD, puede hacerse de cualquier forma siempre que tengamos claro donde está cada cual para más tarde hacer el adaptador USB-SWD que necesitaremos. En este montaje se ha optado por la siguiente correspondencia.&lt;/p&gt;&lt;ul&gt;&lt;li&gt;D+ ↔ SWDIO&lt;/li&gt;&lt;li&gt;D- ↔ SWCLK&lt;/li&gt;&lt;/ul&gt;&lt;div class=&#34;admonition warning&#34;&gt;&lt;p class=&#34;admonition-title&#34;&gt;Warning&lt;/p&gt;&lt;p&gt;La idea en un principio era adoptar la correspondencia utilizada en &lt;a href=&#34;https://facelesstech.wordpress.com/2022/01/08/game-and-watch-hacking-with-rpi/&#34;&gt;esta otra guía&lt;/a&gt;, pero por un error cometido al principio, se terminó haciendo justo al revés. Como se comentaba antes, en realidad no es problema siempre que se tenga claro cómo están hechas las conexiones. Este aviso es solo por si alguien intenta seguir ambas guías de forma simultánea, para que se tenga en cuenta dicha diferencia.&lt;/p&gt;&lt;/div&gt;&lt;p&gt;Una vez hecho el ruteado del puerto, necesitaremos construir el adaptador para poder extraer las señales SWDIO y SWCLK del puerto USB-C. Para ello se corta un cable USB-A convencional para tener acceso a los cuatro cables que contiene por separado y se sueldan a ellos conectores hembra de pin. El adaptador se completa con un adaptador USB-A a USB-C que se marca para orientarlo correctamente cuando lo vayamos a utilizar, ya que solo hemos ruteado los pines D+ y D- de uno de los dos lados (el puerto USB-C es reversible).&lt;/p&gt;&lt;p&gt;&lt;img alt=&#34;Adaptador USB-C SWD&#34; src=&#34;images/posts/2026-03-08_zelda_gw/adaptador_usb-c_swd.jpg&#34; /&gt;&lt;/p&gt;&lt;p&gt;Los colores de los cables suelen estar estandarizados de la siguiente forma:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Rojo: 5V&lt;/li&gt;&lt;li&gt;Negro: GND&lt;/li&gt;&lt;li&gt;Verde: D+&lt;/li&gt;&lt;li&gt;Blanco: D-&lt;/li&gt;&lt;/ul&gt;&lt;h4 id=&#34;version-facil&#34;&gt;Versión fácil&lt;a class=&#34;headerlink&#34; href=&#34;#version-facil&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h4&gt;&lt;p&gt;La manera recomendada para hacer la conexión al puerto SWD (si no se quiere soldar, que es la opción más fiable) es mediante &lt;a href=&#34;https://www.amazon.es/gp/product/B009UOHE1K/&#34;&gt;pinzas sonda de conexión&lt;/a&gt; especializadas. Para aplicar dichas pinzas, es recomendable desconectar previamente la batería de la consola. El conector de la batería salta fácilmente al introducir una pieza fina de plástico por debajo del mismo.&lt;/p&gt;&lt;p&gt;&lt;img alt=&#34;Pinzas conexión GnW&#34; src=&#34;images/posts/2026-03-08_zelda_gw/pinzas_conexion_gnw.jpg&#34; /&gt;&lt;/p&gt;&lt;h2 id=&#34;sonda-de-programacion&#34;&gt;Sonda de programación&lt;a class=&#34;headerlink&#34; href=&#34;#sonda-de-programacion&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Ya tenemos resuelto dónde conectar en la consola. Ahora necesitamos un dispositivo capaz de comunicarse con ese puerto SWD del microcontrolador. Las opciones son:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;a href=&#34;https://www.raspberrypi.com/products/raspberry-pi-pico/&#34;&gt;Raspberry Pi Pico&lt;/a&gt; (Recomendado)&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://www.st.com/en/development-tools/st-link-v2.html&#34;&gt;STLink&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://www.segger.com/products/debug-probes/j-link/#models&#34;&gt;JLink&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://daplink.io/&#34;&gt;DAPLink&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://projects.raspberrypi.org/en/projects/physical-computing/1&#34;&gt;Raspberry Pi (GPIO)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Me decanté por usar una Raspberry Pi Pico. Para que funcione como sonda de programación SWD hay que cargarle el firmware &lt;a href=&#34;https://github.com/raspberrypi/debugprobe&#34;&gt;debugprobe&lt;/a&gt;. En mi caso utilicé el fichero &lt;a href=&#34;https://github.com/raspberrypi/debugprobe/releases/download/picoprobe-cmsis-v1.0.3/picoprobe.uf2&#34;&gt;picoprobe.uf2&lt;/a&gt; de &lt;a href=&#34;https://github.com/raspberrypi/debugprobe/releases/tag/picoprobe-cmsis-v1.0.3&#34;&gt;esta release&lt;/a&gt; en concreto. Para flashear la Pico solo hay que conectarla al ordenador por USB mientras pulsamos el botón &lt;code&gt;BOOTSEL&lt;/code&gt; para forzar el modo en el que se monta como una unidad de almacenamiento y arrastrar el fichero &lt;code&gt;.uf2&lt;/code&gt; a esa unidad. Tras autoflashearse, la Pico se reiniciará automáticamente y empezará a funcionar como sonda de programación SWD.&lt;/p&gt;&lt;p&gt;Una vez programada la Pico, solo queda hacer las conexiones de los cables que habíamos conectado al puerto SWD de la Game&amp;amp;Watch. Podemos utilizar el mismo tipo de pinzas que aplicamos a la consola, aunque en mi caso utilicé otras similares pero un poco más robustas, ya que el espaciado de los pines GPIO de la Pico es mucho mayor.&lt;/p&gt;&lt;p&gt;&lt;img alt=&#34;Pinzas conexión Pico&#34; src=&#34;images/posts/2026-03-08_zelda_gw/pinzas_conexion_pico.jpg&#34; /&gt;&lt;/p&gt;&lt;p&gt;El conexionado entre Game&amp;amp;Watch y Raspberry Pi Pico es:&lt;/p&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th style=&#34;text-align: left;&#34;&gt;Pico&lt;/th&gt;&lt;th style=&#34;text-align: left;&#34;&gt;GnW&lt;/th&gt;&lt;th style=&#34;text-align: left;&#34;&gt;Color&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&#34;text-align: left;&#34;&gt;3&lt;/td&gt;&lt;td style=&#34;text-align: left;&#34;&gt;3&lt;/td&gt;&lt;td style=&#34;text-align: left;&#34;&gt;Negro&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&#34;text-align: left;&#34;&gt;4&lt;/td&gt;&lt;td style=&#34;text-align: left;&#34;&gt;5&lt;/td&gt;&lt;td style=&#34;text-align: left;&#34;&gt;Blanco&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&#34;text-align: left;&#34;&gt;5&lt;/td&gt;&lt;td style=&#34;text-align: left;&#34;&gt;2&lt;/td&gt;&lt;td style=&#34;text-align: left;&#34;&gt;Verde&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p&gt;&lt;img alt=&#34;GnW - Pico&#34; src=&#34;images/posts/2026-03-08_zelda_gw/gnw_pico.png&#34; /&gt;&lt;/p&gt;&lt;h2 id=&#34;desbloqueo-del-microcontrolador&#34;&gt;Desbloqueo del microcontrolador&lt;a class=&#34;headerlink&#34; href=&#34;#desbloqueo-del-microcontrolador&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Una vez resuelta la conectividad a la placa, el primer paso en la modificación es el desbloqueo del microcontrolador STM32H7 para que podamos sustituir el firmware que hay en su memoria flash interna así como poder escribir en la memoria flash externa (con código que inyectaremos en el propio microcontrolador).&lt;/p&gt;&lt;p&gt;Esta tarea se efectúa con el conjunto de utilidades &lt;a href=&#34;https://github.com/BrianPugh/gnwmanager&#34;&gt;gnwmanager&lt;/a&gt;. Este paquete se encuentra registrado en &lt;a href=&#34;https://pypi.org/project/gnwmanager/&#34;&gt;PyPI&lt;/a&gt; por lo que se puede instalar muy fácilmente con &lt;code&gt;pip&lt;/code&gt; (preferiblemente dentro de un entorno virtual Python).&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;2&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;$&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;pip&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;install&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;gnwmanager$&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;gnwmanager&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;install&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;openocd&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;Ahora, tras volver a conectar la batería de la consola si la habíamos desconectado, ejecutaremos el siguiente comando:&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;1&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;(gnwmanager) $ gnwmanager unlock&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;El proceso se interrumpirá en un par de ocasiones dando instrucciones por la terminal que deberemos seguir. Una salida típica sería:&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 1&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 2&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 3&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 4&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 5&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 6&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 7&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 8&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 9&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;10&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;11&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;12&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;13&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;14&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;15&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;16&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;17&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;18&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;19&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;20&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;21&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;22&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;(gnwmanager) [edu@thinkpad ~]$ gnwmanager unlockIf interrupted, resume unlocking with: gnwmanager unlock --backup-dir=backups-2025-10-27-19-28-14Detected ZELDA game and watch.Backing up itcm to &amp;quot;backups-2025-10-27-19-28-14/itcm_backup_zelda.bin&amp;quot;... complete!Backing up external flash to &amp;quot;backups-2025-10-27-19-28-14/flash_backup_zelda.bin&amp;quot;... complete!Flashing payload to external flash... complete!Payload successfully flashed. Perform the following steps:1. Fully remove power, then re-apply power.2. Press the power button to turn on the device; the screen should turn blue.Press the &amp;quot;enter&amp;quot; key when the screen is blue: Backing up internal flash to &amp;quot;backups-2025-10-27-19-28-14/internal_flash_backup_zelda.bin&amp;quot;... complete!Unlocking device... complete!Restoring firmware... complete!Unlocking complete!Pressing the power button should launch the original firmware.&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;Aparecerán los ficheros &lt;code&gt;internal_flash_backup_zelda.bin&lt;/code&gt;, &lt;code&gt;flash_backup_zelda.bin&lt;/code&gt; y &lt;code&gt;itcm_backup_zelda.bin&lt;/code&gt; en un directorio &lt;code&gt;backups-FECHA-HORA&lt;/code&gt; que conviene guardar.&lt;/p&gt;&lt;p&gt;Si encendemos en este momento la consola, no notaremos ningún cambio, es decir ejecutará el firmware original, pero ahora el chip estará desprotegido y podremos flashearle otro firmware.&lt;/p&gt;&lt;h2 id=&#34;modificacion-1-retro-go&#34;&gt;Modificación 1: retro-go&lt;a class=&#34;headerlink&#34; href=&#34;#modificacion-1-retro-go&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;&lt;h4 id=&#34;sustitucion-de-la-flash&#34;&gt;Sustitución de la flash&lt;a class=&#34;headerlink&#34; href=&#34;#sustitucion-de-la-flash&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h4&gt;&lt;p&gt;En este momento toca empezar a modificar la consola seriamente. Como se comentaba al principio, el chip de almacenamiento externo del microcontrolador es una memoria flash de solo 4MB (modelo Zelda). No solo es pequeño para poder cargar muchos juegos, sino que tiene pocos ciclos de escritura, por lo que sustituir los juegos frecuentemente, o cachearlos cuando se hace la modificación para añadir la microSD, puede desgastarlo rápidamente. La modificación habitual es desoldar el chip flash de 4MB original y sustituirlo por otro de 64MB, concretamente el modelo &lt;a href=&#34;https://es.aliexpress.com/item/1005005138227815.html&#34;&gt;MX25U51245GZ4I00&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;Para retirar el chip flash original, es muy recomendable extraer la placa de la consola, desconectando las dos fajas de datos de la pantalla, desoldando el altavoz y retirando todos los tornillos. Una vez que tengamos la placa sobre la mesa de trabajo, protegemos con cinta kapton los alrededores del chip y lo extraemos aplicando flux y aire caliente con una pistola.&lt;/p&gt;&lt;p&gt;&lt;img alt=&#34;Retirar chip flash original 1&#34; src=&#34;images/posts/2026-03-08_zelda_gw/mod_flash_1.jpg&#34; /&gt;&lt;/p&gt;&lt;p&gt;&lt;img alt=&#34;Retirar chip flash original 2&#34; src=&#34;images/posts/2026-03-08_zelda_gw/mod_flash_2.jpg&#34; /&gt;&lt;/p&gt;&lt;p&gt;A continuación limpiamos con malla desoldadora la huella del chip que acabamos de retirar. También, aunque hay que hacerlo con sumo cuidado, ayuda rascar (con la punta de las pinzas por ejemplo) la máscara de soldadura de la PCB para ampliar hacia el exterior la superficie soldable de la huella de soldadura del chip.&lt;/p&gt;&lt;p&gt;&lt;img alt=&#34;Retirar chip flash original 3&#34; src=&#34;images/posts/2026-03-08_zelda_gw/mod_flash_3.jpg&#34; /&gt;&lt;/p&gt;&lt;p&gt;El nuevo chip flash tiene formato QFN-8 de soldadura superficial que no resulta sencillo de soldar. Es recomendable aplicar flux y preestañar los pads de dicho chip por la parte inferior. También recomiendo poner una tira de cinta kapton en la parte inferior de manera que este no quede directamente apoyado sobre la PCB, lo que dificultaría el flujo de estaño por los pads.&lt;/p&gt;&lt;p&gt;&lt;img alt=&#34;Nuevo chip flash&#34; src=&#34;images/posts/2026-03-08_zelda_gw/new_flash.jpg&#34; /&gt;&lt;/p&gt;&lt;p&gt;Hay que fijarse bien en el punto que lleva el chip en su encapsulado que marca el pin número 1 que se corresponde con el que tiene un triángulo indicador en la PCB como se puede ver en la segunda foto de las siguientes.&lt;/p&gt;&lt;p&gt;&lt;img alt=&#34;Retirar chip flash original 4&#34; src=&#34;images/posts/2026-03-08_zelda_gw/mod_flash_4.jpg&#34; /&gt;&lt;/p&gt;&lt;p&gt;&lt;img alt=&#34;Retirar chip flash original 5&#34; src=&#34;images/posts/2026-03-08_zelda_gw/mod_flash_5.jpg&#34; /&gt;&lt;/p&gt;&lt;h4 id=&#34;flasheo-retro-go&#34;&gt;Flasheo retro-go&lt;a class=&#34;headerlink&#34; href=&#34;#flasheo-retro-go&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h4&gt;&lt;p&gt;Una vez instalado el chip, es hora de flashear el firmware. Para esta modificación, me decanto por no hacer dual boot, es decir no instalar el firmware original parcheado junto a retro-go, para así tener todo el espacio de la memoria flash dedicado a los juegos. Para ello empezamos bajando el repositorio del mismo:&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;3&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&#34;nb&#34;&gt;cd&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;~/gitgit&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;clone&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;--recursive&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;https://github.com/sylverb/game-and-watch-retro-go&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-b&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;filesystem_wip&lt;span class=&#34;nb&#34;&gt;cd&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;game-and-watch-retro-go&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;Una vez bajado el código, toca instalar las ROMs en los directorios correspondientes a las distintas máquinas soportadas que encontraremos en &lt;code&gt;~/git/game-and-watch-retro-go/roms/&lt;/code&gt;. Por ejemplo, para instalar las ROMs de NES, copiamos las ROMs a &lt;code&gt;~/git/game-and-watch-retro-go/roms/nes/&lt;/code&gt;. Si queremos portadillas para los juegos, situaremos en los mismos directorios y con los mismos nombres de fichero de las ROMs correspondientes, las imágenes en formato jpg o png. Por ejemplo, para la ROM &lt;code&gt;zelda.nes&lt;/code&gt;, situaremos la portada en &lt;code&gt;~/git/game-and-watch-retro-go/roms/nes/zelda.jpg&lt;/code&gt;.&lt;/p&gt;&lt;p&gt;Tenemos que tener en cuenta que todas las ROMs y sus portadillas tienen que caber en el chip flash de 64 MB que hemos instalado a la consola. La mayoría de las ROMs se comprimen, por lo que como regla de partida, utilizaremos el criterio de elegir ROMs por un tamaño total de aproximadamente el doble (128MB).&lt;/p&gt;&lt;p&gt;Ahora toca compilar el firmware (si no vamos a utilizar portadillas para aprovechar el espacio de sus ficheros para poder poner más ROMs, no incluir las variables de entorno &lt;code&gt;COVERFLOW&lt;/code&gt; y &lt;code&gt;JPG_QUALITY&lt;/code&gt; en los comandos de compilación y flasheo):&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;3&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;4&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;5&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;6&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;7&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;8&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;make&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;docker_buildmake&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;docker&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;docker&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;gnwmanager&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;install&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;openocd&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;docker&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;export&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;GNW_TARGET&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;zelda&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;docker&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;export&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;ADAPTER&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;cmsis-dap&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;docker&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;make&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;clean&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;docker&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;COVERFLOW&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;JPG_QUALITY&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;90&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;EXTFLASH_SIZE_MB&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;64&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;make&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-j&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;nproc&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;Al terminar la compilación se nos informará del tamaño resultante del binario que se flasheará en el chip. Por ejemplo:&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;3&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;4&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;External flash usage Capacity: 61050880 Bytes ( 58.223 MB) Usage: 54335345 Bytes ( 51.818 MB) Free: 6715535 Bytes ( 6.404 MB)&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;Con esa información a la vista podremos iterar el proceso añadiendo o retirando ROMs hasta obtener un binario de unos 55MB, ya que hay que prever algo para los savestates de los juegos.&lt;/p&gt;&lt;p&gt;Una vez que estemos satisfechos con la ocupación del espacio, flashearemos el firmware volviendo a conectar la sonda de programación que comentamos en el apartado &lt;a href=&#34;#sonda-de-programacion&#34;&gt;Sonda de programación&lt;/a&gt;.&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;1&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;docker&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;COVERFLOW&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;JPG_QUALITY&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;90&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;EXTFLASH_SIZE_MB&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;64&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;make&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;flash&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;Una salida típica sería:&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 1&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 2&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 3&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 4&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 5&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 6&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 7&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 8&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 9&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;10&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;11&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;12&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;13&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;14&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;docker@53335bdd9199:/opt/workdir$&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;COVERFLOW&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;JPG_QUALITY&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;90&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;EXTFLASH_SIZE_MB&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;64&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;make&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;flash_gnwmanagerEntering&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;LCD-Game-Emulator&amp;#39;&lt;/span&gt;Entering&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;blueMSX-go&amp;#39;&lt;/span&gt;Entering&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;caprice32-go&amp;#39;&lt;/span&gt;Entering&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;fceumm-go&amp;#39;&lt;/span&gt;Entering&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;gwenesis&amp;#39;&lt;/span&gt;Entering&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;potator&amp;#39;&lt;/span&gt;Entering&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;prosystem-go&amp;#39;&lt;/span&gt;Entering&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;retro-go-stm32&amp;#39;&lt;/span&gt;Entering&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;smw&amp;#39;&lt;/span&gt;Entering&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;tamalib&amp;#39;&lt;/span&gt;Entering&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;zelda3&amp;#39;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;BASH&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;Checking&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;for&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;updated&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;roms&lt;span class=&#34;m&#34;&gt;100&lt;/span&gt;%&lt;span class=&#34;p&#34;&gt;|&lt;/span&gt;█████████████████████████████████████████████████████████████████&lt;span class=&#34;p&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;m&#34;&gt;208&lt;/span&gt;/208&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;04&lt;/span&gt;:20&amp;lt;&lt;span class=&#34;m&#34;&gt;00&lt;/span&gt;:00,&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;m&#34;&gt;1&lt;/span&gt;.25s/it&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;Es importante que guardemos el fichero &lt;code&gt;build/gw_retro_go.elf&lt;/code&gt; porque lo necesitaremos para extraer los savestates en el futuro.&lt;/p&gt;&lt;h4 id=&#34;respaldar-savestates-retro-go&#34;&gt;Respaldar savestates retro-go&lt;a class=&#34;headerlink&#34; href=&#34;#respaldar-savestates-retro-go&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h4&gt;&lt;p&gt;Si más adelante queremos extraer los savestates de los juegos, para poder volverlos a instalar tras flashear un nuevo firmware, en primer lugar necesitaremos depositar en el directorio &lt;code&gt;build&lt;/code&gt; el fichero &lt;code&gt;gw_retro_go.elf&lt;/code&gt; que obtuvimos en el paso anterior. Después podremos arrancar de nuevo el entorno docker y ejecutar el script de backup:&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;3&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;4&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;5&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;6&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&#34;nb&#34;&gt;cd&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;~/git/game-and-watch-retro-gomake&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;docker&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;docker&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;export&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;GNW_TARGET&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;zelda&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;docker&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;export&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;ADAPTER&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;cmsis-dap&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;docker&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;./scripts/saves_backup.sh&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;build/gw_retro_go.elf&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;Los savestates aparecerán en el subdirectorio &lt;code&gt;~/git/game-and-watch-retro-go/save_states&lt;/code&gt;. Una vez que hayamos compilado y flasheado un nuevo firmware, podremos restaurarlos ejecutando el script de restauración:&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;1&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;docker&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;./scripts/saves_restore.sh&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;La restauración se hace de forma inteligente, es decir, si tenemos savestates de un juego que no está en el nuevo firmware, dicho savestate no se instalará en la consola, para evitar desperdiciar espacio de la memoria flash.&lt;/p&gt;&lt;h2 id=&#34;modificacion-2-retro-go-sd&#34;&gt;Modificación 2: retro-go-sd&lt;a class=&#34;headerlink&#34; href=&#34;#modificacion-2-retro-go-sd&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;&lt;h4 id=&#34;instalacion-modulo-slot-microsd&#34;&gt;Instalación módulo slot microSD&lt;a class=&#34;headerlink&#34; href=&#34;#instalacion-modulo-slot-microsd&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h4&gt;&lt;p&gt;Al igual que con la modificación para el retro-go normal, para utilizar retro-go-sd hay que empezar haciendo una modificación hardware a la consola. Esta vez es más complicada, sobre todo la fase final de soldadura del módulo directamente sobre las patitas del microcontrolador, que tienen un paso muy pequeño.&lt;/p&gt;&lt;p&gt;El módulo se compone del propio lector de tarjetas microSD y 4 componentes. Todo ello soldado sobre una PCB tipo flex. La lista de componentes completa es:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;1 &lt;a href=&#34;https://es.aliexpress.com/item/1005008902154552.html&#34;&gt;lector de tarjetas microSD&lt;/a&gt;&lt;/li&gt;&lt;li&gt;1 &lt;a href=&#34;https://es.aliexpress.com/item/1005005677654015.html&#34;&gt;resistencia 100kΩ 0603&lt;/a&gt; o 0805&lt;/li&gt;&lt;li&gt;2 &lt;a href=&#34;https://es.aliexpress.com/item/1005003512666695.html&#34;&gt;condensadores de 1μF 0603&lt;/a&gt; o 0805&lt;/li&gt;&lt;li&gt;1 &lt;a href=&#34;https://es.aliexpress.com/item/1005007136710461.html&#34;&gt;regulador de tensión RT9193-28GB&lt;/a&gt;. Hay personas que han reportado problemas con este modelo comprado en Aliexpress y recomiendan como reemplazo el &#34;MIC5504-2.8YM5-TR&#34;.&lt;/li&gt;&lt;li&gt;1 PCB flex: Aquí se utiliza la versión de &lt;a href=&#34;https://github.com/sylverb/game-and-watch-retro-go-sd/raw/refs/heads/main/assets/MicroSD_Zelda_Final.zip&#34;&gt;PrimoAngelo&lt;/a&gt;. La original que suele referenciarse en la mayoría de las guías es la de &lt;a href=&#34;https://github.com/sylverb/game-and-watch-retro-go-sd/raw/refs/heads/main/assets/GnW_SD_v2.zip&#34;&gt;Tim Schuerewegen / hundshamer&lt;/a&gt;.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Empezaremos soldando los componentes sobre el PCB flex.&lt;/p&gt;&lt;p&gt;&lt;img alt=&#34;Módulo microSD&#34; src=&#34;images/posts/2026-03-08_zelda_gw/mod_msd_1.jpg&#34; /&gt;&lt;/p&gt;&lt;p&gt;Lo siguiente como decíamos al principio será el difícil paso de instalar el módulo en la consola. Retiramos los cuatro tornillos que caen en su superficie y lo presentamos de forma que consigamos que los pads de la flex se encuentren alineados con las patitas del microcontrolador a la vez que estos quedan a sus pies, es decir de esta forma.&lt;/p&gt;&lt;p&gt;&lt;img alt=&#34;Módulo microSD&#34; src=&#34;images/posts/2026-03-08_zelda_gw/mod_msd_2.png&#34; /&gt;&lt;/p&gt;&lt;p&gt;Una vez que se encuentre alineado a nuestro gusto, procederemos a fijarlo en su posición atornillando los cuatro tornillos. Ahora será cuando tendremos que armarnos de paciencia y flux de buena calidad para lograr hacer las soldaduras de los pads del flex y evitar a la vez los puentes entre las mismas. Será necesario comprobar continuidad de las soldaduras así como la no existencia de puentes entre las patitas adyacentes. Si finalmente lo conseguimos, solo resta añadir un punto de soldadura entre el pad marcado con &lt;code&gt;+4V&lt;/code&gt; y el terminal del condensador que queda a su lado.&lt;/p&gt;&lt;p&gt;&lt;img alt=&#34;Módulo microSD&#34; src=&#34;images/posts/2026-03-08_zelda_gw/mod_msd_3.jpg&#34; /&gt;&lt;/p&gt;&lt;h4 id=&#34;flasheo-bootloader&#34;&gt;Flasheo bootloader&lt;a class=&#34;headerlink&#34; href=&#34;#flasheo-bootloader&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h4&gt;&lt;p&gt;Lo siguiente será flashear el bootloader junto al firmware original parcheado de la consola para permitir el dual boot (esta vez sí merece la pena al contar con espacio prácticamente ilimitado para ROMs en la microSD). Desde el directorio donde estén los ficheros de backup de la consola y con un entorno Python que tenga instalado &lt;code&gt;gnwmanager&lt;/code&gt;, ejecutaremos el siguiente comando:&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;1&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;gnwmanager&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;$&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;gnwmanager&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;flash-patch&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;zelda&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;internal_flash_backup_zelda.bin&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;flash_backup_zelda.bin&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;--bootloader&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;Una salida típica sería:&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;2&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;gnwmanager&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;$&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;gnwmanager&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;flash-patch&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;zelda&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;internal_flash_backup_zelda.bin&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;flash_backup_zelda.bin&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;--bootloader&lt;span class=&#34;m&#34;&gt;100&lt;/span&gt;%&lt;span class=&#34;p&#34;&gt;|&lt;/span&gt;███████████████████████████████████████████████████████████████████&lt;span class=&#34;p&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;m&#34;&gt;16&lt;/span&gt;/16&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;00&lt;/span&gt;:58&amp;lt;&lt;span class=&#34;m&#34;&gt;00&lt;/span&gt;:00,&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;m&#34;&gt;3&lt;/span&gt;.66s/it&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;Si encendemos en ese momento la consola, tras haber retirado la sonda de programación, veremos que arranca el firmware original (parcheado). Tras pulsar &lt;code&gt;GAME + LEFT&lt;/code&gt; se ejecutará el bootloader y, como en ese momento Retro-Go SD todavía no estará instalado en la flash interna del STM32, se nos muestrará el siguiente aviso:&lt;/p&gt;&lt;p&gt;&lt;img alt=&#34;Aviso del bootloader&#34; src=&#34;images/posts/2026-03-08_zelda_gw/bootloader_warning.jpg&#34; /&gt;&lt;/p&gt;&lt;h4 id=&#34;instalacion-de-retro-go-sd&#34;&gt;Instalación de Retro-Go SD&lt;a class=&#34;headerlink&#34; href=&#34;#instalacion-de-retro-go-sd&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h4&gt;&lt;p&gt;Solo nos restará instalar el firmware de Retro-Go SD. Para ello, copiaremos el fichero &lt;code&gt;retro-go_update.bin&lt;/code&gt; que descargaremos de la última release publicada por Sylverb en el &lt;a href=&#34;https://github.com/sylverb/game-and-watch-retro-go-sd/releases&#34;&gt;repositorio de Retro-Go SD&lt;/a&gt; al directorio raíz de la microSD. Al arrancar por primera vez, veremos en pantalla cómo se copian los ficheros de retro-go y los cores de los emuladores a la misma microSD.&lt;/p&gt;&lt;p&gt;&lt;img alt=&#34;Instalación de Retro-Go SD&#34; src=&#34;images/posts/2026-03-08_zelda_gw/retro-go_update.jpg&#34; /&gt;&lt;/p&gt;&lt;p&gt;A la vez se creará en la microSD la estructura de directorios siguiente:&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 1&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 2&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 3&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 4&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 5&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 6&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 7&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 8&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 9&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;10&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;11&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;12&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;13&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;14&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;15&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;16&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;17&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;18&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;19&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;20&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;21&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;22&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;23&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;24&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;25&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;26&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;27&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;retro-go/├── CONFIG├── bios/│ ├── coleco/│ ├── msx/│ ├── nes/├── cores/│ ├── mappers/│ ├── a2600.bin│ ├── a2600_defprops.bin│ ├── a7800.bin│ └── ...├── data/│ ├── a2600/│ ├── a7800/│ ├── amstrad/│ └── ...├── fonts/│ ├── cp1251_greybeard.bin│ ├── cp1251_sans_serif.bin│ ├── cp1251_sans_serif_bold.bin│ └── ...└── roms/ ├── a2600/ ├── a7800/ ├── amstrad/ └── ...&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;Solo restará copiar las ROMs que queramos emular en los directorios correspondientes. Si queremos portadillas para los juegos, tendremos que crear el subdirectorio &lt;code&gt;covers&lt;/code&gt; con los mismos subdirectorios del directorio &lt;code&gt;roms&lt;/code&gt; y colocar allí las imágenes. Estas tienen que estar en un formato especial IMG que generaremos con un &lt;a href=&#34;https://github.com/sylverb/game-and-watch-retro-go-sd/blob/main/README.md#cover-art-generator-gencoverspy&#34;&gt;script que se incluye en el repositorio de Retro-Go SD&lt;/a&gt;. Los nombres de los archivos IMG tendrán que coincidir con los de las ROMs en su correspondiente directorio.&lt;/p&gt;&lt;h4 id=&#34;carcasa-trasera&#34;&gt;Carcasa trasera&lt;a class=&#34;headerlink&#34; href=&#34;#carcasa-trasera&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h4&gt;&lt;p&gt;Al colocar el slot microSD hay que modificar la tapa trasera de la consola puesto que el lector cae sobre unos postes de apoyo de la cruceta. También hay que perforar el lateral para dejar paso a la microSD para poder extraerla e insertarla cuando queramos cambiar los juegos, rescatar savestates o actualizar el firmware. Para realizar la perforación &lt;a href=&#34;https://www.printables.com/model/1269910-zelda-game-and-watch-sd-card-drill-jig/files&#34;&gt;existen unos utillajes&lt;/a&gt; diseñados por el usuario facelesstech que ayudan mucho a que la ranura quede limpia. En el vídeo que hay al final de este artículo, puede verse cómo se realiza esta modificación.&lt;/p&gt;&lt;p&gt;Existe una alternativa si no queremos arriesgarnos a estropear definitivamente la tapa original, y es imprimir en 3D el modelo creado por el usuario Aradia y que puede descargarse de &lt;a href=&#34;files/posts/2026-03-08_zelda_gw/G%26W%20Zelda%20-%20Coque%20arri%C3%A8re%20-%20Mod%20Retro%20Go%20SD%20-%20v1.stl&#34;&gt;aquí&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;&lt;img alt=&#34;Carcasa trasera&#34; src=&#34;images/posts/2026-03-08_zelda_gw/carcasa.jpg&#34; /&gt;&lt;/p&gt;&lt;p&gt;El color verde que he encontrado más parecido al de la consola Zelda es el &lt;a href=&#34;https://www.amazon.es/dp/B0DHKZCL75&#34;&gt;15-Verde de OVERTURE&lt;/a&gt;.&lt;/p&gt;&lt;h2 id=&#34;controles&#34;&gt;Controles&lt;a class=&#34;headerlink&#34; href=&#34;#controles&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Indicamos a continuación las combinaciones de teclas de manejo de Retro-go SD (aunque muchas de ellas funcionan también en Retro-go). Manteniendo pulsado el botón &lt;code&gt;PAUSE/SET&lt;/code&gt; mientras se presionan otros botones se realizan las siguientes acciones:&lt;/p&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Combinación de teclas&lt;/th&gt;&lt;th&gt;Acción&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;PAUSE/SET&lt;/code&gt; + &lt;code&gt;GAME&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Guardar una captura de pantalla (deshabilitado por defecto en builds con flash de 1MB)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;PAUSE/SET&lt;/code&gt; + &lt;code&gt;TIME&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Cambiar velocidad de ejecución (1x/1.5x)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;PAUSE/SET&lt;/code&gt; + &lt;code&gt;UP&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Aumentar brillo&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;PAUSE/SET&lt;/code&gt; + &lt;code&gt;DOWN&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Disminuir brillo&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;PAUSE/SET&lt;/code&gt; + &lt;code&gt;RIGHT&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Aumentar volumen&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;PAUSE/SET&lt;/code&gt; + &lt;code&gt;LEFT&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Disminuir volumen&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;PAUSE/SET&lt;/code&gt; + &lt;code&gt;B&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Cargar state&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;PAUSE/SET&lt;/code&gt; + &lt;code&gt;A&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Guardar state&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;PAUSE/SET&lt;/code&gt; + &lt;code&gt;A&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Autodisparo en botón A&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;PAUSE/SET&lt;/code&gt; + &lt;code&gt;B&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Autodisparo en botón B&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;PAUSE/SET&lt;/code&gt; + &lt;code&gt;POWER&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Apagar sin guardar savestate&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;PAUSE/SET&lt;/code&gt; + &lt;code&gt;POWER&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Después de haber hecho &lt;code&gt;PAUSE/SET&lt;/code&gt; y seleccionar &lt;code&gt;Power off&lt;/code&gt;, arrancará el bootloader sin llegar a llamar a Retro-go, lo que nos permitirá ver la versión del bootloader así como información sobre la detección de la microSD y el estado de las memorias flash interna y externa&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;PAUSE/SET&lt;/code&gt; + &lt;code&gt;GAME&lt;/code&gt; + &lt;code&gt;LEFT&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Desde el OFW, hace que arranque el bootloader sin terminar de cargar retro-go. Sirve para ver la pantalla que muestra la detección de SD, chip flash y código en bank2 de flash interna; también para ver la versión del bootloader.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;GAME&lt;/code&gt; + menú &lt;code&gt;Reset settings&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Borra los datos de registro en la SD de lo que hay cacheado en la flash; utilizar cuando se cambie la SD de máquina o se cambie el chip flash. Es equivalente a borrar el fichero &lt;code&gt;flashcachedata.bin&lt;/code&gt; en el directorio &lt;code&gt;data&lt;/code&gt; de la SD.&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;h2 id=&#34;referencias&#34;&gt;Referencias&lt;a class=&#34;headerlink&#34; href=&#34;#referencias&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;No quiero terminar sin hacer mención al servidor de Discord de &lt;a href=&#34;https://discord.gg/TKjHZ5yV&#34;&gt;stacksmashing&lt;/a&gt; y a los siguientes usuarios cuyo trabajo ha hecho posible estas modificaciones:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;stacksmashing&lt;/li&gt;&lt;li&gt;kbeckmann&lt;/li&gt;&lt;li&gt;Tim Schuerewegen&lt;/li&gt;&lt;li&gt;BrianPugh&lt;/li&gt;&lt;li&gt;GMMan&lt;/li&gt;&lt;li&gt;tfmoe__&lt;/li&gt;&lt;li&gt;Sylver Bruneau&lt;/li&gt;&lt;li&gt;facelesstech&lt;/li&gt;&lt;li&gt;DasBoss&lt;/li&gt;&lt;li&gt;bxhxx&lt;/li&gt;&lt;li&gt;Benjamin Solberg&lt;/li&gt;&lt;li&gt;orzeus&lt;/li&gt;&lt;li&gt;ducalex&lt;/li&gt;&lt;li&gt;ZimM&lt;/li&gt;&lt;li&gt;Ninoh-FOX&lt;/li&gt;&lt;li&gt;PrimoAngelo&lt;/li&gt;&lt;li&gt;Aradia&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;En el siguiente video de Macho Nacho se puede ver el todo el proceso de modificación de la consola (el flex del módulo microSD es el modelo que no se sujeta con los tornillos sino con puntos de soldadura sobre la PCB de la G&amp;amp;W):&lt;/p&gt;&lt;iframe width=&#34;688&#34; height=&#34;387&#34; src=&#34;https://www.youtube.com/embed/8YIHjUM8Qms&#34; title=&#34;Making The Zelda G&amp;W Into A MODERN Emulation Powerhouse&#34; frameborder=&#34;0&#34; allow=&#34;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share&#34; referrerpolicy=&#34;strict-origin-when-cross-origin&#34; allowfullscreen&gt;&lt;/iframe&gt;</description><link>https://apuntes.eduardofilo.es/2026-03-08_zelda_gw.html</link> <pubDate>Sun, 08 Mar 2026 15:45:00 +0100</pubDate><source url="https://apuntes.eduardofilo.es/rss.xml">Apuntes de eduardófilo</source><guid isPermaLink="true">https://apuntes.eduardofilo.es/2026-03-08_zelda_gw.html</guid> </item> <item> <title>G&amp;W Zelda hack</title> <description>&lt;p&gt;&lt;img alt=&#34;Zelda G&amp;amp;W&#34; src=&#34;../images/posts/2026-03-08_zelda_gw/zelda_gnw.png&#34; /&gt;&lt;/p&gt;&lt;p&gt;A well-known Japanese video game manufacturer began selling a pair of machines at the end of 2022, replicating the appearance of some of the old G&amp;amp;W, based on an STM32H7 microcontroller running a baremetal firmware with NES and GB emulators, three classic games and a clock application inspired by the Zelda franchise. The machine is very interesting because of the virtues of being based on a microcontroller instead of a microprocessor, that is, great battery life (the one from a Switch joycon), instant boot and sleep mode. The storage medium is a small 4MB NOR flash chip (in the case of the Zelda model), enough to host the mentioned emulators and games, but very scarce if you want to take advantage of the machine and its relatively powerful CPU.&lt;/p&gt;&lt;p&gt;The original firmware serves to verify the solvency of the platform to emulate at least the 8-bit machines that originally run, so the device immediately became attractive to the hacker community. Shortly after it went on sale, &lt;a href=&#34;https://www.youtube.com/watch?v=Rsi8p5gbaps&#34;&gt;procedures appeared to unlock and modify the machine&lt;/a&gt; so that more emulators and games could be installed.&lt;/p&gt;&lt;p&gt;The first major modification proposed by the community consisted of replacing the flash chip with a 64MB one to have more space for games and emulators. Later, the modification evolved to include a microSD card slot to store games and savestates, as well as to greatly simplify the update process, turning the modified machine into an unparalleled portable emulation machine in aspects such as portability, size, battery life, and boot times.&lt;/p&gt;&lt;p&gt;With either of the two modifications, it is possible to emulate the following machines:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Amstrad CPC6128 (beta)&lt;/li&gt;&lt;li&gt;Atari 2600&lt;/li&gt;&lt;li&gt;Atari 7800&lt;/li&gt;&lt;li&gt;ColecoVision&lt;/li&gt;&lt;li&gt;Gameboy / Gameboy Color&lt;/li&gt;&lt;li&gt;Game &amp;amp; Watch / LCD Games&lt;/li&gt;&lt;li&gt;MSX1/2/2+&lt;/li&gt;&lt;li&gt;Nintendo Entertainment System&lt;/li&gt;&lt;li&gt;PC Engine / TurboGrafx-16&lt;/li&gt;&lt;li&gt;Pokémon Mini&lt;/li&gt;&lt;li&gt;Sega Game Gear&lt;/li&gt;&lt;li&gt;Sega Genesis / Megadrive&lt;/li&gt;&lt;li&gt;Sega Master System&lt;/li&gt;&lt;li&gt;Sega SG-1000&lt;/li&gt;&lt;li&gt;Tamagotchi P1&lt;/li&gt;&lt;li&gt;Watara Supervision&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;In this article we will describe the steps to perform these two modifications. The modification to add the microSD slot also requires replacing the flash, since every time we load a new game from the microSD it will be written to the flash chip, and the original 4MB one supports few write cycles since it was not intended to be used this way.&lt;/p&gt;&lt;p&gt;The entire process has been performed on a Linux system. In principle, development on Windows and MacOS X systems is also possible, but the steps to install the requirements and the software we will use will necessarily change.&lt;/p&gt;&lt;h2 id=&#34;connection-to-the-swd-port&#34;&gt;Connection to the SWD port&lt;a class=&#34;headerlink&#34; href=&#34;#connection-to-the-swd-port&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Unlocking the processor and modifying the firmware are done through the SWD port that STM32 microcontrollers usually have to program their internal flash memory and debug developments. This SWD port is located on the PCB unpopulated, that is, without soldered pins or connectors.&lt;/p&gt;&lt;p&gt;&lt;img alt=&#34;SWD&#34; src=&#34;../images/posts/2026-03-08_zelda_gw/swd.jpg&#34; /&gt;&lt;/p&gt;&lt;p&gt;To make the connection to this port there are several options:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Solder wires directly.&lt;/li&gt;&lt;li&gt;Insert bare wires or male pin wires, tilting them to force contact.&lt;/li&gt;&lt;li&gt;Use specialized &lt;a href=&#34;https://www.amazon.es/gp/product/B009UOHE1K/&#34;&gt;connection probe clips&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;Use &lt;a href=&#34;https://es.aliexpress.com/item/1005007602295920.html&#34;&gt;pogo pin clips&lt;/a&gt; (Single row 5pin).&lt;/li&gt;&lt;li&gt;Route the SWDIO and SWCLK pins to the USB-C port.&lt;/li&gt;&lt;/ul&gt;&lt;h4 id=&#34;hard-version&#34;&gt;Hard version&lt;a class=&#34;headerlink&#34; href=&#34;#hard-version&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h4&gt;&lt;p&gt;Since I started tinkering with the machine before the microSD mod appeared, at the time I routed the SWD port to the USB-C. If you end up doing the microSD mod, the effort is not very worthwhile, since from then on flashing the firmware will be done from the microSD itself. However, for documentation purposes we will describe how the routing would be done.&lt;/p&gt;&lt;p&gt;The USB-C port only has the power pins connected since it is only intended to charge the machine. Therefore, the D+ and D- pins that are free can be used to wire them to the SWDIO and SWCLK pins, which are the only essential ones for the SWD port. We will also need to connect to 5V and GND, but these are already wired in the USB-C port. The routing is done with fine enameled wire like the one used to build coils. Soldering to the two central pins of the USB-C port which correspond to D+ and D- is complicated having a very small pitch, but with patience and flux it can be achieved.&lt;/p&gt;&lt;p&gt;&lt;img alt=&#34;Ruteado USB-C&#34; src=&#34;../images/posts/2026-03-08_zelda_gw/ruteado_usb-c_1.jpg&#34; /&gt;&lt;/p&gt;&lt;p&gt;Once the only difficult part of the procedure is solved, that is, soldering the wires to the USB port, these are secured every so often with Kapton tape and directed towards the battery area where the recess on both sides of the housing that surrounds it is used to pass one of the cables. The other is routed through the space between the battery housing and the PCB. This way both cables cannot touch each other, although in theory being varnished there should be no problem, this separate path is adopted as an additional precaution.&lt;/p&gt;&lt;p&gt;&lt;img alt=&#34;Ruteado USB-C&#34; src=&#34;../images/posts/2026-03-08_zelda_gw/ruteado_usb-c_2.jpg&#34; /&gt;&lt;/p&gt;&lt;p&gt;Once the wires reach the vicinity of the SWD port, the two test pads that can be seen in the photo are used to solder them.&lt;/p&gt;&lt;p&gt;&lt;img alt=&#34;Ruteado USB-C&#34; src=&#34;../images/posts/2026-03-08_zelda_gw/ruteado_usb-c_3.jpg&#34; /&gt;&lt;/p&gt;&lt;p&gt;The correspondence between D+ and D- on the USB-C port with SWDIO and SWCLK of the SWD port can be done in any way as long as we are clear on where each one is to later make the USB-SWD adapter we will need. In this assembly the following correspondence has been chosen:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;D+ ↔ SWDIO&lt;/li&gt;&lt;li&gt;D- ↔ SWCLK&lt;/li&gt;&lt;/ul&gt;&lt;div class=&#34;admonition warning&#34;&gt;&lt;p class=&#34;admonition-title&#34;&gt;Warning&lt;/p&gt;&lt;p&gt;The idea at first was to adopt the correspondence used in &lt;a href=&#34;https://facelesstech.wordpress.com/2022/01/08/game-and-watch-hacking-with-rpi/&#34;&gt;this other guide&lt;/a&gt;, but due to a mistake made at the beginning, it ended up being done exactly the other way around. As mentioned earlier, it&#39;s really not a problem as long as you know how the connections are made. This warning is only in case someone tries to follow both guides simultaneously, so that this difference is taken into account.&lt;/p&gt;&lt;/div&gt;&lt;p&gt;Once the port is routed, we will need to build the adapter to extract the SWDIO and SWCLK signals from the USB-C port. To do this, cut a conventional USB-A cable to have access to the four separate cables it contains and solder female pin connectors to them. The adapter is completed with a USB-A to USB-C adapter that is marked to orient it correctly when we are going to use it, since we have only routed the D+ and D- pins on one of the two sides (the USB-C port is reversible).&lt;/p&gt;&lt;p&gt;&lt;img alt=&#34;Adaptador USB-C SWD&#34; src=&#34;../images/posts/2026-03-08_zelda_gw/adaptador_usb-c_swd.jpg&#34; /&gt;&lt;/p&gt;&lt;p&gt;The cable colors are usually standardized as follows:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Red: 5V&lt;/li&gt;&lt;li&gt;Black: GND&lt;/li&gt;&lt;li&gt;Green: D+&lt;/li&gt;&lt;li&gt;White: D-&lt;/li&gt;&lt;/ul&gt;&lt;h4 id=&#34;easy-version&#34;&gt;Easy version&lt;a class=&#34;headerlink&#34; href=&#34;#easy-version&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h4&gt;&lt;p&gt;The recommended way to make the connection to the SWD port (if you don&#39;t want to solder, which is the most reliable option) is using specialized &lt;a href=&#34;https://www.amazon.es/gp/product/B009UOHE1K/&#34;&gt;connection probe clips&lt;/a&gt;. To apply these clips, it is recommended to previously disconnect the console&#39;s battery. The battery connector pops off easily by inserting a thin piece of plastic underneath it.&lt;/p&gt;&lt;p&gt;&lt;img alt=&#34;Pinzas conexión GnW&#34; src=&#34;../images/posts/2026-03-08_zelda_gw/pinzas_conexion_gnw.jpg&#34; /&gt;&lt;/p&gt;&lt;h2 id=&#34;programming-probe&#34;&gt;Programming probe&lt;a class=&#34;headerlink&#34; href=&#34;#programming-probe&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;We have solved where to connect on the console. Now we need a device capable of communicating with that SWD port of the microcontroller. The options are:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;a href=&#34;https://www.raspberrypi.com/products/raspberry-pi-pico/&#34;&gt;Raspberry Pi Pico&lt;/a&gt; (Recommended)&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://www.st.com/en/development-tools/st-link-v2.html&#34;&gt;STLink&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://www.segger.com/products/debug-probes/j-link/#models&#34;&gt;JLink&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://daplink.io/&#34;&gt;DAPLink&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://projects.raspberrypi.org/en/projects/physical-computing/1&#34;&gt;Raspberry Pi (GPIO)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;I chose to use a Raspberry Pi Pico. For it to work as an SWD programming probe, the &lt;a href=&#34;https://github.com/raspberrypi/debugprobe&#34;&gt;debugprobe&lt;/a&gt; firmware must be loaded. In my case I used the &lt;a href=&#34;https://github.com/raspberrypi/debugprobe/releases/download/picoprobe-cmsis-v1.0.3/picoprobe.uf2&#34;&gt;picoprobe.uf2&lt;/a&gt; file from &lt;a href=&#34;https://github.com/raspberrypi/debugprobe/releases/tag/picoprobe-cmsis-v1.0.3&#34;&gt;this specific release&lt;/a&gt;. To flash the Pico, just connect it to the computer via USB while pressing the &lt;code&gt;BOOTSEL&lt;/code&gt; button to force the mode in which it mounts as a storage drive and drag the &lt;code&gt;.uf2&lt;/code&gt; file to that drive. After autoflashing, the Pico will automatically restart and begin to function as an SWD programming probe.&lt;/p&gt;&lt;p&gt;Once the Pico is programmed, the only thing left is to make the connections of the cables that we had connected to the SWD port of the Game&amp;amp;Watch. We can use the same type of clips that we applied to the console, although in my case I used similar ones but slightly more robust, since the spacing of the GPIO pins of the Pico is much larger.&lt;/p&gt;&lt;p&gt;&lt;img alt=&#34;Pinzas conexión Pico&#34; src=&#34;../images/posts/2026-03-08_zelda_gw/pinzas_conexion_pico.jpg&#34; /&gt;&lt;/p&gt;&lt;p&gt;The wiring between Game&amp;amp;Watch and Raspberry Pi Pico is:&lt;/p&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th style=&#34;text-align: left;&#34;&gt;Pico&lt;/th&gt;&lt;th style=&#34;text-align: left;&#34;&gt;GnW&lt;/th&gt;&lt;th style=&#34;text-align: left;&#34;&gt;Color&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&#34;text-align: left;&#34;&gt;3&lt;/td&gt;&lt;td style=&#34;text-align: left;&#34;&gt;3&lt;/td&gt;&lt;td style=&#34;text-align: left;&#34;&gt;Black&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&#34;text-align: left;&#34;&gt;4&lt;/td&gt;&lt;td style=&#34;text-align: left;&#34;&gt;5&lt;/td&gt;&lt;td style=&#34;text-align: left;&#34;&gt;White&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&#34;text-align: left;&#34;&gt;5&lt;/td&gt;&lt;td style=&#34;text-align: left;&#34;&gt;2&lt;/td&gt;&lt;td style=&#34;text-align: left;&#34;&gt;Green&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p&gt;&lt;img alt=&#34;GnW - Pico&#34; src=&#34;../images/posts/2026-03-08_zelda_gw/gnw_pico.png&#34; /&gt;&lt;/p&gt;&lt;h2 id=&#34;microcontroller-unlocking&#34;&gt;Microcontroller unlocking&lt;a class=&#34;headerlink&#34; href=&#34;#microcontroller-unlocking&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Once the connectivity to the board is solved, the first step in the modification is unlocking the STM32H7 microcontroller so that we can replace the firmware in its internal flash memory as well as write to the external flash memory (with code that we will inject into the microcontroller itself).&lt;/p&gt;&lt;p&gt;This task is performed with the &lt;a href=&#34;https://github.com/BrianPugh/gnwmanager&#34;&gt;gnwmanager&lt;/a&gt; utility suite. This package is registered on &lt;a href=&#34;https://pypi.org/project/gnwmanager/&#34;&gt;PyPI&lt;/a&gt; so it can be installed very easily with &lt;code&gt;pip&lt;/code&gt; (preferably inside a Python virtual environment).&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;2&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;$&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;pip&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;install&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;gnwmanager$&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;gnwmanager&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;install&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;openocd&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;Now, after reconnecting the console&#39;s battery if we had disconnected it, we will execute the following command:&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;1&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;(gnwmanager) $ gnwmanager unlock&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;The process will pause on a couple of occasions giving instructions through the terminal that we must follow. A typical output would be:&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 1&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 2&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 3&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 4&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 5&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 6&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 7&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 8&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 9&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;10&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;11&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;12&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;13&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;14&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;15&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;16&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;17&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;18&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;19&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;20&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;21&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;22&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;(gnwmanager) [edu@thinkpad ~]$ gnwmanager unlockIf interrupted, resume unlocking with: gnwmanager unlock --backup-dir=backups-2025-10-27-19-28-14Detected ZELDA game and watch.Backing up itcm to &amp;quot;backups-2025-10-27-19-28-14/itcm_backup_zelda.bin&amp;quot;... complete!Backing up external flash to &amp;quot;backups-2025-10-27-19-28-14/flash_backup_zelda.bin&amp;quot;... complete!Flashing payload to external flash... complete!Payload successfully flashed. Perform the following steps:1. Fully remove power, then re-apply power.2. Press the power button to turn on the device; the screen should turn blue.Press the &amp;quot;enter&amp;quot; key when the screen is blue: Backing up internal flash to &amp;quot;backups-2025-10-27-19-28-14/internal_flash_backup_zelda.bin&amp;quot;... complete!Unlocking device... complete!Restoring firmware... complete!Unlocking complete!Pressing the power button should launch the original firmware.&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;The files &lt;code&gt;internal_flash_backup_zelda.bin&lt;/code&gt;, &lt;code&gt;flash_backup_zelda.bin&lt;/code&gt; and &lt;code&gt;itcm_backup_zelda.bin&lt;/code&gt; will appear in a &lt;code&gt;backups-DATE-TIME&lt;/code&gt; directory that should be saved.&lt;/p&gt;&lt;p&gt;If we turn on the console at this point, we won&#39;t notice any change, meaning it will run the original firmware, but now the chip will be unprotected and we can flash another firmware to it.&lt;/p&gt;&lt;h2 id=&#34;modification-1-retro-go&#34;&gt;Modification 1: retro-go&lt;a class=&#34;headerlink&#34; href=&#34;#modification-1-retro-go&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;&lt;h4 id=&#34;flash-replacement&#34;&gt;Flash replacement&lt;a class=&#34;headerlink&#34; href=&#34;#flash-replacement&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h4&gt;&lt;p&gt;At this time we start modifying the console seriously. As mentioned at the beginning, the microcontroller&#39;s external storage chip is a flash memory of only 4MB (Zelda model). Not only is it small for loading many games, but it has few write cycles, so replacing games frequently, or caching them when making the modification to add the microSD, can wear it out quickly. The usual modification is to desolder the original 4MB flash chip and replace it with a 64MB one, specifically the &lt;a href=&#34;https://es.aliexpress.com/item/1005005138227815.html&#34;&gt;MX25U51245GZ4I00&lt;/a&gt; model.&lt;/p&gt;&lt;p&gt;To remove the original flash chip, it is highly recommended to extract the console&#39;s motherboard, disconnecting the two data ribbon cables from the screen, desoldering the speaker, and removing all screws. Once we have the board on the workbench, we protect the surroundings of the chip with kapton tape and extract it by applying flux and hot air with a heat gun.&lt;/p&gt;&lt;p&gt;&lt;img alt=&#34;Retirar chip flash original 1&#34; src=&#34;../images/posts/2026-03-08_zelda_gw/mod_flash_1.jpg&#34; /&gt;&lt;/p&gt;&lt;p&gt;&lt;img alt=&#34;Retirar chip flash original 2&#34; src=&#34;../images/posts/2026-03-08_zelda_gw/mod_flash_2.jpg&#34; /&gt;&lt;/p&gt;&lt;p&gt;Next, we clean the footprint of the chip we just removed with desoldering braid. Also, although it must be done with great care, it helps to scratch (with the tip of tweezers, for example) the solder mask of the PCB to expand outwards the solderable surface of the chip&#39;s solder footprint.&lt;/p&gt;&lt;p&gt;&lt;img alt=&#34;Retirar chip flash original 3&#34; src=&#34;../images/posts/2026-03-08_zelda_gw/mod_flash_3.jpg&#34; /&gt;&lt;/p&gt;&lt;p&gt;The new flash chip has a surface mount QFN-8 format that is not easy to solder. It is recommended to apply flux and pre-tin the pads of said chip on the bottom. I also recommend putting a strip of kapton tape on the bottom so that it does not rest directly on the PCB, which would hinder the flow of solder through the pads.&lt;/p&gt;&lt;p&gt;&lt;img alt=&#34;Nuevo chip flash&#34; src=&#34;../images/posts/2026-03-08_zelda_gw/new_flash.jpg&#34; /&gt;&lt;/p&gt;&lt;p&gt;You must pay close attention to the dot on the chip&#39;s package that marks pin number 1, which corresponds to the one with an indicator triangle on the PCB as can be seen in the second photo of the following.&lt;/p&gt;&lt;p&gt;&lt;img alt=&#34;Retirar chip flash original 4&#34; src=&#34;../images/posts/2026-03-08_zelda_gw/mod_flash_4.jpg&#34; /&gt;&lt;/p&gt;&lt;p&gt;&lt;img alt=&#34;Retirar chip flash original 5&#34; src=&#34;../images/posts/2026-03-08_zelda_gw/mod_flash_5.jpg&#34; /&gt;&lt;/p&gt;&lt;h4 id=&#34;flashing-retro-go&#34;&gt;Flashing retro-go&lt;a class=&#34;headerlink&#34; href=&#34;#flashing-retro-go&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h4&gt;&lt;p&gt;Once the chip is installed, it&#39;s time to flash the firmware. For this modification, I choose not to set up dual boot, that is, not to install the patched original firmware alongside retro-go, to have all the flash memory space dedicated to games. To do this we start by downloading its repository:&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;3&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&#34;nb&#34;&gt;cd&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;~/gitgit&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;clone&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;--recursive&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;https://github.com/sylverb/game-and-watch-retro-go&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-b&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;filesystem_wip&lt;span class=&#34;nb&#34;&gt;cd&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;game-and-watch-retro-go&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;Once the code is downloaded, it&#39;s time to install the ROMs in the directories corresponding to the different supported machines that we will find in &lt;code&gt;~/git/game-and-watch-retro-go/roms/&lt;/code&gt;. For example, to install the NES ROMs, we copy the ROMs to &lt;code&gt;~/git/game-and-watch-retro-go/roms/nes/&lt;/code&gt;. If we want cover art for the games, we will place the images in jpg or png format in the same directories and with the same file names of the corresponding ROMs. For example, for the &lt;code&gt;zelda.nes&lt;/code&gt; ROM, we will place the cover at &lt;code&gt;~/git/game-and-watch-retro-go/roms/nes/zelda.jpg&lt;/code&gt;.&lt;/p&gt;&lt;p&gt;We have to keep in mind that all ROMs and their covers must fit in the 64 MB flash chip we installed in the console. Most ROMs compress, so as a starting rule, we will use the criteria of choosing ROMs for a total size of roughly double (128MB).&lt;/p&gt;&lt;p&gt;Now it&#39;s time to build the firmware (if we are not going to use covers to take advantage of the space of their files to be able to put more ROMs, do not include the &lt;code&gt;COVERFLOW&lt;/code&gt; and &lt;code&gt;JPG_QUALITY&lt;/code&gt; environment variables in the build and flash commands):&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;3&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;4&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;5&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;6&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;7&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;8&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;make&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;docker_buildmake&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;docker&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;docker&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;gnwmanager&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;install&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;openocd&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;docker&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;export&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;GNW_TARGET&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;zelda&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;docker&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;export&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;ADAPTER&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;cmsis-dap&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;docker&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;make&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;clean&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;docker&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;COVERFLOW&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;JPG_QUALITY&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;90&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;EXTFLASH_SIZE_MB&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;64&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;make&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;-j&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;nproc&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;When building finishes, we will be informed of the resulting binary size that will be flashed to the chip. For example:&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;3&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;4&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;External flash usage Capacity: 61050880 Bytes ( 58.223 MB) Usage: 54335345 Bytes ( 51.818 MB) Free: 6715535 Bytes ( 6.404 MB)&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;With that information in sight we can iterate the process adding or removing ROMs until obtaining a binary of about 55MB, since something must be anticipated for the game savestates.&lt;/p&gt;&lt;p&gt;Once we are satisfied with the space usage, we will flash the firmware reconnecting the programming probe discussed in the &lt;a href=&#34;#programming-probe&#34;&gt;Programming probe&lt;/a&gt; section.&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;1&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;docker&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;COVERFLOW&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;JPG_QUALITY&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;90&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;EXTFLASH_SIZE_MB&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;64&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;make&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;flash&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;A typical output would be:&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 1&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 2&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 3&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 4&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 5&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 6&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 7&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 8&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 9&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;10&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;11&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;12&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;13&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;14&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;docker@53335bdd9199:/opt/workdir$&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;COVERFLOW&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;JPG_QUALITY&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;90&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;EXTFLASH_SIZE_MB&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;64&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;make&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;flash_gnwmanagerEntering&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;LCD-Game-Emulator&amp;#39;&lt;/span&gt;Entering&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;blueMSX-go&amp;#39;&lt;/span&gt;Entering&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;caprice32-go&amp;#39;&lt;/span&gt;Entering&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;fceumm-go&amp;#39;&lt;/span&gt;Entering&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;gwenesis&amp;#39;&lt;/span&gt;Entering&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;potator&amp;#39;&lt;/span&gt;Entering&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;prosystem-go&amp;#39;&lt;/span&gt;Entering&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;retro-go-stm32&amp;#39;&lt;/span&gt;Entering&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;smw&amp;#39;&lt;/span&gt;Entering&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;tamalib&amp;#39;&lt;/span&gt;Entering&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;zelda3&amp;#39;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;BASH&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;Checking&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;for&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;updated&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;roms&lt;span class=&#34;m&#34;&gt;100&lt;/span&gt;%&lt;span class=&#34;p&#34;&gt;|&lt;/span&gt;█████████████████████████████████████████████████████████████████&lt;span class=&#34;p&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;m&#34;&gt;208&lt;/span&gt;/208&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;04&lt;/span&gt;:20&amp;lt;&lt;span class=&#34;m&#34;&gt;00&lt;/span&gt;:00,&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;m&#34;&gt;1&lt;/span&gt;.25s/it&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;It is important that we keep the &lt;code&gt;build/gw_retro_go.elf&lt;/code&gt; file because we will need it to extract the savestates in the future.&lt;/p&gt;&lt;h4 id=&#34;backup-retro-go-savestates&#34;&gt;Backup retro-go savestates&lt;a class=&#34;headerlink&#34; href=&#34;#backup-retro-go-savestates&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h4&gt;&lt;p&gt;If later we want to extract the game savestates, to be able to reinstall them after flashing a new firmware, first we will need to place the &lt;code&gt;gw_retro_go.elf&lt;/code&gt; file we obtained in the previous step in the &lt;code&gt;build&lt;/code&gt; directory. Then we can restart the docker environment and run the backup script:&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;3&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;4&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;5&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;6&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&#34;nb&#34;&gt;cd&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;~/git/game-and-watch-retro-gomake&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;docker&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;docker&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;export&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;GNW_TARGET&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;zelda&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;docker&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;export&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;ADAPTER&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;cmsis-dap&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;docker&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;./scripts/saves_backup.sh&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;build/gw_retro_go.elf&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;The savestates will appear in the &lt;code&gt;~/git/game-and-watch-retro-go/save_states&lt;/code&gt; subdirectory. Once we have built and flashed a new firmware, we can restore them by running the restoration script:&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;1&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;docker&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;./scripts/saves_restore.sh&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;Restoration is done intelligently, that is, if we have savestates of a game that is not in the new firmware, that savestate will not be installed on the console, to avoid wasting flash memory space.&lt;/p&gt;&lt;h2 id=&#34;modification-2-retro-go-sd&#34;&gt;Modification 2: retro-go-sd&lt;a class=&#34;headerlink&#34; href=&#34;#modification-2-retro-go-sd&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;&lt;h4 id=&#34;microsd-slot-module-installation&#34;&gt;microSD slot module installation&lt;a class=&#34;headerlink&#34; href=&#34;#microsd-slot-module-installation&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h4&gt;&lt;p&gt;As with the modification for normal retro-go, to use retro-go-sd you must start by making a hardware modification to the console. This time it is more complicated, especially the final phase of soldering the module directly onto the microcontroller&#39;s pins, which have a very small pitch.&lt;/p&gt;&lt;p&gt;The module consists of the microSD card reader itself and 4 components. All this soldered onto a flex-type PCB. The complete list of components is:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;1 &lt;a href=&#34;https://es.aliexpress.com/item/1005008902154552.html&#34;&gt;microSD card reader&lt;/a&gt;&lt;/li&gt;&lt;li&gt;1 &lt;a href=&#34;https://es.aliexpress.com/item/1005005677654015.html&#34;&gt;100kΩ 0603 resistor&lt;/a&gt; or 0805&lt;/li&gt;&lt;li&gt;2 &lt;a href=&#34;https://es.aliexpress.com/item/1005003512666695.html&#34;&gt;1μF 0603 capacitors&lt;/a&gt; or 0805&lt;/li&gt;&lt;li&gt;1 &lt;a href=&#34;https://es.aliexpress.com/item/1005007136710461.html&#34;&gt;RT9193-28GB voltage regulator&lt;/a&gt;. There are people who have reported problems with this model bought on Aliexpress and recommend the &#34;MIC5504-2.8YM5-TR&#34; as a replacement.&lt;/li&gt;&lt;li&gt;1 flex PCB: Here the version by &lt;a href=&#34;https://github.com/sylverb/game-and-watch-retro-go-sd/raw/refs/heads/main/assets/MicroSD_Zelda_Final.zip&#34;&gt;PrimoAngelo&lt;/a&gt; is used. The original one usually referenced in most guides is the one by &lt;a href=&#34;https://github.com/sylverb/game-and-watch-retro-go-sd/raw/refs/heads/main/assets/GnW_SD_v2.zip&#34;&gt;Tim Schuerewegen / hundshamer&lt;/a&gt;.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;We will begin by soldering the components onto the flex PCB.&lt;/p&gt;&lt;p&gt;&lt;img alt=&#34;microSD module&#34; src=&#34;../images/posts/2026-03-08_zelda_gw/mod_msd_1.jpg&#34; /&gt;&lt;/p&gt;&lt;p&gt;The next step as we said at the beginning will be the difficult step of installing the module in the console. We remove the four screws that fall on its surface and present it in a way that we get the pads of the flex to align with the pins of the microcontroller while these end up at their feet, that is, like this.&lt;/p&gt;&lt;p&gt;&lt;img alt=&#34;microSD module&#34; src=&#34;../images/posts/2026-03-08_zelda_gw/mod_msd_2.png&#34; /&gt;&lt;/p&gt;&lt;p&gt;Once it is aligned to our liking, we will proceed to fix it in its position by driving in the four screws. Now is when we will have to arm ourselves with patience and high-quality flux to manage to solder the pads of the flex and simultaneously avoid bridges between them. It will be necessary to check the continuity of the solders as well as the non-existence of bridges between adjacent pins. If we finally succeed, all that remains is to add a solder point between the pad marked with &lt;code&gt;+4V&lt;/code&gt; and the capacitor terminal next to it.&lt;/p&gt;&lt;p&gt;&lt;img alt=&#34;microSD module&#34; src=&#34;../images/posts/2026-03-08_zelda_gw/mod_msd_3.jpg&#34; /&gt;&lt;/p&gt;&lt;h4 id=&#34;bootloader-flashing&#34;&gt;Bootloader flashing&lt;a class=&#34;headerlink&#34; href=&#34;#bootloader-flashing&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h4&gt;&lt;p&gt;The next step will be to flash the bootloader along with the console&#39;s patched original firmware to allow dual boot (this time it is worthwhile as we have practically unlimited space for ROMs on the microSD). From the directory where the console backup files are located and with a Python environment that has &lt;code&gt;gnwmanager&lt;/code&gt; installed, we will execute the following command:&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;1&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;gnwmanager&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;$&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;gnwmanager&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;flash-patch&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;zelda&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;internal_flash_backup_zelda.bin&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;flash_backup_zelda.bin&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;--bootloader&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;A typical output would be:&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;2&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;gnwmanager&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;$&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;gnwmanager&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;flash-patch&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;zelda&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;internal_flash_backup_zelda.bin&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;flash_backup_zelda.bin&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;--bootloader&lt;span class=&#34;m&#34;&gt;100&lt;/span&gt;%&lt;span class=&#34;p&#34;&gt;|&lt;/span&gt;███████████████████████████████████████████████████████████████████&lt;span class=&#34;p&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;m&#34;&gt;16&lt;/span&gt;/16&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;00&lt;/span&gt;:58&amp;lt;&lt;span class=&#34;m&#34;&gt;00&lt;/span&gt;:00,&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;m&#34;&gt;3&lt;/span&gt;.66s/it&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;If we turn on the console at that moment, after removing the programming probe, we will see that the (patched) original firmware starts. After pressing &lt;code&gt;GAME + LEFT&lt;/code&gt;, the bootloader will execute and, as Retro-Go SD is not yet installed in the internal flash of the STM32 at that moment, we will be shown the following warning:&lt;/p&gt;&lt;p&gt;&lt;img alt=&#34;Bootloader warning&#34; src=&#34;../images/posts/2026-03-08_zelda_gw/bootloader_warning.jpg&#34; /&gt;&lt;/p&gt;&lt;h4 id=&#34;retro-go-sd-installation&#34;&gt;Retro-Go SD installation&lt;a class=&#34;headerlink&#34; href=&#34;#retro-go-sd-installation&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h4&gt;&lt;p&gt;All that remains is to install the Retro-Go SD firmware. To do this, we will copy the &lt;code&gt;retro-go_update.bin&lt;/code&gt; file that we will download from the latest release published by Sylverb in the &lt;a href=&#34;https://github.com/sylverb/game-and-watch-retro-go-sd/releases&#34;&gt;Retro-Go SD repository&lt;/a&gt; to the root directory of the microSD. When booting for the first time, we will see on screen how the retro-go files and emulator cores are copied to the microSD itself.&lt;/p&gt;&lt;p&gt;&lt;img alt=&#34;Retro-Go SD installation&#34; src=&#34;../images/posts/2026-03-08_zelda_gw/retro-go_update.jpg&#34; /&gt;&lt;/p&gt;&lt;p&gt;At the same time, the following directory structure will be created on the microSD:&lt;/p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;table class=&#34;highlighttable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;linenos&#34;&gt;&lt;div class=&#34;linenodiv&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 1&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 2&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 3&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 4&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 5&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 6&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 7&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 8&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt; 9&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;10&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;11&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;12&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;13&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;14&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;15&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;16&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;17&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;18&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;19&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;20&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;21&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;22&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;23&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;24&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;25&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;26&lt;/span&gt;&lt;span class=&#34;normal&#34;&gt;27&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#34;code&#34;&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;retro-go/├── CONFIG├── bios/│ ├── coleco/│ ├── msx/│ ├── nes/├── cores/│ ├── mappers/│ ├── a2600.bin│ ├── a2600_defprops.bin│ ├── a7800.bin│ └── ...├── data/│ ├── a2600/│ ├── a7800/│ ├── amstrad/│ └── ...├── fonts/│ ├── cp1251_greybeard.bin│ ├── cp1251_sans_serif.bin│ ├── cp1251_sans_serif_bold.bin│ └── ...└── roms/ ├── a2600/ ├── a7800/ ├── amstrad/ └── ...&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;All that remains is to copy the ROMs we want to emulate to the corresponding directories. If we want cover art for the games, we will need to create the &lt;code&gt;covers&lt;/code&gt; subdirectory with the same subdirectories as the &lt;code&gt;roms&lt;/code&gt; directory and place the images there. These must be in a special IMG format that we will generate with a &lt;a href=&#34;https://github.com/sylverb/game-and-watch-retro-go-sd/blob/main/README.md#cover-art-generator-gencoverspy&#34;&gt;script included in the Retro-Go SD repository&lt;/a&gt;. The IMG file names must match those of the ROMs in their corresponding directory.&lt;/p&gt;&lt;h4 id=&#34;back-case&#34;&gt;Back case&lt;a class=&#34;headerlink&#34; href=&#34;#back-case&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h4&gt;&lt;p&gt;When installing the microSD slot, you need to modify the back cover of the console because the reader falls over some support posts on the d-pad. You also need to drill a hole in the side to allow access to the microSD so you can extract and insert it when you want to change games, rescue savestates, or update the firmware. To perform the drilling, &lt;a href=&#34;https://www.printables.com/model/1269910-zelda-game-and-watch-sd-card-drill-jig/files&#34;&gt;there are some tools&lt;/a&gt; designed by the user facelesstech that help keep the slot clean. You can see how this modification is performed in the video at the end of this article.&lt;/p&gt;&lt;p&gt;There is an alternative if we don&#39;t want to risk permanently damaging the original cover, and that is to 3D print the model created by the user Aradia, which can be downloaded &lt;a href=&#34;../files/posts/2026-03-08_zelda_gw/G%26W%20Zelda%20-%20Coque%20arri%C3%A8re%20-%20Mod%20Retro%20Go%20SD%20-%20v1.stl&#34;&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;&lt;img alt=&#34;Back case&#34; src=&#34;../images/posts/2026-03-08_zelda_gw/carcasa.jpg&#34; /&gt;&lt;/p&gt;&lt;p&gt;The green color I found most similar to the Zelda console is the &lt;a href=&#34;https://www.amazon.es/dp/B0DHKZCL75&#34;&gt;15-Green from OVERTURE&lt;/a&gt;.&lt;/p&gt;&lt;h2 id=&#34;controls&#34;&gt;Controls&lt;a class=&#34;headerlink&#34; href=&#34;#controls&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Below we indicate the key combinations for controlling Retro-go SD (although many of them also work in Retro-go). Holding down the &lt;code&gt;PAUSE/SET&lt;/code&gt; button while pressing other buttons performs the following actions:&lt;/p&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Key combination&lt;/th&gt;&lt;th&gt;Action&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;PAUSE/SET&lt;/code&gt; + &lt;code&gt;GAME&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Save a screenshot (disabled by default in builds with 1MB flash)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;PAUSE/SET&lt;/code&gt; + &lt;code&gt;TIME&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Change execution speed (1x/1.5x)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;PAUSE/SET&lt;/code&gt; + &lt;code&gt;UP&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Increase brightness&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;PAUSE/SET&lt;/code&gt; + &lt;code&gt;DOWN&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Decrease brightness&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;PAUSE/SET&lt;/code&gt; + &lt;code&gt;RIGHT&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Increase volume&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;PAUSE/SET&lt;/code&gt; + &lt;code&gt;LEFT&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Decrease volume&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;PAUSE/SET&lt;/code&gt; + &lt;code&gt;B&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Load state&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;PAUSE/SET&lt;/code&gt; + &lt;code&gt;A&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Save state&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;PAUSE/SET&lt;/code&gt; + &lt;code&gt;A&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Autofire on button A&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;PAUSE/SET&lt;/code&gt; + &lt;code&gt;B&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Autofire on button B&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;PAUSE/SET&lt;/code&gt; + &lt;code&gt;POWER&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Poweroff without savestate&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;PAUSE/SET&lt;/code&gt; + &lt;code&gt;POWER&lt;/code&gt;&lt;/td&gt;&lt;td&gt;After having done &lt;code&gt;PAUSE/SET&lt;/code&gt; and selected &lt;code&gt;Power off&lt;/code&gt;, the bootloader will start without calling Retro-go, allowing us to see the bootloader version as well as information about the microSD detection and the state of the internal and external flash memories&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;PAUSE/SET&lt;/code&gt; + &lt;code&gt;GAME&lt;/code&gt; + &lt;code&gt;LEFT&lt;/code&gt;&lt;/td&gt;&lt;td&gt;From the OFW, it causes the bootloader to start without fully loading retro-go. It is used to see the screen that shows the SD detection, flash chip, and code in bank2 of the internal flash; it is also used to see the bootloader version.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;GAME&lt;/code&gt; + menu &lt;code&gt;Reset settings&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Clears the registration data in the SD of what is cached in the flash; use when changing the SD of the machine or when changing the flash chip. It is equivalent to deleting the file &lt;code&gt;flashcachedata.bin&lt;/code&gt; in the &lt;code&gt;data&lt;/code&gt; directory of the SD.&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;h2 id=&#34;references&#34;&gt;References&lt;a class=&#34;headerlink&#34; href=&#34;#references&#34; title=&#34;Permanent link&#34;&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;I would not like to finish without mentioning the &lt;a href=&#34;https://discord.gg/TKjHZ5yV&#34;&gt;stacksmashing&lt;/a&gt; Discord server and the following users whose work has made these modifications possible:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;stacksmashing&lt;/li&gt;&lt;li&gt;kbeckmann&lt;/li&gt;&lt;li&gt;Tim Schuerewegen&lt;/li&gt;&lt;li&gt;BrianPugh&lt;/li&gt;&lt;li&gt;GMMan&lt;/li&gt;&lt;li&gt;tfmoe__&lt;/li&gt;&lt;li&gt;Sylver Bruneau&lt;/li&gt;&lt;li&gt;facelesstech&lt;/li&gt;&lt;li&gt;DasBoss&lt;/li&gt;&lt;li&gt;bxhxx&lt;/li&gt;&lt;li&gt;Benjamin Solberg&lt;/li&gt;&lt;li&gt;orzeus&lt;/li&gt;&lt;li&gt;ducalex&lt;/li&gt;&lt;li&gt;ZimM&lt;/li&gt;&lt;li&gt;Ninoh-FOX&lt;/li&gt;&lt;li&gt;PrimoAngelo&lt;/li&gt;&lt;li&gt;Aradia&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;In the following Macho Nacho video you can see the whole console modification process (the flex of the microSD module is the model that is not held by screws but with solder points on the G&amp;amp;W PCB):&lt;/p&gt;&lt;iframe width=&#34;688&#34; height=&#34;387&#34; src=&#34;https://www.youtube.com/embed/8YIHjUM8Qms&#34; title=&#34;Making The Zelda G&amp;W Into A MODERN Emulation Powerhouse&#34; frameborder=&#34;0&#34; allow=&#34;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share&#34; referrerpolicy=&#34;strict-origin-when-cross-origin&#34; allowfullscreen&gt;&lt;/iframe&gt;</description><link>https://apuntes.eduardofilo.es/en/2026-03-08_zelda_gw.html</link> <pubDate>Sun, 08 Mar 2026 15:45:00 +0100</pubDate><source url="https://apuntes.eduardofilo.es/rss.xml">Apuntes de eduardófilo</source><guid isPermaLink="true">https://apuntes.eduardofilo.es/en/2026-03-08_zelda_gw.html</guid> </item> </channel></rss>