Managing Configs

Creating Configurations

New Configuration

Create a new configuration from the default template:

laio config create myproject

This creates ~/.config/laio/myproject.yaml with:

  • Editor window running {{ editor | default(value="nvim") }}
  • Terminal window with three panes: one pane beside two stacked panes in a nested column split (1:5 ratio)

Copy From Existing

Create a new configuration by copying an existing one:

laio config create newproject --copy existingproject

This copies existingproject.yaml to newproject.yaml unchanged. The copy keeps the source config's name: field, so edit it after copying.

Local Configuration

Create a .laio.yaml in the current directory:

laio config create

See Local Configs for more details.

Editing Configurations

Edit in $EDITOR

laio config edit myproject

Opens ~/.config/laio/myproject.yaml in your configured editor.

Direct Editing

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

Validating Configurations

Validate before starting to catch errors:

laio config validate myproject

Validate a local configuration:

laio config validate --file .laio.yaml

Validation checks:

  • YAML syntax correctness
  • Required fields present
  • Field types match schema
  • Enum values are valid (e.g., flex_direction)

Listing Configurations

List All Configs

laio config list

Shows all configurations and running sessions, each with a status icon (● attached, ○ active, · inactive).

JSON Output

laio config list --json

Useful for scripting and automation.

List Active Sessions Only

laio session list

On tmux and zellij this lists every session of the multiplexer, including sessions laio does not manage. On herdr it lists only laio-managed workspaces.

Deleting Configurations

With Confirmation

laio config delete myproject

Prompts for confirmation before deleting.

Force Delete

laio config delete myproject --force

Deletes without confirmation.

Note: This only deletes the configuration file. If the session is active, stop it first:

laio stop myproject
laio config delete myproject --force

Configuration Locations

Global Configurations

Stored in ~/.config/laio/:

~/.config/laio/
├── myproject.yaml
├── another-project.yaml
└── teamwork.yaml

Local Configurations

Stored in project directories as .laio.yaml:

~/projects/myapp/
├── .laio.yaml
├── src/
└── package.json

Linked Configurations

Local configs can be symlinked to global location:

cd ~/projects/myapp
laio config link myapp

Creates: ~/.config/laio/myapp.yaml → ~/projects/myapp/.laio.yaml

See Local Configs for linking details.

Common Workflows

Template Configuration

Create a template for new projects:

laio config create template
laio config edit template
# ... customize as needed

Use it for new projects:

laio config create newproject --copy template

Team Sharing

Share configurations via version control:

# In your project
laio config create
git add .laio.yaml
git commit -m "Add laio configuration"
git push

Team members can then:

git pull
laio start  # Automatically uses .laio.yaml

Validation in CI

Add validation to CI pipeline:

#!/bin/bash
if [ -f .laio.yaml ]; then
  laio config validate --file .laio.yaml
fi

Backup Configurations

# Backup all configs
cp -r ~/.config/laio ~/backups/laio-$(date +%Y%m%d)

# Backup single config
cp ~/.config/laio/myproject.yaml ~/backups/

Configuration Schema

The JSON schema is available at src/common/config/schema.json in the repository.

For editor integration (LSP, validation), point your YAML language server to the schema.

Example for VS Code (settings.json):

{
  "yaml.schemas": {
    "/path/to/laio-cli/src/common/config/schema.json": "*.laio.yaml"
  }
}