Normative Spanish, resolved from the terminal.
A Go CLI that consults the Diccionario panhispánico de dudas and the RAE editorial surfaces through explicit routes. You choose the surface (discovery, a direct entry, or a known slug), and the answer comes back on that surface.
$ dlexa dpd search guion# [dlexa:search] guion*Fuente: Diccionario panhispánico de dudas | Caché: HIT* --- ## Resultado semántico para "guion" - total_candidatos: 1- siguiente_paso: `dlexa dpd guion` ### 1. guion1- snippet: guion1- clasificación: dpd-entry- fuente: Diccionario panhispánico de dudas- ver_contenido: `dlexa dpd guion`Discovery, direct entry and slug articles are separate commands, so the answer you get always corresponds to the surface you asked for.
Federated semantic discovery
dlexa search <consulta>Queries the general RAE search surface and the DPD entry index together, then returns candidates with the exact follow-up command for each one. This is where a question in plain language belongs.
$ dlexa search solo o sóloDirect entry in the Diccionario panhispánico de dudas
dlexa dpd <termino>Exact-match consultation for a DPD entry you already know. It also carries its own discovery path, `dlexa dpd search <consulta>`, scoped to the DPD index.
$ dlexa dpd tildeRAE editorial article by slug
dlexa espanol-al-dia <slug>Opens a complementary guidance article when discovery already identified its route. The slug is the one that appears in the public URL, passed verbatim.
$ dlexa espanol-al-dia un-solo-nombre-para-cada-letraAnswered linguistic doubt by slug
dlexa duda-linguistica <slug>The RAE surface for individual doubts already answered editorially, kept as its own command so a slug from one collection is never resolved against another.
$ dlexa duda-linguistica cuando-se-escriben-con-tilde-los-adverbios-en-menteAnnouncements and FAQ-shaped resources
dlexa noticia <slug>Reaches the RAE news surface, which also hosts FAQ-compatible pages. Discovery can hand you one of these routes directly when the best answer is not a dictionary entry at all.
$ dlexa noticia preguntas-frecuentes-tilde-en-las-mayusculasWhen a direct lookup fails to resolve, it prints a structured miss and hands you the search command to run yourself. The route stays yours.
$ dlexa dpd tilde# [dlexa:dpd] tilde*Fuente: Diccionario panhispánico de dudas | Caché: HIT* --- # tilde ## tilde1 Diccionario panhispánico de dudas 2.ª edición … líneas 14 a 339 elididas: el cuerpo de tilde1 y tilde2 … Source: Real Academia Española y Asociación de Academias de la Lengua EspañolaDictionary: Diccionario panhispánico de dudasEdition: 2.ª ediciónURL: https://www.rae.es/dpd/tildeConsulted: 05/08/2026The discovery surface federates two providers and returns candidates. What each candidate carries is the useful part: the exact next command, and whether that command can be run right now or is only a pointer to somewhere the CLI does not reach yet.
--source dpdThe DPD entry index, queried through its own `/srv/keys` discovery endpoint. It runs first in the federated default.
--source searchThe general RAE search surface, which reaches editorial articles, answered doubts and FAQ-shaped pages beyond the dictionary itself.
A federated run plans per provider. For a multi-token query such as `coma que explicativa`, the DPD provider first tries the leading lexical token, `coma`, and retries the full query only if that returns nothing. General search keeps the original query, so loose queries still land somewhere useful.
ver_contenidoRunnable nowThe next step opens real content right now. Copy the command and run it.
seguir_buscandoDeferredThe result is real but no CLI command maps to it yet, so the tool says exactly that. In JSON output the same state is the candidate’s `deferred` field, which automation should read before acting.
$ dlexa search "solo o sólo"# [dlexa:search] solo o sólo*Fuente: búsqueda general RAE | Caché: HIT* --- ## Resultado semántico para "solo o sólo" - total_candidatos: 7- siguiente_paso: `dlexa dpd hacer` ### 1. ⊗ solo (o solamente) hacer que + infinitivo- snippet: ⊗ solo (o solamente) hacer que + infinitivo- clasificación: dpd-entry- fuente: Diccionario panhispánico de dudas- ver_contenido: `dlexa dpd hacer` ### 2. solo- snippet: solo- clasificación: dpd-entry- fuente: Diccionario panhispánico de dudas- ver_contenido: `dlexa dpd tilde` … candidatos 3 a 6 elididos: tres artículos y una duda lingüística … ### 7. Clara Janés- snippet: … «La soledad no es vivir solo » . El Mundo , 3 de octubre de 2015. … de sombra , por el que obtuvo el Premio Ciudad de Melilla, o Los secretos del bosque , Premio Jaime Gil … del sueño (1989), El hombre de Adén (1991) o Espejos de agua (1997). Suyos son, también, otros …- clasificación: unknown- fuente: RAE- url: https://www.rae.es/academico/clara-janes- seguir_buscando: `dlexa search solo o sólo`Both dead ends print the same four fields, so you are never left holding an error string and a decision. A reader and a script get the same thing.
The response names the correct syntax and points at `--help`, which the project treats as part of the CLI contract for humans and language models alike.
$ dlexa frobnicate# [dlexa:root] Nivel 1 · Syntax unknown command "frobnicate" for "dlexa" - objetivo: `dlexa`- sintaxis correcta: `dlexa <comando> [argumentos]`- acción: Usá `--help` para ver sintaxis válida y ejemplos copiables.This is where the no-rerouting rule becomes visible. The tool preserves a native DPD related-entry suggestion when the source offers one; otherwise it prints the explicit `dlexa search <consulta>` next step and stops.
$ dlexa dpd zzzznoexiste# [dlexa:dpd] Nivel 2 · Not Found No se encontró contenido en este módulo. - objetivo: `zzzznoexiste`- siguiente comando: `dlexa search zzzznoexiste`- acción: Probá con `dlexa search <consulta>` para descubrir la ruta correcta.Both were run unpiped to read the binary’s own status, and both returned exit code 0. The signal to branch on is the structured output: the printed shape, or the `deferred` field in JSON. Worth knowing before wiring it into a script.
Both the lookup modules and the discovery providers run the same explicit pipeline. Each stage lives in its own package, so acquiring a document, understanding it, and deciding how it should look are three problems that never leak into each other.
internal/fetchUpstream acquisition adapters. The only layer that knows the RAE is on the other side of a network.
internal/parseRaw document parsers. They produce structured records, or an explicit miss that travels as a result.
internal/normalizeMaps whatever the source shape happened to be onto the shared model, so nothing downstream ever branches on which provider answered.
internal/renderMarkdown or JSON, chosen by `--format`. Presentation stays outside module logic, which is why the same lookup serves a reader and a script without a second code path.
`internal/cache` sits beside the pipeline as explicit infrastructure: filesystem-backed, with an in-memory fallback. Every response reports its own state, so the `Caché: HIT` and `Caché: MISS` in the captures above tell you whether it went out to the network. `--no-cache` skips reads and writes for a single request.
The tool accepts free text, so it says plainly what it is aiming at. Knowing exactly what you asked is what makes the answer worth pasting into your work.
The questions the DPD exists to settle. That focus is what lets a single command return an answer you can act on.
A DPD recommendation turns on five conditions at once, and the tool passes all of them through. You get guidance you can weigh, with its conditions attached.
When the live source has nothing for a term, the answer is a structured Nivel 2 with the exact `dlexa search` command that would find it. Every answer that does arrive came from the source, so it can be trusted on sight.
The cache is the filesystem, with an in-memory fallback. Your queries stay where you ran them, and a warm machine answers from disk.
How a DPD table is rendered depends on the table, so the structure the entry uses to make its point survives the trip.
Go 1.22 or newer is the only prerequisite, and the binary carries exactly one direct dependency: Cobra, for the command tree.
$ go install github.com/Disble/dlexa/cmd/dlexa@latestThe source, the README that documents every surface, and the CONTRIBUTING guide with the pinned lint toolchain.
The Diccionario panhispánico de dudas itself. Every entry the CLI returns carries its attribution block back to here.