> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ankra.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# ankra dev

> Run this machine's heavy dev commands (test, lint, typecheck) in an Ankra Workspace

## ankra dev

Send the heavy commands of a development loop - go test, go vet, go build,
golangci-lint, pnpm typecheck / test / lint, vitest, tsc `--noEmit`, Playwright
suites - to the checkout's Ankra Workspace instead of running them on this
machine, without changing what you or a coding agent type.

'ankra dev install' puts small shims named go, gofmt, golangci-lint, pnpm, npm
and npx in front of the real tools on PATH. Each shim asks 'ankra' where the
invocation belongs:

```text theme={null}
routed          go test|vet|build (no -o, -c, coverage or profile files),
                golangci-lint run, gofmt -l|-d <paths>, pnpm|npm typecheck,
                test, test:ci, test:unit, test:shard, lint, lint:*,
                format-check, knip, vitest run, tsc --noEmit
routed, changes go generate, go mod tidy|vendor|edit, go get, go fix, go fmt,
applied here    go tool ..., gofmt -w, golangci-lint run --fix, golangci-lint fmt
routed, results Playwright test runs (pnpm|npm test:e2e*, e2e*, [exec]
copied back     playwright, npx playwright test): test-results and reports
local           everything else: go run, go install, go -C, dev servers,
                builds, pnpm install|add, anything interactive (--ui,
                --debug, --headed, codegen), gofmt reading stdin
```

A routed command runs exactly like 'ankra exec': same output, same exit code.
When the checkout has no workspace to use (not a repository connected to Ankra
Pipelines, not logged in, offline) or the workspace could not run it, the real
tool runs on this machine instead, so nothing ever blocks on the platform.

The workspace kind follows the tool: go, gofmt and golangci-lint use the
repository's "go" workspace profile, pnpm, npm and npx its "node" profile and
Playwright runs its "e2e" (or "playwright") profile - when the repository has
that profile. Otherwise they all share its default workspace.

Mode: ANKRA\_EXEC=auto|remote|local for one command, 'ankra dev mode' for the
default. ANKRA\_EXEC\_EXPLAIN=1 \<command> prints route or local and runs nothing.

**Examples**

```bash theme={null}
ankra dev install
  ankra dev status
  ANKRA_EXEC_EXPLAIN=1 go test ./...
  ANKRA_EXEC=local pnpm typecheck
  ankra dev mode local
```

## ankra dev install

Write the routing shims for go, gofmt, golangci-lint, pnpm, npm and npx and
put them in front of the real tools.

The shims go to \~/.ankra/dev/shims (`--dir`) and are linked into a directory
that is already on PATH, \~/.local/bin by default (`--link-dir`), so running
sessions and git hooks pick them up at once. When no such directory is on
PATH, or a real tool still comes first, the exact PATH line to add to your
shell profile is printed; no profile is ever edited for you.

Safe to run again (it upgrades the shims in place). A name that is taken by
a real file or by a link to something else is left alone and reported. Links
that point at the earlier claude-tools remote-exec shim are replaced only
with `--replace-legacy`.

`--uninstall` removes exactly what an install created: the links that point at
its shims and the shim files themselves. Commands then run locally again.

Each shim is a few lines of POSIX sh that hand the invocation to
'ankra dev shim'; without an ankra CLI it runs the real tool, so removing the
CLI never breaks go or pnpm. See 'ankra dev `--help`' for what routes.

```bash theme={null}
ankra dev install [flags]
```

**Examples**

```bash theme={null}
ankra dev install
  ankra dev install --link-dir ~/bin
  ankra dev install --dir ~/.local/share/ankra/shims --link-dir ""
  ankra dev install --uninstall
```

**Flags**

| Flag | Default | Description |
| - | - | - |
| `--dir` | | Directory the shims are written to (default \~/.ankra/dev/shims) |
| `--link-dir` | | Directory already on PATH to link the shims into (default \~/.local/bin when it is on PATH; empty links nothing) |
| `--replace-legacy` | `false` | Replace links that point at the claude-tools remote-exec shim |
| `--uninstall` | `false` | Remove the shims and links a previous install created |

## ankra dev mode

Show the routing mode the dev shims use, or set the default.

```text theme={null}
auto    route when the checkout has a workspace, otherwise run locally (default)
remote  the same, and say so in one line when a routable command runs locally
local   never route: every command runs on this machine
```

The ANKRA\_EXEC environment variable overrides the default for one command. A
default that was never set here is read from \~/.config/ankra-exec/mode, where
the earlier remote-exec scripts kept theirs.

```bash theme={null}
ankra dev mode [auto|remote|local]
```

**Examples**

```bash theme={null}
ankra dev mode
  ankra dev mode local
```

## ankra dev status

Show how the dev shims are set up on this machine: the routing mode and where
it comes from, the shim directory, and for each tool whether its shim is
installed and whether it is what the name resolves to first on PATH (a tool
installed in front of it would bypass routing). Reads nothing from the
platform.

```bash theme={null}
ankra dev status [flags]
```

**Examples**

```bash theme={null}
ankra dev status
  ankra dev status -o json
```

**Flags**

| Flag | Default | Description |
| - | - | - |
| `-o`, `--output` | | Output format: json or yaml (default: human-readable) |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.