# 使用 Homebrew, Nix, pacman, scoop 安装 codesnap

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

## 安装

```sh
sudo av install brew:codesnap
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install codesnap
```

  证据: local Homebrew formula metadata

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#codesnap
```

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

- pacman (92%):

```sh
sudo pacman -S codesnap
```

  证据: Arch Linux sync databases: codesnap from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

### Windows

- Scoop (92%):

```sh
scoop install extras/codesnap
```

  证据: Scoop official bucket manifest trees: bucket/codesnap.json from https://api.github.com/repos/ScoopInstaller/Extras/git/trees/master?recursive=1

## 软件包事实

- **软件包键:** brew:codesnap
- **软件包管理器:** Homebrew
- **版本:** 0.13.4
- **来源摘要:** Generates code snapshots in various formats
- **主页:** <https://codesnap-docs.netlify.app/>
- **仓库:** <https://github.com/codesnap-rs/codesnap>
- **最后更新:** 2026-06-15T10:20:13-04:00
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- codesnap (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

CodeSnap is a Rust command-line tool and library for rendering code snippets into visual snapshots such as PNG, SVG, HTML, and text-style outputs.

### 项目历史

The project README describes CodeSnap as a pure Rust renderer that generates snapshots through a graphics engine rather than network or browser-based rendering. It provides both a CLI and a Rust library API.

### 采用历史

Distribution has spread through Rust and system package channels: the README documents Cargo installation, precompiled binary installation, Homebrew, Nix/NixOS, and Arch Linux packaging, while source_facts also lists Scoop packaging.

### 使用方式

Users run codesnap against a source file to generate an output image or use the Rust library builder API inside another project. The tool supports themes, line numbers, watermarks, backgrounds, scaling, breadcrumbs, clipboard integration, and multiple output formats.

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

For package-manager users, CodeSnap is a compact example of a modern Rust CLI that turns a social or documentation task into a local, reproducible binary. Its significance is strongest in the cross-packaging story: Cargo, Homebrew, Nix, Arch, and Scoop all make it reachable without a web app.

### 时间线

- 2020s: Project develops as a Rust CLI and library for code snapshots.
- 2020s: README documents Cargo, Arch Linux, Nix/NixOS, and Homebrew installation paths.
- 2026: Homebrew formula distributes CodeSnap 0.13.4.

### Related projects

- Related projects include syntect for syntax highlighting, Sublime Text syntax definitions and themes, Rust Cargo packaging, and web/editor tools that create code images for documentation or social sharing.

### 来源

- <https://github.com/codesnap-rs/codesnap>
- <https://codesnap-docs.netlify.app/>
- <https://formulae.brew.sh/api/formula/codesnap.json>


## 安全说明

narrow executable package without higher-risk signals.

- **Geiger 风险:** 绿色 / 低
- narrow executable package without higher-risk signals

## 其他软件包管理器记录

- Nix - codesnap: normalized package name match | nixpkgs package indexes: pkgs/by-name/co/codesnap/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- pacman - codesnap - 0.13.4-1: normalized package name match | Arch Linux sync databases: codesnap from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | Pure Rust tool for generating beautiful code snapshots | https://github.com/codesnap-rs/codesnap
- Scoop - extras/codesnap: normalized package name match | Scoop official bucket manifest trees: bucket/codesnap.json from https://api.github.com/repos/ScoopInstaller/Extras/git/trees/master?recursive=1


## Combined YAML source

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


## 来源

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