Skip to main content

Configuration

XShell stores its configuration as JSON at:

PlatformPath
Linux / macOS~/.xshell/config.json
Windows%APPDATA%\XShell\config.json

The file is created with defaults on first launch.

Default configuration

{
"theme": "default",
"plugins": ["git", "sysinfo", "calc"],
"history_size": 2000,
"autocorrect": true,
"complete_while_typing": true,
"prompt_format": "{default}",
"aliases": {
"ll": "ls -l",
"la": "ls -a",
"lla": "ls -la",
"..": "cd ..",
"...": "cd ../..",
"g": "git",
"py": "python"
},
"show_banner": true,
"vi_mode": false
}

Keys reference

KeyTypeDefaultDescription
themestring"default"Active theme name
pluginsarray['git', 'sysinfo', 'calc']Plugins to load at startup
history_sizeint2000Max history entries to keep
autocorrectbooltrueSuggest corrections for unknown commands
complete_while_typingbooltrueShow completions as you type
aliasesobjectsee abovePersistent alias definitions
show_bannerbooltrueShow ASCII art banner on startup
vi_modeboolfalseUse vi key bindings (Esc, hjkl, …)

Editing config from the shell

Config changes made with theme set and alias are auto-saved. For other keys, edit the file directly — changes take effect on next launch:

# Show the config file path
python -c "from xshell.config.manager import _config_dir; print(_config_dir())"

# Open in default editor (Windows)
notepad %APPDATA%\XShell\config.json

# Open in default editor (Unix)
$EDITOR ~/.xshell/config.json

Adding persistent aliases

{
"aliases": {
"k": "kubectl",
"dc": "docker-compose",
"tf": "terraform",
"gp": "gpush"
}
}

Loading a custom config file

# Pass an explicit path to XShell
python -c "
from xshell.core.shell import XShell
XShell(config_path='/path/to/my-config.json').run()
"

Or modify main.py to accept --config as a CLI flag.

Per-project config

XShell doesn't natively support per-project config files yet.
As a workaround, use a shell script:

start-dev.sh
#!/bin/bash
export XSHELL_THEME=gruvbox
python main.py --theme gruvbox --no-plugins

User themes and plugins directories

PlatformThemesPlugins
Linux/macOS~/.xshell/themes/~/.xshell/plugins/
Windows%APPDATA%\XShell\themes\%APPDATA%\XShell\plugins\

Drop .json files into themes and .py files into plugins — XShell picks them up automatically without any configuration changes. Plugin names resolve in this order:

  1. Built-in plugin modules under xshell/plugins/builtin/
  2. User plugin directory
  3. Project-local plugins in the repository plugins/ folder