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
| Argument | Required | Description |
|---|---|---|
FILE_OR_URL | Yes | A local PDF / Word / Excel / PowerPoint file, or an http(s) URL pointing to one of these files |
Flags
| Flag | Default | Description |
|---|---|---|
-o, --output-dir DIR | (none) | Specify the output directory; created automatically if it does not exist |
--force | false | Overwrite an existing .md file in place |
--extract-figures | false | Extract document images to NAME.figures/ and rewrite image placeholders in the Markdown to local relative paths |
-h, --help | Show 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
| Constraint | Description |
|---|---|
| Extensions | .pdf, .docx, .xlsx, .pptx |
| File size | 100 MB maximum |
| URL schemes | http, https |
| Unsupported inputs | Image files, plain text, Markdown, source code files |
Output Rules
| Scenario | Output Location |
|---|---|
Local file, -o not specified | Same directory as the source file |
URL, -o not specified | Current directory |
-o specified | The 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
| Error | Resolution |
|---|---|
Unsupported extension | Only PDF / DOCX / XLSX / PPTX are supported |
Exceeds 100 MB limit | Split or compress the file before converting |
Unable to determine a supported file type from the URL | Use 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 |