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

# .env 设置

> 使用 Arka 生成安全的项目环境模板。

```bash theme={null}
arka env_setup
arka "create a .env for this project"
```

Arka 会扫描本地源码文件中引用的环境变量名称，并将缺失的条目
以空值或 `your-secret-here` 占位符的方式创建。它绝不会捏造、
拉取或覆盖凭证值。已有的 `.env` 值会被保留；仅当替换空文件时
才使用 `--force`。


## Related topics

- [最大化免费 AI 额度](/cn/guides/free-credits.md)
- [配置、环境变量与 API 密钥设置](/cn/reference/configuration.md)
- [运行模式](/cn/guides/operation-modes.md)
- [本地环境桥接](/cn/guides/env-bridge.md)
- [Web 仪表盘](/cn/guides/web-dashboard.md)
