Skip to main content

ankra exec

Run a command (go test, golangci-lint run, pnpm typecheck, vitest run, a Playwright suite) for this git worktree in your Ankra Workspace instead of on this machine. Output streams back live and the exit code is the remote command’s own. The worktree is sent as it is - tracked files plus untracked files that are not ignored - as a snapshot commit built in a temporary index (the branch, the index and the working tree are untouched). Only what the workspace lacks is uploaded: which commits it holds is recorded under refs/ankra-exec/synced/. The command runs in the same relative directory, with only an allowlisted environment forwarded (GOFLAGS, NODE_OPTIONS, TZ, … and the names in ANKRA_EXEC_FORWARD_ENV). The workspace is this checkout’s (origin remote, a repository connected to Ankra Pipelines) of the --kind given, brought up on first use.
Exit codes: the remote command’s own when it ran; 196 when it did not run remotely (and $ANKRA_EXEC_NOTRUN_FILE is created when set, which is what the routing shims fall back on); 130 after Ctrl-C, which stops the remote command; 2 for a usage error. Each run appends a line to ~/.claude/logs/ankra-exec.log (ANKRA_EXEC_LOG).
Examples
Flags