{"id":50210453,"url":"https://github.com/phd1000x-ux/nbv","last_synced_at":"2026-05-29T07:18:10.885Z","repository":{"id":357345594,"uuid":"1236482513","full_name":"phd1000x-ux/nbv","owner":"phd1000x-ux","description":"A fast terminal-native Jupyter notebook viewer","archived":false,"fork":false,"pushed_at":"2026-05-21T12:06:26.000Z","size":5652,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-21T15:54:04.577Z","etag":null,"topics":["cli","command-line-tool","data-science","ipynb","jupyter","jupyter-notebook","notebook-viewer","rust","syntax-highlighting","terminal"],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/phd1000x-ux.png","metadata":{"files":{"readme":"README.ko.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-12T09:35:57.000Z","updated_at":"2026-05-21T13:36:27.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/phd1000x-ux/nbv","commit_stats":null,"previous_names":["phd1000x-ux/nbv"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/phd1000x-ux/nbv","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phd1000x-ux%2Fnbv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phd1000x-ux%2Fnbv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phd1000x-ux%2Fnbv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phd1000x-ux%2Fnbv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phd1000x-ux","download_url":"https://codeload.github.com/phd1000x-ux/nbv/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phd1000x-ux%2Fnbv/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33503230,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T03:12:49.672Z","status":"ssl_error","status_checked_at":"2026-05-26T03:12:47.976Z","response_time":63,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","command-line-tool","data-science","ipynb","jupyter","jupyter-notebook","notebook-viewer","rust","syntax-highlighting","terminal"],"created_at":"2026-05-26T04:05:09.179Z","updated_at":"2026-05-26T04:05:09.756Z","avatar_url":"https://github.com/phd1000x-ux.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"assets/banner.png\" alt=\"nbv — 터미널 네이티브 주피터 노트북 뷰어\" width=\"820\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://crates.io/crates/nbv\"\u003e\u003cimg src=\"https://img.shields.io/crates/v/nbv.svg\" alt=\"crates.io\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/phd1000x-ux/nbv/releases\"\u003e\u003cimg src=\"https://img.shields.io/github/v/release/phd1000x-ux/nbv\" alt=\"GitHub release\"\u003e\u003c/a\u003e\n  \u003ca href=\"LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/crates/l/nbv.svg\" alt=\"MIT License\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"README.md\"\u003eEnglish\u003c/a\u003e\n\u003c/p\u003e\n\n터미널에서 바로 보는 빠른 주피터 노트북 뷰어.\n\n브라우저나 JupyterLab, VS Code를 띄우지 않고 `.ipynb` 파일을 터미널에서 그대로 본다. `cat`/`bat` 같은 흐름을 그대로 — 한 번 호출하면 stdout으로 전체 내용을 쏟아내고 끝.\n\n## 데모\n\n```\n$ nbv analysis.ipynb\n┌─ markdown ───────────────────────────────────────────────┐\n│ # Simple Notebook                                        │\n│ A basic test.                                            │\n└──────────────────────────────────────────────────────────┘\n┌─ In [1] ── code (python) ────────────────────────────────┐\n│ x = 1 + 2                                                │\n└──────────────────────────────────────────────────────────┘\n┌─ Out [1] ── text/plain ──────────────────────────────────┐\n│ 3                                                        │\n└──────────────────────────────────────────────────────────┘\n```\n\nGhostty나 iTerm2에서는 matplotlib/seaborn으로 만든 PNG 출력이 셀 안에 인라인으로 그려진다.\n\n## 주요 기능\n\n- **빠르다.** 셀 단위로 stdout flush — 200셀 노트북도 200ms 이내에 끝나고, 첫 셀은 ms 단위로 보인다.\n- **단일 바이너리.** 약 3 MB. 런타임 의존성 없음. 파이썬 안 깔려도 됨.\n- **이미지 인라인.** Ghostty와 iTerm2의 그래픽 프로토콜을 네이티브로 지원. 그 외 터미널에서는 PNG 크기를 표시하는 placeholder 박스로 폴백.\n- **자동 감지.** TTY 여부, 터미널 종류, 컬러 지원 여부 — 환경변수 설정 없이 그냥 동작한다.\n- **파이프 안전.** non-TTY 감지해서 우아하게 폴백. `nbv x.ipynb | less -R` 그대로 됨. `| head`로 끊겨도 `SIGPIPE`를 잡아서 exit 0.\n- **시각적 마감.** Unicode box-drawing으로 그린 셀 경계, `syntect` 기반 코드 하이라이팅, 마크다운 헤더/리스트 정렬, 커널이 준 ANSI 색이 살아있는 traceback.\n- **표 렌더링.** 마크다운 셀의 GFM 파이프 표와 pandas DataFrame `text/html` 출력을 컬럼 정렬이 살아있는 box-drawing 표로 렌더링.\n\n## 설치\n\n**Homebrew (macOS arm64):**\n\n```bash\nbrew install phd1000x-ux/tap/nbv\n```\n\n**Cargo (Rust 1.70 이상이면 어디서나):**\n\n```bash\ncargo install nbv\n```\n\n**Prebuilt 바이너리 (macOS arm64):**\n\n```bash\ncurl -L https://github.com/phd1000x-ux/nbv/releases/latest/download/nbv-v0.5.0-aarch64-apple-darwin.tar.gz \\\n  | tar -xz -C /usr/local/bin\n```\n\n**Prebuilt 바이너리 (Linux x86_64, static musl):**\n\n```bash\ncurl -L https://github.com/phd1000x-ux/nbv/releases/latest/download/nbv-v0.5.0-x86_64-unknown-linux-musl.tar.gz \\\n  | tar -xz -C /usr/local/bin\n```\n\n**소스에서 빌드:**\n\n```bash\ngit clone https://github.com/phd1000x-ux/nbv.git\ncd nbv\ncargo install --path .\n```\n\n`cargo install` 후 `~/.cargo/bin`이 `PATH`에 없다는 경고가 뜨면:\n\n```bash\n~/.cargo/bin/nbv setup\n```\n\n(아직 `nbv`가 `PATH`에 없으니 풀패스로 호출 — 그게 바로 해결하려는 문제니까.) `setup`은 셸(zsh / bash / fish)을 감지해서 rc 파일에 추가할 한 줄을 보여주고 y/N로 확인받는다. 적용 후엔 현재 터미널에서 즉시 활성화할 수 있는 한 줄도 같이 출력해준다 — zsh/bash는 `export PATH=…`, fish는 `fish_add_path …`. 또는 새 터미널을 열어도 된다. 확인 프롬프트 건너뛰려면 `--yes`.\n\n## 사용법\n\n```bash\nnbv analysis.ipynb                          # stdout으로 렌더링\nnbv --no-color analysis.ipynb               # ANSI 색 끄기\nnbv --no-images analysis.ipynb              # 이미지 강제 placeholder\nnbv --theme InspiredGitHub analysis.ipynb   # 코드 블록의 syntect 테마 변경\nnbv --list-themes                           # 사용 가능한 syntect 테마 이름 목록\nnbv --width 120 analysis.ipynb              # 출력 폭 강제 (최소 20; 기본: 자동 감지)\nNBV_THEME=InspiredGitHub nbv analysis.ipynb # --theme 의 환경변수 폴백 (플래그가 있으면 플래그 우선)\nNBV_WIDTH=120 nbv analysis.ipynb            # --width 의 환경변수 폴백\nnbv -h                                      # 도움말\nnbv -V                                      # 버전\nnbv completion bash                         # bash 완성 스크립트 출력\nnbv mangen                                  # section-1 man 페이지 출력\n```\n\n이게 전부. 플래그에 없는 동작은 모두 환경에서 자동 감지된다.\n`--theme`, `--width` 는 플래그가 없으면 환경변수 `NBV_THEME` / `NBV_WIDTH` 도 읽기 때문에 셸에서 한 번 `export` 해두면 영속화된다.\n\n## 쉘 자동완성\n\nnbv는 clap_complete를 통해 bash, zsh, fish, powershell, elvish 쉘의 자동완성 스크립트를 제공한다.\n출력을 각 쉘이 기대하는 위치에 파이프하면 된다:\n\n```bash\nnbv completion bash       \u003e /etc/bash_completion.d/nbv\nnbv completion zsh        \u003e ~/.zfunc/_nbv\nnbv completion fish       \u003e ~/.config/fish/completions/nbv.fish\nnbv completion powershell \u003e $PROFILE.nbv-completion.ps1   # 그 다음 프로필에서 dot-source\n```\n\nman 페이지는 `nbv mangen`으로 얻을 수 있다:\n\n```bash\nnbv mangen | gzip \u003e /usr/local/share/man/man1/nbv.1.gz   # 그 다음 `man nbv`\n```\n\n## 무엇을 어떻게 렌더링하나\n\n| ipynb 요소 | v0.5 동작 |\n| --- | --- |\n| 마크다운 셀 | 헤더(H1~H6), 리스트, 블록인용, 인라인 코드, 코드 펜스(syntect로 하이라이팅), 굵게/기울임, 링크 텍스트, GFM 표 |\n| 코드 셀 | 커널 언어로 syntect 하이라이팅 (기본 Python) |\n| `text/plain` 출력 | 박스 안 평문 |\n| `image/png` 출력 | Ghostty/iTerm2 인라인 (네이티브 프로토콜), 그 외 placeholder 박스 (`🖼 PNG W×H`) |\n| `text/html` (DataFrame) | box-drawing 표로 렌더링; 표로 파싱되지 않으면 커널의 `text/plain` 표현으로 폴백 |\n| 에러 / traceback | TTY/색 지원 시 커널 ANSI 색 보존, `--no-color`면 strip |\n| `stdout`/`stderr` 스트림 | 라벨 붙은 박스 안에 평문 |\n| 알 수 없는 셀/출력 타입 | `(skipped)` placeholder + stderr 경고 한 줄, 렌더링 계속 진행 |\n\nv0.5 미지원: 수식(LaTeX), 인터랙티브 위젯, JPEG/SVG 이미지, application/json pretty-print.\n\n## 터미널 지원\n\n| 터미널 | 색 | 이미지 |\n| --- | --- | --- |\n| Ghostty | ✓ | ✓ (kitty graphics protocol) |\n| iTerm2 | ✓ | ✓ (OSC 1337) |\n| kitty | ✓ | ✓ |\n| Terminal.app | ✓ | placeholder |\n| Alacritty | ✓ | placeholder |\n| tmux (모든 종류) | ✓ | placeholder (passthrough는 추후 지원) |\n| 파이프 / non-TTY | (`NO_COLOR` 따름) | placeholder |\n\n감지는 `$TERM_PROGRAM`과 `$TERM`을 보고 자동. `--no-color`, `--no-images`, `NO_COLOR=1`로 강제 가능.\n\n## Exit code\n\n| 코드 | 의미 |\n| --- | --- |\n| 0 | 정상 |\n| 1 | 파일 IO 오류 (없음/권한) |\n| 2 | 잘못된 CLI 인자 (clap이 자동 처리) |\n| 3 | `.ipynb` 파싱 실패 (JSON 오류 또는 스키마 위반) |\n\n## 개발\n\n```bash\ncargo test              # 166 tests (140 unit + 26 integration)\ncargo build --release   # target/release/nbv (약 3 MB)\n```\n\n## 라이선스\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphd1000x-ux%2Fnbv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphd1000x-ux%2Fnbv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphd1000x-ux%2Fnbv/lists"}