Skip to content

User Guide

Arif Dogan edited this page Mar 4, 2025 · 1 revision

Usage Guide

This guide will help you understand how to effectively use LLMDog to share your code with Large Language Models.

Basic Usage

  1. Open a terminal and navigate to your project directory:

    cd /path/to/your/project
  2. Launch LLMDog:

    llmdog
  3. Use the interactive TUI to select files and directories (see [User Interface](User-Interface) for detailed navigation).

  4. Press Enter to process your selection, generate the Markdown output, and copy it to your clipboard.

  5. Paste the output directly into any LLM chat interface (Claude, ChatGPT, etc.).

  6. Ask your question or provide context about the code you've shared.

Command-Line Options

LLMDog supports several command-line options:

llmdog [options]

Available options:

  • -h, --help: Display help information
  • -v, --version: Display the current version of LLMDog
  • --about: Show information about LLMDog

Example Workflow

Here's a complete example workflow:

  1. You're working on a project and encounter a bug in your code.

  2. Navigate to your project directory:

    cd ~/projects/my-web-app
  3. Launch LLMDog:

    llmdog
  4. Use the arrow keys to navigate to the relevant files.

  5. Press Space to expand directories.

  6. Press Tab to select files that are relevant to your issue.

    • Select your main source file with the bug
    • Select related model/entity files
    • Select any test files that demonstrate the issue
  7. Press Enter to generate the Markdown and copy it to your clipboard.

  8. Open your preferred LLM chat interface (e.g., Claude, ChatGPT).

  9. Paste the copied code with Ctrl+V or Cmd+V.

  10. Add your question, for example:

    I'm getting a null pointer exception in my authService when trying to validate a user token. 
    The error occurs in the validateToken method. Can you help me identify the issue and suggest a fix?
    

Output Format

LLMDog generates Markdown-formatted output with the following structure:

# Directory Structure

authService.js models/ |- user.js |- token.js tests/ |- authService.test.js


# File Contents

## File: authService.js
```js
// Your file content here with proper syntax highlighting

File: models/user.js

// Your file content here with proper syntax highlighting

// ... and so on for each selected file


This format provides the LLM with:
1. A clear overview of the project structure
2. The full content of each file
3. Proper syntax highlighting for better readability

## Working with Git Repositories

LLMDog integrates with Git by:

1. **Respecting `.gitignore`**: Files and directories in your `.gitignore` are automatically excluded from selection.

2. **Highlighting Git Status**: The UI shows different styling for:
   - Modified files
   - Untracked files
   - Ignored files

This makes it easy to focus on the relevant code that you're actively working on.

## Content Search

When dealing with larger projects, you can use the content search feature:

1. Press `/` to activate the search mode.
2. Type your search query.
3. Press `Enter` to search.
4. Use `Ctrl+S` to toggle between "filename search" and "content search" modes.

This helps you quickly find the relevant files when you're dealing with larger codebases.

## Bookmark Usage

For frequent tasks, you can save your file selections as bookmarks:

1. Select the files you commonly need to share.
2. Press `Ctrl+Shift+B` to save the current selection as a bookmark.
3. Enter a name for your bookmark when prompted.

To use your saved bookmarks:
1. Press `Ctrl+B` to open the bookmarks menu.
2. Navigate to the bookmark you want to use.
3. Press `Enter` to apply the bookmark.

See the [Bookmarks](Bookmarks) page for more detailed information.

## Tips for Effective Use

1. **Be Selective**: Only include files that are directly relevant to your question.

2. **Include Context**: Select enough files to provide context, but not so many that the LLM gets overwhelmed.

3. **Use Bookmarks**: For recurring tasks, save your selection patterns as bookmarks.

4. **Leverage Search**: Use the search functionality to quickly find relevant files in larger projects.

5. **Mind the Token Limit**: Remember that LLMs have token limits. The status bar shows an estimated token count to help you stay within limits.

6. **Focus on Modified Files**: When debugging issues, start by selecting recently modified files that might contain the bug.

Clone this wiki locally