Script Structure

📖 Description

A script in NAVA is a declarative automation description written in the .nava format (plain JSON).
It defines what to do, what to work with, and how exactly to perform actions — in a minimalistic and human-readable way.

Typically, everything is defined in a single .nava file: a flow of actions (flow), data context (context), and execution environment parameters (environment).

If needed, context and environment can be placed in separate files — for example, to reuse the same context across scripts or define environment centrally.

đŸ—‚ī¸ File Naming and Organization

While a .nava file can include all parts of the script, it's recommended to follow these conventions when splitting content into separate files:

File Name Purpose Format

*.nava

Main script file with any name JSON

context.json

Context data: targets and other inputs JSON

environment.json

Execution environment parameters JSON
All files must be located in the same folder. The .nava extension is recommended but not required. File names context.json and environment.json are reserved.
🧩 Script Structure

The .nava file is a full-fledged JSON object script, without wrappers or extra structure — it starts directly with the script content.

Field Type Required DescriptionDefault value

name

string Human-readable script name. Used in logs and UI.Unnamed Script

description

string Script description (e.g. purpose, author, date).

debugMode

bool Enables debug mode with extra logging.false

flow

NavaAction[] Array of automation steps, each represented as a NavaAction object.

environment

NavaEnvironment Execution environment settings: browser, headless, viewport, etc.Must be provided either in the script or via environment.json

context

NavaContext Context data — variables, targets, input parameters.Must be provided either in the script or via context.json

watcher

WatcherSettings Watcher mode configuration object (WatcherSettings).
đŸ§Šī¸ Watcher Settings Structure

Parameters that control cyclic execution of the script in watcher mode.

Field Type Required DescriptionDefault value

enabled

bool Enables watcher mode — the script will run periodically.false

intervalMs

int Interval between script runs in watcher mode (in milliseconds).60000
📄 Site updated: 17.06.2025 00:01
An unhandled error has occurred. Reload 🗙