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

@roland0511/jafd

v1.1.0

Published

Just Another Feishu Doc Converter - CLI tool for fetching and converting Feishu (Lark) Wiki/Doc/Sheet/Bitable content

Readme

jafd

Just Another Feishu Doc Converter

A CLI tool and Node.js library for fetching and converting Feishu (Lark) Wiki/Doc/Sheet/Bitable content to Markdown and CSV.

Features

  • Read documents: Fetch content from Docs, Sheets, Bitable, and Wiki with automatic image download
  • Export: Convert documents to Markdown with images, or sheets to CSV
  • List children: List child nodes of a Wiki space
  • Search: Search Wiki nodes by keyword
  • Write/Append: Write content to Feishu documents
  • Create: Create new Feishu documents

Installation

Global installation (recommended for CLI use)

npm install -g @roland0511/jafd

Local installation

npm install @roland0511/jafd

Use via npx (no installation)

npx @roland0511/jafd <command>

Configuration

Before using jafd, you need to configure your Feishu app credentials.

Option 1: Environment variables

Set the following environment variables:

export FEISHU_APP_ID="your_app_id"
export FEISHU_APP_SECRET="your_app_secret"

Option 2: Configuration file

Create a jafd.json or config.json file in:

  • Current working directory
  • ~/.jafd/config.json
{
  "app_id": "your_app_id",
  "app_secret": "your_app_secret"
}

Option 3: .env file

Create a .env file in:

  • Current working directory
  • ~/.jafd/.env
  • ~/.env
FEISHU_APP_ID=your_app_id
FEISHU_APP_SECRET=your_app_secret

CLI Usage

Read a document

# Read a document (cached as markdown/csv with images)
jafd read <token_or_url>

Export a document

# Export to current directory
jafd export <token_or_url>

# Export to specific directory
jafd export <token_or_url> -o ./output
jafd export <token_or_url> --output-dir ./output

List Wiki children

jafd list <wiki_token_or_url>
# or
jafd list-children <wiki_token_or_url>

Search Wiki

jafd search "search query" <wiki_token_or_url>

Resolve a token

jafd resolve <token_or_url>

Create a document

jafd create "Document Title"
jafd create "Document Title" --folder <folder_token>

Write to a document

jafd write <token_or_url> "Content to write"

Append to a document

jafd append <token_or_url> "Content to append"

Help

jafd --help
jafd <command> --help

Node.js API Usage

const jafd = require('@roland0511/jafd');

// Read a document
const doc = await jafd.readDoc('doc_token_or_url');
console.log(doc);

// Export a document
const result = await jafd.exportDoc('doc_token_or_url', './output');

// List wiki children
const children = await jafd.listChildren('wiki_token');

// Search wiki
const results = await jafd.searchWiki('query', 'wiki_token');

// Create a document
const newDoc = await jafd.createDoc('My Document');

// Write to a document
await jafd.writeDoc('doc_token', '# Hello\n\nWorld');

// Append to a document
await jafd.appendDoc('doc_token', 'More content');

Cache

jafd caches downloaded content and access tokens in:

  • ~/.jafd/cache/ - Cached documents and assets
  • ~/.jafd/cache/feishu_token.json - Cached access token

The cache is valid for 1 hour.

Supported Document Types

  • Wiki spaces
  • Docx documents (new format)
  • Doc documents (old format)
  • Sheets
  • Bitable

How to get Feishu App ID and Secret

  1. Go to Feishu Open Platform
  2. Create a new app
  3. Get your App ID and App Secret from the app settings
  4. Enable the necessary APIs (Document, Sheet, Wiki, etc.)

License

MIT