Skip to content

CLI reference

Generated directly from marq's actual click command tree (qmd_py.cli.main:cli) — this page can't drift out of sync with the code the way a hand-transcribed --help dump would.

Note

deep-search is a registered alias for query (same command object, two names). It appears below under a second "marq query" heading rather than "marq deep-search" — the generator names each section after the command object's own name, not the alias it was registered under. Both names work identically on the command line.

marq

marq: centralized markdown/code search over Postgres/pgvector.

Usage:

marq [OPTIONS] COMMAND [ARGS]...

Options:

Name Type Description Default
--version boolean Show the version and exit. False
-v, --verbose integer range (0 and above) Log to stderr: -v for INFO (per-query timings, per-collection counts), -vv for DEBUG. 0
--help boolean Show this message and exit. False

marq bench

Run search-quality benchmarks (precision/recall/MRR/F1) against a fixture file.

Usage:

marq bench [OPTIONS] FIXTURE_PATH

Options:

Name Type Description Default
-c, --collection text Restrict to one collection None
--format choice (cli | json) N/A cli
--help boolean Show this message and exit. False

marq cleanup

Remove orphaned content/embeddings and inactive document records.

No VACUUM step (unlike the TS reference): Postgres's autovacuum handles space reclaim automatically, and a manual VACUUM on a shared server is more likely to cause lock contention than help.

Usage:

marq cleanup [OPTIONS]

Options:

Name Type Description Default
--help boolean Show this message and exit. False

marq collection

Manage indexed collections.

Usage:

marq collection [OPTIONS] COMMAND [ARGS]...

Options:

Name Type Description Default
--help boolean Show this message and exit. False

marq collection add

Add and index a collection.

Usage:

marq collection add [OPTIONS] PATH

Options:

