문서 보기이전 판역링크맨 위로 이 문서는 읽기 전용입니다. 원본을 볼 수는 있지만 바꿀 수는 없습니다. 문제가 있다고 생각하면 관리자에게 문의하세요. {{tag>[npm notion cli api workers]}} ====== ntn ====== Notion CLI. Notion 인증, Workers 배포/운영, Public API 호출을 터미널에서 다룬다. ===== Summary ===== * 공식 패키지명과 실행 파일은 ''ntn''이다. * ''nth''는 다른 npm 패키지이므로 혼동하지 않는다. * 이 페이지는 2026-07-13 기준 npm registry의 ''ntn 0.19.0''과 공식 README를 바탕으로 정리했다. <note important> 사용자가 흔히 ''nth''로 잘못 적지만, 실제 Notion CLI는 ''ntn''이다. </note> ===== Usage ===== <code bash> ntn login ntn workers list ntn workers deploy ntn api ls ntn api v1/pages --spec -X POST ntn files list </code> * ''<color #c3c3c3>**ntn**</color> <color #ff7f27>login</color>'' * ''<color #c3c3c3>**ntn**</color> <color #ff7f27>logout</color>'' * ''<color #c3c3c3>**ntn**</color> <color #ff7f27>workers</color> <color #22b14c>[<switches>...]</color> <color #7092be>COMMAND</color>'' * ''<color #c3c3c3>**ntn**</color> <color #ff7f27>api</color> <color #7092be>PATH</color> <color #22b14c>[<switches>...]</color>'' * ''<color #c3c3c3>**ntn**</color> <color #ff7f27>files</color> <color #7092be>COMMAND</color> <color #22b14c>[<switches>...]</color>'' * ''<color #c3c3c3>**ntn**</color> <color #ff7f27>completions</color> <color #7092be>SHELL</color>'' ===== Install ===== * 공식 README는 macOS/Linux에서 ''curl -fsSL https://ntn.dev | bash'' 설치를 우선 안내한다. * Windows는 ''winget install --exact --id Notion.ntn'' 설치를 안내한다. * npm registry에도 게시되어 있으므로 Node.js 환경에서는 ''npm install -g ntn'' 또는 ''npm exec --yes ntn -- --version'' 형태를 검토할 수 있다. ===== Options ===== * ''<color #22b14c>**-X**</color>'', ''<color #22b14c>**--method**</color>'': ''ntn api''에서 HTTP method를 강제한다. * ''<color #22b14c>**-d**</color>'', ''<color #22b14c>**--data**</color>'': ''ntn api'' 요청 본문을 직접 JSON으로 넣거나 ''@path'' 파일 입력을 사용한다. * ''<color #22b14c>**--spec**</color>'': 선택한 API path의 스펙을 확인한다. * ''<color #22b14c>**--docs**</color>'': 선택한 API path의 문서를 연다. ===== Examples ===== <code bash> ntn login ntn logout ntn workers --help ntn workers list ntn workers deploy ntn api ls ntn api v1/pages --spec -X POST ntn api v1/pages --docs -X POST ntn api v1/pages -d '{"parent":{"page_id":"abc123"}}' ntn api v1/pages parent[page_id]=abc123 ntn api v1/pages archived:=true properties[count]:=10 ntn api v1/users page_size==100 Accept:application/json ntn files create < file.png ntn files create --external-url https://example.com/photo.png ntn files get <upload-id> ntn files list </code> ===== Config ===== * 초기 인증은 ''ntn login''으로 시작한다. * shell completion은 ''ntn completions powershell'' 같은 하위 명령으로 설정한다. * ''ntn api''는 header, query param, inline JSON body를 한 줄 문법으로 받을 수 있다. * 요청 본문 입력은 stdin JSON, ''--data'', inline body field 중 하나만 사용한다. ===== Troubleshooting ===== * ''nth''를 설치했다면 Notion CLI가 아니다. ''npm uninstall -g nth'' 뒤에 ''ntn'' 기준으로 다시 확인한다. * ''ntn api'' 요청에서 body source를 여러 방식으로 섞으면 충돌할 수 있으므로 한 가지 방식만 쓴다. * file upload는 성공 시 조용히 끝날 수 있다. TTY가 아니면 진행 표시가 보이지 않을 수 있다. * Workers 중심 도구이므로 일반적인 Notion page 작성 도구로 기대하면 기능 범위가 다를 수 있다. ===== Compatibility ===== * npm 최신 버전: ''0.19.0'' (2026-07-09 게시) * registry 메타데이터 기준 지원 OS: ''darwin'', ''linux'', ''win32'' * registry 메타데이터 기준 지원 CPU: ''arm64'', ''x64'' * 문서 기준 설치 경로는 curl 설치와 Winget 설치가 우선이며, npm 패키지는 배포 채널 중 하나로 본다. ===== Deprecated / Legacy ===== * 현재 확인한 자료에서는 뚜렷한 deprecated 서브커맨드는 찾지 못했다. * 다만 설치 방식은 공식 README 기준으로 npm보다 ''https://ntn.dev'' 또는 Winget 안내가 더 전면에 있다. ===== Related ===== * 인증: ''ntn login'', ''ntn logout'' * Workers 운영: ''ntn workers list'', ''ntn workers deploy'' * Public API 호출: ''ntn api ls'', ''ntn api v1/pages'' * 파일 업로드: ''ntn files create'', ''ntn files list'' ===== Help ===== ++++ ntn --help | <code text> Local help output was not captured in this workspace because the ntn binary is not installed here. Use the following entrypoints from the official README until live help is captured: ntn login ntn workers --help ntn api ls ntn files list </code> ++++ ===== See Also ===== * [[notion:ko|Notion]] * [[node.js:npm|npm]] ===== History ===== * codex:: 2026-07-13 Created the ntn command page from the official Notion CLI npm package and README. /home/u613600155/domains/cli.zerotymer.net/public_html/data/pages/npm/ntn.txt 마지막으로 수정됨: 2026/07/13 13:06저자 127.0.0.1