> ## Documentation Index
> Fetch the complete documentation index at: https://docs.somark.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Overview

> The unified entry point for SoMark CLI & SDK.

SoMark CLI & SDK are developer tools from the SoMark team.

We keep the SDK and CLI in the same project for one practical reason: install once, get two paths. The same package gives you in-app integration and command-line execution. Use [SoMark CLI](https://docs.somark.ai/en/documentation/cli.md) when you want to run immediately in a terminal, script, or agent platform. Use [SoMark SDK](https://docs.somark.ai/en/documentation/sdk.md) when you want to connect document parsing to a product, backend service, or automation pipeline.

Python and JavaScript are not two wrappers around one codebase. `somark-py` and `somark-js` are independent implementations: each follows its own language ecosystem, async model, and engineering conventions, without glue code or unnecessary dependencies.

> [card] [somark-py](https://github.com/SoMarkAI/somark-py)
>
> Python implementation. One package provides both the SDK and the `somark` CLI.

> [card] [somark-js](https://github.com/SoMarkAI/somark-js)
>
> JavaScript / TypeScript implementation. One package provides both the SDK and the `somark` CLI.

## One capability set, two entry points

> [card] CLI
>
> Best for terminals, scripts, CI, agent platforms, and every "process this file now" scenario.

> [card] SDK
>
> Best for product features, backend services, async jobs, data pipelines, and engineering systems that need to run reliably over time.

## Sync principle

The SoMark API is the highest-priority source of truth. Whatever the API supports, the CLI and SDK follow. The CLI does not create a separate workflow, and the SDK does not invent a parallel universe.

The Python and JavaScript implementations keep parsing capabilities fully aligned, but some derived capabilities differ because of ecosystem differences:

* SoMarkDown (A compiler for SoMark's Markdown superset, with professional rendering for math, chemical structures, code highlighting, and more.) can only be imported from the JS SDK because SoMarkDown itself is implemented in JavaScript. SoMarkDown Preview is available in both Python and JS workflows.
* PDF processing reaches its broadest capability range on the Python side because it depends on SoPDF (A high-performance, open-source-friendly PDF processing library.), whose implementation and lower-level dependencies are more complete in Python.

## When to use CLI

> [card] Agent platforms
>
> Use `somark` as a clean external tool in Claude Code, Codex, OpenClaw, and similar environments.

> [card] Terminal batches
>
> Scan folders, run scripts, and process batches of papers, reports, receipts, or contracts without building an app first.

> [card] One-off conversion
>
> Temporarily convert files to Markdown, JSON, SoMarkDown, or ZIP, then move on with the result.

> [card] Automation and diagnostics
>
> Put it in CI, scheduled jobs, local preview, usage checks, and installation diagnostics. This is what command lines are good at.

## When to use SDK

> [card] In-product parsing
>
> After users upload files, return readable, searchable, and reusable structured content inside your app.

> [card] Backend services
>
> Connect parsing to APIs, workers, webhooks, or internal services so documents become part of your system.

> [card] Async queue control
>
> Use it when large files, batch files, or long-running tasks need fine-grained async control after entering a queue.

> [card] Data pipelines
>
> Parse, clean, store, search, and vectorize content with a deep SoMark integration, so unstructured files become usable data.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.