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

# CLI 개요

> Tiro AI 노트와 트랜스크립트를 위한 에이전트 우선 커맨드라인.

Tiro CLI는 npm에 [`@theplato/tiro-cli`](https://www.npmjs.com/package/@theplato/tiro-cli)로 배포돼요. MCP 서버가 노출하는 것과 동일한 Tiro API를 노출하지만, 파일시스템 위주의 워크플로, 셸 파이프라인, 그리고 MCP에 닿을 수 없는 모든 환경(CI, cron, 임시 에이전트 실행)에 맞게 최적화돼 있어요.

[![npm version](https://img.shields.io/npm/v/@theplato/tiro-cli)](https://www.npmjs.com/package/@theplato/tiro-cli)
[![Node.js](https://img.shields.io/node/v/@theplato/tiro-cli)](https://nodejs.org)

## 빠른 설치

<CodeGroup>
  ```bash npm theme={"system"}
  npm install -g @theplato/tiro-cli
  ```

  ```bash pnpm theme={"system"}
  pnpm add -g @theplato/tiro-cli
  ```

  ```bash yarn theme={"system"}
  yarn global add @theplato/tiro-cli
  ```

  ```bash bun theme={"system"}
  bun add -g @theplato/tiro-cli
  ```
</CodeGroup>

```bash theme={"system"}
tiro auth login                                 # browser opens; OAuth + PKCE
tiro notes search "Q3 Planning" --since 7d --json
```

## 어떤 surface를 언제 쓸까

|            | **REST API** | **MCP server**          | **CLI**                 |
| ---------- | ------------ | ----------------------- | ----------------------- |
| 대상         | 서비스, 통합      | MCP를 인식하는 AI 클라이언트      | 셸, CI, 임시 에이전트          |
| 결과가 도착하는 곳 | 내 코드         | 에이전트 **context window** | **파일시스템** 또는 stdout 파이프 |
| 세션당 토큰 비용  | 요청당          | 수천(tool schema)         | 수십(호출당)                 |
| 가장 잘 맞는 용도 | 서비스 간 트래픽    | 작은 읽기, 멀티턴 추론           | 대량 export, 파일 작업, 스크립팅  |
| 발견 방법      | OpenAPI      | MCP `list_tools`        | `tiro --help`           |

세 surface는 동일한 OAuth provider와 JWT audience를 공유하므로, 하나를 위해 발급된 자격 증명은 나머지에서도 동작해요. [Authentication](/ko/developers/fundamentals/authentication)을 참고하세요.

<Note>
  CLI는 **MCP 서버를 대체하지 않아요**. 같은 데이터를 다른 surface로,
  파일시스템 위주이면서 셸에 native한 워크플로에 맞게 최적화한 것이에요.
  대화 안에서 주로 노트를 읽고 추론하는 Claude Desktop / Cursor / Code
  에이전트라면 MCP가 여전히 더 잘 맞아요. 결과를 디스크나 파이프로
  받고 싶을 때 CLI를 쓰세요.
</Note>

## 무엇을 얻나요

* **Auth**: `tiro auth login | status | logout` — loopback redirect를 쓰는 OAuth Authorization Code + PKCE, 토큰은 OS Keychain에 저장돼요.
* **Notes**: `tiro notes list | search | get | transcript` — MCP의 `list_notes` / `search_notes` / `get_note` / `get_note_transcript`와 동일한 surface를 다뤄요.
* **Wiki**: `tiro wiki workspaces | search | page | mentions | graph` — 자동으로 추출된 knowledge graph를 읽어요. `--workspace <guid>`로 특정 워크스페이스를 지정해요. 유료/opt-in이고, MCP 위키 도구를 그대로 미러링해요.
* **MCP-shape JSON**: `tiro notes transcript --format json`은 MCP `get_note_transcript` payload를 그대로 미러링해요. 기존 MCP 파서를 그대로 재사용하세요.
* **파일 출력**: 모든 조회 명령은 `--output <path>`를 지원하므로 실제 콘텐츠는 디스크로 가고 stdout은 메타데이터 한 줄로 줄어들어요. 에이전트 context window를 가볍게 유지하는 데 중요해요.
* **안정적인 에러 envelope**: 모든 에러는 문서화된 exit code와 함께 `{ ok: false, error: { code, message, suggestion?, errorType?, httpStatus?, requestId? } }`를 반환해요.

## 아키텍처

```
                       Tiro Backend — /v1/external/* + /v1/mcp/*
                              │
       ┌──────────────────────┼──────────────────────┐
       ▼                      ▼                      ▼
  ┌──────────┐         ┌──────────────┐       ┌──────────────┐
  │ REST     │         │ MCP server   │       │ CLI          │
  │ clients  │         │ (uniform     │       │ (filesystem, │
  │          │         │  shape)      │       │  bulk, pipe) │
  └──────────┘         └──────────────┘       └──────────────┘
```

## 로드맵

* ✅ **0.1** — auth(login / status / logout)와 `--help`.
* ✅ **0.2** — notes 코어(list / search / get / transcript) 및 MCP-shape transcript JSON, 파싱된 예제, 첫 테스트 스위트.
* ✅ **0.3** — 패키지 위생(whitelist publish, sourcemap 제거), `tiro mcp info` / `tiro mcp install`, `AGENTS.md` 동봉, 문단 단위 transcript timestamp + `--no-timestamps`, 재설계된 OAuth callback 페이지.
* ⏳ **0.4** — `notes export`(대량 → directory + manifest), templates, share-links, folders, `tiro schema` self-describe.
* ⏳ **1.0** — 안정 버전. 공개 라이선스, Homebrew tap, 자동 publish.

→ 설치와 인증을 진행하려면 [Setup](/ko/developers/cli/setup)으로 이어가세요.

## 링크

* npm: [npmjs.com/package/@theplato/tiro-cli](https://www.npmjs.com/package/@theplato/tiro-cli)
* GitHub: [github.com/plato-corp/tiro-cli](https://github.com/plato-corp/tiro-cli)
* Changelog: [CHANGELOG.md](https://github.com/plato-corp/tiro-cli/blob/main/CHANGELOG.md)
* Issues: [github.com/plato-corp/tiro-cli/issues](https://github.com/plato-corp/tiro-cli/issues)
