Configuration Reference

Boring, complete, searchable.

Config file location

~/.config/hash/config.toml

Create it if it doesn't exist. All fields are optional.

Shell

config.toml
[shell]
editor = "nvim" # External editor for complex edits
keybindings = "emacs" # Readline compatibility mode
dialect = "bash" # Parser dialect: "bash" (default) or "zsh" (experimental)
disable_builtins = ["cd"] # Optional: needed if you alias cd="z"

init_commands = [ # Always run at startup
"source ~/.aliases"
]

[shell.startup_files]
login = ["/etc/profile", "~/.profile", "~/.hash_profile"]
interactive = ["~/.hashrc"]

Shell dialect (experimental zsh)

Hash parses commands, source, eval, startup files, and migrated files as bash by default. Set dialect = "zsh" to opt into zsh parsing instead. Upstream zsh support in the mvdan.cc/sh interpreter is experimental and incomplete, so shell/editor integration builtins such as bindkey, setopt, compdef, and zstyle remain compatibility no-ops.

The default startup files stay Hash-specific even in zsh mode. To source your zsh startup files directly, configure them explicitly:

config.toml
[shell]
dialect = "zsh"

[shell.startup_files]
login = ["/etc/zprofile", "~/.zprofile", "~/.hash_profile"]
interactive = ["~/.zshrc", "~/.hashrc"]

Hooks

config.toml
[shell.hooks]
chpwd = [ # Run when working directory changes
"zoxide add -- \"$PWD\"",
]

The chpwd hook runs after every directory change (both cd and interpreter-level cd). This replaces bash's PROMPT_COMMAND for tools that need directory tracking. See Integrations for setup guides.

Input

config.toml
[input]
keybindings = "helix" # "helix", "emacs", "vim"
gutter = true # Show visual indicator for multiline
max_paste_size = "10MB" # Maximum paste size (truncates larger pastes)

Note: Pastes larger than max_paste_size are silently truncated to prevent memory exhaustion. The default of 10MB handles most use cases.

Prompt

config.toml
[prompt]
mode = "starship" # "starship", "built-in", "none"
starship_path = "/opt/starship/starship" # Explicit path (optional)
alignment = "left" # Built-in prompt alignment hint

Agent

Hash runs one selected agent at a time. Use a flat [agent] config, or define named [agent.<name>] entries and select one with default.

For Claude over ACP, install the current adapter with npm install -g @agentclientprotocol/claude-agent-acp and use command = "claude-agent-acp".

Flat ACP/stdio transport

config.toml
[agent]
transport = "stdio"
command = "claude-agent-acp"

Named agents

config.toml
[agent]
default = "ollama"
timeout = "120s"
allowed_commands_scope = "project"

[agent.claude]
transport = "stdio"
command = "claude-agent-acp"

[agent.ollama]
transport = "http"
url = "http://localhost:11434/api/generate"
model = "codellama:13b"
headers = { Authorization = "Bearer token" }

History

config.toml
[history]
enabled = true
path = "~/.local/share/hash/history.db"
# max_entries and max_age are reserved; retention is not enforced in 0.6.x

Completions

config.toml
[completions]
fuzzy = true # Enable fuzzy matching
file_icons = true # Show file type icons (requires nerd font)
cobra_enabled = true # Enable Cobra __complete support
mask_sensitive_env = true # Hide API keys/secrets in env completion previews

Clipboard

config.toml
[clipboard]
max_output_size = "1MB" # Max output per command
buffer_size = 100 # Commands to keep in buffer
preserve_colors = false # Keep ANSI codes when copying

Prediction (adaptive learning)

config.toml
[prediction]
enabled = true
confidence_threshold = 0.6 # Minimum score to suggest
accept_keys = ["right", "tab"] # Keys to accept prediction
path_min_count = 2 # Uses before suggesting path
path_recency_boost_hours = 24 # Recency boost window

Environment variables

VariablePurpose
HASH_SHELL=1Set by Hash — detect you're in Hash
HASH_CONFIG_DIROverride config directory
XDG_CONFIG_HOMEChange the default config root
XDG_DATA_HOMEChange the default data root
HASH_CLIPBOARD_MAX_OUTPUT_SIZEOverride command output capture size

Files

PathPurpose
~/.config/hash/config.tomlMain config
~/.hashrcInteractive shell startup (like .bashrc)
~/.hash_profileLogin shell startup (like .bash_profile)
~/.local/share/hash/history.dbCommand history (SQLite)
~/.local/share/hash/learning.dbLearned error fixes (SQLite)