{"id":24765930,"url":"https://github.com/infinitensor/infinitui","last_synced_at":"2026-04-16T04:32:23.050Z","repository":{"id":247330152,"uuid":"825534244","full_name":"InfiniTensor/InfiniTUI","owner":"InfiniTensor","description":null,"archived":false,"fork":false,"pushed_at":"2024-08-11T09:40:44.000Z","size":291,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-08-31T16:37:38.902Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/InfiniTensor.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-GPL-V3","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-08T03:02:58.000Z","updated_at":"2024-08-11T11:33:28.000Z","dependencies_parsed_at":"2024-08-11T10:56:01.522Z","dependency_job_id":null,"html_url":"https://github.com/InfiniTensor/InfiniTUI","commit_stats":null,"previous_names":["infinitensor/infinitui"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/InfiniTensor/InfiniTUI","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InfiniTensor%2FInfiniTUI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InfiniTensor%2FInfiniTUI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InfiniTensor%2FInfiniTUI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InfiniTensor%2FInfiniTUI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/InfiniTensor","download_url":"https://codeload.github.com/InfiniTensor/InfiniTUI/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InfiniTensor%2FInfiniTUI/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31871565,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-15T15:24:51.572Z","status":"online","status_checked_at":"2026-04-16T02:00:06.042Z","response_time":69,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-28T23:17:45.801Z","updated_at":"2026-04-16T04:32:23.026Z","avatar_url":"https://github.com/InfiniTensor.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# InfiniTUI: InfiniLM 的终端 UI 客户端\n\n- ![1.png](./asserts/1.png)\n- ![2.png](./asserts/2.png)\n\n操作模式类似于 Vim，灵感借鉴于 [tenere](https://github.com/pythops/tenere) 。\n## 支持平台\n\n- [x] MacOS\n- [x] Linux\n- [] Windows\n\n\n## V0.1.0 功能列表\n\n- 与大模型对话\n- 对话历史\n- 保存对话记录到指定目录文件\n- 打开指定目录并展示 markdown 文件\n- 复制指定文件内容和目录结构作为 prompt 到剪切板\n\n## 支持模型\n\n- InfiniLM\n- Ollama\n- OpenAI GPT\n- ChatGLM（智谱清言）\n\n\n## 使用 InfiniLM\n\n### 启动 InfiniLM\n\n```\n\u003e cd /path/to/InfiniLM\n\u003e cargo service  --model model/your_cast_model_path/ --port 3000 --top-k 100  --top-p 0.9 --temperature 0.9 --log info\n```\n\n### 启动 infini TUI Client\n\n1. 配置文件\n\n配置文件使用 TOML 配置文件进行配置。文件默认位置为：\n\n- Linux：`$HOME/.config/infini/` 或 `$XDG_CONFIG_HOME/infini/`\n- Mac：`$HOME/Library/Application Support/infini/`\n\n**你也可以自定义配置文件目录**：\n\n```\nexport CONFIG_DIR=/path/to/infiniinfini_config_dir/\n```\n\n**需要配置的文件如下**：\n\n- `config.toml`，指定使用的模型等信息\n- `prompts.toml`，设置默认的 prompts 信息\n\n[config.template.toml](./config.template.toml) 示例：\n\n```rust\narchive_file_name = \"/Users/username/infini.archive.md\"\nfile_explorer_path = \"/Users/username/Work/Projects/infini/files/\"\nllm = \"infinilm\"\n\nlanguage = \"zh-CN\"  # 或 \"en\"\n\n[infinilm]\nurl = \"http://localhost:3000/infer\"\n```\n\n[prompt.template.toml](./prompt.template.toml) 示例：\n\n```rust\n[[messages]]\nrole = \"system\"\ncontent = \"\"\"\n你现在是一个 Rust 语言专家，为用户解答任何 Rust 相关问题，并输出安全和健壮的 Rust 代码：\n\n确保你输出的 Rust 代码中不要加任何转义符号！\n\n转换完成之后请按指定 json 格式输出。\n\"\"\"\n\n```\n\n2. 编译运行\n\n在项目根目录：\n\n```\n\u003e cargo run\n```\n\n或用 [Just](https://github.com/casey/just) 部署（或参考 : [Justfile](./Justfile) 文件，使用对应 cargo 命令）\n\n```\n\u003e just deploy\n\u003e infini\n```\n\n3. 界面多语言支持\n\n目前支持 中文 和 英文 两种语言：\n\n可以在编译运行时指定 `--lang` 参数指定语言\n\n```\n\u003e cargo run -- --lang en\n```\n\n也可以在 `config.toml` 中配置 `language` 语言，默认为 中文（`zh-CN`）\n\n## 基本操作\n\n- `tab` 键可以切换焦点\n- 焦点在 prompt 区域，按 `i` 键可以输入，按 `esc` + `enter` 发送消息\n- 焦点在 chat 区域，按 `j` 或 `k` 可以上下滚动\n- `?` 弹出帮助界面\n- `ctrl + f` 弹出指定的文件目录，`-\u003e` 可进入目录，`tab` 可切换页面， `j`或`k` 上下滚动内容\n- `ctrl + p` 可以复制选定文件内容及其目录结构作为 Prompt 到剪切板，随后可粘贴到 prompt 输入框\n\n**特定用法**\n\n可以用于 infiniLM 代码阅读和开发调试 ：\n\n- 可以把 infinilm 的源码放到指定目录，设置 file_explorer_path\n- 通过 ctrl+f 和 ctrl + p ，直接把代码文件和指定目录结构生成为一个 prompt，自动复制到剪切板，然后可以粘贴进 prompt 输入框让大模型解读相关代码\n\n\n\n\n### 键绑定\n\nInfiniTUI 支持自定义键绑定。\n您可以通过更新 config 配置文件中的`[key_bindings]`部分来修改一些默认键绑定。\n这是一个包含默认键绑定的示例\n\n```toml\n[key_bindings]\nshow_help = '?'\nshow_history = 'h'\nnew_chat = 'n'\nsave_chat = 's'\n```\n\nℹ️ 注意\n\n\u003e 为避免与vim键绑定重叠，您需要使用`ctrl` + `键`，除了帮助`?`外。\n\n## ⌨️ 键绑定介绍\n\n### 全局\n\n这些是无论焦点在哪个块上都适用的默认键绑定。\n\n`ctrl + n`：开始新聊天并将上一个保存在历史中。\n\n`ctrl + s`：保存当前聊天或聊天历史（首先应该可见历史弹出窗口）到指定目录下的`\ninfini.archive.md`文件。\n\n`Tab`：切换焦点。\n\n`j`或`向下箭头键`：向下滚动\n\n`k`或`向上箭头键`：向上滚动\n\n`ctrl + h`：显示聊天历史。按`Esc`关闭它。\n\n`ctrl + t`：停止流响应\n\n`q`或`ctrl + c`：退出应用\n\n`?`：显示帮助弹出窗口。按`Esc`关闭它\n\n### 提示符\n\n有像vim一样的3种模式：`Normal`、`Visual`和`Insert`。\n\n#### 插入模式\n\n`Esc`：切换回正常模式。\n\n`Enter`：创建新行。\n\n`Backspace`：删除前一个字符。\n\n#### 正常模式\n\n`Enter`：提交提示\n\n\u003cbr\u003e\n\n`h或Left`：向后移动光标一字符。\n\n`j或Down`：向下移动光标。\n\n`k或Up`：向上移动光标。\n\n`l或Right`：向前移动光标一字符。\n\n`w`：向右移动光标一个单词。\n\n`b`：向后移动光标一个单词。\n\n`0`：移动光标到行首。\n\n`$`：移动光标到行尾。\n\n`G`：移动到底部。\n\n`gg`：移动到顶部。\n\n\u003cbr\u003e\n\n`a`：在光标后插入。\n\n`A`：在行尾插入。\n\n`i`：在光标前插入。\n\n`I`：在行首插入。\n\n`o`：在当前行下面添加新行。\n\n`O`：在当前行上面添加新行。\n\n\u003cbr\u003e\n\n`x`：删除光标下的一个字符。\n\n`dd`：剪切当前行\n\n`D`：删除当前行并\n\n`dw`：删除光标旁的单词。\n\n`db`：删除光标左侧的单词。\n\n`d0`：从光标删除到行首。\n\n`d$`：从光标删除到行尾。\n\n\u003cbr\u003e\n\n`C`：更改到行尾。\n\n`cc`：更改当前行。\n\n`c0`：从光标更改到行首。\n\n`c$`：从光标更改到行尾。\n\n`cw`：更改下一个单词。\n\n`cb`：更改光标左侧的单词。\n\n\u003cbr\u003e\n\n`u`：撤销\n\n`p`：粘贴\n\n#### 视觉模式\n\n`v`：切换到视觉模式。\n\n`y`：复制选中的文本\n\n\u003cbr\u003e\n\n## ⚖️ 许可证\n\n- GPLv3\n- MIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finfinitensor%2Finfinitui","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finfinitensor%2Finfinitui","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finfinitensor%2Finfinitui/lists"}