Skip to content

CLI Overview

The ODict CLI is the fastest way to create, inspect, combine, and query dictionaries from a terminal. Most workflows start with XML, compile it to a .odict file, and then use the compiled file for lookup, search, tokenization, or serving over HTTP.

TaskCommandUse it when
Create a starter XML fileodict newYou want a blank ODXML file with the dictionary name filled in.
Compile XMLodict compileYou are ready to turn ODXML into a compact .odict file.
Inspect a dictionaryodict infoYou want basic metadata such as file version, size, and entry count.
List headwordsodict lexiconYou need every term defined in a dictionary.
Look up entriesodict lookupYou know the word and want an exact dictionary entry.
Split compound textodict splitYou want to break a term into known dictionary words without trying the whole term first.
Build a search indexodict indexYou want full-text search across definitions.
Search definitionsodict searchYou know the meaning or phrase, but not necessarily the headword.
Tokenize textodict tokenizeYou want language-aware tokens matched against dictionary entries.
Convert back to textodict dumpYou want XML or SQL output from a compiled dictionary.
Merge dictionariesodict mergeYou want to combine entries from multiple dictionaries.
Download dictionariesodict downloadYou want a dictionary from the remote registry.
Manage aliasesodict aliasYou want short names for local or downloaded dictionaries.
Serve over HTTPodict serveYou want JSON lookup, search, split, or tokenization endpoints.
Terminal window
odict new animals -n "Animal Dictionary"
odict compile animals.xml
odict lookup animals.odict cat

Add search when you need discovery by definition text:

Terminal window
odict index animals.odict
odict search animals.odict "domesticated mammal"

Use dump when you want to inspect or transform a compiled dictionary:

Terminal window
odict dump animals.odict -f xml
odict dump animals.odict -f sqlite -o animals.sql

Use merge when you want to combine multiple compiled dictionaries:

Terminal window
odict merge base.odict extra.odict -o combined.odict

Most commands accept a local .odict path. Commands that load dictionaries can also use aliases or remote names, depending on the feature:

Terminal window
odict download wiktionary/eng
odict alias set eng ./eng.odict
odict lookup eng hello

Remote dictionary names use the form dictionary/language, such as wiktionary/eng.

For every flag and argument, see the Command Reference. For guided workflows, see Downloading Dictionaries, Aliases and Loading, and Serving Dictionaries.