get_codebase
Clone any Git repository and generate a structured text file containing its file structure, all text file contents, and estimated token count, while respecting .gitignore and .repomixignore patterns.
Instructions
Clone a Git repository and generate a structured text file containing its contents.
This tool clones a git repository from the provided URL, processes its contents,
and returns a single text file containing the repository structure and the content
of all files. Binary files and empty text files are excluded. The tool respects
.gitignore and .repomixignore patterns. The output includes an estimated token count
using the o200k_base encoding.
Args:
repo_url (str): The URL of the Git repository to clone
use_token (bool, optional): Whether to use the GitLab token for authentication.
Defaults to True.
Returns:
str: A formatted text representation of the repository contents, including
file structure, estimated token count, and the content of all text files.
Raises:
GitCommandError: If there is an error during the git clone operation
Exception: For any other errors that occur during processing
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| repo_url | Yes | ||
| use_token | No |