Skip to content

๐ŸŒ Gittxt Streamlit Plugin

The Streamlit Plugin provides a clean visual interface for Gittxt. It allows users to scan GitHub repositories and download AI-ready textual outputs via a local or cloud-hosted web app.


๐Ÿš€ Launch the Web App

Locally via CLI

gittxt plugin run gittxt-streamlit

Or Manually

streamlit run src/plugins/gittxt_streamlit/main.py

App runs at: http://localhost:8501


โ˜๏ธ Hosted Version

Access the live app on Streamlit Cloud: ๐Ÿ‘‰ gittxt.streamlit.app

This version mirrors the full CLI functionality with a polished UX.


๐ŸŽ› Features

๐Ÿ“‚ Scan GitHub Repos

  • Input any public GitHub repository URL
  • Configure filters: include/exclude patterns, directory filters, .gittxtignore support
  • Set output options: .txt, .json, .md, --lite, --zip, --tree-depth
  • View summary metrics, skipped files, and non-textual assets
  • One-click downloads for all outputs (including ZIP bundle)

๐Ÿง  AI Repo Summary (Beta)

  • Generate LLM-based repo summaries using OpenAI or Ollama
  • Choose Docs-Only vs Full-File mode for context
  • View token-aware context preview before analysis
  • Interact via multi-turn chat
  • Export chat history as .json or .md

๐Ÿ“ Output Directory Structure

By default, outputs are written to:

/tmp/gittxt_streamlit_output/
โ”œโ”€โ”€ txt/
โ”œโ”€โ”€ json/
โ”œโ”€โ”€ md/
โ””โ”€โ”€ zip/

These are cleared when the Restart button is clicked.


๐Ÿ›  Architecture Overview

The plugin is modular and mirrors the CLI tool:

src/plugins/gittxt_streamlit/
โ”œโ”€โ”€ main.py                # UI router (Scan โ†” AI Summary)
โ”œโ”€โ”€ requirements.txt
โ”œโ”€โ”€ scan/                  # Scan interface
โ”‚   โ”œโ”€โ”€ app.py             # Scan UI
โ”‚   โ”œโ”€โ”€ pipeline.py        # CLI-equivalent scanner logic
โ”‚   โ””โ”€โ”€ ui_components.py   # Filters, results, downloads
โ””โ”€โ”€ ai/                    # AI Summary interface
    โ”œโ”€โ”€ ai_summary.py      # Full LLM UI
    โ”œโ”€โ”€ llm_handler.py     # OpenAI / Ollama API calls
    โ”œโ”€โ”€ context_builder.py # Context builder from scanned files
    โ””โ”€โ”€ chat_exporter.py   # Export markdown / json chat

โš™๏ธ Plugin Management

You can use the plugin CLI system to install and run this plugin:

Install

gittxt plugin install gittxt-streamlit

Run

gittxt plugin run gittxt-streamlit

Dependencies in requirements.txt are auto-installed on first run.


โš ๏ธ Notes

  • Scans call gittxt scan via internal async logic, mirroring CLI behavior.
  • Only one scan can run per session. Restart clears prior output.
  • Chat summary is experimental โ€” LLM issues may occur (especially with token overflow).

๐Ÿ’ก Tips

  • Use Docs-Only mode for faster LLM summaries
  • Toggle Advanced Filters to fine-tune file selection
  • .gittxtignore is supported with the Sync Ignore checkbox
  • Token counts and skipped file reasons are visible in the scan summary

Back: API Plugin