https://github.com/patricktrainer/pbtree
Like `pbcopy` but for LLM prompt building đī¸
https://github.com/patricktrainer/pbtree
chatgpt claude-ai cli llm prompt-engineering
Last synced: 3 months ago
JSON representation
Like `pbcopy` but for LLM prompt building đī¸
- Host: GitHub
- URL: https://github.com/patricktrainer/pbtree
- Owner: patricktrainer
- License: agpl-3.0
- Created: 2024-08-21T20:01:35.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-09-04T23:13:52.000Z (almost 2 years ago)
- Last Synced: 2024-09-07T07:08:27.645Z (almost 2 years ago)
- Topics: chatgpt, claude-ai, cli, llm, prompt-engineering
- Language: TypeScript
- Homepage:
- Size: 122 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# đŗ PBTree
PBTree is like `pbcopy`, but supercharged. đ

## ⨠Features
- đĨī¸ Interactive file navigation
- đ Quick search
- â
Multi-select files and folders
- đ Copy selected content to clipboard as XML
## đ¯ Perfect for adding context to Claude
PBTree generates XML output, making it ideal for [crafting prompts for Claude AI](https://docs.anthropic.com/en/docs/build-with-claude/prompt-engineering/use-xml-tags)! Claude loves structured data in XML tags. đ¤â¤ī¸
## đ ī¸ Build & install
1. Clone the repo:
```bash
git clone https://github.com/patricktrainer/pbtree.git
cd pbtree
```
2. Install dependencies:
```bash
npm install
```
3. Build the project:
```bash
npm run build
```
4. Link the package globally:
```bash
npm link
```
Alternatively, you can use the [rebuild script](./scripts/rebuild.js) to do all of the above:
```bash
npm run rebuild
```
## đšī¸ How to use
After building and linking, simply run `pbtree` in your terminal:
```bash
pbtree
```
- â¨ī¸ Type to search.
- âŦī¸ âŦī¸ Move up and down the list
- âŦ
ī¸ âĄī¸ Navigate back and forth between folders
- space Select or deselect the current item (file or folder)
- â return Copy selected content to the clipboard and exit.
## đ¨âđģ Development
To run PBTree in development mode:
```bash
npm run dev
```
This uses `ts-node` to run the TypeScript files directly.
## đĻ Dependencies
- [react](https://www.npmjs.com/package/react) and [ink](https://www.npmjs.com/package/ink) for the CLI interface
- [clipboardy](https://www.npmjs.com/package/clipboardy) for clipboard operations
Check `package.json` for the full list of dependencies and their versions.
## đ¤ Contribute
Contributions welcome! đ
1. Fork the repo
2. Create your feature branch: `git checkout -b my-new-feature`
3. Commit your changes: `git commit -am 'Add some feature'`
4. Push to the branch: `git push origin my-new-feature`
5. Submit a pull request
đĒ **Enjoy!**