Skip to content

Getting started ​

The Liatir CLI is the command-line tool that creates Plugin projects and builds their .lia files. Install Node.js and npm to use it, even when the Plugin itself uses another language.

sh
npm install -g @liatir/cli
liatir init my-liatir-plugin --yes
cd my-liatir-plugin

This creates a Node TypeScript Plugin and installs its npm dependencies. Node is the recommended starting point unless your analysis needs another language. R and Native require an app and CLI build containing their runtime support; an older installation may not offer these choices.

Choose a runtime ​

A runtime is the environment that executes your Plugin's code.

RuntimeUse it forAuthor prerequisitesApp bridge
NodeTypeScript/JavaScript and npm libraries.Node.js and npm.Yes
PythonScientific Python and Python packages.A compatible Python for local contract extraction; the app prepares a managed environment for packaged runs.Yes
RR statistics, CRAN and Bioconductor packages.R >= 4.1; Rscript on PATH or LIATIR_RSCRIPT.Yes
NativeCompiled Rust or C++ programs.Rust/Cargo, or CMake and a C++17 compiler with libcurl development files.Yes
WASMPortable computation in an isolated environment.Rust/Cargo with wasm32-wasip1, or CMake with WASI SDK for C++.No

The bridge lets a Plugin use Liatir Jobs, storage, logs and progress. Node, Python, R and Native also have ordinary operating-system access. WASM has no bridge or arbitrary host filesystem/network access.

Run liatir init without arguments for guided setup. It asks for the project folder, runtime and metadata. Node additionally offers TypeScript or JavaScript and npm installation. Native/WASM offer Rust or C++; Rust WASM offers to install its compilation target. C++ WASM uses an existing WASI SDK installation. Node metadata lives in package.json; the other runtimes use .lia-manifest.json.

Initialization flags ​

sh
liatir init                            # guided initialization
liatir init plugin-name --yes          # Node TypeScript defaults
liatir init plugin-name --node --ts
liatir init plugin-name --node --js
liatir init plugin-name --python
liatir init plugin-name --r
liatir init plugin-name --native        # Rust executable
liatir init plugin-name --native --cpp  # C++ executable
liatir init plugin-name --wasm          # Rust/WASM
liatir init plugin-name --wasm --cpp    # C++/WASM
liatir init plugin-name --runtime r     # equivalent runtime selector
liatir init plugin-name --template <TEMPLATE_NAME>
liatir init plugin-name --category "Quality Control" --tags "FASTQ,QC"
liatir init plugin-name --no-install    # skip Node npm installation
liatir init plugin-name --no-wasm-target

Declare inputs and outputs ​

Declare the fields once in code. They define the form users see and the ports that connect the Plugin to a pipeline. liatir build reads these declarations and generates the bundle's manifest; do not maintain a separate schema.

RuntimeEntry pointContract declaration
Nodesrc/index.ts or src/index.jsdefinePlugin({ inputs, outputs }).main(handler)
Pythonsrc/main.pydefine_plugin(...) and @plugin.main
Rsrc/main.Rdefine_plugin(...) and plugin$main(handler)
Native/WASM (Rust)src/main.rsdefine_plugin().input(...).output(...).main(handler)
Native/WASM (C++)src/main.cppliatir::define_plugin().input(...).output(...).main(handler)

The CLI supplies and refreshes the non-Node SDK files. See API packages, complete entry points and field declarations.

Test, build and import ​

  1. Open Liatir and run liatir dev from your project. Its temporary Dev Runner rebuilds on save and tests the current bundle without adding it to your permanent Plugin library. All five runtimes use this workflow.
  2. Run liatir build to produce the distributable .lia file.
  3. Import it on the Plugins page in Liatir.
  4. Complete any runtime preparation shown on the Plugin's page, then run it alone or add it to a pipeline.

Runtime preparation ​

The Plugin's page shows any preparation needed before running it:

RuntimePreparation
NodeUses Liatir's Node runtime. npm dependencies are bundled by the CLI.
PythonPrepare the Plugin's managed Python environment and declared packages.
RInstall compatible R and choose Prepare R packages to restore the bundled dependency lock.
NativeImport an executable for the exact OS/processor and choose Allow executable access after reviewing it.
WASMUses the built-in isolated runner; no separate interpreter or executable permission is needed.

C++ authors need CMake >= 3.21; Native also needs a C++17 compiler and libcurl headers/libraries. For WASM, set WASI_SDK_PATH to WASI SDK. The first C++ build can fetch the pinned JSON library; later builds reuse it. LIATIR_CMAKE can select a CMake executable outside PATH. See SDK packages.

Package preparation may require internet access and compilation tools; prepared runs work offline. R's first build creates renv.lock, which must be committed with the project. Native permission applies to the exact imported bundle and must be granted again after a change. The Native starters build the author's host target by default; include and test additional targets before distribution. See the bundle format for dependency locks and executable packaging.

Pipeline integration ​

Every runtime uses the same file, text, number and boolean inputs and standard outputs. File outputs appear in Results and can feed later steps, including steps using a different runtime. Runs appear in Jobs with logs, cancellation and their pipeline association.

R and Native run in temporary directories removed when their Job ends. Return file content inline, or a path in bridge-managed storage outside that directory; see file output values.

CLI commands ​

CommandPurpose
liatir initCreate a project for any of the five runtimes.
liatir devTest in the running app's temporary Dev Runner.
liatir buildExtract the code contract and package a .lia file.
liatir updateUpdate CLI/API dependencies in a Node project.
liatir -v / liatir versionShow the CLI version and installed project API version, if present.