Skip to content

fujingzhai/claude-note

Repository files navigation

Claude Note

Claude Note is a sidebar plugin for SiYuan that embeds local Claude Code sessions into your note-taking workspace. It lets you ask Claude Code to work with the current document, related notes, attached files, and a local working directory without leaving SiYuan.

This is not a generic Chat API client. Claude Note runs the Claude Code CLI already installed and configured on your computer, so it can reuse your Claude Code models, permissions, tool calls, session history, and local file workflows while passing SiYuan context in a note-friendly format.

Features

  • Use Claude Code directly from the SiYuan sidebar.
  • Attach the currently opened SiYuan document to a prompt.
  • Search and attach related SiYuan documents as context.
  • Attach local files as additional reference material.
  • Keep multiple parallel sessions with separate model, thinking effort, and permission settings.
  • Load, rename, resume, and delete Claude Code history sessions.
  • Show or hide thinking traces and tool calls, with per-step expansion controls.
  • View model, thinking effort, permission mode, and context window usage in the composer.
  • Read model and environment variable settings from ~/.claude/settings.json.
  • Use the bundled lightweight SiYuan API helper when Claude Code needs to read or update SiYuan notes.
  • Navigate long conversations with top/bottom jump buttons.

Requirements

Before using Claude Note, make sure you have:

  1. SiYuan desktop app.
  2. A working local Claude Code CLI.
  3. Node.js 18 or later.

For Claude Code installation, login, model configuration, and proxy or gateway setup, see the official documentation:

If claude works normally in your terminal, Claude Note can usually use it.

Installation

From the SiYuan marketplace

  1. Open SiYuan.
  2. Go to Settings -> Marketplace -> Plugins.
  3. Search for Claude Note.
  4. Install and enable the plugin.
  5. Click the Claude Note icon in the SiYuan sidebar.

Basic Usage

  1. Open Claude Note from the sidebar.
  2. Type a question or task in the composer.
  3. Attach the current document, related notes, or local files when needed.
  4. Choose the model, thinking effort, and permission mode.
  5. Send the message and wait for Claude Code to respond.

While a session is running, you can still switch to another session, create a new one, or continue editing input. Running sessions can be stopped individually.

Context

Claude Note supports four common context sources:

  • Current document: attach the currently opened SiYuan document.
  • Selected blocks: send one or more selected SiYuan blocks from the editor menu or floating toolbar.
  • Related notes: search and select other SiYuan documents.
  • Local files: attach files from your computer as reference material.

Attached context is sent with the current prompt. After sending, temporary context attachments are cleared to avoid accidental accumulation in later turns.

Claude Note includes a lightweight SiYuan API helper. It tries to use the API token and port from the running SiYuan environment automatically. If auto-detection fails, you can set the token and port manually in plugin settings.

Model, Thinking Effort, and Permission Mode

The composer provides Claude Code options for:

  • Model: based on Claude Code defaults and recognized entries from ~/.claude/settings.json.
  • Thinking effort: mapped to Claude Code's effort option.
  • Permission mode: mapped to Claude Code's permission mode for tool and file operation approvals.

These options are stored per session, so different sessions can use different runtime settings.

Settings

General settings:

  • Attach the current document by default.
  • Require Command/Ctrl + Enter to send.
  • Automatically scroll to the bottom while streaming.
  • Show thinking process.
  • Show tool calls.
  • SiYuan API token and port.

Claude Code settings:

  • Claude CLI path. Usually this can be left empty to use claude from PATH.
  • Working directory. This is the main local boundary for Claude Code file and command operations.
  • Project instructions. This maps to CLAUDE.md in the working directory.
  • Environment variables passed to Claude Code sessions.

The working directory should usually be your SiYuan data directory or a dedicated workspace for reading, writing, and research material. If CLAUDE.md does not exist in the working directory, Claude Note creates it.

Notes

  • Claude Note depends on local Claude Code. If claude does not work in the terminal, the plugin cannot run it.
  • Claude Code may read files, modify files, or execute commands depending on the working directory and permission mode.
  • Claude Note prevents Claude Code from writing directly to SiYuan .sy files. Note changes should go through the bundled SiYuan API helper.
  • If you use third-party models, proxies, or custom gateways, verify that Claude Code works in the terminal first.
  • Claude Note currently focuses on sidebar usage and does not provide a tab mode.

Development

pnpm install
pnpm dev

Build:

pnpm build

Repository:

https://github.com/fujingzhai/claude-note

License

MIT

Disclaimer

This plugin was made through vibe coding. Tools and models used during development include:

  • Codex (GPT-5.5): about 60% of the work
  • Antigravity (Gemini 3.5 Flash): about 30% of the work
  • Claude Code (mimo-v2.5-pro): about 10% of the work

Please evaluate it carefully before using it in important workflows.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors