v0.2.4

Documentation version

v0.2.4v0.3.2
en

Documentation language

en

Search documentation

ESC

Documentation search

What are you working on?

Find a guide, configuration option, action, or ESH topic.

Browse documentation
DocsWorkspace configuration

Workspace configuration

.evin/workspace.flow is the canonical root entry point for an Evin workspace. It defines workspace identity, module discovery, external namespace inclusion, stage ordering, shared environment and action-template values, Git hook execution policy, and root task definitions.

The Evin language server resolves workspace metadata and task fields against their typed Flow schemas. Completion is scoped to the cursor: it offers missing fixed keys, finite values, stages, environment presets and variables, visible task references, relevant template names, and paths in module or namespace fields. Qualified task completion follows module and namespace scopes, so a prefix such as rel can offer release:build; unsupported value positions return an empty Evin completion result. Action with: fields use the descriptor supplied by the action implementation. Schema diagnostics identify unknown or duplicate fixed fields, wrong value types, missing required fields, and invalid enum values while preserving hovers in unaffected parts of an invalid document. Runtime validation remains authoritative.

Root schema

workspace Define workspace identity, module discovery, include paths, Git hook runners, and execution policy.

.evin/workspace.flow is the root configuration file for an Evin workspace. The workspace: block defines the workspace name, version, module locations, external namespace inclusion paths, generated hook execution strategies, and default task concurrency.

Root Sections

KeyTypeRequiredPurpose
workspaceobjectyesWorkspace identity, module discovery, and runner policy.
stageslist of stringsyesOrdered list of pipeline stages (Check, Build, Test, etc.).
tasksmap of tasksnoRoot task definitions executed by Evin.
envmap of stringsnoWorkspace-wide environment variables overriding .env.
valuesmap of stringsnoWorkspace-wide template values consumed by actions via ${value}.
exposelist of stringsnoPublic task surface exposed to external callers.

Workspace metadata fields

workspace.name Declare the unique identifier for the workspace.

Specifies the workspace identity. The workspace name serves as the root namespace for the repository.

Purpose and behavior

  • Qualifies dependencies when disambiguating root tasks shadowed by local module tasks (e.g. needs: [my-repository:build]).

  • Serves as the default package and artifact namespace when publishing outputs.

  • Must be a non-empty string identifier.

workspace.version Declare the workspace semantic version string.

Defines the default version string for the entire workspace.

Behavior

  • Modules without an explicit module.version automatically inherit this version.

  • Available to actions and tasks through ${workspace.version} and version bumper pipelines.

  • Supports semantic versioning formats (e.g. "1.2.3", "0.1.0-canary.10").

workspace.modules Declare directories scanned for child module configurations.

Specifies a list of workspace-relative directory paths scanned by Evin for child modules.

Behavior

  • In each listed directory, Evin loads <dir>/.evin/module.flow. If the file does not exist, the directory is safely ignored.

  • Tasks defined within discovered modules are automatically namespaced with <module-name>:<task-id>.

  • Tasks run with their working directory (cwd) defaulted to the module directory.

workspace.include Import external namespace Flow files into the workspace task graph.

Imports auxiliary Flow documents into the workspace. Also accepted with the alias includes.

List vs map syntax

  • List format:

    include:
      - .evin/release.flow
      - .evin/packages.flow
    

    Tasks retain the namespace name defined in the target file's namespace.name field.

  • Map format:

    include:
      rel: .evin/release.flow
    

    Explicitly maps the prefix to a customized namespace identifier.

workspace.install_hint Custom installation command or advice displayed when the evin executable is missing.

Supplies a helpful instruction string displayed by generated Git hooks if the evin binary cannot be found in the developer's $PATH.

Example

workspace:
  name: evin-project
  version: "1.0.0"
  install_hint: "cargo install --locked --path crates/evin"
workspace.hook_runner Configure a custom executable and arguments used by generated Git hooks.

Configures an alternative command used by Git hooks created by evin hook install.

By default, generated Git hooks invoke evin run <hook>. In repositories where Evin itself is actively developed or where Evin is run through a wrapper (such as a container or package runner), use hook_runner to point hooks to that runner.

workspace.hook_runner.command Alternative executable binary used when invoking generated Git hooks.

The executable name or binary path called by generated Git hooks instead of evin.

Common examples:

  • cargo (paired with args: [run, -p, evin, --])

  • mise, npx, pnpm, or ./scripts/evin-wrapper

workspace.hook_runner.args Prefix arguments inserted before the hook dispatch command.

A list of command-line arguments prepended before run <hook> when the hook runner executes.

workspace.policy Relative path to repository policy configuration.

