Profiles¶
Profiles are declarative YAML manifests that define terminal environments. They specify environment variables, lifecycle hooks, startup commands, and visual prompts.
Profile Structure¶
Each profile is a YAML document with the following structure:
apiVersion: sbsh/v1beta1
kind: TerminalProfile
metadata:
name: profile-name
spec:
runTarget: local
restartPolicy: exit
shell:
cwd: "~"
cmd: /bin/bash
cmdArgs: []
inheritEnv: true
env:
KEY: value
prompt: "custom prompt"
stages:
onInit:
- script: echo "Starting..."
postAttach:
- script: echo "Attached!"
Profile Components¶
Metadata¶
name: Unique identifier for the profile (required)
Spec¶
runTarget: Where the terminal runs (currently onlylocal)restartPolicy: Behavior on exit (exit,restart-on-error,restart-unlimited)shell: Command and environment configurationstages: Lifecycle hooks (onInit,postAttach)
Profile Storage¶
Profiles are stored in ~/.sbsh/profiles.yaml by default. Multiple profiles are defined in the same file, separated by --- (YAML document separator).
Profile Discovery¶
List available profiles:
Using Profiles¶
Start a terminal with a profile:
Profile Examples¶
See the Profiles Guide for comprehensive examples and reference documentation.
Related Concepts¶
- Terminals - Terminal lifecycle
- Environment Isolation - Environment configuration
- Profiles Guide - Complete profile reference