# 使用 Homebrew, Nix 安装 basedpyright

查看 basedpyright 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:basedpyright
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install basedpyright
```

  证据: local Homebrew formula metadata

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#basedpyright
```

  证据: nixpkgs package indexes: pkgs/by-name/ba/basedpyright/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

## 软件包事实

- **软件包键:** brew:basedpyright
- **软件包管理器:** Homebrew
- **版本:** 1.39.9
- **来源摘要:** Pyright fork with various improvements and built-in pylance features
- **主页:** <https://docs.basedpyright.com>
- **最后更新:** 2026-06-28T03:19:45Z
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- basedpyright (别名)
- basedpyright-langserver (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 1.39.9
## 项目历史与用法

basedpyright is a fork of Microsoft's Pyright type checker and language server for Python. It adds stricter defaults, additional diagnostics, PyPI distribution, version pinning, and reimplemented Pylance features for editors outside VS Code.

### 项目历史

The official documentation describes basedpyright as a Pyright fork with type-checking improvements, Pylance features, and more. Its documentation site and README both point to the GitHub repository and organize the project around benefits over upstream Pyright.

The release stream tracks upstream Pyright closely. The latest documentation canonical URL observed for this batch was v1.39.9, and GitHub release metadata for v1.39.9 names the paired Pyright version as 1.1.411.

### 采用历史

basedpyright is distributed through several developer channels: PyPI, the Visual Studio Marketplace, Open VSX, Sublime Text Package Control, Homebrew, and Nix according to the README badges and input metadata. That spread reflects its role as both a CLI checker and language server.

A major adoption hook is that users can install it from PyPI without Node.js, while the VS Code extension uses the same version to avoid different diagnostics between editor and CLI.

### 使用方式

Users run basedpyright as a command-line type checker or basedpyright-langserver as an editor language server. Configuration follows Pyright-style project configuration in pyrightconfig.json or pyproject.toml.

The docs emphasize stricter defaults, new diagnostic rules, baseline support for adopting those rules in existing projects, and Pylance-like language-server behavior outside Microsoft's closed-source Pylance extension.

### 为什么软件包爱好者会关心

basedpyright is important in package-manager culture because it repackages a Node-centered Python type checker as a Python-installable tool and aligns editor and CLI versions. That solves a real packaging pain point for Python projects that want type checking without a JavaScript toolchain.

It also shows a common modern fork pattern: take a successful corporate-backed open-source core, add stricter defaults and features withheld in a closed extension, and distribute it through every editor/package channel where Python developers already work.

### 时间线

- 2020s: basedpyright forked Pyright to add stricter checks, Pylance-like features, and packaging changes.
- 2020s: Documentation organized a Benefits over Pyright section covering baselines, better defaults, new diagnostics, and language-server improvements.
- 2026: v1.39.9 was published with Pyright 1.1.411 alignment according to GitHub release metadata.

### Related projects

- Pyright is the upstream Microsoft type checker that basedpyright forks.
- Pylance is Microsoft's closed-source VS Code extension whose features basedpyright reimplements for wider editor use.
- Mypy, Pyre, and pytype are related Python static type checkers, but basedpyright's direct lineage is Pyright.

### 来源

- <https://docs.basedpyright.com/latest>
- <https://docs.basedpyright.com/latest/benefits-over-pyright/>
- <https://github.com/DetachHead/basedpyright#readme>
- <https://github.com/DetachHead/basedpyright/releases>
- source_facts.package-manager


## 安全说明

没有找到 basedpyright 的匹配本地密钥处理 manifest。Nucleus 软件包元数据仍在此发布，以便未来覆盖拥有稳定的软件包 URL。



## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Configuration files

- Unix: <project-root>/pyrightconfig.json, <project-root>/pyproject.toml
## 其他软件包管理器记录

- Nix - basedpyright: normalized package name match | nixpkgs package indexes: pkgs/by-name/ba/basedpyright/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1


## Combined YAML source

View the package source record on GitHub. [combined/basedpyright.yml](https://github.com/mxcl/pkgdb/blob/main/combined/basedpyright.yml)


## 来源

- pkg.so package database
- Geiger risk classifier
- curated configuration and credential file locations
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
