Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,9 @@ jobs:
New-Item -ItemType Directory -Force -Path "build" | Out-Null
Copy-Item "target\${{ matrix.target.rust }}\release\${{ matrix.component }}.exe" "build\$binaryName.exe"

(Get-FileHash "build\$binaryName.exe" -Algorithm SHA256).Hash.ToLowerInvariant() |
Set-Content "build\$binaryName.exe.sha256" -NoNewline

Write-Output "Built binary: $binaryName"

- name: Upload to Cloudflare R2 (Unix)
Expand Down
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,15 @@
associations). Lease mutation stays internal to the agent runtime
services.

### Added (PD-10)

- **Windows PowerShell installer and `lba.cmd` shim (plan-20260714 PD-10)**:
`install.ps1` installs the published `libra-windows-amd64.exe`, verifies a
published SHA-256 when available, updates the user PATH, and creates an
ownership-marked `lba.cmd`. Reinstalls repair only Libra-managed shims;
`-NoAlias`/`LIBRA_NO_ALIAS=1` preserve opt-out behavior, and `-Uninstall`
removes only files and PATH entries created by the installer.

### Fixed

### Added (PD-03)
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "libra"
version = "0.19.63"
version = "0.19.64"
edition = "2024"
license = "MIT"
description = "AI agent-native version control system with Git on-disk compatibility, SQLite-backed metadata, and tiered cloud storage"
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ curl -fsSL https://download.libra.tools/install.sh | sh
# Homebrew (macOS)
brew install libra

# Windows PowerShell
irm https://download.libra.tools/install.ps1 | iex

# From source (requires Rust)
git clone https://github.com/wingwangsz/libra.git
cd libra
Expand All @@ -61,6 +64,9 @@ The script installer also creates the optional shorthand
repairs a missing alias without replacing the binary. Use `--no-alias` or
`LIBRA_NO_ALIAS=1` to opt out; an existing user-owned `lba` is never
overwritten. See [installer behavior and options](docs/installation.md).
On Windows, the PowerShell installer creates `lba.cmd` beside `libra.exe` and
adds the install directory to the user PATH. Use `-NoAlias` or
`LIBRA_NO_ALIAS=1` to opt out.

#### Auto-upgrade (opt-in)

Expand Down
7 changes: 6 additions & 1 deletion README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ curl -fsSL https://download.libra.tools/install.sh | sh
# Homebrew(macOS)
brew install libra

# Windows PowerShell
irm https://download.libra.tools/install.ps1 | iex

# 从源码编译(需要 Rust)
git clone https://github.com/wingwangsz/libra.git
cd libra
Expand All @@ -60,6 +63,8 @@ cargo build --release
重复安装同一版本会修复缺失的 alias,不替换二进制。使用 `--no-alias` 或
`LIBRA_NO_ALIAS=1` 可关闭;已存在的用户自有 `lba` 绝不会被覆盖。详见
[安装器行为与选项](docs/installation.zh-CN.md)。
Windows PowerShell 安装器会在 `libra.exe` 旁创建 `lba.cmd`,并将安装目录加入
当前用户的 PATH。使用 `-NoAlias` 或 `LIBRA_NO_ALIAS=1` 可关闭该行为。

### 初始化你的第一个仓库

Expand Down Expand Up @@ -181,7 +186,7 @@ cargo +nightly fmt --all --check
cargo +nightly fmt --all
```

Windows 构建用户请查看 [Windows 构建指南](docs/installation/windows.md) 了解 OpenSSL 配置
Windows 安装与 alias 行为请查看[安装文档](docs/installation.zh-CN.md)。

详细贡献指南请参见 [docs/development/contributing.md](docs/development/contributing.md)。

Expand Down
19 changes: 19 additions & 0 deletions docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,25 @@ whole Libra home directory is moved.
The installer does not create a copy, hard link, shell function, or alias in a
profile. `lba` is only the optional filesystem symlink beside `libra`.

## Windows

Run the PowerShell installer from PowerShell:

```powershell
irm https://download.libra.tools/install.ps1 | iex
```

It installs `libra.exe` in `%USERPROFILE%\.libra\bin`, adds that directory to
the user PATH, and creates the optional `lba.cmd` shim. The shim resolves
`libra.exe` beside itself, so moving the `.libra` directory keeps both commands
working. Re-running the same version repairs a missing or Libra-managed shim
without replacing the binary.

Use `-NoAlias`, `LIBRA_NO_ALIAS=1`, or `-NoModifyPath` for opt-out behavior.
`-Uninstall` removes only the Libra-managed binary, shim, marker, and PATH
entry; existing user-owned `lba.*` files are preserved. The installer accepts
`-Version <VERSION>`, `-Dir <PATH>`, and `-BaseUrl <URL>` for scripted installs.

## Opting out

Use the flag for one invocation:
Expand Down
17 changes: 17 additions & 0 deletions docs/installation.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,23 @@ curl -fsSL https://download.libra.tools/install.sh | sh
安装器不会创建二进制副本、hard link、shell function 或 profile alias。`lba` 只是
`libra` 旁的可选文件系统 symlink。

## Windows

在 PowerShell 中运行:

```powershell
irm https://download.libra.tools/install.ps1 | iex
```

安装器把 `libra.exe` 放到 `%USERPROFILE%\.libra\bin`,加入当前用户的 PATH,
并创建可选的 `lba.cmd` shim。shim 总是调用自身旁边的 `libra.exe`,因此移动整个
`.libra` 目录后两个命令仍然有效。重复安装同一版本时,会修复缺失或由 Libra
管理的 shim,而不会替换二进制文件。

可使用 `-NoAlias`、`LIBRA_NO_ALIAS=1` 或 `-NoModifyPath` 关闭对应行为。`-Uninstall`
只删除 Libra 管理的二进制、shim、标记文件和 PATH 项;已有的用户 `lba.*` 文件会
保留。脚本安装支持 `-Version <VERSION>`、`-Dir <PATH>` 和 `-BaseUrl <URL>`。

## 关闭 alias

单次调用使用 flag:
Expand Down
Loading
Loading