Usage

Command line

To transcode say an archetype file escrow.arl to ligo:
1
$ archetype -t ligo escrow.arl
Copied!
To transcode to whyml:
1
$ archetype -t whyml escrow.arl
Copied!
To list available target languages:
1
$ archetype --list-target
2
ligo
3
scaml
4
whyml
5
markdown
Copied!
To list available commands:
1
$ archetype --help
2
usage : archetype [-t <lang> | -pt | -ext | -tast | [-ws] [-sa] [-skv] [-nse] | -lsp <request>] [-r | -json] <file>
3
4
Available options:
5
-t <lang> Transcode to <lang> language
6
--target Same as -t
7
--list-target List available target languages
8
-pt Generate parse tree
9
--parse-tree Same as -pt
10
-ext Process extensions
11
--extensions Same as -ext
12
-ast Generate typed ast
13
--typed-ast Same as -ast
14
--typed Display type in ast output
15
-ap Display all parenthesis in printer
16
--typed Same as -ap
17
-ws With storage
18
--with-storage Same as -ws
19
-sa Transform to shallow asset
20
--shallow-asset Same as -sa
21
-skv Split key value of collection of asset
22
--split-key-values Same as -skv
23
-nse Transform to no side effect
24
--no-side-effect Same as -nse
25
-nr Remove rational
26
--no-rational Same as -nr
27
-ndd Remove date and duration
28
--no-date-duration Same as -ndd
29
-pas Process asset state
30
--process-asset-state Same as -pas
31
-raf Replace field by update
32
--remove-assignfield Same as -raf
33
-rau Remove add_update method
34
--remove-add-update Same as -rau
35
-ru Remove update method
36
--remove-update Same as -ru
37
-mu Merge update
38
--merge-update Same as -mu
39
-ne Remove enum and match with
40
--no-enum Same as -ne
41
-rfd Remove function of left value from dot access field asset
42
--remove-fun-dotasset Same as -rfd
43
-evi Evaluate initial value
44
--eval-initial-value Same as -evi
45
-aes Add explicit sort
46
--add-explicit-sort Same as -aes
47
-fp Focus property (with whyml target only)
48
--focus-property Same as -fp
49
-ptc Print type contract in archetype syntax
50
--print-type-contract Same as -ptc
51
-lsp <request> Generate language server protocol response to <resquest>
52
--list-lsp-request List available request for lsp
53
--service <service> Generate service response to <service>
54
--list-services List available services
55
-m Pretty print model tree
56
--model Same as -m
57
-r Print raw model tree
58
--raw Same as -r
59
-ry Print raw model tree
60
--raw-whytree Same as -r
61
-json Print JSON format
62
-V <id> process specication identifiers
63
-v Show version number and exit
64
--version Same as -v
65
-help Display this list of options
66
--help Display this list of options
67
Copied!
Some features are still under development

VS code extension

The archetype extension provides:
  • syntax highlighting
  • LSP support
  • transcoding commands
Export as PDF
Copy link
Edit on GitHub