SDML(1)

πŸ“¦
version 0.3.2+20250310 Β· 3 versions
, in ubuntu resolute, ubuntu stonking

🌸 SDML(1) β€” User Commands, but make it cute ✨

okay bestie, welcome to the SDML(1) manual page πŸ’– it lives in the User Commands section, and today we're talking about one specific little icon: sdml view. grab a strawberry drink πŸ“ and let's go.


πŸŽ€ NAME

sdml view β€” View formatted module source.

like, it literally just shows you your module source, but formatted and cute. periodt.


🌈 SYNOPSIS

sdml view [OPTIONS] [MODULE]

πŸ’… DESCRIPTION

View formatted module source. πŸ’–

okay so real talk β€” this command generates source code from a module file, which at first sounds like… why? why would you do that? generating source from source? πŸ™ˆ but NO, bestie, listen: this view gives you levels of detail, and that's what makes it iconic. it's an overview of your module definitions. the --level argument is the main character here β€” it lets you elide content and get a bird's-eye view of what's going on in a module. no cap.

  • Definitions (default) :: Show only the definitions in the module. any definition body gets elided, so you get a clean overview of the module contents. Elided definitions are followed by ";; ...".
sdml view --level definitions -i examples/example.sdm module
example <https://example.com/api> is

import [ dc xsd ]

datatype Uuid <- sdml:string ;; ...

entity Example ;; ...

end
  • Members :: Show definitions in the module and show the members of product types and variants of sum types β€” but not their bodies, if present. it's giving "tell me who's in the group chat but not what they said" πŸ’€
sdml view --level members -i examples/example.sdm module
example <https://example.com/api> is

import [ dc xsd ]

datatype Uuid <- sdml:string ;; ...

entity Example is
  version -> Uuid
  name -> sdml:string
  ;; ...
end

end
  • Full :: Show all contents of the module. everything. the whole vibe. πŸ”₯
sdml view --level full -i examples/example.sdm module
example <https://example.com/api> is

import [ dc xsd ]

datatype Uuid <- sdml:string is
  @xsd:pattern = "[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}"
end

entity Example is
  version -> Uuid
  name -> sdml:string is
    @dc:description = "the name of this thing"@en
  end
end

end

Indentation level can also be specified, although the default remains 2 spaces. 🫢

🧚 Arguments:

  • [MODULE] β€” the SDML module, loaded using the standard resolver ✨

πŸ‘‘ OPTIONS

  • -l, --level <LEVEL> β€” Possible values:
    • definitions: Top-level definitions, incomplete
    • members: Top-level definitions and members, incomplete
    • full: Full source

[default: definitions]

  • -s, --indent-spaces <INDENT_SPACES> β€” Set the number of spaces for indentation 🌸

[default: 2]

  • -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 ⭐

πŸ’€ quick vibe check: --level is doing a LOT of heavy lifting in this manpage, so if your output looks "incomplete"… bestie that's literally the feature, not a bug.

and that's the whole page, you ate that πŸ’… mwah.

this was sdml view version 0.3.2+20250310, dated October 2025, and it belongs to the SDML(1) manual page. go forth and view your modules, queen πŸ‘‘βœ¨

πŸ“¦ where this page comes from