# 使用 Homebrew, Nix, pacman 安装 cargo-clone

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

## 安装

```sh
sudo av install brew:cargo-clone
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install cargo-clone
```

  证据: local Homebrew formula metadata

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#cargo-clone
```

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

- pacman (92%):

```sh
sudo pacman -S cargo-clone
```

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

## 软件包事实

- **软件包键:** brew:cargo-clone
- **软件包管理器:** Homebrew
- **版本:** 1.2.4
- **来源摘要:** Cargo subcommand to fetch the source code of a Rust crate
- **主页:** <https://github.com/JanLikar/cargo-clone>
- **仓库:** <https://github.com/JanLikar/cargo-clone>
- **最后更新:** 2026-06-22T14:02:57-07:00
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- cargo-clone (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

cargo-clone is a small Cargo subcommand that downloads the source code of crates from a registry. It fills a simple inspection gap: getting a crate's packaged source without manually navigating registry storage or repository metadata.

### 项目历史

The GitHub repository was created in January 2016, early in Cargo's third-party subcommand culture. The README positions cargo-clone as a way to fetch Rust crate source from a registry and, optionally, clone the upstream git repository recorded in crate metadata.

### 采用历史

cargo-clone is a niche utility rather than a broad platform component. Its adoption is visible through crates.io publication and packaging in Homebrew, Nix, and pacman, mostly serving developers who inspect crate contents or reproduce package sources.

### 使用方式

Users run commands such as `cargo clone serde` or append a version requirement such as `cargo clone cargo-clone@1.0.0`. With `--git`, the tool uses the repository URL from crate metadata and delegates to git clone.

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

The tool matters to package nerds because it distinguishes registry source from repository source. That distinction is central to auditing Rust packages: the code published to crates.io is the artifact Cargo actually builds.

### 时间线

- 2016: GitHub repository created.
- 2016: First crates.io publication recorded for cargo-clone.
- 2025: crates.io metadata shows continued updates, with version 1.2.4 current by the sampled registry data.

### Related projects

- Cargo provides the external subcommand mechanism that lets `cargo clone` dispatch to cargo-clone.
- crates.io is the registry source that cargo-clone queries and downloads from.
- git is used when users choose the README-documented `--git` path.

### 来源

- <https://api.github.com/repos/JanLikar/cargo-clone>
- <https://crates.io/api/v1/crates/cargo-clone>
- <https://github.com/JanLikar/cargo-clone#readme>


## 安全说明

narrow executable package without higher-risk signals.

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

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

- Nix - cargo-clone: normalized package name match | nixpkgs package indexes: pkgs/by-name/ca/cargo-clone/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- pacman - cargo-clone - 1.2.4-2: normalized package name match | Arch Linux sync databases: cargo-clone from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | A cargo subcommand to fetch the source code of a Rust crate | https://github.com/JanLikar/cargo-clone


## Combined YAML source

View the package source record on GitHub. [combined/cargo-clone.yml](https://github.com/mxcl/pkgdb/blob/main/combined/cargo-clone.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
