# 使用 Homebrew, apt, dnf, MacPorts, Nix, zypper 安装 osc

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

## 安装

```sh
sudo av install brew:osc
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install osc
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install osc
```

  证据: MacPorts ports tree: devel/osc/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- Debian apt (92%):

```sh
sudo apt install osc
```

  证据: Debian stable package indexes: osc from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- dnf (92%):

```sh
sudo dnf install osc
```

  证据: Fedora Rawhide package metadata: osc from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#osc
```

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

- zypper (92%):

```sh
sudo zypper install osc
```

  证据: openSUSE Tumbleweed package metadata: osc from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst

## 软件包事实

- **软件包键:** brew:osc
- **软件包管理器:** Homebrew
- **版本:** 1.27.2
- **来源摘要:** Command-line interface to work with an Open Build Service
- **主页:** <https://openbuildservice.org>
- **仓库:** <https://github.com/openSUSE/osc>
- **最后更新:** 2026-07-02T12:53:46Z
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- git-obs (别名)
- git-osc-precommit-hook (别名)
- osc (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

osc, the openSUSE Commander, is the command-line client for Open Build Service. It gives packagers and release engineers a Subversion-like working-copy interface for OBS projects, packages, metadata, build results, and submit workflows.

### 项目历史

GitHub records openSUSE/osc as created on 2011-09-23, but the tool's history is tied to the longer-running Open Build Service packaging workflow. The README identifies osc as the command-line interface to OBS and documents installation from openSUSE:Tools, from Git, and as Python-built artifacts.

The openSUSE wiki describes osc as written in Python and usable both as a command-line interface and as a Python module. It also characterizes the client as having network behavior in the style of Subversion, which explains its checkout/update/commit vocabulary and its fit for package source trees.

### 采用历史

osc is part of the working culture around OBS: the official OBS user guide tells users to install osc from their distribution or from openSUSE:Tools, and notes availability for distributions including CentOS, Debian, Fedora, SLE, and openSUSE. Homebrew and other package managers also package it, which makes the tool reachable outside openSUSE systems.

Its adoption is less about casual CLI popularity and more about being the standard local tool for an OBS-backed packaging workflow. Packagers use it to manage package sources, trigger builds, inspect logs, and submit changes to projects served by OBS instances.

### 使用方式

Typical osc workflows include listing projects and packages, checking out package sources, updating local working copies, committing changes, viewing diffs, querying build results, reading build logs, editing metadata, and running local builds. The README's examples include osc ls, osc co, osc up, osc ci, osc diff, osc results, osc log, osc meta, and osc build.

First-time configuration stores credentials in ~/.config/osc/oscrc, with optional keyring integration. That config location matters because osc is both a package-management workflow tool and a credentialed API client for OBS.

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

osc is important to package nerds because it is a CLI frontend to a multi-distribution build farm. It bridges source package maintenance, metadata, repository targets, build logs, submit requests, and local build reproduction in one command namespace.

The package also shows how distro tooling differs from application package managers: osc is not resolving app dependencies for one project, it is operating against remote build infrastructure that produces RPMs and other distribution artifacts across targets.

### 时间线

- 2011-09-23: GitHub repository created.
- The OBS user guide documents osc as the command-line tool for working with Open Build Service.
- The openSUSE wiki documents osc's Python implementation, Subversion-style network behavior, and role as client for OBS source repositories.

### Related projects

- Open Build Service is the server-side build and repository platform. The openSUSE:Tools repository distributes osc packages for users who want stable packaged builds, while OBS:Server:Unstable carries builds from the development branch.

### 来源

- <https://api.github.com/repos/openSUSE/osc>
- <https://en.opensuse.org/openSUSE:OSC>
- <https://formulae.brew.sh/formula/osc>
- <https://github.com/openSUSE/osc>
- <https://openbuildservice.org/help/manuals/obs-user-guide/cha-obs-osc>
- <https://raw.githubusercontent.com/openSUSE/osc/master/README.md>


## 安全说明

没有找到 osc 的匹配本地密钥处理 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: ~/.config/osc/oscrc, ~/.oscrc

## Credential files

- Unix: ~/.config/osc/oscrc, ~/.oscrc
## 其他软件包管理器记录

- Debian apt - osc - 1.12.1-2: normalized package name match | Debian stable package indexes: osc from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Open Build Service commander | https://en.opensuse.org/openSUSE:OSC
- Nix - osc: normalized package name match | nixpkgs package indexes: pkgs/by-name/os/osc/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - osc - 0.169.1-2: normalized package name match | Ubuntu 24.04 LTS package indexes: osc from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Open Build Service commander | http://en.opensuse.org/openSUSE:OSC
- dnf - osc - 1.27.2-481.2.2.fc45: normalized package name match | Fedora Rawhide package metadata: osc from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Open Build Service Commander | https://github.com/openSUSE/osc
- zypper - osc - 1.27.2-1.2: normalized package name match | openSUSE Tumbleweed package metadata: osc from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Command-line client for the Open Build Service | https://github.com/openSUSE/osc
- MacPorts - osc: normalized package name match | MacPorts ports tree: devel/osc/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## Combined YAML source

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