---
name: "sdml-convert"
section: "1"
platform: "linux"
package: "sdml"
version: "0.3.2+20250310-1+b1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/sdml-convert"
---

# sdml-convert(1)

Convert a module into an alternate representation.

## NAME

sdml convert - Convert a module into an alternate representation.

## SYNOPSIS

**sdml** *convert* \[*OPTIONS*\] *--output-format \<OUTPUT\_FORMAT\>* \[*MODULE*\]

## DESCRIPTION

Convert a module into an alternate representation.

This command allows the conversion of a module from the SDML surface syntax into one of a number of alternate representations.

\- RDF :: This uses the surface to RDF mapping defined in the SDML Language Reference. The mapping is normative and stable.

\- JSON :: This is a direct representation of the in-memory model in the Rust package \`sdml\_core\` in JSON. This mapping is non-normative and may change according to any model structure change.

\- S-Expression :: This is a debugging representation, and supported as the underlying tree-sitter library uses s-expressions as a parse-tree visualization.

### Arguments:

-

  \[MODULE\]

-

  SDML module, loaded using the standard resolver

## OPTIONS

**-f**, **--output-format** \<OUTPUT\_FORMAT\>

-

  Possible values: - json:        JSON - json-pretty: Pretty-printed JSON - rdf:         RDF Abstract Model - s-expr:      S-Expressions

**-o**, **--output** \<OUTPUT\>

-

  File name to write to, or '-' to write to stdout

-

  \[default: **-\]**

**-i**, **--input** \<INPUT\>

-

  Input SDML file name to read from, or '-' to read from stdin

-

  \[default: **-\]**

**-h**, **--help**

-

  Print help (see a summary with '-h')

**-V**, **--version**

-

  Print version
