Your First Session

Understanding Sessions

A laio session is defined by a YAML configuration file that describes:

  • The session name
  • Root working directory
  • Windows and their layouts
  • Panes within each window
  • Commands to run in each pane
  • Session lifecycle hooks

Creating a Configuration

Create a new configuration:

laio config create myproject

This creates ~/.config/laio/myproject.yaml with a default template.

Editing the Configuration

Open the configuration in your editor:

laio config edit myproject

Or edit it directly:

$EDITOR ~/.config/laio/myproject.yaml

Basic Configuration Structure

Here's a simple two-window setup:

name: myproject
path: /path/to/myproject

windows:
  - name: editor
    panes:
      - commands:
          - command: nvim

  - name: terminal
    flex_direction: row  # vertical split: side-by-side
    panes:
      - flex: 1
      - flex: 1

This creates:

  • Window 1: Single pane running nvim
  • Window 2: Two side-by-side panes with vertical split (50/50)

Starting Your Session

Start the configured session:

laio start myproject

You'll be automatically attached to the session with your configured layout.

Validating Configuration

Before starting, validate your YAML:

laio config validate myproject

This checks for syntax errors and schema violations.

Next Steps