npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@yank-note/cli

v0.1.2

Published

Official CLI for Yank Note.

Downloads

451

Readme

@yank-note/cli

Official command-line interface for Yank Note.

Development

pnpm install
pnpm run typecheck
pnpm test
pnpm run build

Usage

pnpm run build
node dist/index.js help
node dist/index.js version
node dist/index.js doctor
node dist/index.js list-action
node dist/index.js list-repo
node dist/index.js exec-action base.list-repositories
node dist/index.js reload-main-window
node dist/index.js setting schema server.port
node dist/index.js setting list
node dist/index.js setting open server.port
node dist/index.js markdown-features --language en --output /tmp/yn-features.md
node dist/index.js export --absolute-path /absolute/path/to/doc.md --to html

After installation, the published binary name is:

yn-cli

Global options

yn-cli --host 127.0.0.1 --port 3044 --json <command>
  • --host <host>: override the Yank Note server host
  • --port <port>: override the Yank Note server port
  • --json: output machine-readable JSON

If --port is omitted, yn-cli reads the default Yank Note config file at ~/yank-note/config.json and falls back to 3044 when needed. If --host is omitted, yn-cli uses the configured host when available and otherwise falls back to 127.0.0.1.

Doctor

yn-cli doctor

doctor prints:

  • CLI version, Node version, and platform
  • resolved Yank Note config path
  • resolved host and port
  • whether the config file exists
  • whether the Yank Note MCP endpoint is reachable
  • whether yn_list_actions works through MCP
  • whether the base.list-repositories action is available

For automation or AI usage:

yn-cli --json doctor

MCP Transport

yn-cli uses mcporter as the MCP connector and talks to Yank Note through:

http://<host>:<port>/api/mcp/message

The current flow does not depend on private HTTP APIs outside the MCP endpoint.

List Repositories

yn-cli list-repo
yn-cli --json list-repo

This command calls the Yank Note MCP endpoint, checks for the base.list-repositories action, and prints each repository as:

<name>    <path>    enabled|disabled

List Actions

yn-cli list-action
yn-cli --json list-action

This command lists the actions exposed by Yank Note through the MCP action bridge, including each action name and its MCP-oriented description when available.

Execute Actions

yn-cli exec-action base.list-repositories
yn-cli exec-action layout.toggle-side true
yn-cli exec-action plugin.switch-todo.switch 12 false
yn-cli --json exec-action base.find-in-repository '{"pattern":"TODO","caseSensitive":false}'

Arguments are parsed one by one:

  • valid JSON literals such as true, 123, {"a":1}, and [1,2] are parsed as structured values
  • other values are passed as plain strings

Reload Main Window

yn-cli reload-main-window
yn-cli reload-main-window --url-mode dev
yn-cli --json reload-main-window --url-mode prod

This command wraps the MCP tool yn_reload_main_window. It is usually not needed for normal content work and is mainly useful when developing or debugging extensions.

Supported reload arguments:

  • --url-mode <scheme|prod|dev>: optionally switch URL mode before reloading

Settings

yn-cli setting schema
yn-cli setting schema server.port
yn-cli setting list
yn-cli setting open
yn-cli setting open server.port
yn-cli --json setting open server.port

Setting commands use MCP and do not write configuration values.

  • setting schema [key]: get the full setting schema or one setting definition
  • setting list: get current setting values
  • setting open [key]: open the Yank Note settings panel and optionally locate a setting key or group

Markdown Features

yn-cli markdown-features
yn-cli markdown-features --language en
yn-cli markdown-features --language zh-CN --output /tmp/yn-features.md
yn-cli --json markdown-features --language en

This command fetches Yank Note's built-in extended Markdown feature documentation through MCP. When --output is provided, the content is written to the target file instead of stdout.

Export

yn-cli export --absolute-path /absolute/path/to/doc.md --to html
yn-cli export --repo main --path /docs/guide.md --to docx --output /tmp/guide.docx
yn-cli export --absolute-path /absolute/path/to/doc.md --to html --style inline --code plain --code-line-numbers false --code-copy-button false --toc 1,2
yn-cli export --absolute-path /absolute/path/to/doc.md --to pdf --page-size A4 --landscape --scale 1
yn-cli --json export --absolute-path /absolute/path/to/doc.md --to html

Supported export arguments:

  • --repo <name>: repository name
  • --path <path>: document path inside the repository
  • --absolute-path <path>: absolute markdown file path
  • --output <path>: output file path; defaults to ./<basename>.<to>
  • --from <markdown|html>: source export mode. Default: html
  • --to <docx|html|rst|adoc|pdf>: target export format. Default: html
  • --local-image <inline|upload|keep>: how local images are handled in html export. Default: inline
  • --style <include|inline|none>: how preview styles are exported in html export. Default: include
  • --code <highlight|plain>: whether code blocks stay highlighted in html export. Default: highlight
  • --toc <levels>: comma-separated heading levels such as 1,2,3. Default: empty
  • --code-line-numbers <true|false>: render code line numbers in html export. Default: true
  • --code-copy-button <true|false>: render the code copy button in html export. Default: true
  • --page-size <A3|A4|A5|Legal|Letter|Tabloid>: common PDF paper sizes. Default: A4
  • --landscape: export PDF in landscape orientation. Default: false
  • --scale <number>: PDF scale factor between 0.1 and 2. Default: 1
  • --print-background <true|false>: include CSS backgrounds in PDF output. Default: true
  • --margin-top <inches>: top PDF margin
  • --margin-bottom <inches>: bottom PDF margin
  • --margin-left <inches>: left PDF margin
  • --margin-right <inches>: right PDF margin
  • --render-timeout <ms>: timeout for preview rendering. Default: 20000
  • --image-timeout <ms>: timeout for preview images and related preview resources. Default: 60000

Parameter groups:

  • Input location: --repo, --path, --absolute-path
  • General export: --output, --from, --to, --render-timeout, --image-timeout
  • HTML export: --local-image, --style, --code, --toc, --code-line-numbers, --code-copy-button
  • PDF export: --page-size, --landscape, --scale, --print-background, --margin-top, --margin-bottom, --margin-left, --margin-right

You must provide either:

  • --absolute-path
  • or both --repo and --path

Notes:

  • PDF export only supports --from html
  • yn-cli intentionally exposes only the most common PDF options; if you need more control, export to HTML first and handle the final conversion yourself
  • Export jobs should be treated as serial work. Do not run multiple exports in parallel, especially for PDF.