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

# nora pipelines

> 터미널에서 Foundry 데이터 파이프라인 — 노드, 엣지, 스케줄, 배포, 실행, 로그.

파이프라인이 Foundry 표면: 인제스트, 클린, 청크, 강화, 인덱스. CLI 가 시각적 캔버스 미러 — 모든 노드, 모든 엣지, 모든 스케줄 실행이 스크립트 가능.

파이프라인 라이프사이클이 `flows` 다음으로 큰 CLI 표면 — Flow 에는 `flows use`, 파이프라인은 ID 로 별도 참조 계획.

## 명령 그룹

* **CRUD**: `pipelines list/get/create/update/delete`
* **노드**: `pipelines nodes add/list/update/remove`
* **엣지**: `pipelines edges connect/list/update/delete`
* **스케줄**: `pipelines schedule set/clear`
* **실행**: `pipelines dry-run`, `pipelines run file/document/folder`
* **블록**: `pipelines blocks test/ingest-local`
* **배포**: `pipelines publish/rollback`, `pipelines publications list/live`
* **로그**: `pipelines logs list/get`
* **벌크**: `pipelines sync`
* **클라우드 인제스트**: `pipelines ingest-cloud`

## 파이프라인 CRUD

### List / get

```bash theme={null}
nora pipelines list
nora pipelines get p_billing_ingest
```

`list` 가 파이프라인당 로우 하나. `get` 이 전체 메타데이터와 노드·엣지 인쇄.

### Create

```bash theme={null}
nora pipelines create \
  --name "Billing ingest" \
  --stages source,clean,chunk,enrich,output \
  --vector-store qdrant
```

플래그:

* `--name` (필수) — 표시 이름.
* `--stages` (필수) — 순서대로 스테이지 이름 comma 목록.
* `--id <id>` — 옵션 명시 ID; 아니면 서버가 발행.
* `--vector-store pgvector|qdrant` — 출력 스테이지의 인덱스 백엔드.

### Update

```bash theme={null}
nora pipelines update p_billing_ingest \
  --set-name "Billing ingest (v2)" \
  --set-vector-store qdrant
```

* `--set-name <n>`, `--set-stages <s,…>`, `--set-vector-store <backend>`.

### Delete

```bash theme={null}
nora pipelines delete p_billing_ingest
```

노드와 엣지 cascade. 라이브 파이프라인 버전이 ID 로 유예 기간 동안 접근 가능.

## 노드

노드가 파이프라인 캔버스의 개별 블록 — 각 팔레트 항목 (`src_local`, `chunk_markdown`, `embed_openai` 등) 이 노드 인스턴스 됨.

### List

```bash theme={null}
nora pipelines nodes list p_billing_ingest
```

모든 노드를 JSON 으로 인쇄.

### Add

```bash theme={null}
nora pipelines nodes add p_billing_ingest \
  --palette-id chunk_markdown \
  --stage chunk \
  --title "Chunk markdown" \
  --icon scissors \
  --tone default \
  --order 2 \
  --config '{"max_tokens": 400, "overlap": 50}'
```

플래그:

* `--palette-id` (필수) — 팔레트 항목 ID.
* `--stage` (필수) — 어느 파이프라인 스테이지.
* `--title`, `--icon`, `--tone` (필수) — 표시.
* `--order` (필수) — 스테이지 안 시각 순서.
* `--id <id>` — 명시 ID; 생략하면 서버 발행.
* `--sublabel <text>` — 제목 아래 작은 캡션.
* `--config <json>` — 블록 특화 설정.
* `--notes <text>` — 자유 텍스트 노트.
* `--output-ports <json>` — 팔레트의 기본 출력 포트 오버라이드.

### Update

```bash theme={null}
nora pipelines nodes update n_chunk \
  --set-config '{"max_tokens": 600, "overlap": 100}' \
  --set-title "Chunk (더 길게)"
```

`--set-*` 플래그: `--set-title`, `--set-sublabel`, `--clear-sublabel`, `--set-stage`, `--set-order`, `--set-config`, `--set-notes`, `--clear-notes`, `--set-output-ports`.

### Remove

```bash theme={null}
nora pipelines nodes remove n_chunk
```

## 엣지

### List / connect / update / delete

```bash theme={null}
nora pipelines edges list p_billing_ingest
nora pipelines edges connect p_billing_ingest --from-node-id n_source --to-node-id n_chunk
nora pipelines edges update e_abc --set-label "raw markdown"
nora pipelines edges delete e_abc
```

connect 플래그: `--from-node-id`, `--to-node-id` (필수), `--id <id>`, `--from-port <port>`, `--label <text>`.

## 스케줄

### Set

```bash theme={null}
nora pipelines schedule set p_billing_ingest \
  --cron "0 2 * * *" \
  --tz Asia/Seoul \
  --target billing \
  --sample 100
```

* `--cron <expr>` — 5필드 cron.
* `--tz <IANA>` — 타임존.
* `--target <tag>` — 각 실행에서 처리할 폴더 태그.
* `--sample <n>` — 스케줄 실행당 항목 캡.

넘긴 플래그만 변경. `--cron` 생략하면 현재 것 유지, 예: 타겟만 변경.

### Clear

```bash theme={null}
nora pipelines schedule clear p_billing_ingest
```

