korevDocs

Environment variables

Setup, run and archive scripts, terminals and agents in a workspace get these variables.

They come after the repository's [environment_variables], so a repository cannot override them.

VariableValue
KOREV_WORKSPACE_NAMEThe workspace name
KOREV_WORKSPACE_PATHThe worktree path
KOREV_WORKSPACE_IDThe workspace id
KOREV_ROOT_PATHThe repository's main checkout
KOREV_DEFAULT_BRANCHThe workspace's target branch
KOREV_PORTThe first of the ten ports reserved for the workspace
KOREV_IS_LOCAL1

Agent processes also get KOREV_SESSION_ID.

Ask chats do not run in a workspace, so they get none of these.

Ports

KOREV_PORT starts at 55000 and goes up in steps of ten, one block per active workspace. A workspace owns $KOREV_PORT to $KOREV_PORT+9. A restored workspace gets a new block.

In scripts, the shell expands $KOREV_PORT and $((KOREV_PORT + 1)). In preview_urls, Korev expands them itself.

Variables Korev removes

Korev removes GH_TOKEN, GITHUB_TOKEN, GH_ENTERPRISE_TOKEN and GITHUB_ENTERPRISE_TOKEN from everything it starts, so gh uses its own sign-in.

On this page