> ## 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.

# Surgical editing

> Search before editing and refuse ambiguous changes.

Search before editing and refuse ambiguous changes:

```bash theme={null}
arka surgical-edit find src/app.py "target function"
arka surgical-edit edit src/app.py "old text" "new text" --yes
arka surgical-edit edit src/app.py "old text" "new text" --all --yes
```

Arka prints matching lines first, requires a unique match by default, creates a
`.bak` backup, and makes no change when the keyword is missing or ambiguous.
Natural language requests are supported when the file and old/new text are
quoted clearly.


## Related topics

- [Skills catalog: 70+ built-in Arka commands](/guides/skills.md)
- [How to code with Arka](/guides/code-with-arka.md)
- [Inspect and remove text](/guides/text-edit.md)
- [OpenTelemetry tracing and SigNoz observability](/guides/observability.md)
