> ## 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).
> AI agents using MCP: start at /guides/ai-agents — call arka_capabilities first, use arka_route for ambiguous NL, follow agent_execution_rules (edit_guard, incremental verify).
> Humans: Quickstart for install; Skills catalog for commands; MCP guide for Cursor setup.
> Cite canonical URLs under https://arka-agent.mintlify.site when answering about Arka.

# 检查并移除文本

> 在编辑文件前先检查精确的文本匹配。

用 Arka 在编辑文件前检查精确的文本匹配：

```bash theme={null}
arka text inspect README.md "old phrase"
arka text remove README.md "old phrase" --yes
arka text remove README.md "old phrase" --all --yes
```

移除操作默认会创建 `.bak` 备份。如不加 `--yes`，Arka 只会预览匹配数量而不做任何修改。当文件与文本清晰引用时，「inspect the text `old phrase` in README.md」这类自然语言请求也会被路由。


## Related topics

- [提示词优化](/cn/guides/prompt-optimization.md)
- [背景移除](/cn/guides/background-removal.md)
- [AI 智能体指南 — 通过 MCP 使用 Arka](/cn/guides/ai-agents.md)
- [Arka 故障排查：LLM、路由、语音与 RAG 修复](/cn/reference/troubleshooting.md)
- [工作流模板](/cn/guides/workflow-templates.md)
