SL

shuke-labs/leg

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

0 stars 质量 60 趋势 20NOASSERTION

Agent-friendly headless agent (ask/session) — the local-LLM-agent half split out of SHUKE-LABS/baton

概览

See Usage and Sessions below for the full flag set (model selection, alternate credential env vars, --session when a trail holds more than one session, etc). This installs leg, leg-tui, and leg-web. Run leg-tui in a terminal or leg-web to open the local browser interface. Their internal supervisor is bundled beside the native binaries; no LEG_UI_SUPERVISOR_BIN setting is needed. From a checkout, run bash scripts/dev.sh to update and install leg and its UI companions. Per-platform archives for every CI-supported target (.tar.gz on Unix, .zip on Windows) are attached to each GitHub Release. Each archive contains leg, leg-tui, leg-web, and leg-ui-supervisor (.exe on Windows); keep these binaries together when installing them. Releases are created automatically when changes land on main. A Conventional Commit subject of type feat bumps the minor version; every other subject bumps patch. The first release uses the current Cargo version (0.1.0) unchanged.

README

以下为原文 README 节选,完整内容请查看原文。

leg

leg binary skeleton.

Quickstart

export ANTHROPIC_API_KEY=sk-...

leg ask "hello"

LEG_CONTEXT_WINDOW_TOKENS=200000 LEG_EVENT_LOG=trail.jsonl leg session
# type a message, then Ctrl-D or /exit to end the session and create trail.jsonl

leg session --resume trail.jsonl

See Usage and Sessions below for the full flag set (model selection, alternate credential env vars, --session when a trail holds more than one session, etc).

Install

npm i -g @shukelabs/leg

This installs leg, leg-tui, and leg-web. Run leg-tui in a terminal or leg-web to open the local browser interface. Their internal supervisor is bundled beside the native binaries; no LEG_UI_SUPERVISOR_BIN setting is needed.

or build from source directly:

cargo install --git https://github.com/SHUKE-LABS/leg --locked

From a checkout, run bash scripts/dev.sh to update and install leg and its UI companions.

Per-platform archives for every CI-supported target (.tar.gz on Unix, .zip on Windows) are attached to each GitHub Release. Each desktop archive contains leg, leg-tui, leg-web, and leg-ui-supervisor (.exe on Windows); keep these binaries together when installing them. The i386 bundle for iSH hosts is described below.

Install the native binaries

npm and pnpm expose leg through a generated script shim, and the TUI and Web companions cannot start a turn from one. leg install copies the native binaries into a per-user directory that they can use:

leg install
  • Windows: %LOCALAPPDATA%\leg\bin, added to the current user’s PATH. The change applies to newly started shells only, so open a new shell afterwards.
  • Unix: $XDG_BIN_HOME, or $HOME/.local/bin when it is unset. leg install never edits shell startup files; add the directory to your PATH yourself.

leg install --dest picks another directory, and leg install --no-path leaves the Windows PATH alone. leg install --help lists every option.

Run the command from the native leg binary of a release archive or of the npm platform package: it installs leg, leg-tui, leg-web, and leg-ui-supervisor from the directory that holds the running executable, and it never copies a package-manager shim. A cargo install build has no companions beside it, so it has nothing to install.

Releases are created automatically when changes land on main. A Conventional Commit subject of type feat bumps the minor version; every other subject bumps patch. The first release uses the current Cargo version (0.1.0) unchanged.

Every published npm package includes THIRD_PARTY_NOTICES.txt with the licenses of the bundled third-party Rust crates and vendored material.

iSH bundle for iOS

Each release also attaches leg--i686-unknown-linux-musl.tar.gz for hosts that run a Linux i386 userland, such as the iSH

在 GitHub 查看完整 README

推荐工具

换一个关键词,或者移除筛选条件。

安装

npx skillfish add shuke-labs/leg
新手?先看 mcpskill.org 教程 →