Yazelix Nova Documentation

repository·main·Indexed 22 days ago

https://github.com/luccahuguet/yazelix

A Nix-packaged terminal workspace for high-performance workflows. Yazelix Nova integrates Mars (a Rio-derived terminal), Zellij, Yazi, Nushell, and Helix into a cohesive, popup-oriented interface. It features the yzx CLI for environment management, Ratconfig for TUI-based configuration, and a grid-based motion model for workspace navigation. Available in multiple package variants depending on the inclusion of Mars, Helix, and Yazi.

Tokens
31.9K
Snippets
78
Records
143
Agent score
77%

What's inside Yazelix Nova

  1. Overview of Yazelix First-party Components

    main

    Yazelix is an ecosystem of specialized forks, plugins, and libraries designed to work together. Key components include:

    • Mars: A GUI terminal used by yzx launch featuring Kitty graphics, cursor shaders, and session integration.
    • Yazelix Zellij: A multiplexer fork with Kitty graphics passthrough and managed runtime appearance switching.
    • Yazelix Helix: An editor fork with isolated configuration and workspace bridge hooks.
    • Zellij Plugins: Includes Pane Orchestrator (manages workspace roots, panes, and focus), Popup (manages floating TUI panes), and Bar (provides status widgets and session details).
    • Ratconfig: A reusable Ratatui configuration editor and TOML patching/migration library.
    • Yazelix Screen: Provides terminal welcome animations and an aquarium via yzx screen.
    • Yazelix Cursors: Provides shared cursor presets and validation for Ratconfig.
    • Yazi Bistro: A collection of curated Yazi flavors.
    • auto-layout.yazi: A Yazi plugin that adjusts column layout based on pane width.
    • zjstatus: A Zellij fork providing activity-aware tab markers.
  2. Check platform support and compatibility

    main

    Yazelix Nova supports various package combinations across Linux and Darwin (macOS).

    Supported Surfaces

    • Standard Packages: Eight combinations of Mars, managed-Helix, and managed-Yazi are supported on x86_64 and aarch64 for both Linux and Darwin.
    • Headless / SSH: Use yzx enter in a capable interactive host terminal for managed TUI-only sessions.

    macOS Specifics

    • Builds: Real aarch64-darwin runner builds all eight packages and the Home Manager closure (no desktop entry).
    • Unverified Features: On macOS, the following remain unverified: interactive floor (help, status, doctor, enter, managed workspace, host-editor delegation) and full-package launch GUI behavior.
  3. Use the Yazi popup and reveal functionality

    main

    Yazelix provides mechanisms to bridge your editor and the Yazi file manager:

    • Alt r (in Yazi): Starts the active tab's persistent Yazi popup at the current Helix buffer.
    • yzx reveal <target>: Exposes the same behavior inside a managed session without changing the tab's canonical workspace. Using Editor-to-Yazi reveal replaces an existing popup process, whereas ordinary popup toggles preserve live navigation state.
    • In a managed Yazi popup: Pressing Alt r hides the popup, preserves its navigation state, and returns to the underlying pane without opening the hovered item.
    • In tiled Yazi: Alt r focuses the existing Helix buffer without opening the hovered item; the tiled pane remains visible.
    • Enter: Remains the explicit action to open a file.

    Note: Helix and Yazi bind Alt r locally; Zellij does not replay this key across focus changes.

  4. Understand Yazelix Runtime Contracts

    main

    Yazelix operates through a series of formal 'Runtime Contracts' (IDs C1 through C13) that define how different components (CLI, Desktop, Terminal, Shell, Editor, and Config UI) interact. These contracts ensure stability across the ecosystem by assigning specific 'Owners' to each behavior and defining 'Checks' to validate them.

    Key areas of the runtime include:

    • Front-door & Desktop (C1, C8): Handles CLI entry, headless enter mode, and desktop application launching.
    • Terminal & Shell Bridge (C2-C7, C10, C12): Manages appearance authority (Mars/Zellij), layout templates, Nu/Yazi layering, and Helix editor bridging.
    • Popups (C9a-C9e): Manages the Kitty protocol, role-based popups, custom command popups, and Git/LazyGit integration.
    • Config UI (C11a-C11d): Handles semantic schema persistence, inventory management for tools (Mars/Cursors/Starship/Yazi), and Helix row observation.
    • Installation (C13): Defines the package combinations for Mars, Helix, and Yazi, including Home Manager integration.
  5. Understand the Tab Workspace and Canonical Root

    main

    The pane orchestrator maintains one canonical workspace root per tab.

    • Resolution: The first managed open resolves the containing Git worktree (or the directory/file parent if outside Git) and sets it as the explicit state.
    • Consistency: Later Yazi opens preserve this root. Managed opens will reset a drifted Helix cwd back to this canonical root.
    • Retargeting: Using Alt z in Yazi performs an explicit retarget operation, updating both the orchestrator and the managed editor simultaneously.
    • Scope: Git and agent popup requests carry this canonical root explicitly to ensure tools stay synchronized with the workspace.
  6. Access the Yazelix TUI via SSH or Headless

    main
    If you are working over SSH or without a GUI (no Mars), use the yzx enter command. This starts the managed Zellij and Yazi workspace with your selected editor in the current interactive terminal. This workflow does not require DISPLAY, WAYLAND_DISPLAY, or Mars.
    yzx enter
  7. How appearance.mode affects components

    main

    The appearance.mode setting is the primary control for the visual state of the Yazelix ecosystem. It accepts two values: dark or light.

    • Mars: Projects the mode to mars.appearance.preset if the native config is a writable regular file.
    • Zellij: Passes the root appearance at launch. Zellij resolves the matching dark or light theme from its pinned inventory. New tabs inherit the current session mode immediately.
    • Yazi: Reads the root mode to select from packaged dark/light flavor pools from Yazi Bistro.
      • default is the first dark choice (uses Yazi's native preset).
      • Light mode inherits Bluloco Light.
      • Explicit flavor.dark or flavor.light selections take precedence.
  8. Manage Yazi configuration with Yazelix

    main

    Yazelix manages Yazi configurations by providing a structured asset tree that supports native TOML, optional Lua, and keymap sidecars.

    Asset Tree Structure

    Your managed configuration should reside in ~/.config/yazelix/yazi/ and follow this structure:

    • yazi.toml: Main configuration (native TOML tables merge recursively).
    • theme.toml: Theme settings.
    • package.toml: Opaque metadata passed to Yazi as ya pkg.
    • starship.toml: Complete replacement for the packaged compact Starship header config (not a merge layer). Its presence activates materialization.
    • init.lua: Lua initialization.
    • keymap.toml: Keymap sidecar.
    • plugins/*.yazi/: Yazi plugin directories.
    • flavors/*.yazi/: Yazi flavor directories.

    Configuration Merging Rules

    • TOML Tables: Merge recursively.
    • Scalars and Arrays: User values replace packaged values.
    • plugin.prepend_fetchers: Uses replace-plus-managed-Git semantics, preserving user fetchers while restoring the two sidebar Git fetchers exactly once.
    • Starship: The presence of yazi/starship.toml triggers materialization, linking it into the effective config as yazelix_starship.toml.

    Note: Normal ~/.config/yazi is not read by Yazelix.

  9. How Appearance Projection works

    main

    Yazelix manages the dark/light mode authority via the root appearance.mode.

    Mars Integration

    When Mars is included, a global save or reset updates mars.appearance.preset in ~/.config/yazelix/mars/config.toml. Mars uses a directory watcher to reload these changes automatically. To prevent overrides, the runtime removes any inherited MARS_APPEARANCE environment variable before yzx launch.

    Zellij Integration

    Yazelix passes the root dark/light mode to managed Zellij sessions. Zellij resolves this by matching theme_dark or theme_light. Managed sessions ignore ambient terminal appearance to ensure the root mode remains authoritative. A save from within a session calls set-dark-theme or set-light-theme against that specific session.

    Yazi Integration

    Each managed Yazi launch reads the root mode and selects the matching native flavor (flavor.dark or flavor.light). If a light side is absent, it defaults to Yazi Bistro's Bluloco Light. If a dark side is absent, it uses Yazi's native preset. The source theme.toml is never rewritten.

  10. Navigate the Yazelix workspace with keybindings

    main

    Yazelix uses a grid-based motion model inspired by Helix/Vim. The Alt and Ctrl Alt layers handle focus and movement, while Alt Shift accesses specific workspace surfaces.

    Focus and Movement

    Layerhjkl
    AltFocus left / prev tabFocus downFocus upFocus right / next tab
    Ctrl AltMove tab leftMove pane downMove pane upMove tab right

    Workspace Surfaces (Alt Shift)

    KeySurface
    Alt Shift HSidebar
    Alt Shift JGit
    Alt Shift KRatconfig
    Alt Shift LAgent

    Specialized Popups and Commands

    • Yazi: Alt Shift Y toggles the full Yazi popup.
    • Command Menu: Alt Shift M toggles the command palette.
    • Visuals: Alt Shift S opens a transient full-screen random visual.
    • Session Control: Ctrl q quits the Yazelix session.
    • Pane Control: Alt m opens a new pane; Alt Shift F toggles fullscreen for the focused pane.
    • Editor/Yazi Toggle: Ctrl y toggles focus between the editor and Yazi sidebar.
  11. Configure Appearance and Mars Settings

    main

    Yazelix uses a root appearance authority (Contract C2) to manage visual settings across Mars, Zellij, and Yazi.

    • Root Mode: Saving the root appearance.mode automatically switches the Ratconfig palette and projects the setting into the writable Mars configuration via mars.appearance.preset.
    • Mars Live Reload: Mars reloads the following settings live when changed via the root config:
      • opacity
      • font size
      • line height
      • scrollbar
      • bell behavior
    • Window Dimensions: width and height settings apply to newly created windows.
    • Fallback Behavior: If the Mars configuration is symlinked or read-only, Yazelix does not modify the file; instead, it passes the root mode to the launch via the MARS_APPEARANCE environment variable.
    • Yazi Integration: Managed Yazi instances read the root mode, and the materializer projects the selected native flavor into a generated theme.toml without altering user or Home Manager source files.
  12. Understand Yazelix configuration layering

    main

    Yazelix uses a layered configuration model where packaged defaults are applied first, followed by sparse user overrides. This allows you to customize specific settings without maintaining a full copy of the tool's default configuration.

    Configuration Directory Structure

    By default, user overrides are placed in ~/.config/yazelix/. You can override this root directory using the YAZELIX_CONFIG_HOME environment variable.

    Default Directory Layout:

    • config.toml: Sparse semantic overrides for the root.
    • cursors.toml: Shared cursor selection and effects.
    • mars/config.toml: Sparse Mars overrides.
    • zellij/config.kdl: Guarded scalar sidecar.
    • zellij/plugins.kdl: Extra plugins only.
    • starship.toml: Sparse prompt overrides.
    • nu/{env,config}.nu: Nu configuration (applied after packaged Nu).
    • helix/*: Helix configuration (created on demand).
    • yazi/{yazi.toml,theme.toml,package.toml,starship.toml,init.lua,keymap.toml,plugins/,flavors/}: Yazi specific files.

    Layering Logic by Surface

    SurfaceLayering Pattern
    Root TOMLPackaged semantic defaults $\rightarrow$ sparse explicit user overrides
    CursorsPinned child-owned field catalog $\rightarrow$ seeded user file with sparse settings
    MarsPackaged base $\rightarrow$ recursive sparse user override
    NuPackaged $\rightarrow$ optional host mise activate nu $\rightarrow$ optional user Nu
    StarshipPackaged schema $\rightarrow$ Ratconfig discovery $\rightarrow$ sparse user overrides over character.format marker
    HelixPackaged default $\rightarrow$ Ratconfig baseline $\rightarrow$ recursive sparse user override
    YaziPackaged TOML $\rightarrow$ recursive user tables + replacing scalars/arrays
    ZellijPackaged $\rightarrow$ guarded scalar sidecar $\rightarrow$ runtime materialize under state dir

    Note: Host configurations located at ~/.config/{helix,yazi,starship} are not loaded by default.