모든 스케줄 필드 지움 — 파이프라인이 수동 전용 됨.

## 파이프라인 실행

### 인라인 텍스트에 대한 dry-run

```bash theme={null}
nora pipelines dry-run p_billing_ingest --input "이건 테스트 문서."
# 또는 파일에서:
nora pipelines dry-run p_billing_ingest --input @sample.md
# 또는 stdin 에서:
cat sample.md | nora pipelines dry-run p_billing_ingest --input -
```

주어진 텍스트에 파이프라인을 엔드투엔드 실행, 출력 지속 없음. 스테이지별 결과 인쇄.

### 파일에 대한 실행

```bash theme={null}
nora pipelines run file p_billing_ingest --file ./contract.pdf
```

파일 multipart 업로드하고 파이프라인 실행.

### 저장된 문서에 대한 실행

```bash theme={null}
nora pipelines run document p_billing_ingest --document-id doc_abc
```

이미 라이브러리에 있는 문서에 대해 실행.

### 폴더에 대한 실행

```bash theme={null}
nora pipelines run folder p_billing_ingest --tag billing --max-documents 500
```

`billing` 태그된 모든 문서에 대해 실행 (`--max-documents` 까지).

## 단일 블록 테스트

```bash theme={null}
nora pipelines blocks test \
  --palette-id chunk_markdown \
  --input "# 헤딩\n\n일부 콘텐츠..." \
  --config '{"max_tokens": 200}'
```

한 팔레트 블록을 격리하여 테스트 — 파이프라인 불필요. 청커나 강화기 설정 반복 시 유용.

실행 중 파이프라인의 `src_local` 노드용:

```bash theme={null}
nora pipelines blocks ingest-local n_source
```

로컬 파일시스템 스캔 킥오프.

## 파이프라인 배포

파이프라인이 Flow 처럼 버전 관리·배포.

### Publish

```bash theme={null}
nora pipelines publish p_billing_ingest \
  --summary "chunker: max_tokens 400 -> 600" \
  --author-label "paul"
```

DRAFT 를 라이브 버전으로 얼림. 스케줄 실행과 하류 소비자가 라이브 버전 사용.

### Rollback

```bash theme={null}
nora pipelines rollback p_billing_ingest 5
```

라이브 포인터를 버전 `seq=5` 로 플립.

### Publications

```bash theme={null}
nora pipelines publications list p_billing_ingest
nora pipelines publications live p_billing_ingest
```

`list` 가 이력 표시. `live` 가 현재 라이브 페이로드 fetch.

## 로그

### 실행 나열

```bash theme={null}
nora pipelines logs list p_billing_ingest \
  --status ok \
  --since 2026-07-01 \
  --limit 20
```

필터:

* `--status ok|error`
* `--search <text>` — 로그 페이로드에 대한 전문.
* `--since <ISO>` / `--until <ISO>`
* `--run-kind <kind>` — 어느 진입점으로 필터.
* `--limit <n>` — 최대 로우.
* `--json` — 기계 읽기 가능.

### 하나 가져오기

```bash theme={null}
nora pipelines logs get p_billing_ingest log_abc
```

한 실행의 전체 스테이지별 세부.

## 벌크 sync

```bash theme={null}
nora pipelines sync p_billing_ingest --file ./pipelines/billing.json
```

JSON 파일에서 파이프라인의 이름·스테이지·노드·엣지 교체. 멱등 — 매 배포에 CI 에서 실행 안전.

## 클라우드 인제스트

```bash theme={null}
nora pipelines ingest-cloud p_billing_ingest n_gdrive_source
```

`src_cloud` 노드 (Google Drive, S3 등) 용 수동 벌크 인제스트 킥오프. 아니면 스케줄로만 실행.

## 레시피

### 한 스크립트에서 최소 파이프라인 부트스트랩

```bash theme={null}
P=$(nora pipelines create --name "Docs ingest" --stages source,chunk,enrich,output | jq -r '.id')

nora pipelines nodes add $P --palette-id src_local --stage source --title "Local" --icon folder --tone default --order 1
nora pipelines nodes add $P --palette-id chunk_markdown --stage chunk --title "Chunk MD" --icon scissors --tone default --order 1
nora pipelines nodes add $P --palette-id embed_openai --stage enrich --title "Embed" --icon spark --tone default --order 1
nora pipelines nodes add $P --palette-id out_pgvector --stage output --title "Index" --icon database --tone default --order 1

# 배선 (노드 ID 필요 — add 에서 캡처)
# ...

nora pipelines publish $P --summary "초기"
```

### CI: git 에서 파이프라인 sync

```bash theme={null}
nora pipelines sync p_docs_ingest --file pipelines/docs.json
nora pipelines publish p_docs_ingest --summary "$(git log -1 --pretty=%s)"
```

### 가장 최근 errored 실행 가져오기

```bash theme={null}
nora pipelines logs list p_billing_ingest --status error --limit 1 --json | jq '.[0]'
```

### 유지보수 위해 스케줄 끄기

```bash theme={null}
nora pipelines schedule clear p_billing_ingest
# 유지보수...
nora pipelines schedule set p_billing_ingest --cron "0 2 * * *" --tz Asia/Seoul --target billing
```
