Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Providers — System

System providers resolve system_* tags at runtime. They read environment/OS state — no input, no user interaction.

Contract

  • Always return Ok(String).
  • Missing value → empty string (""), never Err.
  • Resolved once per pipeline run, then cached for all actions.

Usage in a val candidate:

val:
  - name: lang
    data: system_language

Tags

Identity

TagValueExample
system_osOperating system namemacos, linux
system_archCPU architectureaarch64, x86_64
system_hostnameMachine hostnamezarubin-mini
system_userCurrent user name ($USER)keygenqt
system_uidCurrent user ID501
system_pidCurrent process ID42831
system_shellShell basename ($SHELL)zsh, bash
system_languageLanguage code from $LANGen, ru

system_language strips locale suffixes: en_US.UTF-8 → en. Falls back to en if $LANG is unset, C, or POSIX.

Code languages

TagValueExample
system_code_langsSupported code language extensionsrs, py, ts, js, …
system_code_shellSupported shell language extensionssh, bat

Both tags are newline-separated lists, one extension per line. Single source of truth: vibe_ast languages (crate::langs).

Time

TagValueExample
system_dateCurrent date, ISO 86012025-01-15
system_timeCurrent time14:30:05
system_datetimeCurrent date and time, ISO 86012025-01-15T14:30:05
system_timestampUnix epoch seconds1736945405

Hardware

TagValueExample
system_cpu_coresLogical CPU core count8
system_mem_availableAvailable memory in bytes4294967296

Directories

TagValueExample
system_dir_homeUser home ($HOME)/Users/keygenqt
system_dir_pwdCurrent working directory/Users/keygenqt/project
system_dir_configUser config directory~/Library/Application Support (macOS)
system_dir_dataUser data directoryPlatform-specific
system_dir_cacheUser cache directoryPlatform-specific
system_dir_downloadUser downloads directoryPlatform-specific
system_dir_tempTemporary directory/tmp, /var/folders/...

All directory tags use the dirs crate for cross-platform resolution. Missing directory → empty string.

Example

actions:
  - tag: tag_report
    run: small
    val:
      - name: lang
        data: system_language
      - name: os
        data: system_os
      - name: user
        data: system_user
      - name: date
        data: system_date
    action: |
      [Task]
      Generate a short system report.
      Language: {lang}.

      [Data]
      OS: {os}
      User: {user}
      Date: {date}