Skip to Content
aka.localhost

Configuration

aka.toml, environment variables, and the files aka keeps.

aka.toml

An optional aka.toml lists the apps of a project for aka up. aka looks for it from the current directory up to the repository root.

aka.toml
[apps]
web = "npm run dev"            # a name and a command

[apps.api]                     # or a table, for more settings
cmd = "uvicorn main:app --reload"
dir = "services/api"
port_hint = 8000
no_preset = false
SettingTypeMeaning
cmd (or command)stringthe command; required
dirstringwhere to run it, relative to aka.toml; default the file's directory
port_hintintegerroute to this port, like --port-hint
no_presetbooleando not apply presets, like --no-preset

The file accepts strings (double or single quoted), integers, booleans, tables and comments. Anything else, an unknown setting, or a key set twice is an error with its line number, so a typo never silently drops an app.

Environment variables

VariableDefaultMeaning
AKA_PROXY_PORT1355the proxy's port, for HTTP and HTTPS
AKA_HTTPS_PORT443the dedicated HTTPS port to try; 0 for none
AKA_HTTPSon0 serves plain HTTP only
AKA_PREFIXfrom the branchthe worktree prefix; empty turns it off
AKA_STATE_DIR~/.akawhere aka keeps its files
AKA_NO_PTYoff1 captures app output through pipes instead of a pseudo-terminal

aka sets PORT, HOST, AKA_URL and AKA_PORT for the app, NODE_EXTRA_CA_CERTS when HTTPS is on, and PYTHONUNBUFFERED when output goes through pipes.

Files

Everything aka keeps is in ~/.aka, or AKA_STATE_DIR:

FileContents
ca.pem, ca-key.pemthe local certificate authority
aliases.jsonaliases
projects.jsonwhich dev command a bare aka runs, per project
presets.jsonyour own presets (optional)
daemon.logthe proxy's log

Nothing is written into your projects.

On this page