FluxLite
轻量级 AI 编码助手 · 终端原生 · 插件可扩展
Lightweight AI coding agent — terminal-native, plugin-extensible.
- 轻量:单文件 EXE(~33MB)或 pip 安装,零运行时依赖
- 原生:真正的终端体验 — 流式输出、Markdown 渲染、命令补全
- 可扩展:插件系统 + MCP + Hooks,每个维度都可定制
- 安全:沙箱隔离文件操作,工具执行前确认,质量门禁
中文 (点击切换到 English)
安装
pip install fluxlite
或从源码安装:
git clone https://github.com/SVolsa/fluxlite.git
cd fluxlite
pip install -e .
要求:Python >= 3.9,OpenAI 兼容的 API Key。
快速上手
# 首次运行 — 设置向导
fluxlite --wizard
# 交互聊天
fluxlite
# 单次问答(不执行工具)
fluxlite "解释这段代码"
# 单次问答 + 自动执行工具
fluxlite --auto "跑测试并修复失败"
功能
| 功能 | 说明 |
|---|---|
| 对话 | 流式输出 + Markdown 渲染 |
| 工具 | 34 个内置工具:文件、代码、Git、搜索、终端、浏览器、HTTP |
| 插件 | ~/.fluxlite/plugins/ 放 JSON + Python 即可扩展 |
| 沙箱 | 文件操作隔离到临时目录,审核后应用或丢弃 |
| 会话 | 自动保存/恢复,支持搜索和导出 |
| 子代理 | spawn_agents 并行派发子任务 |
| 规划 | task_planner + self_review 先规划再自查 |
| Hooks | 工具执行前后触发自定义脚本 |
| MCP | 连接外部 MCP 服务器 |
内置工具 (34)
文件: file_read file_write file_edit file_append file_delete file_list
代码: code_executor run_tests
Git: git_status git_diff git_log git_add git_commit
搜索: web_search grep_search glob_files
网络: http_request file_download web_scrape browser
终端: terminal(持久会话)
协作: spawn_agents task_planner self_review
记忆: memory_read memory_write rule_add rule_remove rule_list
系统: config_set mcp_call mcp_list hook_run hook_list
命令
/help /clear /model /memory /rules /rule /think /compact /toolresult
/export /token /truncate /rewind /context /tools /lang /git
/autocommit /new /search /sessions /last /plan /mcp /hooks
/plugin /sandbox /diff /review /fix /pin /init /exit
/触发命令补全并显示描述Ctrl+R搜索历史- 行末
\续行 /s→/sessions,/q→/exit(短别名)
配置
~/.fluxlite/config.toml:
[api]
key = "your-api-key"
base_url = "https://api.deepseek.com"
model = "deepseek-chat"
[app]
language = "zh"
timeout = 60
safe_mode = true
也支持环境变量:OPENAI_API_KEY / ANTHROPIC_API_KEY / TAVILY_API_KEY。
项目上下文
项目根目录放置 FLUXLITE.md,启动时自动注入。用 /init 自动生成。也可添加 .fluxlite/project_memory.md 和 INSTRUCTIONS.md。
插件
见 API.md,中英双语文档 + 示例。
测试
pytest tests/ -v
许可
MIT
English (click to switch to 中文)
Lightweight — ~33MB standalone EXE or pip install, zero runtime deps. Terminal-native — streaming output, Markdown rendering, command completion. Extensible — plugin system + MCP + Hooks, customize at every layer. Safe — sandbox isolates file ops, confirm-before-execute, quality gates.
Install
pip install fluxlite
Or from source:
git clone https://github.com/SVolsa/fluxlite.git
cd fluxlite
pip install -e .
Requirements: Python >= 3.9, OpenAI-compatible API key.
Quickstart
# First run — setup wizard
fluxlite --wizard
# Interactive chat
fluxlite
# One-shot (no tool execution)
fluxlite "explain this code"
# One-shot with auto tool execution
fluxlite --auto "run the tests and fix failures"
Features
| Feature | Description |
|---|---|
| Chat | Streaming output + Markdown rendering |
| Tools | 34 built-in: file ops, code exec, git, search, terminal, browser, HTTP |
| Plugins | Drop JSON + Python in ~/.fluxlite/plugins/ to extend |
| Sandbox | File ops isolated to temp dir; review then apply or discard |
| Sessions | Auto save/restore, search, and export |
| Sub-agents | spawn_agents for parallel subtask dispatch |
| Planner | task_planner + self_review toolchain |
| Hooks | Custom scripts triggered pre/post tool execution |
| MCP | Connect external MCP servers |
Built-in Tools (34)
Files: file_read file_write file_edit file_append file_delete file_list
Code: code_executor run_tests
Git: git_status git_diff git_log git_add git_commit
Search: web_search grep_search glob_files
Network: http_request file_download web_scrape browser
Terminal: terminal (persistent session)
Planning: spawn_agents task_planner self_review
Memory: memory_read memory_write rule_add rule_remove rule_list
System: config_set mcp_call mcp_list hook_run hook_list
Commands
/help /clear /model /memory /rules /rule /think /compact /toolresult
/export /token /truncate /rewind /context /tools /lang /git
/autocommit /new /search /sessions /last /plan /mcp /hooks
/plugin /sandbox /diff /review /fix /pin /init /exit
/triggers command completion with descriptionsCtrl+Rfor history search- End line with
\to continue typing /s→/sessions,/q→/exit(short aliases)
Config
~/.fluxlite/config.toml:
[api]
key = "your-api-key"
base_url = "https://api.deepseek.com"
model = "deepseek-chat"
[app]
language = "zh"
timeout = 60
safe_mode = true
Also reads environment variables: OPENAI_API_KEY / ANTHROPIC_API_KEY / TAVILY_API_KEY.
Project Context
Place FLUXLITE.md in your project root to inject it into the system prompt on startup. Use /init to auto-generate. Also supports .fluxlite/project_memory.md and INSTRUCTIONS.md.
Plugins
See API.md for bilingual API docs and examples.
Tests
pytest tests/ -v
License
MIT
Metadata
Release files for fluxlite 0.6.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| fluxlite-0.6.0.tar.gz | 107.0 kB | Without provenance | Details for fluxlite-0.6.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| fluxlite-0.6.0-py3-none-any.whl | Python 3 | none | any | Details for fluxlite-0.6.0-py3-none-any.whl |
Total release size: 221.8 kB
Release files / fluxlite-0.6.0.tar.gz
| Download URL | fluxlite-0.6.0.tar.gz |
|---|---|
| Size | 107.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7bff07710ee4d2bc19e1c7464386bc89c204d78d8091125022d3dede89664950
|
|
BLAKE2b-256 checksum How to use checksums |
5a6b7fb914bc23461c6126ef55bff80f03215c8a465f8acf04f90698340c7c8b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.9
|
Release files / fluxlite-0.6.0-py3-none-any.whl
| Download URL | fluxlite-0.6.0-py3-none-any.whl |
|---|---|
| Size | 114.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d3c40a2b3a36d5cb5a10a3edec1596f36d6a9ddd5f09591d91709996604078da
|
|
BLAKE2b-256 checksum How to use checksums |
3b9fd3e33c5cf74ba338dd243fee8444b2c13f40d8d553f76528d64a6ac96355
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.9
|
Security for fluxlite 0.6.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.