Skip to content
Cogno v0.4.0

Shell profiles

A shell profile tells Cogno how to start one shell: which program, with which arguments, in which directory. Every new tab starts a profile.

On first launch Cogno looks for installed shells and writes a profile for each one into your config file:

PlatformDetected shellsDefault
macOS, Linuxevery Zsh and Bash listed in /etc/shellsZsh if present, otherwise Bash
WindowsWindows PowerShell and PowerShell 7 (pwsh)the first PowerShell found

This only happens while no profile exists. Afterwards the profiles are yours to edit.

shell.profiles.zsh.shell_type = ZSH
shell.profiles.zsh.path = /bin/zsh
shell.profiles.zsh.args = [-l, -i]
shell.profiles.zsh.working_dir = ~

zsh is the profile name. You choose it; it appears in menus. Use only letters, digits and _ if you want to reference the profile in a keybinding.

SettingRequiredMeaning
shell_typeyesZSH, Bash or PowerShell. Other shells, such as fish, are not supported.
pathyesPath of the shell executable.
argsnoArguments passed to the shell.
working_dirnoDirectory the shell starts in. Default: ~
env.<var>noExtra environment variables, e.g. env.EDITOR = nvim
enable_shell_integrationnoLoad Cogno’s shell integration. Default: true
inject_cogno_clinoPut the cogno command on the shell’s PATH. Default: true
load_user_rcnoLoad your own startup files such as .zshrc, .bashrc or the PowerShell profile. Default: true

Changes to a profile apply to terminals you open afterwards.

Set load_user_rc = false for a clean shell without your aliases, plugins and prompt theme — useful to rule out your own configuration when something misbehaves. PATH is still taken from your login environment.

shell.default = zsh
shell.order = [zsh, bash]
  • shell.default is the profile a new tab starts. It must name an existing profile.
  • shell.order is the order in menus. Every entry must name an existing profile.
  • You can define at most 9 profiles.

The actions open_shell_1 … open_shell_9 open a new tab with the profile in that position. By default they are on Ctrl+Shift+1 … 9 (Command+Shift+1 … 9 on macOS).

Position 1 is always the default profile. The profiles from shell.order follow, then any remaining profiles.

To bind a key to a profile by name, pass the name to new_tab:

keybind = Ctrl+Alt+B=new_tab:bash
shell.default = zsh
shell.order = [zsh, work]
shell.profiles.zsh.shell_type = ZSH
shell.profiles.zsh.path = /bin/zsh
shell.profiles.zsh.args = [-l, -i]
shell.profiles.work.shell_type = Bash
shell.profiles.work.path = /opt/homebrew/bin/bash
shell.profiles.work.working_dir = ~/projects/work
shell.profiles.work.env.AWS_PROFILE = work

All profile settings are listed under Shell in the settings reference.