LanAgent.Terminal 1.0.2

There is a newer version of this package available.
See the version list below for details.
dotnet tool install --global LanAgent.Terminal --version 1.0.2
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local LanAgent.Terminal --version 1.0.2
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=LanAgent.Terminal&version=1.0.2
                    
nuke :add-package LanAgent.Terminal --version 1.0.2
                    

LanAgent .NET Tool

LanAgent 的终端 AI Agent,安装后的命令为 lanagent。

环境要求

目前 Agent 执行支持 Windows x64,需要 .NET 8 或更高版本运行时、硬件虚拟化和 Windows Hypervisor Platform。工具已启用主版本向前滚动,因此安装了较新 .NET 运行时的电脑也可启动它。安装工具仍需 .NET SDK 提供 dotnet tool 命令。Python 3.10–3.14 与 PowerShell 7.6.x 在执行前检查。工具包自带 sandbox worker、Hyperlight 原生组件和 Python guest;宿主 Python 与 PowerShell 仍需安装。

安装与使用

安装已发布到 NuGet.org 的版本:

dotnet tool install --global LanAgent.Terminal
lanagent --help
lanagent doctor
lanagent doctor --install
lanagent chat --workspace C:\Projects\MyProject

进入聊天后按 F2 配置模型或使用 /login。更新和卸载:

Windows 交互聊天由每个数据目录唯一的后台会话运行。再次运行 lanagent 会在当前终端接入同一个 Agent 进程,保留正在运行的任务、会话、模型、工作区和权限;原终端返回命令行。后续连接的启动参数不会改变现有会话,使用聊天内命令调整设置,或 /exit 结束后用新参数启动。--data-dir 可以启动独立后台会话。

Ctrl+] 分离终端连接,关闭终端窗口也不会停止后台任务;再次运行 lanagent 可重新接入。/exit 或 /quit 才结束整个后台会话。只有同一 Windows 用户能够连接。非交互 run 和只读 tasks list/show 保持原有执行方式。

供应商和模型一起自动恢复。F2 或 /model 直接显示“供应商 · 模型”的列表,上次选择排在首位。

dotnet tool update --global LanAgent.Terminal
dotnet tool uninstall --global LanAgent.Terminal

从源码打包并通过本地 NuGet 源安装

在仓库根目录运行(打包需 .NET SDK):

dotnet pack src/LanAgent.Terminal -c Release -p:Version=1.0.1
dotnet tool install --global LanAgent.Terminal --add-source ./artifacts/packages --version 1.0.1

更新到刚打包的本地版本:

dotnet tool update --global LanAgent.Terminal --add-source ./artifacts/packages --version 1.0.1

版本默认在 src/LanAgent.Terminal/LanAgent.Terminal.csproj 中维护,也可以通过 -p:Version=1.0.2 覆盖。sandbox 的文件作为工具运行文件放入包内的 sandbox/ 子目录,不依赖另外发布 LanAgent.Core 或 LanAgent.Sandbox 包。

发布

确认包 ID 在 NuGet.org 可用、版本及作者信息正确,并用有权发布该包的 API Key 执行:

dotnet nuget push ./artifacts/packages/LanAgent.Terminal.1.0.0.nupkg --source https://api.nuget.org/v3/index.json --api-key <API_KEY>

API Key 请通过本地安全配置提供,不要提交到仓库。这里只配置和生成工具包;公共发布需要单独执行上述命令。

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last Updated
1.0.6 131 10/15/2026
1.0.5 117 10/14/2026
1.0.2 109 10/12/2026