Skip to content

Commit faa10a2

Browse files
author
Alex Bikeyev
committed
docs: add first commands section with help and help dim examples to scripting reference
1 parent e6be5df commit faa10a2

2 files changed

Lines changed: 31 additions & 0 deletions

File tree

47 KB
Loading

‎docs/reference/scripting.md‎

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,37 @@ You can also run specific runtime modes directly:
2424
./start --tui # terminal interface
2525
```
2626

27+
## First two commands
28+
29+
Once the REPL or TUI is running, start with `help` to see all documented commands.
30+
31+
```bash
32+
om> help
33+
```
34+
35+
![OM Core help command](../assets/images/om-core-help.png)
36+
37+
The second command to learn is `help dim`. Dimensions are the first thing you define in almost every model, and the built-in help shows the exact syntax.
38+
39+
```bash
40+
om> help dim
41+
```
42+
43+
![OM Core help dim command](../assets/images/om-core-help-dim.png)
44+
45+
From the help output you can see the three ways to define a dimension:
46+
47+
```openm
48+
# Unordered by default
49+
dim Region North South East West
50+
51+
# Explicit unordered
52+
dim Region --set North South East West
53+
54+
# Ordered sequence
55+
dim Year --seq Y1 Y2 Y3 Y4 Y5
56+
```
57+
2758
## Script structure
2859

2960
A typical `.openm` script follows this order:

0 commit comments

Comments
 (0)