dlexa

RAE-grounded Spanish, ready for your agent to cite.

dlexa · dpd tilde
$ 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/2026
A direct lookup. The real run prints 344 lines, so lines 14 to 339 are removed as whole lines and the cut is marked where it happens. The closing block is the tool’s own attribution, emitted on every entry.
Agent contract

Choose a route, then use its minimum syntax

The help text gives an agent the command map before it makes a request.

dlexa · --help
$ dlexa --help# Ayuda: dlexa Elegí la superficie correcta para resolver la duda: `dpd` abre entradas directas, `search` descubre rutas y los comandos por slug abren contenido ya identificado. ## Sintaxis`dlexa <comando> [argumentos]` ## Qué podés hacer- Consultar una entrada DPD exacta con `dlexa dpd <termino>`.- Descubrir qué superficie conviene con `dlexa search <consulta>`.- Abrir contenido ya identificado con `dlexa espanol-al-dia <slug>`, `dlexa duda-linguistica <slug>` o `dlexa noticia <slug>`. ## Qué recibe- Una duda en lenguaje natural suele arrancar mejor en `search`.- Un término puntual del DPD va directo en `dpd`.- Un slug público exacto va en su comando específico. ## Ejemplos- `dlexa dpd basto`- `dlexa dpd solo`- `dlexa search solo o sólo`- `dlexa duda-linguistica cuando-se-escriben-con-tilde-los-adverbios-en-mente`- `dlexa noticia preguntas-frecuentes-tilde-en-las-mayusculas` ## Guía para agentes y automatizaciones- Leé esta ayuda como mapa de superficies: primero elegí comando, después copiá la sintaxis mínima del bloque correspondiente.- Los ejemplos entre backticks son literales copiables.- `--format json` sirve para automatización estructurada; Markdown prioriza lectura humana y LLM. ## Próximo paso sugerido- Si ya conocés la entrada exacta, seguí con `dlexa dpd <termino>`.- Si partís de una duda en lenguaje natural, seguí con `dlexa search <consulta>`.
Complete, verbatim stdout from `./dlexa --help`.

JSON output shape

Request.Query
"solo"
Request.Format
"json"
Request.Sources
["dpd"]
Request.NoCache
false
Entries[].Headword
"tilde1"
Entries[].Source
"dpd"
Entries[].URL
"https://www.rae.es/dpd/tilde"
Entries[].Metadata
present
The surface

Five routes, and you always name the one you took

Discovery, direct entry and slug articles are separate commands, so the answer you get always corresponds to the surface you asked for.

  1. 01

    search

    Discovery

    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.

    Copy this literally
    $ dlexa search solo o sólo
  2. 02

    dpd

    Direct lookup

    Direct 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.

    Copy this literally
    $ dlexa dpd tilde
  3. 03

    espanol-al-dia

    Article by slug

    RAE 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.

    Copy this literally
    $ dlexa espanol-al-dia un-solo-nombre-para-cada-letra
  4. 04

    duda-linguistica

    Article by slug

    Answered 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.

    Copy this literally
    $ dlexa duda-linguistica cuando-se-escriben-con-tilde-los-adverbios-en-mente
  5. 05

    noticia

    Article by slug

    Announcements 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.

    Copy this literally
    $ dlexa noticia preguntas-frecuentes-tilde-en-las-mayusculas
Discovery

Every candidate arrives with the exact next command

The 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.

The two providers it federates

  • dpd--source dpd

    The DPD entry index, queried through its own `/srv/keys` discovery endpoint. It runs first in the federated default.

  • search--source search

    The general RAE search surface, which reaches editorial articles, answered doubts and FAQ-shaped pages beyond the dictionary itself.

The same query is not sent everywhere

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.

What a candidate hands you

  • ver_contenidoRunnable now

    The next step opens real content right now. Copy the command and run it.

    Surfaces it can open
    • dpd
    • espanol-al-dia
    • duda-linguistica
    • noticia
  • seguir_buscandoDeferred

    The 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
$ 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`
Candidates 3 to 6 are removed as whole lines and the cut is marked; nothing else was touched. Candidate 2 is worth reading twice: asking about `solo` resolves to `dlexa dpd tilde`, because that is where the DPD settles the question. Candidate 7 is the deferred case, and the `…` inside its snippet belongs to the source.
Always a next step

A lookup that finds nothing still tells you where to look

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 four fields it always prints

Nivel
Which dead end this is: 1 for the syntax failure, 2 for a missing entry.
objetivo
The term or the command the run was aiming at.
siguiente comando
The command that moves you forward, ready to copy. Nivel 1 prints the same field as `sintaxis correcta`.
acción
What to do with that command, in one line.
Nivel 1 · Syntax

The command itself does not exist

What triggers it

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 · root
$ 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.
Complete and unedited.
Nivel 2 · Not Found

The command exists, the entry does not

What triggers it

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
$ 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.
Complete and unedited.

Measured on the binary

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.

Provenance

Provenance that stays with the answer

dlexa keeps direct DPD entries and RAE editorial routes distinct, so an agent can cite the surface that answered the doubt.

  • Direct entries from the DPD

    The `dpd` route opens an identified entry from the Diccionario panhispánico de dudas. Its closing block carries the source, dictionary, edition, URL and consultation date.

    • Source
    • Dictionary
    • Edition
    • URL
    • Consulted
  • Editorial routes from the RAE

    Known public slugs open their own RAE editorial surface. `espanol-al-dia`, `duda-linguistica` and `noticia` preserve that route in the command an agent runs.

    • espanol-al-dia
    • duda-linguistica
    • noticia
Install

One line, and a single dependency behind it

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@latest
Open the repository
  • github.com/Disble/dlexa

    The source, the README that documents every surface, and the CONTRIBUTING guide with the pinned lint toolchain.

  • rae.es/dpd

    The Diccionario panhispánico de dudas itself. Every entry the CLI returns carries its attribution block back to here.