Usage

Command line

To transcode say an archetype file escrow.arl to ligo:

$ archetype -t ligo escrow.arl

To transcode to whyml:

$ archetype -t whyml escrow.arl

To list available target languages:

$ archetype --list-target
ligo
scaml
whyml
markdown

To list available commands:

$ archetype --help
usage : archetype [-t <lang> | -pt | -ext | -tast | [-ws] [-sa] [-skv] [-nse] | -lsp <request>] [-r | -json] <file>
Available options:
-t <lang> Transcode to <lang> language
--target Same as -t
--list-target List available target languages
-pt Generate parse tree
--parse-tree Same as -pt
-ext Process extensions
--extensions Same as -ext
-ast Generate typed ast
--typed-ast Same as -ast
--typed Display type in ast output
-ap Display all parenthesis in printer
--typed Same as -ap
-ws With storage
--with-storage Same as -ws
-sa Transform to shallow asset
--shallow-asset Same as -sa
-skv Split key value of collection of asset
--split-key-values Same as -skv
-nse Transform to no side effect
--no-side-effect Same as -nse
-fp Focus property (with whyml target only)
--focus-property Same as -fp
-lsp <request> Generate language server protocol response to <resquest>
--list-lsp-request List available request for lsp
--service <service> Generate service response to <service>
--list-services List available services
-r Print raw model tree
--raw Same as -r
-ry Print raw model tree
--raw-whytree Same as -r
-json Print JSON format
-V <id> process specication identifiers
-v Show version number and exit
--version Same as -v
-help Display this list of options
--help Display this list of options

Some features are still under development

VS code extension

The archetype extension provides:

  • syntax highlighting

  • LSP support

  • transcoding commands