localix-cli README

项目的 README,来自 github.com/localixai/localix-cli。合并为一个 markdown 文件:README.md。

Localix CLI

Localix CLI

An ultrafast, lightweight agent runtime for coding and CI

A coding agent at your terminal, on any model: a ChatGPT sign-in, OpenRouter, your own key or a local model (Ollama, LM Studio, llama.cpp). The same agent runs one task in CI and helps your other agents. One binary under 4 MB.

CI status Latest release MIT License macOS and Linux

Quick start · At your terminal · Measured · In CI · In other agents · Docs · cli.localix.ai

llx at a terminal, every step a real run on Claude Haiku 5.5: a model is picked, a failing test is fixed, answers are drawn with steps, tabs, a table and a formula, two agents work in parallel

Every step a real run on Claude Haiku 5.5: any model · a fix · answers · agents · a decision · a ship check. It plays on cli.localix.ai too, by chapter, where it can be paused and copied from.

Quick start

1. Install on macOS or Linux:

curl -fsSL https://raw.githubusercontent.com/localixai/localix-cli/main/scripts/install.sh | sh

2. Run it in your project:

cd your-project
llx

3. Sign in and ask:

/login
the median test fails, fix it

/login takes a ChatGPT sign-in, OpenRouter or a key for any of 200+ providers; a model on your own machine (Ollama, LM Studio) needs none. llx doctor says what is missing. Other ways to install: Installing llx.

Installed with the script? Run llx --update to install the latest stable release. A session only notifies you when one is available.

Why llx

llx is a model in a loop over five tools: bash, apply_patch, ask, agents and jobs. It reads, searches and runs your checks through the shell, and changes files with patches.

At your terminal

What finished goes into the terminal's own scrollback, so scrolling, selecting and copying stay the terminal's. Several sessions can work in one project at once, each with agents of its own.

An answer as llx draws it in a terminal: a file tree, code under its file's name, a diff, a formula, a quote with its source and a footnote An answer as llx draws it in a terminal: figures side by side, a table, a task list, the case for and against, and sources by number

The renderer's own rows, written as SVG. The Markdown is read by flowdown, the lab's library.

Key What it does
Enter Sends. While a task works, what you type goes to it, read at its next step
Shift+Tab Goes round the modes: default → plan (read-only) → bypass → your own
/ The commands: /login, /model, /mode, /new, /rewind, /diff, /copy, /usage and more
@ Mentions a file of the project; a dragged file or picture is attached
← On an empty prompt, lists the sessions in this project
Esc, Ctrl+C Steps back out of what is open; Ctrl+C also stops work

Every key and command: Using llx.

Measured beside Claude Code

The same task, the same model, the same Anthropic key, started in the same minute; the tests that score a run were written before it.

Task Model Agent Solved Time Turns Cost
evalkit, 238 tests Haiku 5.5 llx 238 of 238 286 s 14 $0.050
Claude Code 2.1.321 238 of 238 478 s 25 $0.46
shopkit, 69 tests Haiku 5.5 llx 69 of 69 69 s 5 $0.012
Claude Code 2.1.321 69 of 69 67 s 4 $0.011

One run of each agent, on one machine: a measurement, not a law. Every run's log, code and test output are in benchmark/, the slower runs too (history); bun benchmark/run.ts repeats it on your key.

In CI and scripts

llx exec is the same agent given one task: it ends with an answer, in the shape a JSON Schema defines if you pass one, and an exit code your pipeline can branch on (0 done, 1 no data, 2 out of turns, time or budget, 3 error). It works through bash with gh, git and your project's tools, with no MCP server and no built-in prompt, so the same task runs on GitHub, GitLab or any runner with a shell.

# a step of a job, after actions/checkout
- uses: localixai/localix-cli@v0
  id: llx
  env:
    OPENROUTER_API_KEY: ${{ secrets.OPENROUTER_API_KEY }}
    GH_TOKEN: ${{ github.token }} # read-only in this job; a second job posts the answer
    PR: ${{ github.event.pull_request.number }}
  with:
    model: anthropic/claude-haiku-5.5
    allow: bash
    schema: '{"type":"object","properties":{"summary":{"type":"string"}},"required":["summary"]}'
    prompt: |
      Review pull request #$PR with gh and git. Run something to confirm a problem
      before you report it.

