New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

plainhub

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

plainhub

GitHub-native notepad. CLI and MCP Server for AI IDE integration.

Source
npmnpm
Version
1.3.0
Version published
Weekly downloads
44
120%
Maintainers
1
Weekly downloads
 
Created
Source

PlainHub

GitHub-native notepad. CLI and MCP Server for AI IDE integration.

Open, edit, save — directly to your repo. No server, no database.

Install

npm install -g plainhub

Quick Start

CLI

plainhub auth --from-gh        # Import auth from gh CLI (recommended)
plainhub open README.md -r owner/repo
plainhub browse -r owner/repo  # Open file browser

MCP Server (Claude Code)

claude mcp add plainhub -- plainhub-mcp

Then say: "Open the README in PlainHub"

MCP Server (Cursor)

Add to .cursor/mcp.json:

{
  "mcpServers": {
    "plainhub": {
      "command": "plainhub-mcp"
    }
  }
}

CLI Usage

Commands

CommandDescription
plainhub open <file>Open a file in PlainHub
plainhub diff <sha>Show commit diff in PlainHub
plainhub browseOpen repository file browser
plainhub authAuthenticate with GitHub PAT
plainhub auth --from-ghImport token from gh CLI
plainhub auth --statusShow auth status
plainhub auth --logoutRemove saved token

Options

OptionValueDescription
-r, --repoowner/nameRepository
-b, --branchstringGit branch
-l, --linenumberJump to line
-nPrint URL only (don't open browser)
--themedark/lightEditor theme
--previewon/offMarkdown preview
--scrollstringScroll to heading in preview
--sidebaron/offShow sidebar
--fontSize10-32Font size
--lineNumberson/offShow line numbers
--whitespaceon/offShow whitespace
--no-authOpen without saved token

Examples

plainhub open docs/API.md -r owner/repo --preview on
plainhub open src/App.tsx -r owner/repo -l 42 --theme light
plainhub open README.md -r owner/repo -n  # Print URL only
plainhub diff abc1234 -r owner/repo       # Show commit diff
plainhub diff abc1234 -r owner/repo --path src/main.js  # Diff for specific file

MCP Server Tools

ToolDescription
plainhub_openOpen a file or change editor settings
plainhub_diffShow commit diff in PlainHub
plainhub_browseOpen repository file browser
plainhub_authSave a GitHub PAT
plainhub_auth_statusCheck authentication status

Authentication

PlainHub supports three authentication methods:

  • gh CLI import (recommended): plainhub auth --from-gh
  • Manual PAT: plainhub auth — opens GitHub token settings
  • Web UI: Enter PAT directly in the browser

Tokens are saved to ~/.config/plainhub/token with 0600 permissions (owner-only read/write).

Security

  • Tokens are stored locally with restrictive file permissions (0600)
  • URL fragments (#token=...) are never sent to servers per HTTP spec
  • Fragments are cleared from browser history immediately after use
  • No intermediary servers — browser communicates directly with GitHub API
  • Homepage
  • Documentation
  • Report an Issue

License

MIT

Keywords

plainhub

FAQs

Package last updated on 03 Apr 2026

Related posts