( ´∀`)文字 Moji
Reference

Configuration reference

YAML fields, paths, environment variables, and precedence.

Paths

The default configuration path is ~/.moji/config.yaml. Override it with MOJI_CONFIG.

The default cache path is $XDG_CACHE_HOME/moji when XDG_CACHE_HOME is set, or ~/.cache/moji otherwise.

Complete example

download_dir: ~/Downloads/moji
github_token: ""
search_timeout_seconds: 15
cache_ttl_seconds: 3600
default_formats: [otf, ttf, woff2, dfont, pfb, pfm]
source_plugins: []

ranking:
  format: 3.0
  family_size: 4.0
  trusted: 1.5
  size_penalty: 0.5
  weight_bonus: 2.0
  variable_bonus: 1.5

rate_limits:
  github:
    timeout_seconds: 15
    retries: 2
  getfonts:
    timeout_seconds: 15
    retries: 1
  dafont:
    timeout_seconds: 15
    retries: 1
  fontsquirrel:
    timeout_seconds: 15
    retries: 1
  fontshare:
    timeout_seconds: 15
    retries: 1
  registry:
    timeout_seconds: 15
    retries: 1
  plugins:
    timeout_seconds: 20
    retries: 0
  websearch:
    timeout_seconds: 20
    retries: 0

providers:
  github:
    enabled: true
  getfonts:
    enabled: true
  dafont:
    enabled: true
  fontsquirrel:
    enabled: false
    instance: ""
  fontshare:
    enabled: true
    instance: ""
  registry:
    enabled: true
  plugins:
    enabled: true
  websearch:
    enabled: true
    instance: ""

Fields

FieldTypeDefaultMeaning
download_dirstring~/Downloads/mojiDestination for get and TUI downloads
github_tokenstringemptyGitHub Code Search token
search_timeout_secondspositive integer15Overall search deadline
cache_ttl_secondsnon-negative integer3600Cache lifetime; 0 disables cache hits
default_formatsstring arrayOTF, TTF, WOFF2, DFONT, PFB, PFMFormats used without --format
source_pluginsstring arrayemptyExecutable paths implementing the source plugin protocol
rankingmappingshown aboveRelative score weights
rate_limitsmappingshown abovePer-provider timeout and retry count
providersmappingshown aboveProvider enablement and optional instance

providers.fontsquirrel.instance and providers.fontshare.instance can replace the official API base URL. Leave them empty for the public catalogs.

Environment variables

VariableMeaning
GITHUB_TOKENGitHub token; takes precedence over the config token
MOJI_CONFIGAlternate config path
XDG_CACHE_HOMEAlternate cache root
EDITORProgram used by moji config
NO_COLORDisable styled terminal output
TERM=dumbDisable styled terminal output

Per-invocation flags override general config defaults. Provider availability still depends on required credentials and instance settings. If no explicit token is available, Moji uses an existing authenticated GitHub CLI session for GitHub.com without saving its token.

On this page