Specifies the workspace-relative path to the repository policy manifest governing commit messages, branch naming, and release policies.

Remote HTTP or HTTPS URLs are rejected; policy files must reside locally within the repository.

workspace.execution Global dispatch policy for task execution (linear or parallel).

Controls the default dispatch mode for tasks across the workspace.

Values

  • linear (default): Tasks execute sequentially according to dependency topological sort.

  • parallel: Tasks dispatch concurrently as soon as their needs prerequisites complete. Individual tasks can also declare parallel: true or parallel: false to override this setting.

Root sections

workspace.stages Define ordered workspace pipeline stages.

Declares the valid pipeline stages and their execution vocabulary for the workspace.

Requirements & Behavior

  • Stages must begin with an uppercase ASCII letter (A-Z); remaining characters must be alphanumeric (A-Za-z0-9).

  • Every task that specifies stage: must match one of these declared stages.

  • Stages allow filtering task runs via evin run --stage <Stage>.

  • Stages also govern variable scoping: environment variables in .evin/environment.json can be restricted to specific stages via stages: [Build, Publish].

workspace.env Supply workspace-wide environment values overriding root .env.

Defines environment variables shared across all tasks in the workspace.

Precedence

Environment values resolve with the following precedence (highest priority wins):

  1. Task literal variables (task.env: { KEY: value })

  2. Module environment (module.env)

  3. Workspace environment (workspace.flow -> env:)

  4. Root .env file

  5. Schema defaults (.evin/environment.json -> default:)

workspace.values Define reusable template values accessible in action configurations.

Declares workspace-wide string values available to action configurations via ${value_name} syntax.

Scope and overrides

  • Can be overridden at the module level (module.values) or task level (task.values).

  • Consumed inside action with: blocks (e.g. path: "dist/${artifact_name}.tar.gz").

workspace.expose Declare the public task interface available to external callers.

Specifies the list of task IDs intended as the repository's public interface. External tools and CLI discovery surfaces treat exposed tasks as the primary entry points of the repository.

workspace.tasks Define named workspace tasks and their execution graph.

Defines the top-level tasks directly owned by the root workspace.

Each entry is a task mapping keyed by its task identifier (matching [a-z0-9-]+). Tasks define prerequisites (needs), execution commands (run), action steps (steps), triggers (on), environment selections (env, presets), and working directories (cwd).

Task schema

task.description Human-readable label for the task shown in CLI listings and editor tooling.

A concise, human-readable summary of what the task does.

Displayed when running evin list and in editor completions. If omitted, the task ID is used as the fallback label.

task.stage Assign the task to a declared workspace pipeline stage.

Assigns the task to one of the stages declared in stages: [...].

Rules

  • Must match one of the workspace's declared stage names exactly.

  • Tasks without a stage are not assigned to any stage by default; they can still be invoked directly by task ID or as graph dependencies.

  • Allows running all tasks in a stage with evin run --stage <Stage>.

task.needs Declare prerequisite tasks that must complete successfully before this task runs.

Declares directed edges in the execution DAG. Evin guarantees that all prerequisite tasks complete successfully before this task begins.

Rules

  • Dependencies can reference root tasks (check) or module tasks (api:build).

  • The overall task dependency graph must be strictly acyclic (no circular dependencies).

  • When execution is parallel, this task dispatches immediately once all needs tasks finish.

task.on Configure automated triggers (such as Git hooks) that invoke this task.

Associates the task with events or Git hook lifecycles.

When a Git hook is invoked (e.g. via git commit running .git/hooks/pre-commit), Evin executes all tasks whose on.hooks matches the invoked hook.

task.on.hooks List Git hook names that trigger this task.

List of Git hook names (such as pre-commit, pre-push, commit-msg) that trigger this task.

task.env Select environment variables from the pool or declare task-local literal values.

Specifies environment variables available during task execution.

Two accepted formats:

  1. Selection list:

    env: [LOG_LEVEL, DATABASE_URL]
    

    Imports the listed variable names from the resolved environment pool (from .env, workspace env, or host environment).

  2. Literal map:

    env:
      LOG_LEVEL: debug
      PORT: "8080"
    

    Supplies task-specific literal variables directly to commands and actions.

task.presets Import groups of environment variables declared in .evin/environment.json or built-in presets.

Selects named groups of environment variables defined in .evin/environment.json or provided by built-in presets.

Built-in presets

PresetVariables included
rustRUST_BACKTRACE, RUST_LOG, CARGO_TERM_COLOR
nodeNODE_ENV, NPM_CONFIG_LOGLEVEL
ciCI, GITHUB_ACTIONS, CONTINUOUS_INTEGRATION
pythonPYTHONPATH, PYTHONUNBUFFERED, PYTHONDONTWRITEBYTECODE
awsAWS_REGION, AWS_DEFAULT_REGION, AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN
dockerDOCKER_HOST, DOCKER_BUILDKIT

