Skip to content

ShammiAnand/rtt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rtt

rtt is a cli application which allows you to convert a repository of code/files and webpages into flat files (both txt and md formats are supported) and interact with LLMs all using one CLI

Installation

currently only supports macOS & Linux distros

curl -sfL https://raw.githubusercontent.com/shammianand/rtt/main/install.sh | sh
# Add to your shell config (~/.zshrc or ~/.bashrc):
export GROQ_API_KEY=sk_xxxx 

Usage

Convert Local Directory

# Convert current directory to rtt.txt (optimized format)
rtt

# Convert current directory to rtt.txt (explicit)
rtt .

# Convert directory to custom output file
rtt /path/to/dir -o output.txt

Download Web Pages

# Save webpage as markdown
rtt url https://example.com -o page.md

Query Content

# Query current directory
rtt query . "Explain this codebase"

# Query webpage
rtt query url https://example.com "Summarize this article"

Features

  • Current Directory Support: Run rtt without arguments to process the current directory
  • Automatic Cache Filtering: Always skips cache files, build artifacts, and non-code/text files
  • Optimized Text Output: Always creates minimal-formatting text files that save tokens for LLM processing
  • Comprehensive File Support: Processes code files, text files, markdown, configuration files, and more

File Filtering

The tool automatically skips:

  • Cache files (.cache, .tmp, .log, etc.)
  • Build artifacts (node_modules, target, build, dist)
  • System files (.DS_Store, Thumbs.db)
  • Binary and non-text files

Output Format

The tool always creates optimized text files with:

  • Minimal formatting and no extra spaces
  • Simple FILE: path headers for each file
  • No markdown syntax or file separators
  • Ideal for token-efficient LLM processing

By default, queries use the Mixtral-8x7b model with a 32k context window.

For more details:

rtt help
rtt query --help

Author

@shammianand

About

repo/url to text for easy interaction with llms all built in

Topics

Resources

License

Stars

Watchers

Forks

Contributors