Skip to content
/ zhankai Public

Writes the content of all files of a given repo

License

Notifications You must be signed in to change notification settings

w3hc/zhankai

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

npm version npm downloads

Zhankai

CLI tool for exporting repository content into a structured markdown file for LLM processing.

🚀 Features

  • 📄 Markdown file generation from repository content
  • 🔍 .gitignore integration
  • 📊 Repository structure visualization
  • ❓ AI-assisted query system
  • 🔄 File truncation (30 lines preview for 500+ line files)
  • 🖼️ Binary file handling with placeholders
  • 🔐 Authentication system

📦 Installation

# Using npm
npm install -g zhankai

# Using yarn
yarn global add zhankai

# Using pnpm
pnpm add -g zhankai

🎯 Basic Usage

# Version verification
zhankai --version

# Documentation generation
cd your-project
zhankai

💡 Commands

Documentation Generation

# Default output
zhankai

# Custom output file
zhankai -o custom-docs.md

# Directory depth limitation
zhankai -d 2

# Include file contents
zhankai -c

AI Integration

⚠️ Requirement: RGCVII token holdings required.

# Authentication setup
zhankai setup

# Codebase queries
zhankai -q "describe functionality"

# Credential removal
zhankai logout

🛠️ Options

Option Description Default
-o, --output <filename> Output file specification <REPOSITORY_NAME>_app_description.md
-d, --depth <number> Directory traversal depth Infinity
-c, --contents Content inclusion flag false
-q, --query <string> AI query string -
--version Version information -

🔒 Authentication Process

  1. RGCVII token verification
  2. zhankai setup execution
  3. Required inputs:
    • Ethereum address
    • Etherscan message signature
    • Signature verification

🤝 Development

Versions

  • pnpm v9.12.2
  • Node.js v20.9.0

Setup

git clone https://github.com/your-username/zhankai.git
cd zhankai
pnpm i
pnpm build

📝 Technical Implementation

  1. Repository scanning
  2. .gitignore filtering
  3. File processing:
    • Size-based truncation
    • Binary file conversion
    • Format preservation
  4. Structure generation
  5. Markdown compilation

🆘 Technical Support

📄 License

GPL-3.0 License. See LICENSE for specifications.

About

Writes the content of all files of a given repo

Resources

License

Stars

Watchers

Forks

Packages

No packages published