---
title: "CLI"
description: "TwexAPI CLI로 트윗 검색, 팔로워 내보내기, DM, X Articles 및 터미널 X API 자동화를 사용합니다."
---

애플리케이션 코드 없이 결정적 터미널 명령, JSON 출력, dry-run 미리보기, 저장된 자격 증명 프로필이 필요한 TwexAPI REST 워크플로에는 CLI를 사용하세요.

| CLI 작업 | 명령 | 저장 |
| -------- | ------------------------ | ------------ |
| 트윗 검색 | `x-api-scraper search tweets` | cursor |
| 프로필 읽기 | `x-api-scraper about` | `screen_name` |
| 팔로워 목록 | `x-api-scraper followers` | cursor |

## 설치

```bash
npm install -g @twexapi-dev/x-api-scraper-cli
x-api-scraper --help
```

Node.js 18 이상이 필요합니다.

소스: [twexapi-dev/x-api-scraper-cli](https://github.com/twexapi-dev/x-api-scraper-cli)

## 인증

[TwexAPI 대시보드](https://twexapi.io/dashboard)에서 API 키를 받으세요.

```bash
export X_API_SCRAPER_KEY="YOUR_API_KEY"

x-api-scraper auth apps add --name prod --api-key "YOUR_API_KEY"
x-api-scraper auth apps use prod
x-api-scraper --app prod about elonmusk
```

## 기본 예제

```bash
# Lookup users
x-api-scraper --app prod users elonmusk sama

# Search tweets
x-api-scraper --app prod search tweets "founder" "ai" --sort Latest

# List followers (v3)
x-api-scraper --app prod followers elonmusk

# Global trending tweets
x-api-scraper --app prod trending tweets --country "United States" --topic "Sports" --count 50
```

## 원시 API 요청

TwexAPI 경로를 직접 호출합니다.

```bash
x-api-scraper --app prod /twitter/elonmusk/about
x-api-scraper --app prod -X POST -d '["elonmusk","sama"]' /twitter/users
```

## 스킬로 사용

GitHub 스킬 설치 프로그램에서 설치합니다.

```bash
npx skills add twexapi-dev/x-api-scraper-cli
```

또는 ClawHub에서 설치합니다.

```bash
npx clawhub@latest install x-api-scraper-cli
```

## 보안 참고

- CLI는 환경에서 `X_API_SCRAPER_KEY`, `X_API_SCRAPER_BASE_URL`, `X_API_SCRAPER_CONFIG_DIR`을 읽습니다.
- 저장된 앱 구성 및 프로필은 기본적으로 `~/.x-api-scraper/config.json`에 일반 JSON으로 저장됩니다.
- 에이전트 워크플로에서 쓰기 작업 전에 `--dry-run`을 사용하세요.

## 참고 자료

* [SDKs overview](/sdks)
* [Authentication](/authentication)
* [MCP Server](/mcp/overview)
* [Agent MCP Handoff](/mcp/agent-handoff)
* [Advanced Twitter Search](/api-reference/search-endpoints/get-data-page-twitter-advanced-search-page-post)
* [Source Repository](https://github.com/twexapi-dev/x-api-scraper-cli)
