zhankai
v1.5.3
Published
CLI tool for exporting repository content into a structured markdown file for LLM processing
Maintainers
Readme
Zhankai
A CLI tool that exports repository content into structured markdown for LLM processing.
Zhankai utilizes the Rukh API to connect with Anthropic's claude-3-7-sonnet-20250219 model.
Features
- 📄 Structured markdown generation from repository content
- 🔍
.gitignoreintegration - 📊 Repository structure visualization
- 🧠 AI-assisted code modification with Claude 3.7 Sonnet
- 🔄 Intelligent file truncation (30 lines preview for large files)
- 🖼️ Binary file handling
- 📁 Automated output management
- 🙈 Automatic .gitignore configuration
Installation
npm install -g zhankai
# or
yarn global add zhankai
# or
pnpm add -g zhankaiUpgrade
npm install -g zhankai@latest
# or
yarn global add zhankai@latest
# or
pnpm add -g zhankai@latestUsage
Basic
cd your-project
zhankaiCustom Output File
zhankai -o custom-docs.mdAI Query
[!TIP] Commit changes before using the
-qoption. Zhankai modifies code files when responding to queries.
zhankai -q "Add a workflow file that describes how the app work in detail"Like it? Sponsor W3HC to support development and gain unlimited access to Claude 3.7 Sonnet – it's the cheapest access available in town.
Options
| Option | Description | Default |
|--------|-------------|---------|
| -o, --output <filename> | Output file name | <REPOSITORY_NAME>_app_description.md |
| -d, --depth <number> | Directory traversal depth | Infinity |
| -c, --contents | Include file contents | false |
| -q, --query <string> | AI query to Claude 3.7 Sonnet | - |
| --version | Display version information | - |
| --debug | Enable debug mode | false |
| --timeout <number> | API request timeout in milliseconds | 240000 |
| login | Authenticate with GitHub and generate Ethereum wallet | - |
| github | Authenticate with GitHub using Personal Access Token | - |
| logout | Clear stored GitHub credentials | - |
| sign <message> | Sign a message with your Ethereum wallet | - |
File Organization
Zhankai:
- Creates a
/zhankaidirectory in your project - Stores all generated files in this directory
- Adds
/zhankaito your .gitignore automatically
Development
Please review the contribution guidelines before submitting pull requests.
Setup
git clone https://github.com/w3hc/zhankai.git
cd zhankai
pnpm i
pnpm buildTesting
pnpm test
pnpm test:watch # Watch mode
pnpm test:coverage # Coverage reportSupport
Contact Julien via:
- Element: @julienbrg:matrix.org
- Farcaster: julien-
- Telegram: @julienbrg
- Twitter: @julienbrg
- Discord: julienbrg
- LinkedIn: julienberanger
