Skip to main content

Documents

turing-cli documents converts documents to Markdown, making them easy for agents to read, summarize, search, or ingest into a knowledge base.

In agent workflows, you can use the commands on this page together with the Documents skill on SkillHub. If the converted material involves usage, billing, or token troubleshooting, you can also pair it with the Turing Operations skill to call turing-cli operations. You may also configure your own skills according to the conventions of your agent or IDE.

Command

turing-cli documents convert FILE_OR_URL [flags]

Arguments

ArgumentRequiredDescription
FILE_OR_URLYesA local PDF / Word / Excel / PowerPoint file, or an http(s) URL pointing to one of these files

Flags

FlagDefaultDescription
-o, --output-dir DIR(none)Specify the output directory; created automatically if it does not exist
--forcefalseOverwrite an existing .md file in place
--extract-figuresfalseExtract document images to NAME.figures/ and rewrite image placeholders in the Markdown to local relative paths
-h, --helpShow command help

Examples

Convert a local file:

turing-cli documents convert report.pdf

Convert from a URL:

turing-cli documents convert https://example.com/report.pdf

Output to a specific directory:

turing-cli documents convert report.docx -o ./out

Overwrite an existing Markdown file:

turing-cli documents convert slides.pptx --force

Extract images:

turing-cli documents convert report.pdf --extract-figures

Input Constraints

ConstraintDescription
Extensions.pdf, .docx, .xlsx, .pptx
File size100 MB maximum
URL schemeshttp, https
Unsupported inputsImage files, plain text, Markdown, source code files

Output Rules

ScenarioOutput Location
Local file, -o not specifiedSame directory as the source file
URL, -o not specifiedCurrent directory
-o specifiedThe specified directory

If the target .md file already exists and --force is not set, the CLI will not overwrite the original file. Instead, it generates a filename using the first 8 characters of the SHA-256 hash of the Markdown content:

sample.md -> sample_a1b2c3d4.md

By default, images in the document are not written to disk; figure://ID placeholders are retained in the Markdown. When --extract-figures is enabled, images are written to the NAME.figures/ directory alongside the Markdown file, and the placeholders are replaced with local relative paths.

Troubleshooting

ErrorResolution
Unsupported extensionOnly PDF / DOCX / XLSX / PPTX are supported
Exceeds 100 MB limitSplit or compress the file before converting
Unable to determine a supported file type from the URLUse a direct link with a correct file extension or Content-Type header
Conversion failed (status=...)The file may be corrupted, encrypted, or malformed; verify that the file opens normally and retain the trace