# 使用 Homebrew, winget 安装 x-cli

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

## 安装

```sh
sudo av install brew:x-cli
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install x-cli
```

  证据: local Homebrew formula metadata

### Windows

- winget (92%):

```sh
winget install --id XuanyuanLuoxue.XCLI -e
```

  证据: Windows Package Manager source index: XuanyuanLuoxue.XCLI from https://cdn.winget.microsoft.com/cache/source.msix

## 软件包事实

- **软件包键:** brew:x-cli
- **软件包管理器:** Homebrew
- **版本:** 5.0.0
- **来源摘要:** Command-line power tool for Twitter
- **主页:** <https://github.com/sferik/x-cli>
- **仓库:** <https://github.com/sferik/x-cli>
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- x (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

x-cli is Erik Michaels-Ober's command-line client lineage for Twitter, now framed as a command-line interface for the X API. Its history runs through the earlier `t` Ruby CLI, which became a recognizable terminal-first Twitter tool, and the current x-cli repository, which updates the idea for X API authentication and v1.1/v2 API behavior.

### 项目历史

The original project documentation for `t` says it was created after the twitter Ruby gem removed its command-line interface in version 0.5.0. The `t` project was offered as a successor, but as a clean-room implementation containing none of the original CLI code.

The current x-cli README describes the tool as a command-line interface for the X API, with OAuth 1.0a and OAuth 2.0 authentication, v1.1 and v2 API support with fallback behavior, streaming commands, shell completion, and YAML configuration. It also preserves migration behavior from the older ~/.trc profile file to the newer ~/.xrc default.

### 采用历史

The project became popular because it made Twitter scriptable from ordinary shells: posting, listing, searching, following, and account management could be composed with pipes and other Unix tools. The current GitHub repository still shows thousands of stars and hundreds of forks, reflecting its long-lived CLI niche.

### 使用方式

Historically, users ran commands such as `t authorize`, `t update`, `t whois`, and list-management commands after creating Twitter API credentials. The current x-cli command tree focuses on `x` commands for accounts, search, streams, delete/list/set operations, and profile management.

Configuration is part of the project's continuity: the current README states that ~/.xrc is the default profile config, while ~/.trc is read as a fallback and migrated on write. That preserves the older `t` ecosystem while moving the command name and API model toward X.

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

x-cli is package-nerd interesting as a social-network CLI that survived API churn, branding churn, and authentication changes. It is the kind of package users install not for a daemon or library, but to make a web platform automatable from shell scripts.

### 时间线

- twitter gem 0.5.0: The original gem CLI is removed, leading to the separate clean-room `t` project.
- 2010s: `t` becomes a RubyGems-installed Twitter command-line power tool.
- 2020s: The current x-cli repository presents the tool as an X API CLI with OAuth 1.0a/OAuth 2.0 and API v1.1/v2 support.
- Current line: ~/.xrc becomes the default profile config while ~/.trc remains a migration fallback.

### Related projects

- The twitter Ruby gem is the ancestor context for the original CLI removal. The current x-cli README also identifies x-api as the client library layer for HTTP, authentication, and retry primitives.

### 来源

- <https://github.com/sferik/x-cli#readme>
- <https://sferik.github.io/t/>
- <https://sferik.github.io/twitter/>


## 安全说明

narrow executable package without higher-risk signals.

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


## 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: ~/.xrc, ~/.trc
## 其他软件包管理器记录

- winget - XuanyuanLuoxue.XCLI: normalized package name match | Windows Package Manager source index: XuanyuanLuoxue.XCLI from https://cdn.winget.microsoft.com/cache/source.msix


## Combined YAML source

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