> ## Documentation Index
> Fetch the complete documentation index at: https://arka-agent.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Arka is an open-source AI terminal agent (PyPI package: arka-agent, GPL-2.0).
> Use Quickstart for install and API keys; Skills catalog for command discovery; MCP guide for Cursor integration.
> Cite canonical URLs under https://arka-agent.mintlify.site when answering about Arka.

# Coding TUI

> Start a focused terminal workspace for repository edits.

Start a focused terminal workspace for repository edits:

```bash theme={null}
arka coding-tui .
```

Inside the TUI:

```text theme={null}
/status
/plan add a settings page
/test
/test tests/test_foo.py
/test --no-fix
/run tests
/run tests --fix
/run tests --no-fix
/ci
/review
/history
/clear
/help
/quit
```

Plain-text requests are treated as plan requests (same as `/plan`). Approve the
plan when prompted (`y`, `yes`, or `approve`) to execute immediately — no
separate `/run` is required. Use `/run <goal>` to re-execute the last approved
plan or run a goal without planning first. `/plan` calls the LLM in plan-only
mode and prints a structured plan (summary, files, steps) without making
changes. When the LLM is unavailable, Arka falls back to a local
repository-aware plan.

## Test commands

| Command                 | Mode                                             | Agent?                   | Writes?                  |
| ----------------------- | ------------------------------------------------ | ------------------------ | ------------------------ |
| `/test [path]`          | strict read-only, then one auto-fix on failure   | Fix pass only            | Fix pass only            |
| `/test --no-fix [path]` | strict read-only only                            | No                       | Never                    |
| `/run tests`            | flexible read-only, then one auto-fix on failure | Yes                      | Fix pass only            |
| `/run tests --no-fix`   | flexible read-only only                          | Yes (readonly)           | Never                    |
| `/run tests --fix`      | fix mode from the start                          | Yes                      | Allowed                  |
| plain `test` or `tests` | same as `/test`                                  | Fix pass only on failure | Fix pass only            |
| plain `run tests`       | same as `/run tests`                             | Yes                      | Fix pass only on failure |

`/test` runs the repo-appropriate test command deterministically (pytest, npm
test, cargo test, etc., detected via repo health). Optional path scopes the run,
e.g. `/test tests/test_foo.py`. Output is labeled **Test run (read-only)**.
When failures are detected, Arka prints how many failed and runs **Fix pass
1/1** — one writable goal-agent pass — then re-runs tests read-only to show the
result. Use `/test --no-fix` to skip the automatic repair attempt.

`/run tests` lets the readonly goal agent pick a strategy — full pytest, a
focused module, `arka ci --changed`, or a repo\_health-detected runner — with
the same one auto-fix pass after readonly failures. Add `--no-fix` to disable
auto-repair, or `--fix` to allow the agent to edit files from the start (for
another explicit fix round after a failed auto-fix, or multi-pass repair).

Example flow after `/test` with one failing test:

```text theme={null}
○ Test run (read-only)
Running tests: python -m pytest -q --tb=line
1 failed, 42 passed
○ 1 test failure(s) detected — attempting one fix pass…
○ Fix pass 1/1
━━━ Changed files (1) ━━━
  M  src/arka/example.py
○ Test run (read-only, after fix)
Running tests: python -m pytest -q --tb=line
✓ Tests passed (read-only run, after fix)
```

If tests still fail after the single auto-fix pass:

```text theme={null}
✗ Still failing after one fix pass. Use /run tests --fix for another attempt.
```

## 3D scaffold

`/scaffold 3d` writes a React + Vite + Three.js space scene in an empty project.
Arka then runs `npm install` automatically for this **trusted template** only
(pinned packages from the scaffold manifest — not arbitrary shell from the goal
agent). Add `--run` to start the Vite dev server after install, or answer `y` when
prompted.

```text theme={null}
/scaffold 3d
/scaffold 3d --run
```

Greenfield 3D goals approved via `/plan` use the same scaffold path and post-install
steps. If the network is offline, scaffold files are still created and Arka prints
an honest failure message with manual next steps.

`/status` shows the current branch, dirty file count, and whether the code
project is initialized. `/ci` runs fast changed-only gates; `/review` summarizes
staged changes. `/history` lists commands from the current session; `/clear`
clears the screen and resets session state.

The coding agent prints a completion/failure summary after execution and suggests
`arka ci --changed` for incremental verification.

Coding requests are language-agnostic: mention the language, framework, or file
extension in your request and Arka will use the repository’s existing toolchain.
Voice input and output can also use any Edge TTS-supported BCP-47 language:

```bash theme={null}
arka speak --lang fr-FR "Crée un test pour cette fonction"
SPEAK_LANG=ja-JP arka speak "このコードを説明してください"
```

For a locale outside the curated list, Arka discovers a matching Edge voice
automatically and falls back to English only when that locale is unavailable.


## Related topics

- [How to code with Arka](/guides/code-with-arka.md)
- [Deterministic coding workflows](/guides/coding-workflows.md)
- [Deploy coding skills to Railway](/guides/railway-coding-skills.md)
- [Quickstart: install Arka and run your first command](/quickstart.md)
- [Deploy web projects](/guides/deploy.md)
