Skip to content

mosaic config ​

Shows and changes the configuration in ~/.config/mosaic/config.toml. Run it with no options, or with --show, to print the configuration as JSON.

Usage ​

bash
mosaic config --show
mosaic config --unpaywall-email you@university.edu --download-dir ~/papers
mosaic config --ss-key KEY --ncbi-key KEY
mosaic config --disable-source dblp --disable-source hal
mosaic config --filename-pattern "{year}_{author}_{title}"
mosaic config --llm-provider openai --llm-base-url http://localhost:11434/v1 --llm-api-key ollama --llm-model qwen3:8b
mosaic config --embedding-model qwen3-embedding:0.6b --embedding-base-url http://localhost:11434/v1 --embedding-api-key ollama

Behaviour ​

Options can be combined; the file is written once.

PurposeOptions
Keys--elsevier-key, --ss-key, --ncbi-key (PubMed and PubMed Central), --core-key, --ads-key, --ieee-key, --springer-key, --scopus-key, --scopus-inst-token, --zenodo-key, --zotero-key (also finds and saves your Zotero user ID)
Open access--unpaywall-email
Sources--enable-source NAME, --disable-source NAME (repeatable; config names such as semantic_scholar, europepmc)
Paths and names--download-dir, --db-path, --filename-pattern, --rate-limit-delay
Obsidian--obsidian-vault, --obsidian-subfolder, --obsidian-filename-pattern, --obsidian-tag (repeatable, replaces the list), --obsidian-wikilinks/--no-obsidian-wikilinks
LLM--llm-provider (openai or anthropic), --llm-api-key, --llm-model, --llm-base-url (any OpenAI-compatible server: Ollama, LM Studio, llama.cpp)
Embeddings and retrieval--embedding-model, --embedding-base-url, --embedding-api-key, --rag-top-k, --rag-auto-index, --chunk-overlap, --full-text-index
PEDro--pedro-fair-use, --pedro-fetch-details, --pedro-rate-limit-delay

Placeholders of --filename-pattern: {year} (0000 when unknown), {source}, {author} (the first word of the first author's name as the source writes it: a family name for "Family, Given" sources, a given name for "Given Family" ones), {title} (up to 60 characters), {doi}, {journal} (no_journal when unknown).

Keys without an option (custom sources, rag.citations.*, rag.chunk_size, Zotero user_id, and others) are set by editing ~/.config/mosaic/config.toml: see configuration.

Exit code 1 for an unknown source name.

See also: configuration, installation.

Options ​

mosaic config [OPTIONS]
OptionValueDefaultDescription
--showPrint current config
--elsevier-keyTEXTSet Elsevier / ScienceDirect API key
--ss-keyTEXTSet Semantic Scholar API key
--ncbi-keyTEXTSet NCBI API key (used for PubMed and PMC)
--core-keyTEXTSet CORE API key
--ads-keyTEXTSet NASA ADS API key
--ieee-keyTEXTSet IEEE Xplore API key
--springer-keyTEXTSet Springer API key
--scopus-keyTEXTSet Scopus API key
--scopus-inst-tokenTEXTSet Scopus institutional token
--zenodo-keyTEXTSet Zenodo API key
--zotero-keyTEXTSet Zotero API key (web API)
--unpaywall-emailTEXTSet Unpaywall email
--download-dirTEXTSet PDF download directory
--db-pathTEXTSet SQLite cache path
--filename-patternTEXTSet PDF filename pattern (placeholders: {year}, {source}, {author}, {title}, {doi})
--rate-limit-delayFLOATSet default delay between API calls in seconds
--enable-sourceTEXTEnable a source by name (repeatable). Known names: arxiv, semantic_scholar, sciencedirect, doaj, europepmc, openalex, base, springer_api, core, nasa_ads, ieee, zenodo, crossref, dblp, hal, pubmed, pmc, biorxiv, pedro, scopus
--disable-sourceTEXTDisable a source by name (repeatable). Same names as --enable-source
--obsidian-vaultTEXTSet Obsidian vault path
--obsidian-subfolderTEXTSet subfolder inside vault for paper notes
--obsidian-filename-patternTEXTSet Obsidian note filename pattern (placeholders: {year}, {author}, {title})
--obsidian-tagTEXTSet Obsidian tags (repeatable, replaces existing list). E.g. --obsidian-tag paper --obsidian-tag science
--obsidian-wikilinks, --no-obsidian-wikilinksUse Obsidian [[wikilinks]] in generated notes
--pedro-fair-use, --no-pedro-fair-useAcknowledge PEDro fair-use policy to enable the source
--pedro-fetch-details, --no-pedro-fetch-detailsFetch each PEDro record page to get authors, year, DOI and abstract (slower)
--pedro-rate-limit-delayFLOATSet PEDro-specific rate-limit delay in seconds (default: 3.0)
--llm-providerTEXTLLM provider for relevance ranking: "openai" or "anthropic"
--llm-api-keyTEXTAPI key for the LLM provider (any string for local servers)
--llm-modelTEXTModel name (leave empty for provider default)
--llm-base-urlTEXTBase URL for a local OpenAI-compatible server (e.g. http://localhost:11434/v1)
--llm-timeoutFLOATSeconds to wait for one LLM answer (raise it for large local models)
--embedding-modelTEXTEmbedding model name (e.g. snowflake-arctic-embed2, text-embedding-3-small)
--embedding-base-urlTEXTBase URL for the embedding server (e.g. http://localhost:11434/v1)
--embedding-api-keyTEXTAPI key for the embedding server (any string for local servers)
--rag-top-kINTEGERNumber of papers retrieved per RAG query (default: 10)
--rag-auto-index, --no-rag-auto-indexAuto-index new papers after each search/get run
--chunk-overlapINTEGERToken overlap between consecutive chunks (default: 50)
--full-text-index, --no-full-text-indexIndex full PDF text when available (requires pymupdf)

Released under GPL-3.0-or-later, BSD-2-Clause, BSD-3-Clause or MIT, at your choice.