Skip to content

Commit

Permalink
Fix examples (#17)
Browse files Browse the repository at this point in the history
update instructions
  • Loading branch information
julienbrg authored Oct 24, 2024
1 parent 2725152 commit 49a634f
Showing 1 changed file with 84 additions and 48 deletions.
132 changes: 84 additions & 48 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,94 +3,130 @@

# Zhankai

Writes the content of all files of a given repo. You can then use this file to save some time describing your app to your favorite LLM assistant.
CLI tool for exporting repository content into a structured markdown file for LLM processing.

## Installation
## πŸš€ Features

You can install Zhankai globally using npm:
- πŸ“„ 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

```bash
# Using npm
npm install -g zhankai
```

Or using yarn:

```bash
# Using yarn
yarn global add zhankai
```

## Use

### Verify Installation
# Using pnpm
pnpm add -g zhankai
```

After installation, you can verify that Zhankai is installed correctly by checking its version:
## 🎯 Basic Usage

```bash
# Version verification
zhankai --version

# Documentation generation
cd your-project
zhankai
```

### Run
## πŸ’‘ Commands

To use Zhankai, navigate to the root of your repository and run:
### Documentation Generation

```bash
# Default output
zhankai
```

This will create a `<REPOSITORY_NAME>_app_description.md` file at the root of your repository, containing the content of all files and the repository structure.
# Custom output file
zhankai -o custom-docs.md

## Options
# Directory depth limitation
zhankai -d 2

# Include file contents
zhankai -c
```

- `-o, --output <filename>`: Specify a custom output filename
- `-d, --depth <number>`: Set the maximum depth to traverse (default: Infinity)
- `-c, --contents`: Include file contents (default: false)
- `-q, --query "your question"` : Ask a question about your codebase (e.g., `zhankai -q "what does this app do?"`)
### AI Integration

Examples:
> ⚠️ **Requirement**: [RGCVII](https://basescan.org/token/0x11dC980faf34A1D082Ae8A6a883db3A950a3c6E8) token holdings required.
```bash
# Save output to my-docs.md
zhankai -o my-docs.md
# Authentication setup
zhankai setup

# Only include files up to 2 directories deep
zhankai -d 2
# Codebase queries
zhankai -q "describe functionality"

# Generate docs and ask about functionality
zhankai -q "explain the main features"
# Credential removal
zhankai logout
```

## Features
## πŸ› οΈ Options

- Generates a markdown file with the content of all files in the repository
- Excludes files and directories specified in .gitignore
- Truncates files with more than 500 lines, showing only the first 30 lines
- Replaces image file contents (png, jpg, jpeg, ico) with a placeholder message
- Generates a tree structure of the repository
- Ask questions about your codebase using the `-q` option (e.g., `zhankai -q "explain this app"`)
| 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 | - |

## Contrib
## πŸ”’ Authentication Process

### Install Dependencies
1. RGCVII token verification
2. `zhankai setup` execution
3. Required inputs:
- Ethereum address
- Etherscan message signature
- Signature verification

```bash
pnpm i
```
## 🀝 Development

### Versions

### Build and update
- pnpm v9.12.2
- Node.js v20.9.0

### Setup

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

## Versions
## πŸ“ Technical Implementation

- pnpm `v8.7.5`
- node `v20.9.0`
1. Repository scanning
2. `.gitignore` filtering
3. File processing:
- Size-based truncation
- Binary file conversion
- Format preservation
4. Structure generation
5. Markdown compilation

## Support
## πŸ†˜ Technical Support

You can contact me via [Element](https://matrix.to/#/@julienbrg:matrix.org), [Farcaster](https://warpcast.com/julien-), [Telegram](https://t.me/julienbrg), [Twitter](https://twitter.com/julienbrg), [Discord](https://discordapp.com/users/julienbrg), or [LinkedIn](https://www.linkedin.com/in/julienberanger/).
- [Element](https://matrix.to/#/@julienbrg:matrix.org)
- [Farcaster](https://warpcast.com/julien-)
- [Telegram](https://t.me/julienbrg)
- [Twitter](https://twitter.com/julienbrg)
- [Discord](https://discordapp.com/users/julienbrg)
- [LinkedIn](https://www.linkedin.com/in/julienberanger/)

## License
## πŸ“„ License

This project is licensed under the GPL-3.0 License.
GPL-3.0 License. See [LICENSE](LICENSE) for specifications.

0 comments on commit 49a634f

Please sign in to comment.