Paths and environment variables
Configuration and data directories
asksh resolves directories identically across macOS, Linux, and Windows, expanding leading ~ and $VAR / ${VAR} references:
Config directory : $ASKSH_CONFIG_DIR, then $XDG_CONFIG_HOME/asksh, then ~/.config/asksh.
Data directory : $ASKSH_DATA_DIR, then $XDG_DATA_HOME/asksh, then ~/.local/share/asksh.
Project root : walks upward from the current directory looking for .jj, then .git (including Git worktree .git files), falling back to the current directory.
Files under the config directory
Path
Purpose
config.toml
Main provider, model, capabilities, routing, and MCP configuration
permissions.toml
Global tool permission rules
skills/
Global SKILL.md directories
runbooks/
Global *.md and <name>/RUNBOOK.md workflows
memory.toml
Global procedural memory entries
Files under the data directory
Path
Purpose
sessions.db
SQLite WAL database for sessions, events, FTS5 search index, telemetry, and usage
snapshots/<session-id>/
Pre-edit file backups and manifest.json for undo and diff
asksh.log
Debug log written when -v/--verbose or ASKSH_LOG is set
update.json
Cached latest release tag and check timestamp (24-hour TTL)
askshd.sock
askshd Unix domain socket (falls back to /tmp/askshd-<uid>.sock if path length exceeds 96 bytes)
askshd.pid
Running askshd process ID
jobs/<job-id>.json
Persisted askshd background and watch job state
Project-local files
When inside a repository or non-$HOME directory, asksh reads:
.asksh/permissions.toml (also walked upward from CWD to / for permission resolution)
.asksh/skills/
.asksh/runbooks/
.asksh/memory.toml
Environment variables
Directory overrides
Variable
Effect
ASKSH_CONFIG_DIR
Overrides the configuration directory
XDG_CONFIG_HOME
Base config directory when ASKSH_CONFIG_DIR is unset
ASKSH_DATA_DIR
Overrides the data directory
XDG_DATA_HOME
Base data directory when ASKSH_DATA_DIR is unset
Configuration overrides
Booleans accept 1, t, T, TRUE, true, True, 0, f, F, FALSE, false, False. Empty or invalid boolean strings are ignored.
Variable
Overrides
ASKSH_BASE_URL
base_url
ASKSH_API_KEY
api_key (literal string)
ASKSH_MODEL
model
ASKSH_YOLO
yolo
ASKSH_SESSION_CONTINUE
session_continue
ASKSH_HISTORY_FILE
history_file
ASKSH_ENABLE_HISTORY_SEARCH
capabilities.enable_history_search
ASKSH_ENABLE_FILE_TOOLS
capabilities.enable_file_tools
ASKSH_ENABLE_COMMAND_EXECUTION
capabilities.enable_command_execution
ASKSH_SEND_CWD
opening.send_cwd
ASKSH_SEND_LAST_COMMAND
opening.send_last_command
Runtime and CLI variables
Variable
Effect
ASKSH_SHELL
Overrides $SHELL for shell detection and history lookup (set automatically by asksh init hooks)
ASKSH_LOG
Any non-empty value enables debug logging to asksh.log
ASKSH_NO_UPDATE_CHECK
Set to any truthy value (other than "", "0", "false", "no") to disable background release checks
ASKSH_FROM_INSTALLER
Suppresses the post-setup shell hook hint when set
Installer variables (install.sh)
Variable
Effect
ASKSH_VERSION
Release version to install instead of latest
ASKSH_INSTALL_DIR
Target binary directory (default ~/.local/bin)
ASKSH_NO_SETUP
Truthy value skips running asksh setup
ASKSH_NO_MODIFY_SHELL
Truthy value skips modifying your shell startup file
Ambient variables read
asksh also reads SHELL, HISTFILE, AWS_PROFILE, DOCKER_HOST, KUBECONFIG, and VIRTUAL_ENV to locate history and enrich ambient prompt context.