Ready-made workflows, each run for real: a pull request review, @llx in any thread, issue triage, a failed run explained and more. The action, the two-job pattern, keys, limits and GitLab: CI. Exit codes and the --json events: Reference.

In other agents

Claude Code, Codex or a script of yours can call llx from its shell: llx exec hands a task to a helper on any model, so the agent's own tokens go where they matter, and llx decide picks one of a few options about some text in about a second. A skill tells any agent that takes skills when each pays:

npx skills add localixai/localix-cli

In Claude Code it is also a plugin: /plugin install llx --marketplace localixai/localix-cli. More: In other agents.

Documentation

All of it is also on cli.localix.ai/docs.

Guide What it holds
Installing llx The install script, other ways, pinning a release, signing in
Using llx The command line, a session key by key, models and local hosts, sessions, project instructions
Modes and trust Modes, rules, approvals, the sandbox and its boundaries
Tools The five tools: bash, apply_patch, ask, agents, jobs
CI · Recipes · Examples The GitHub Action, the two-job pattern, shell recipes, ready-made workflows
In other agents Helpers on any model, llx decide, the skill
Reference · Compared Exit codes, --json events, llx decide; the action beside other agents' actions
Architecture · Models · Changelog The layers and their rules, the model catalog, what changed

Contributing

Start with CONTRIBUTING.md and ARCHITECTURE.md. Report vulnerabilities as SECURITY.md describes. llx is open source under the MIT License, made by Localix Lab, built and reviewed with Claude Fable 5.2.

Before Localix CLI, this repository was auto-copilot-cli (2023, TypeScript), its author's first AI command line. llx is its successor, written anew in Rust.

localix-cli (localixai/localix-cli)

正在搜索数据库…

这是什么?一个用 Rust 编写的终端编程智能体。它是一个小于 4 MB 的单一可执行文件,可以搭配任何模型使用,包括运行在你自己电脑上的本地模型。命令名是 llx。
它是库还是我要运行的程序?它是一个你在项目中运行的命令行程序,而不是库。同一个智能体也可以通过 llx exec 在 CI 中以非交互方式运行。
我该怎么让它跑起来?在 macOS 或 Linux 上运行安装脚本,然后在你的项目中运行 llx。输入 /login 即可登录,可以使用 ChatGPT 账号、OpenRouter 密钥、200 多个服务商中任意一家的密钥,或本地模型。
我需要先有账号或密钥吗?不一定。你需要某种模型:ChatGPT 登录、OpenRouter 密钥、你自己的服务商密钥,或者 Ollama、LM Studio 等本地模型(无需密钥)。运行 llx doctor 可以查看缺少什么。
它能在 Windows 上运行吗?README 只提供了 macOS 和 Linux 的安装步骤,因此没有说明是否支持 Windows。
这个智能体实际会用哪些工具?它是一个在循环中工作的模型,使用五个工具:bash、applypatch、ask、agents 和 jobs。它通过 shell 读取文件、搜索内容并运行检查,并通过补丁来修改文件。
如何在 CI 或脚本中运行它?llx exec 会让智能体完成一个任务并返回答案;如果你传入了 JSON Schema,答案会按该格式返回。它的退出码(0 表示完成,1 表示没有数据,2 表示超出轮数、时间或预算,3 表示出错)可以让流水线根据结果进行分支判断。
其他智能体能使用 llx 吗?可以。Claude Code、Codex 或脚本可以从其 shell 中调用 llx exec,把任务交给任意模型上的助手。llx decide 可以在约一秒内针对一段文本,从几个选项中选出一个。此外还提供一个 skill 和一个 Claude Code 插件。
这是新项目还是老项目?它是 auto-copilot-cli 的后继项目。auto-copilot-cli 是同一作者于 2023 年开发的 TypeScript 命令行工具。llx 是用 Rust 从头重写的。
有哪些类似的项目?dscode, octomind, DeepCode, memdoor, Raven, oh-my-pi, gentle-shell, Agent
作者
localixai
大小
16.2 MB
星标
368
时长
3年
提交 · 90 天