Custom presets declared in .evin/environment.json are also available.

task.values Define task-local template values overriding workspace and module values.

Supplies task-specific template values available in action with: blocks via ${value_name}.

Task-level values take highest precedence over module-level and workspace-level values.

task.cwd Set the working directory for task commands and actions relative to workspace root.

Sets the execution working directory for all commands and actions in this task.

Path must be relative to the owning context (workspace root for root tasks, or module directory for module tasks). If omitted, defaults to the root directory for workspace tasks or the module directory for module tasks.

task.pure Strip default host environment safelist and isolate task outputs.

When true, strips the default host environment safelist. The task executes in strict isolation with only explicitly selected environment variables.

Pure tasks do not publish outputs downstream to dependent tasks, preventing undeclared side effects.

task.parallel Allow concurrent dispatch as soon as prerequisites are satisfied.

Enables concurrent dispatch for this specific task.

When enabled, Evin does not wait for other independent tasks to finish; it dispatches this task immediately once all tasks in needs: [...] complete successfully.

task.watch Opt a task into file watch supervision and automatic rerun.

Configures watch supervision for continuous execution during development.

When a task with watch is run via evin run --watch <task>, Evin executes the task graph and supervises the specified paths, automatically rerunning the graph on file changes.

task.watch.paths Workspace-relative glob patterns to supervise for changes.

List of workspace-relative glob patterns to monitor.

Requirements

  • At least one pattern is required.

  • Paths must be workspace-relative and cannot contain ...

  • Supports standard glob syntax (*, **, ?, [...]).

task.watch.ignore Glob patterns excluded from triggering watch reruns.

List of glob patterns to ignore during watch supervision. Changes matching these patterns will not trigger a rerun.

task.watch.debounce Cooldown duration after file modifications before rerunning the task.

A positive duration string specifying how long to wait after file changes before re-executing the task graph (e.g. 300ms, 500ms, 1s).

Defaults to 300ms.

task.run Define a single ESH command body executed for the task.

Evaluates a single command or embedded ESH script in the task's context.

Notes

  • Mutually exclusive with steps:. A task can specify run: or steps:, but not both.

  • Commands run using the task's resolved environment, working directory (cwd), and ESH interpreter.

task.steps Define ordered sequence of commands and built-in actions.

Defines a sequence of execution steps evaluated in order.

Step Types

  1. Command step (run:): Evaluates an ESH shell command.

  2. Action step (uses: ... with: ...): Invokes a built-in Evin action (such as evin/archive@v1, evin/docs@v1, evin/version-bumper@v1).

Steps execute strictly sequentially; failure of any step terminates the task immediately.

task.steps.run Execute an ESH command as one step in a multi-step task.

Executes an ESH command string in the task's resolved execution context.

task.steps.uses Exact identifier of the built-in action to invoke.

Names the built-in Evin action executed by this step.

Built-in actions

  • evin/archive@v1: Create reproducible archives and distribution packages (.tar.gz, .zip, .deb, etc.).

  • evin/docs@v1: Parse and validate documentation sources, then generate page data and a route manifest.

  • evin/version-bumper@v1: Calculate next semantic versions from Git history.

  • evin/changelog@v1: Generate changelogs from conventional commits.

  • evin/git-release@v1: Create Git tags and release bundles.

  • evin/release-sync@v1: Plan provider-neutral release-state reconciliation.

task.steps.with Strict configuration map passed to the selected built-in action.

Supplies action-specific configuration parameters to the action named by uses:.

Fields, validation rules, and editor auto-completion are determined by the target action's schema. Unknown fields are strictly rejected.

Complete shape

#!evin/v1
workspace:
  name: my-repository
  version: "1.0.0"
  modules: [crates/api]
  include: [.evin/release.flow, .evin/packages.flow]
  install_hint: "cargo install --locked --path crates/evin"
  hook_runner:
    command: cargo
    args: [evin-dev]
  policy: .evin/policy.json
  execution: linear

stages: [Check, Build, Test]
expose: []

env:
  RUST_BACKTRACE: "1"

values:
  artifact_name: my-repository

tasks: {}

Root fields

FieldTypeRequiredRuntime behavior
workspaceobjectyesWorkspace identity and global settings
stageslist of stringsyesValid stage names and stage-target vocabulary
tasksmap of tasksnoRoot task declarations
envmap of stringsnoOverrides values loaded from root .env
valuesmap of stringsnoAction-template values
exposelist of stringsnoAccepted by the current schema; the current executor does not consume it