Name Type Description Default
--name text Collection name (default: directory basename) None
--mask text Glob pattern **/*.md
--help boolean Show this message and exit. False

marq collection exclude

Exclude a collection from default (unscoped) queries.

Usage:

marq collection exclude [OPTIONS] NAME

Options:

Name Type Description Default
--help boolean Show this message and exit. False

marq collection include

Include a collection in default (unscoped) queries.

Usage:

marq collection include [OPTIONS] NAME

Options:

Name Type Description Default
--help boolean Show this message and exit. False

marq collection list

List all collections with details.

Usage:

marq collection list [OPTIONS]

Options:

Name Type Description Default
--help boolean Show this message and exit. False

marq collection remove

Remove a collection by name.

Usage:

marq collection remove [OPTIONS] NAME

Options:

Name Type Description Default
--help boolean Show this message and exit. False

marq collection rename

Rename a collection.

Usage:

marq collection rename [OPTIONS] OLD_NAME NEW_NAME

Options:

Name Type Description Default
--help boolean Show this message and exit. False

marq collection show

Show collection details.

Usage:

marq collection show [OPTIONS] NAME

Options:

Name Type Description Default
--help boolean Show this message and exit. False

marq collection update-cmd

Set (or clear, if omitted) the pre-update command for a collection.

Usage:

marq collection update-cmd [OPTIONS] NAME [COMMAND_PARTS]...

Options:

Name Type Description Default
--help boolean Show this message and exit. False

marq context

Manage per-path and global search context.

Usage:

marq context [OPTIONS] COMMAND [ARGS]...

Options:

Name Type Description Default
--help boolean Show this message and exit. False

marq context add

Add context for a path (or "/" for global context).

Usage:

marq context add [OPTIONS] PATH TEXT

Options:

Name Type Description Default
--help boolean Show this message and exit. False

marq context check

Check for collections/paths missing context.

Usage:

marq context check [OPTIONS]

Options:

Name Type Description Default
--help boolean Show this message and exit. False

marq context list

List all contexts.

Usage:

marq context list [OPTIONS]

Options:

Name Type Description Default
--help boolean Show this message and exit. False

marq context rm

Remove context for a path (or "/" for global context).

Usage:

marq context rm [OPTIONS] PATH

Options:

Name Type Description Default
--help boolean Show this message and exit. False

marq doctor

Diagnose Postgres, pgvector, migrations, and LLM-router health.

Usage:

marq doctor [OPTIONS]

Options:

Name Type Description Default
--help boolean Show this message and exit. False

marq embed

Generate vector embeddings for pending documents.

Usage:

marq embed [OPTIONS]

Options:

Name Type Description Default
-c, --collection text Restrict embedding to one collection None
--model text Embedding model slug (default: the configured model) None
--help boolean Show this message and exit. False

marq get

Get a document by path or docid; optional line range (path:from:count).

Usage:

marq get [OPTIONS] FILEPATH

Options:

Name Type Description Default
--from integer Starting line number None
-l integer Maximum lines to show None
--no-line-numbers boolean Disable line numbers False
--help boolean Show this message and exit. False

marq ls

List collections, or files in a collection[/path].

Usage:

marq ls [OPTIONS] [PATH_ARG]

Options:

Name Type Description Default
--help boolean Show this message and exit. False

marq mcp

Start the MCP server (stdio by default), or manage the HTTP daemon (see 'mcp stop').

Usage:

marq mcp [OPTIONS] [COMMAND] [ARGS]...

Options:

Name Type Description Default
--http boolean Use Streamable HTTP transport instead of stdio False
--port integer HTTP port 8181
--host text HTTP host 127.0.0.1
--daemon boolean Run the HTTP server in the background False
--help boolean Show this message and exit. False

marq mcp stop

Stop the background MCP HTTP daemon.

Usage:

marq mcp stop [OPTIONS]

Options:

Name Type Description Default
--help boolean Show this message and exit. False

marq multi-get

Get multiple documents by glob pattern or comma-separated list.

Usage:

marq multi-get [OPTIONS] PATTERN

Options:

Name Type Description Default
-l integer Maximum lines per file None
--max-bytes integer Skip files larger than this 65536
--no-line-numbers boolean Disable line numbers False
--format choice (cli | json | csv | md | xml | files | toon) N/A cli
--help boolean Show this message and exit. False

marq query

Hybrid search: query expansion + BM25/vector RRF fusion + LLM reranking (recommended). Accepts a multi-line query document of lex:/vec:/hyde: (+ optional intent:) lines to bypass automatic expansion.

Usage:

marq query [OPTIONS] QUERY

Options:

Name Type Description Default
-c, --collection text Restrict to collection(s) Sentinel.UNSET
-n integer Number of results 10
--all boolean Return all matches False
--min-score float Minimum score threshold 0.0
--full boolean Show full document content False
--intent text Describe what you're after to sharpen ranking None
--no-rerank boolean Skip LLM reranking, use RRF scores only False
-C, --candidate-limit integer Max RRF candidates to rerank 40
--explain boolean Include retrieval score traces (cli/json formats) False
--format choice (cli | json | csv | md | xml | files | toon) N/A cli
--help boolean Show this message and exit. False

marq query

Hybrid search: query expansion + BM25/vector RRF fusion + LLM reranking (recommended). Accepts a multi-line query document of lex:/vec:/hyde: (+ optional intent:) lines to bypass automatic expansion.

Usage:

marq query [OPTIONS] QUERY

Options:

Name Type Description Default
-c, --collection text Restrict to collection(s) Sentinel.UNSET
-n integer Number of results 10
--all boolean Return all matches False
--min-score float Minimum score threshold 0.0
--full boolean Show full document content False
--intent text Describe what you're after to sharpen ranking None
--no-rerank boolean Skip LLM reranking, use RRF scores only False
-C, --candidate-limit integer Max RRF candidates to rerank 40
--explain boolean Include retrieval score traces (cli/json formats) False
--format choice (cli | json | csv | md | xml | files | toon) N/A cli
--help boolean Show this message and exit. False

Full-text keyword search (BM25, no LLM).

Usage:

marq search [OPTIONS] QUERY

Options:

Name Type Description Default
-c, --collection text Restrict to collection(s) Sentinel.UNSET
-n integer Number of results 10
--all boolean Return all matches False
--min-score float Minimum score threshold 0.0
--full boolean Show full document content False
--intent text Describe what you're after to sharpen ranking None
--format choice (cli | json | csv | md | xml | files | toon) N/A cli
--help boolean Show this message and exit. False

marq skill

Show or install the marq skill (bootstrap instructions for agents).

Usage:

marq skill [OPTIONS] {show|install}

Options:

Name Type Description Default
--global boolean Install to ~/.agents/skills False
--force boolean Overwrite an existing install False
--help boolean Show this message and exit. False

marq skills

List and retrieve bundled runtime skills.

Usage:

marq skills [OPTIONS] [COMMAND] [ARGS]...

Options:

Name Type Description Default
--help boolean Show this message and exit. False

marq skills get

Print one or more bundled runtime skills.

Usage:

marq skills get [OPTIONS] [NAMES]...

Options:

Name Type Description Default
--full boolean Include references/templates/scripts False
--all boolean Print all bundled runtime skills False
--json boolean Output as JSON False
--help boolean Show this message and exit. False

marq skills list

List bundled runtime skills.

Usage:

marq skills list [OPTIONS]

Options:

Name Type Description Default
--json boolean Output as JSON False
--help boolean Show this message and exit. False

marq skills path

Print a bundled skill's directory (or all bundled skill directories).

Usage:

marq skills path [OPTIONS] [NAME]

Options:

Name Type Description Default
--json boolean Output as JSON False
--help boolean Show this message and exit. False

marq status

Show index status and collections.

Usage:

marq status [OPTIONS]

Options:

Name Type Description Default
--help boolean Show this message and exit. False

marq update

Re-index all collections; configured update commands run first.

Usage:

marq update [OPTIONS]

Options:

Name Type Description Default
--help boolean Show this message and exit. False

marq vsearch

Vector similarity search (no reranking).

Usage:

marq vsearch [OPTIONS] QUERY

Options:

Name Type Description Default
-c, --collection text Restrict to collection(s) Sentinel.UNSET
-n integer Number of results 10
--all boolean Return all matches False
--min-score float Minimum score threshold (default 0.3) None
--full boolean Show full document content False
--intent text Describe what you're after to sharpen ranking None
--format choice (cli | json | csv | md | xml | files | toon) N/A cli
--help boolean Show this message and exit. False