Skip to content
Start free evaluation

pdcomm-docs command reference

pdcomm-docs searches and reads the PDComm documentation from a terminal. To connect it to AI tools, see Use the docs from AI tools. This page covers every command and option.

pdcomm-docs search <query...> [--lang ko|en] [--product P] [--limit N] [--json]
pdcomm-docs get <url-or-id> [--lang ko|en] [--json]
pdcomm-docs api <name-or-glob> [--surface c|cpp|dotnet] [--product P] [--lang ko|en] [--limit N] [--json]
pdcomm-docs list [--lang ko|en] [--product P] [--depth 1|2] [--json]
pdcomm-docs serve [--root DIR] [--port N] [--host ADDR] [--open]
pdcomm-docs mcp
pdcomm-docs --help | --version

Write options as --limit 3 or --limit=3. Arguments after -- count as query words, not options. An option that doesn’t apply to the command, such as --port with search, produces --port does not apply to search and exit code 2.

search, get, api, list, and mcp read the search index file search-index.json. The first of these that is given wins:

  1. --index <file> names the index file.
  2. --remote <url> downloads the index. Only HTTPS is allowed, except for this computer (localhost, 127.0.0.1), which may use HTTP. The download uses the system curl.
  3. --root <dir> uses the search-index.json in that folder. If it’s missing, the command fails instead of falling back to another index.
  4. The file in the PDCOMM_DOCS_INDEX environment variable.
  5. ../site/search-index.json in the bundle next to the program.

Choose a language with --lang ko or --lang en. Without it, the PDCOMM_DOCS_LANG environment variable applies. Without either, search picks Korean when the query contains Hangul and English otherwise, get uses the language of the URL, list uses Korean, and api uses English.

--product takes getting-started, secs-gem, modbus, mqtt, opc-ua, or tools.

With --json, search, get, api, and list print their result as JSON. On an error, they print {"error": …} to standard output and the message to standard error.

Lists the most relevant sections first, with title, URL, and a snippet. --limit defaults to 10 and accepts 1 to 100. At most three sections of one page appear.

터미널 창
pdcomm-docs search "parity error" --product tools --limit 2
1. Test Modbus RTU on a virtual RS-485 bus › Step 4: Reproduce a parity error [tools]
https://pdcomm.podosoft.io/docs/en/tools/tutorials/modbus-rtu-on-a-virtual-bus/#step-4-reproduce-a-parity-error
1. In terminal 1 (the lab), flag a parity error on the next character the master receives:
2. Test Modbus RTU on a virtual RS-485 bus › Step 6: Read the trace [tools]
https://pdcomm.podosoft.io/docs/en/tools/tutorials/modbus-rtu-on-a-virtual-bus/#step-6-read-the-trace
Find the parity error from step 4 in rs485-trace.jsonl, in the folder where you started the lab:
2 of 29 results (en docs)

With no results, the command prints No results for … and exits with code 0.

Prints a page or section as Markdown. The argument is a URL from a search result, a path such as /docs/en/tools/quickstart/ (/en/tools/quickstart/ in the offline copy), or an ID. With a #anchor at the end, you get that section and its subsections only. The last line is Source: <url>.

터미널 창
pdcomm-docs get /docs/en/tools/quickstart/
pdcomm-docs get /docs/en/tools/quickstart/ --lang ko
pdcomm-docs get "/docs/en/tools/guides/virtual-serial-cli/#commands"

--lang opens the other language version. If the section doesn’t exist, the command lists the page’s sections and exits with code 1.

Finds C, C++, and .NET API symbols by name or pattern; use * and ? as wildcards. --surface narrows the search to c, cpp, or dotnet. --limit defaults to 20 and accepts 1 to 500.

터미널 창
pdcomm-docs api pdcomm_modbus_logging_configure
pdcomm-docs api 'pdcomm_modbus_logging_*' --surface c

For up to three matches, you get the signature, description, parameters, return value, declaration, and reference URL of each. For more, you get one line per symbol with its ID and summary.

pdcomm_modbus_logging_configure (c function, modbus)
int32_t pdcomm_modbus_logging_configure(const uint8_t *input, size_t size)
Library-local logging control; optional asynchronous JSONL, default off.
…
Id: c:pdcomm_modbus_logging_configure
Reference: https://pdcomm.podosoft.io/docs/en/modbus/reference/c/pdcomm_modbus_logging_configure/

When nothing matches, the command exits with code 1. API descriptions are in English; --lang ko shows Korean only where the translation is up to date.

Lists the pages of each product in sidebar order. --depth 1 shows pages only; the default --depth 2 adds sections and their anchors. The time the index was built (Index built …) goes to standard error.

터미널 창
pdcomm-docs list --product tools --depth 1

Serves the offline documentation site from a local web server. Search in the browser only works when you open the site through a web server rather than as files.

Option Default Description
--root <dir> ../site in the bundle next to the program The site folder to serve.
--port <n> 8787 0 picks a free port.
--host <addr> 127.0.0.1 The listening address.
--open Off Opens the default browser.
터미널 창
pdcomm-docs serve --port 0
Serving /opt/pdcomm-docs/site at http://127.0.0.1:59748/ (press Ctrl+C to stop)

Missing paths get the 404 page, and paths that point outside the site folder are refused. Press Ctrl+C to stop.

Runs as an MCP server that exchanges newline-delimited JSON-RPC over standard input and output; AI tools start it. Its tools are docs_search, docs_get_page, docs_api_lookup, and docs_list_sections. To connect it, see Use the docs from AI tools.

Code Meaning
0 Success, including a search without results.
1 No index found; no matching page, section, or API symbol; an option value out of range; or the server couldn’t start.
2 Unknown command or option name. The usage goes to standard error.
Message Fix
no search index found (tried: …) Point to the index with --index, --root, or PDCOMM_DOCS_INDEX.
unknown language "fr"; available: ko, en Use ko or en with --lang.
no en page matches "…"; search first or list the sections Check the path, or find the page with search or list.
… has no section #…; sections: … Use one of the listed section names.
cannot use … as the site root: … Check the folder you passed to serve --root.
--limit must be a number in range, got "0" Use a number within the range.