> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lexq.io/llms.txt
> Use this file to discover all available pages before exploring further.

# 설치 & 인증

> LexQ CLI를 설치하고 API 키를 설정하세요.

## 요구사항

* **Node.js** 18 이상
* API 키가 있는 활성 LexQ 계정

## 설치

<CodeGroup>
  ```bash npm (글로벌) theme={null}
  npm install -g @lexq/cli
  ```

  ```bash npx (설치 없이) theme={null}
  npx @lexq/cli groups list
  ```

  ```bash pnpm theme={null}
  pnpm add -g @lexq/cli
  ```
</CodeGroup>

확인: `lexq --version`

## 인증

### 1단계: API 키 발급

콘솔 → **관리 → API 키 → 새 키 생성** → 키 복사 (`lexq_us_xxxxxxxxxxxxx`)

### 2단계: 로그인

```bash theme={null}
lexq auth login
# Enter your API Key: lexq_us_xxxxxxxxxxxxx
```

키는 `~/.lexq/config.json`에 저장됩니다.

### 3단계: 확인

```bash theme={null}
lexq auth whoami
```

## 설정

`~/.lexq/config.json`:

```json theme={null}
{
  "apiKey": "lexq_us_xxxxxxxxxxxxx",
  "baseUrl": "https://api.lexq.io/api/v1/partners",
  "format": "json"
}
```

## 전역 옵션

| 플래그                      | 설명                 |
| ------------------------ | ------------------ |
| `--format <json\|table>` | 출력 형식 (기본: `json`) |
| `--api-key <key>`        | API 키 오버라이드        |
| `--base-url <url>`       | API URL 오버라이드      |
| `--dry-run`              | HTTP 요청 미리보기       |
| `--verbose`              | 전체 요청/응답 표시        |
| `--no-color`             | 색상 비활성화            |

<Tip>
  **AI 에이전트:** 항상 `--format json`을 사용하세요. `--format table`은 사람이 읽을 때만 사용합니다.
</Tip>

## 다음 단계

<CardGroup cols={2}>
  <Card title="명령어 레퍼런스" icon="terminal" href="/ko/cli/commands">
    전체 명령어.
  </Card>

  <Card title="MCP 서버" icon="plug" href="/ko/cli/mcp-server">
    AI 에이전트 연동.
  </Card>
</CardGroup>
