Skip to main content

Lightweight terminal-native AI coding agent with plugins, MCP, sandbox, and 34+ built-in tools

Project description

FluxLite

github.com/SVolsa/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.mdINSTRUCTIONS.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 descriptions
  • Ctrl+R for 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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fluxlite-0.5.7.tar.gz (81.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fluxlite-0.5.7-py3-none-any.whl (86.2 kB view details)

Uploaded Python 3

File details

Details for the file fluxlite-0.5.7.tar.gz.

File metadata

  • Download URL: fluxlite-0.5.7.tar.gz
  • Upload date:
  • Size: 81.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for fluxlite-0.5.7.tar.gz
Algorithm Hash digest
SHA256 10d956908c673873676eb8bbeb43afec4705c73b7c3b89eb63a264d986273deb
MD5 c9873345d8f5effecd9c6962eafc754f
BLAKE2b-256 107c2b332c51630aecbbe2e323d800b8ad1da9cab417b9690c5de05462e74530

See more details on using hashes here.

File details

Details for the file fluxlite-0.5.7-py3-none-any.whl.

File metadata

  • Download URL: fluxlite-0.5.7-py3-none-any.whl
  • Upload date:
  • Size: 86.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for fluxlite-0.5.7-py3-none-any.whl
Algorithm Hash digest
SHA256 707b511869721167219f49eee9e0d7a6ee7017ae284620a194ab306f2b75c2a3
MD5 c80adf1359c98bc3662e6e4ab2f2ee8a
BLAKE2b-256 b4464bce0ca6d0b937a21e95cea3fcf264c9e66156dd38e186faf04188107146

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page