snomiao

Onenote CLI — AI skill for Claude Code

AI community

Make your OneNote notebooks survive in the age of AI — CLI with full-text page-level search via Graph API.

How to install Onenote CLI

This entry records only its repository, not the path inside it, so there is no exact command to give. Open snomiao/onenote-cli and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Onenote CLI does

Make your OneNote notebooks survive in the age of AI — CLI with full-text page-level search via Graph API.

Alternatives in AI

README

onenote-cli

**Your OneNote, in a terminal. Fluent with AI.**

onenote ls                                  # browse your notebooks
onenote read NotebookA/SectionB/PageC       # read a page, rendered as markdown
onenote search "visa interview"             # find any word, anywhere
onenote open NotebookA/SectionB             # jump back into OneNote Online
onenote append NotebookA/SectionB/today -c "- met with alex" --md

Every page, every section, every word — addressable by path, openable from a prompt, pipe-able into anything.

Install

As an AI Agent Skill

# Claude Code / OpenClaw / Codex / Cursor / any SKILL.md-compatible agent
npx skills add snomiao/onenote-cli

Manual

git clone https://github.com/snomiao/onenote-cli.git
cd onenote-cli
bun install

Setup

  1. Register an Azure AD app at entra.microsoft.com (see docs/setup.md for full walkthrough)
  2. Copy .env.example to .env.local and set your Client ID:
    cp .env.example .env.local
    # Edit .env.local with your Application (client) ID
  3. Login:
    bun run src/index.ts auth login

Usage

# Auth
onenote auth login          # Login via device code flow
onenote auth whoami         # Show current user
onenote auth setup          # Print setup instructions
onenote auth logout         # Clear tokens

# Notebooks  ( = name, path, Graph ID, or URL)
onenote notebooks list
onenote notebooks get 
onenote notebooks create 

# Sections
onenote sections list []                 # e.g. "NotebookA"
onenote sections create -n  --name 

# Pages  ( = "nb/sec/page", page ID, or OneNote URL)
onenote pages list []                    # e.g. "NotebookA/SectionB"
onenote pages get 
onenote pages create -s  -t  --body "# Heading" --md
onenote pages append  -c "- bullet" --md   # ⚠ may reformat existing content (Graph API lim