文字 Moji
Reference

CLI reference

Commands, flags, output modes, and defaults.

Command grammar

moji <query> [flags]
moji get <query> [flags]
moji config [show]
moji cache clear
moji --version
moji --help

moji <query>

Search enabled providers. When stdin and stdout are terminals, open the live TUI. Otherwise print a table. --json always prints structured output.

moji get <query>

Search, rank, select, and download. A trailing weight is parsed from the query. The phrases entire family and all weights select multiple files from the best family source.

moji config

Create the default config when missing, then open it with $EDITOR.

moji config show

Print effective configuration as JSON. The GitHub token is redacted.

moji cache clear

Delete cached provider responses and recreate the cache directory.

Flags

FlagShortDefaultMeaning
--format <list>-fconfig defaultComma-separated otf, ttf, woff, or woff2
--weight <name>-wanyKeep only a normalized font weight
--max <count>-n10 search / 1 getMaximum visible results or downloads
--provider <list>all enabledComma-separated github, getfonts, or configured websearch
--jsonoffPrint machine-readable JSON
--dry-runoffPreview a get selection without downloading
--download-dir <path>-d~/Downloads/mojiDownload destination
--verbose-voffPrint provider failures, counts, and elapsed time
--debugoffPrint provider state and retry details
--no-cacheoffBypass cached search results
--token-stdinoffRead a GitHub token from standard input
--allow-insecureoffAllow HTTP for a source you explicitly trust
--help-hShow help and ignore other arguments
--versionPrint 0.1.0

Flags may appear before or after query words. Values can use a separate argument or --flag=value.

TUI keys

KeyAction
up / kSelect previous result
down / jSelect next result
enterOpen result details
DDownload selected result
/Filter loaded results
fCycle all, OTF, TTF, and WOFF2
tab / oCycle score, format, and size sorting
escClose details or exit
q / Ctrl-CExit

Standard streams

  • Search results and successful command output use stdout.
  • Diagnostics, verbose status, debug status, and errors use stderr.
  • Color is disabled when NO_COLOR is set or TERM=dumb.

On this page