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

docz-cli

v0.3.0

Published

DocSync CLI — read and write company documents

Downloads

667

Readme

docz-cli

DocSync CLI & MCP Server — read and write company documents from terminal and AI agents

npm version License: MIT


Quick Start

# Login
npx docz-cli login --token <your-token>

# Browse
npx docz-cli spaces
npx docz-cli ls 研发
npx docz-cli cat 研发:docs/guide.md

# Write
npx docz-cli write 吴鹏飞:notes/todo.md '# TODO List'

Features

  • Simple addressing<space>:<path> format, Space supports name or ID
  • Full file operations — ls, cat, upload, write, mkdir, rm, mv
  • Git-backed — every write creates a commit, built-in version history
  • Trash recovery — deleted files recoverable within 30 days
  • MCP Server — built-in stdio MCP server for AI agent integration
  • Zero config — single token, works immediately

Installation

Requirements: Node.js >= 22.0.0

npx docz-cli <command>       # Use directly via npx
npm install -g docz-cli      # Or global install, then use `docz` shorthand

Global install registers both docz-cli and docz commands. Examples below use docz-cli; replace with docz if installed globally.

Authentication

Get your API Token:

  1. Login to https://docz.zhenguanyu.com (SSO)
  2. Go to Settings → Account → API Tokens (or visit /settings directly)
  3. Click New Token, name it, copy the token (shown only once)

Then configure:

# Option 1: login command (saved to ~/.docz/config.json)
docz-cli login --token <your-token>

# Option 2: environment variable
export DOCSYNC_API_TOKEN=<your-token>

Commands

| Command | Description | |---------|-------------| | login --token <t> | Configure credentials | | whoami | Show current user | | spaces | List all accessible spaces | | ls <space>[:<path>] | List files and folders | | cat <space>:<path> | Read file content | | upload <file> <space>[:<dir>] | Upload local file | | write <space>:<path> <content> | Write content to file (- for stdin) | | mkdir <space>:<path> | Create folder | | rm <space>:<path> | Delete file/folder (30-day trash) | | mv <space>:<from> <to> | Rename or move | | log <space>[:<path>] | Show change history | | trash <space> | Show deleted files | | mcp | Start MCP stdio server |

Usage Examples

Browse

docz-cli spaces                    # List all spaces
docz-cli ls 研发                    # List root directory
docz-cli ls 研发:docs               # List subdirectory
docz-cli cat 研发:docs/guide.md     # Read file content

Write

docz-cli write 吴鹏飞:notes/todo.md '# TODO List'                    # Write content
echo '# Report' | docz-cli write 吴鹏飞:reports/daily.md -            # From stdin
docz-cli upload ./report.pdf 研发:reports                              # Upload file
docz-cli mkdir 研发:new-project                                        # Create folder

Manage

docz-cli mv 研发:old.md new.md         # Rename
docz-cli rm 研发:deprecated.md          # Delete (recoverable)
docz-cli log 研发                        # Space history
docz-cli log 研发:docs/guide.md         # File history
docz-cli trash 研发                      # View trash

Pipes

cat outputs to stdout, write ... - reads from stdin. Combine with any Unix tool:

# Search content
docz-cli cat 研发:docs/guide.md | grep "部署"

# Extract CSV columns
docz-cli cat 研发:data.csv | cut -d',' -f1,3 | head -10

# Read → transform → write back
docz-cli cat 吴鹏飞:config.md | sed 's/old/new/g' | docz-cli write 吴鹏飞:config.md -

# Local command output → DocSync
echo "# Generated at $(date)" | docz-cli write 吴鹏飞:notes/auto.md -
cat local-file.md | docz-cli write 吴鹏飞:docs/remote.md -

MCP Server

Built-in MCP server for AI agent integration (Claude Code, Cursor, etc.).

Configuration

Add to your MCP settings:

{
  "mcpServers": {
    "docz-mcp": {
      "command": "npx",
      "args": ["-y", "docz-cli", "mcp"],
      "env": {
        "DOCSYNC_API_TOKEN": "<your-token>"
      }
    }
  }
}

MCP Tools

| Tool | Description | |------|-------------| | docz_list_spaces | List all accessible spaces | | docz_list_files | List files in a directory | | docz_read_file | Read file content | | docz_upload_file | Upload/create a file | | docz_mkdir | Create a folder | | docz_delete | Delete file/folder | | docz_file_history | View change history |

AI Agent Skill

Install as a reskill skill to teach AI agents how to use docz-cli:

npx reskill install github:kanyun-inc/docz-cli/skills -a claude-code cursor -y

The skill provides command reference, usage scenarios, and addressing format documentation so agents can autonomously browse, read, and write DocSync documents.

API Reference

docz-cli wraps the DocSync REST API:

| Command | API Endpoint | |---------|-------------| | spaces | GET /api/spaces | | ls | GET /api/spaces/{id}/tree?path= | | cat | GET /api/spaces/{id}/blob/{path} | | upload / write | POST /api/spaces/{id}/files/upload | | mkdir | POST /api/spaces/{id}/files/mkdir | | rm | POST /api/spaces/{id}/files/delete | | mv | POST /api/spaces/{id}/files/rename | | log | GET /api/spaces/{id}/log/[{path}] | | trash | GET /api/spaces/{id}/trash |

Auth: Authorization: Bearer <token>. Backend is Git — every write is a commit.

License

MIT