|
| 1 | +# Forkify Command Line 🍽️ |
| 2 | + |
| 3 | +   |
| 4 | + |
| 5 | +A command-line interface for interacting with Claude AI to process, analyze, and explore documents. Forkify provides an intuitive terminal experience for document analysis with conversation management and system prompt customization. |
| 6 | + |
| 7 | +|  | |
| 8 | +|:------------------------------------------:| |
| 9 | +| *HumainLabs.ai — Cognitive Framework Engineering & Research* | |
| 10 | + |
| 11 | +## 📋 Table of Contents |
| 12 | + |
| 13 | +* [Overview](#-overview) |
| 14 | +* [Features](#-features) |
| 15 | +* [Requirements](#-requirements) |
| 16 | +* [Installation](#-installation) |
| 17 | +* [Usage](#-usage) |
| 18 | +* [Command Reference](#-command-reference) |
| 19 | +* [Development](#-development) |
| 20 | +* [License](#-license) |
| 21 | + |
| 22 | +## 🔍 Overview |
| 23 | + |
| 24 | +Forkify Command Line is a powerful terminal-based application that enables developers and researchers to interact with Claude AI for document analysis. By removing the web and API components, this version focuses exclusively on the command-line experience, providing a lightweight yet powerful tool for document processing tasks. |
| 25 | + |
| 26 | +The command-line version maintains all the core functionality of Forkify while simplifying the deployment and usage experience. Work with your documents directly from your terminal without the need for Docker, web servers, or API endpoints. |
| 27 | + |
| 28 | +## ✨ Features |
| 29 | + |
| 30 | +| Feature | Description | |
| 31 | +| ------- | ----------- | |
| 32 | +| **Document Processing** | Process and analyze documents with Claude AI | |
| 33 | +| **Conversation Management** | Create, switch between, and manage conversations | |
| 34 | +| **System Prompt Customization** | Choose different system prompts for different analysis tasks | |
| 35 | +| **Response Length Control** | Adjust response length from extremely short to very detailed | |
| 36 | +| **Context Window Management** | Control how much of the conversation history is sent to Claude | |
| 37 | +| **Document Source Tracking** | View which documents are being used in the current conversation | |
| 38 | +| **Token Usage Monitoring** | Track token usage and associated costs | |
| 39 | + |
| 40 | +## 📦 Requirements |
| 41 | + |
| 42 | +* Python 3.8 or higher |
| 43 | +* Anthropic API key (for Claude) |
| 44 | + |
| 45 | +## 📥 Installation |
| 46 | + |
| 47 | +### Using git |
| 48 | + |
| 49 | +```bash |
| 50 | +# Clone the repository |
| 51 | +git clone https://github.com/HumainLabs/forkify-cmdline.git |
| 52 | +cd forkify-cmdline |
| 53 | + |
| 54 | +# Run the setup script |
| 55 | +./scripts/setup.sh |
| 56 | +``` |
| 57 | + |
| 58 | +### Configuration |
| 59 | + |
| 60 | +Update the `.env` file with your API keys: |
| 61 | + |
| 62 | +``` |
| 63 | +ANTHROPIC_API_KEY=your_api_key_here |
| 64 | +``` |
| 65 | + |
| 66 | +## 🚀 Usage |
| 67 | + |
| 68 | +Start the command-line interface: |
| 69 | + |
| 70 | +```bash |
| 71 | +python claude.py |
| 72 | +``` |
| 73 | + |
| 74 | +Or use the development script: |
| 75 | + |
| 76 | +```bash |
| 77 | +./scripts/dev.sh |
| 78 | +``` |
| 79 | + |
| 80 | +### Working with Documents |
| 81 | + |
| 82 | +1. Place your documents in the `input-docs/main` or create subdirectories for organization |
| 83 | +2. Start a conversation with `/sw <name>` to create a new conversation |
| 84 | +3. Refer to documents in your queries with `@@filename` syntax |
| 85 | +4. Ask questions about your documents |
| 86 | + |
| 87 | +### Sample Session |
| 88 | + |
| 89 | +``` |
| 90 | +> /sw research_project |
| 91 | +Created new conversation 'research_project' |
| 92 | +> I need to analyze @@research_paper.pdf |
| 93 | +Processing document 'research_paper.pdf'... |
| 94 | +Document analysis complete. |
| 95 | +> What are the key findings in this paper? |
| 96 | +The key findings from the research paper include: |
| 97 | +[Claude generates response analyzing the document] |
| 98 | +``` |
| 99 | + |
| 100 | +## 🧰 Command Reference |
| 101 | + |
| 102 | +| Command | Description | |
| 103 | +| ------- | ----------- | |
| 104 | +| `/q` | Quit the program | |
| 105 | +| `/sw` | List all conversations | |
| 106 | +| `/sw <name>` | Create new conversation or switch to existing | |
| 107 | +| `/reload` | Reprocess all documents for current conversation | |
| 108 | +| `/ld <n>` | Reload documents and update context (default: last 20 messages) | |
| 109 | +| `/docs` | Show document sources for current conversation | |
| 110 | +| `/p` | List available system prompts | |
| 111 | +| `/p <type>` | Switch system prompt type (analysis\|qa\|generation) | |
| 112 | +| `/xxs` | Switch to extremely short responses (128 tokens) | |
| 113 | +| `/xs` | Switch to very short responses (256 tokens) | |
| 114 | +| `/s` | Switch to short responses (512 tokens) | |
| 115 | +| `/m` | Switch to medium responses (1024 tokens) | |
| 116 | +| `/l` | Switch to long responses (2048 tokens) | |
| 117 | +| `/xl` | Switch to very long responses (4096 tokens) | |
| 118 | +| `/xxl` | Switch to extremely long responses (8192 tokens) | |
| 119 | +| `/clearall` | Clear ALL sessions and conversations (requires confirmation) | |
| 120 | +| `/clearconv` | Clear ALL conversations and related files/folders (requires confirmation) | |
| 121 | +| `/usage` | Display total token usage and costs | |
| 122 | +| `/` | Show help message | |
| 123 | + |
| 124 | +## 🛠️ Development |
| 125 | + |
| 126 | +### Directory Structure |
| 127 | + |
| 128 | +* `input-docs/` - Place your input documents here |
| 129 | +* `processed-docs/` - Contains processed document data |
| 130 | +* `output-docs/` - Contains output generated from conversations |
| 131 | +* `sessions/` - Contains conversation session data |
| 132 | +* `data/` - Contains application data |
| 133 | +* `scripts/` - Contains utility scripts |
| 134 | + |
| 135 | +### Scripts |
| 136 | + |
| 137 | +* `setup.sh` - Sets up the application environment |
| 138 | +* `dev.sh` - Starts the command-line interface |
| 139 | + |
| 140 | +## 📄 License |
| 141 | + |
| 142 | +This project is licensed under the MIT License - see the LICENSE file for details. |
| 143 | + |
| 144 | +--- |
| 145 | + |
| 146 | +Maintained with ❤️ by HumainLabs.ai |
0 commit comments