← 返回命令列表

Linux command

keen 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Start the agent

keen

Run without a global install

npx keen-code

Check the installed version

keen --version

Switch to a different LLM provider mid-session

/model

Adjust the extended-reasoning effort level

/thinking

Compress the conversation

/compact

说明

keen (distributed as the keen-code npm package) is a small, terminal-based coding agent written in Go. It treats the AI model as a generic backend and ships a deliberately tiny tool surface: read_file, write_file, edit_file, glob, grep, and bash. That is the entire toolbox the agent uses to navigate, edit, and run code, by design favouring simplicity over feature breadth. Invoking keen with no arguments drops you into an interactive session anchored at the current working directory. The agent reads files, edits them in place, and runs shell commands on your behalf, conversing through the terminal. Slash commands such as /model, /thinking, and /compact control provider selection, reasoning depth, and context compaction without leaving the session. The agent is provider-agnostic: it can drive Anthropic, OpenAI (including ChatGPT OAuth), Google AI (Gemini), DeepSeek, Kimi, GLM, MiniMax, Codex, and the Go port of OpenCode. Switching providers is done at runtime with /model rather than via separate CLI flags, so a single keen install covers every supported backend. A notable trait of the project: every line of code in the repository is reported to have been written by an AI agent, with the prompts and design decisions archived under .ai-interactions/.

参数

--version
Print the keen-code version and exit. Also reachable as npx keen-code --version for users who skip the global install.

FAQ

What is the keen command used for?

keen (distributed as the keen-code npm package) is a small, terminal-based coding agent written in Go. It treats the AI model as a generic backend and ships a deliberately tiny tool surface: read_file, write_file, edit_file, glob, grep, and bash. That is the entire toolbox the agent uses to navigate, edit, and run code, by design favouring simplicity over feature breadth. Invoking keen with no arguments drops you into an interactive session anchored at the current working directory. The agent reads files, edits them in place, and runs shell commands on your behalf, conversing through the terminal. Slash commands such as /model, /thinking, and /compact control provider selection, reasoning depth, and context compaction without leaving the session. The agent is provider-agnostic: it can drive Anthropic, OpenAI (including ChatGPT OAuth), Google AI (Gemini), DeepSeek, Kimi, GLM, MiniMax, Codex, and the Go port of OpenCode. Switching providers is done at runtime with /model rather than via separate CLI flags, so a single keen install covers every supported backend. A notable trait of the project: every line of code in the repository is reported to have been written by an AI agent, with the prompts and design decisions archived under .ai-interactions/.

How do I run a basic keen example?

Run `keen` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does --version do in keen?

Print the keen-code version and exit. Also reachable as npx keen-code --version for users who skip the global install.