Sen comes with a command line application (called sen) to help you perform some actions following
the approach taken by git.
The best way to familiarize yourself with all the commands and the available options is to do
--help, starting with sen --help.
--8<-- "snippets/sen.sh"You can also get help about the specific sub-commands.
For example:
# open a sen explorer window
sen explorer
# open a sen shell on the current terminal
sen shell
# connect to a remote sen application on localhost:8094
sen rshell localhost:8094
# starts a replay of an archive
sen replay my_archive
# runs a sen kernel from a configuration file
sen run my_config.yaml--8<-- "snippets/sen_run.sh"
The configuration file uses YAML. Its sections, every key the kernel understands,
environment-variable substitution and the include merging rules are documented in
The configuration file, which is the reference for the format.
A short example, so this page stands on its own:
load:
- name: shell
group: 2
open: [ local.counters ]
build:
- name: counterComponent
group: 3
freqHz: 2
imports: [ my_counter ]
objects:
- name: myCounter
class: my_counter.CounterImpl
bus: local.counters
step: 5sen generate is a thin command-line front-end over the
sen::gen library, which implements the underlying
generators.
--8<-- "snippets/sen_generate.sh"
--8<-- "snippets/sen_generate_cpp.sh"
--8<-- "snippets/sen_generate_cpp_stl.sh"
--8<-- "snippets/sen_generate_cpp_fom.sh"
--8<-- "snippets/sen_generate_cpp_exports.sh"
Works the same way as C++, but with slightly different options.
--8<-- "snippets/sen_generate_uml.sh"
--8<-- "snippets/sen_generate_uml_stl.sh"
--8<-- "snippets/sen_generate_uml_fom.sh"
Works the same way as C++, but with slightly different options.
--8<-- "snippets/sen_generate_mkdocs.sh"
--8<-- "snippets/sen_generate_mkdocs_stl.sh"
--8<-- "snippets/sen_generate_mkdocs_fom.sh"
Renders the data model as a small web application: a tree, a search, and a page per type. It needs no server and no network, so the output opens straight from a file.
--8<-- "snippets/sen_generate_html.sh"
--8<-- "snippets/sen_generate_html_stl.sh"
--8<-- "snippets/sen_generate_html_fom.sh"
Renders the data model as a Typst document, in the shape of an interface control document: an overview, a class hierarchy, a table per type and an index. It writes Typst source rather than a PDF, so producing one is a separate step with the Typst compiler.
What the document contains, and what it looks like, is set by the options rather than inferred from the model.
--8<-- "snippets/sen_generate_typst.sh"
--8<-- "snippets/sen_generate_typst_stl.sh"
--8<-- "snippets/sen_generate_typst_fom.sh"
Generates json schemas from a Sen data model.
--8<-- "snippets/sen_generate_json_component_stl.sh"--8<-- "snippets/sen_generate_json_component_fom.sh"--8<-- "snippets/sen_generate_json_package_stl.sh"--8<-- "snippets/sen_generate_json_package_fom.sh"--8<-- "snippets/sen_generate_json_schema.sh"--8<-- "snippets/sen_generate_py.sh"
--8<-- "snippets/sen_generate_py_stl.sh"
--8<-- "snippets/sen_generate_py_fom.sh"
TypeScript generation reads STL only; there is no FOM subcommand today.
--8<-- "snippets/sen_generate_ts.sh"
--8<-- "snippets/sen_generate_ts_stl.sh"
Helps you interact with archives. "Archive" and "recording" are the same thing here: the recorder
writes a recording, and sen archive is the command that inspects one.
--8<-- "snippets/sen_archive.sh"
--8<-- "snippets/sen_archive_info.sh"
--8<-- "snippets/sen_archive_indexed.sh"
--8<-- "snippets/sen_package.sh"
--8<-- "snippets/sen_package_init.sh"
--8<-- "snippets/sen_package_init-component.sh"
--8<-- "snippets/sen_file_to_array.sh"