workspace fields

FieldTypeRequiredMeaning
namestringyesWorkspace identifier; also qualifies explicit root dependencies from modules
versionstringyesWorkspace version string
moduleslist of pathsnoDirectories in which EVIN looks for .evin/module.flow
includelist or map of pathsnoExternal namespace Flow files declaring namespaced tasks, such as .evin/packages.flow for inline distro-package tasks (alias includes)
install_hintstringnoMessage shown by a generated hook when the default evin executable is missing
hook_runner.commandstringnoAlternative executable used by generated hooks
hook_runner.argslist of stringsnoArguments inserted before run <hook>
policypath stringnoLocal repository policy JSON file; remote HTTP(S) sources are not supported
executionlinear or parallelnoWorkspace dispatch policy; default is linear

Stages must start with an uppercase ASCII letter; remaining characters must be ASCII alphanumeric. Their list order does not create graph dependencies.

Task fields

FieldTypeDefaultMeaning
descriptionstringtask IDHuman-readable UI label
stagestringnoneMust exactly match a declared stage when present
needslist of task IDsemptyDirected prerequisite edges
on.hookslist of stringsemptyHook targets that select the task
envlist or string mapinherited poolEnvironment selection or literal task variables
presetslist of namesnoneBuilt-in or custom environment-key groups
valuesstring mapemptyTask-local action-template values
cwdrelative path stringworkspace rootWorking directory for commands and actions
purebooleanfalseRemove default host safelist; pure task outputs are not published downstream
parallelbooleanfalseLet this task dispatch concurrently when ready
watchobjectnoneOpt selected targets into watch supervision
runstringnoneSingle ESH command body
stepslist of stepsnoneOrdered ESH commands and built-in actions

Task IDs must match [a-z0-9-]+. A task may use run or steps, but not both. A task without either is accepted as an empty task. A task without stage is not silently assigned to the first stage; it remains runnable by task ID or as a dependency.

Step fields

steps:
  - run: cargo test --workspace
  - uses: evin/archive@v1
    with:
      path: dist/app.tar.gz
      include: [target/release/app]
FieldAccepted withMeaning
runcommand stepESH source evaluated in the task context
usesaction stepExact built-in action identifier
withaction stepAction-specific strict configuration

Steps execute in order. A failing step stops the remaining steps and prevents dependent tasks from starting.

Dependencies and templates

The graph rejects missing dependencies and cycles. An action can consume an output only from a task listed directly in needs:.

ESH run scripts can publish simple string outputs by appending key=value lines to the file named by EVIN_STATE. The runner creates this file for each script invocation. The first = separates the key from its value; later = characters and surrounding spaces are retained. Repeated keys use the last value; empty keys and lines without = are ignored. Outputs are published to dependent tasks only after the whole task succeeds, and tasks marked pure: true do not publish outputs.

VERSION="$(json -g version package.json)"
printf 'version=%s\n' "$VERSION" >> "$EVIN_STATE"

A dependent task can then use ${build.version} in action configuration or read the value through ctx.state.get_input("build", "version") in a native action. ESH scripts can use the output file to pass values to downstream tasks; the runner does not expose output values in telemetry. Keys whose names look secret-like (for example, API_TOKEN) register their values with that task's redactor before captured output is logged. A downstream task registers direct dependency outputs with secret-like keys in its own redactor. A dynamic credential kept only in a shell variable is outside Evin's redaction registry; write it to EVIN_STATE under a secret-like key when it must flow to a downstream task and be redacted there.

The editor and evin check report an error when an action's with: block references ${task.output} without listing that producer directly in needs:. The diagnostic identifies the reference and the dependency to add. A producer reachable only through another dependency does not expose its outputs to the consumer. Validation does not execute tasks or require the output to exist yet.

tasks:
  bump:
    stage: Build
    steps:
      - uses: evin/version-bumper@v1

  package:
    stage: Build
    needs: [bump]
    steps:
      - uses: evin/archive@v1
        with:
          path: "dist/app-${bump.version}.tar.gz"
          include: [target/release/app]

Template forms are ${value}, ${env.NAME}, and ${task.output}. Old {{...}} syntax is rejected by action configuration validators.

Watch object

FieldTypeDefaultValidation
pathsnon-empty list of globsrequiredWorkspace-relative; no ..
ignorelist of globsemptySame path restrictions
debounceduration string300msPositive integer with ms or s suffix

When a selected task has watch, EVIN runs the graph and then supervises the declared paths until cancellation.

Page source: reference/20.workspace-configuration.4500.md