Remote Repository
Inspect a remote Git repository without cloning the entire history.
Basic Usage
bash
gitinspect inspect https://github.com/user/repo.gitHow It Works
- gitinspect resolves the HEAD commit via
git ls-remote - It checks the cache for an existing snapshot
- If not cached, it performs a shallow clone (
--depth 1 --filter=blob:none) - The repository is analyzed and the result is cached
- The temporary clone is cleaned up
Any Git Host
Works with any Git remote — GitHub, GitLab, Bitbucket, self-hosted:
bash
# GitHub
gitinspect inspect https://github.com/user/repo.git
# GitLab
gitinspect inspect https://gitlab.com/user/repo.git
# Bitbucket
gitinspect inspect https://bitbucket.org/user/repo.git
# Self-hosted
gitinspect inspect https://git.company.com/team/project.gitWith Options
bash
gitinspect inspect \
--format text \
--max-tokens 4000 \
--strip \
https://github.com/user/repo.gitDisable Cache
Force a fresh clone:
bash
gitinspect inspect --no-cache https://github.com/user/repo.gitPerformance Tips
- Use caching (default) — repeated inspections of the same repo are instant
- Set a token budget —
--max-tokens 4000is usually enough for an overview - Use
--strip— removing comments saves significant tokens - Use
--include— only inspect the files you need