How coderamp-labs/gitingest works
Gitingest turns a repository URL, slug, or local directory into an LLM-ready text digest, with file-tree, size, and token statistics. The main workflow parses the source and filtering options, resolves and clones remote repositories when needed, traverses files, and formats the result. A FastAPI service exposes ingestion and digest retrieval, with optional S3 caching and storage. The graph reflects README-described capabilities and indexed references; some server and CLI internals were not sampled, so uncertain links are omitted.
Main entry points: query_processor.py Server query orchestration · ingestion.py Filesystem ingestion · entrypoint.py CLI and package API · query_parser.py Source and option parsing
Components 18
User interfaces
- CLI and package API
src/gitingest/entrypoint.py - Web interface
src/static/js
Ingestion pipeline
- Source and option parsing
src/gitingest/query_parser.py - URL and ref utilities
src/gitingest/utils/query_parser_utils.py - Repository cloning
src/gitingest/clone.py - Git operations
src/gitingest/utils/git_utils.py
Digest processing
- Filesystem ingestion
src/gitingest/ingestion.py - File filtering
src/gitingest/utils/pattern_utils.py - Ignore patterns
src/gitingest/utils/ignore_patterns.py - Digest formatting
src/gitingest/output_formatter.py - Ingestion configuration
src/gitingest/config.py - Ingestion data schemas
src/gitingest/schemas/ingestion.py
Web service
- FastAPI application
src/server/main.py - Ingest routes
src/server/routers/ingest.py - Server query orchestration
src/server/query_processor.py - Request and response models
src/server/models.py - S3 digest storage
src/server/s3_utils.py
Other components
- Repository or directory
Connections 21
- Repository or directory → CLI and package API: provides input
README.md - CLI and package API → Source and option parsing: parses source
src/gitingest/entrypoint.py - Source and option parsing → URL and ref utilities: normalizes input
src/gitingest/query_parser.py - Source and option parsing → Git operations: resolves commit
src/gitingest/query_parser.py - CLI and package API → Repository cloning: clones repository
src/gitingest/entrypoint.py - Repository cloning → Git operations: uses Git
src/gitingest/clone.py - CLI and package API → Filesystem ingestion: ingests files
src/gitingest/entrypoint.py - Filesystem ingestion → Digest formatting: formats digest
src/gitingest/ingestion.py - Filesystem ingestion → Ingestion configuration: uses limits
src/gitingest/ingestion.py - Filesystem ingestion → File filtering: applies filters
- File filtering → Ignore patterns: uses patterns
src/gitingest/utils/pattern_utils.py - Filesystem ingestion → Ingestion data schemas: builds file data
src/gitingest/ingestion.py - Web interface → FastAPI application: submits request
- FastAPI application → Ingest routes: registers routes
src/server/main.py - Ingest routes → Request and response models: validates request
src/server/routers/ingest.py - Ingest routes → Server query orchestration: starts ingestion
src/server/routers/ingest.py - Server query orchestration → Source and option parsing: parses repository
src/server/query_processor.py - Server query orchestration → Repository cloning: clones repository
src/server/query_processor.py - Server query orchestration → Filesystem ingestion: ingests files
src/server/query_processor.py - Server query orchestration → S3 digest storage: checks and stores
src/server/query_processor.py - Server query orchestration → Request and response models: returns response
src/server/query_processor.py