콘텐츠로 이동

설치

요구사항: Python 3.11 이상. 노션에 반영하려면 Notion 통합 토큰이 필요하다.

PyPI에는 배포하지 않는다. git 주소로 설치한다(모노레포이므로 하위 경로를 지정한다).

uv (권장)

uv tool install "git+https://github.com/devcomfort/notion-ml#subdirectory=packages/notionml"

pipx

pipx install "git+https://github.com/devcomfort/notion-ml#subdirectory=packages/notionml"

pip (가상환경)

python3 -m venv ~/.venvs/notion-ml
~/.venvs/notion-ml/bin/pip install "git+https://github.com/devcomfort/notion-ml#subdirectory=packages/notionml"

저장소에서 직접

git clone https://github.com/devcomfort/notion-ml.git
cd notion-ml
./tools/nl --help          # 설치 없이 실행
uv sync                    # 워크스페이스(패키지+문서) 동기화

노트 저장소 지정

노트는 도구 저장소가 아니라 별도 저장소(store) 에 있다.

export NOTIONML_STORE="$HOME/notes"          # 환경 변수(우선)
# 또는 store/tools/notion-ml-store.json 에 {"store_root": "/home/…/notes"}

확인:

nl config

노션 연결

  1. Notion에서 통합(integration) 을 만들고 토큰을 복사한다.
  2. 대상 페이지에서 ⋯ → 연결 → 통합 추가로 초대한다(초대하지 않으면 404).
  3. 토큰을 파일로 둔다.
mkdir -p ~/.config/notion-ml && chmod 700 ~/.config/notion-ml
printf '%s' 'ntn_…' > ~/.config/notion-ml/notion-token
chmod 600 ~/.config/notion-ml/notion-token
nl auth status notion

환경 변수 NOTION_TOKEN이 있으면 파일보다 우선한다. 옛 경로 ~/.config/it2026/notion-token도 읽는다.

워크스페이스 정보

워크스페이스 이름·업로드 상한은 API로 조회할 수 없다. nl config는 로컬 설정과 토큰 유효성만 보여 준다.