Skip to main content

GitHub Echo

Python Version PyPI Version GitHub Stars GitHub Contributors License GitHub Issues



A command-line tool built to obtain in-depth, actionable information about GitHub repositories that is often challenging to decipher manually.

Check out the examples and read the usage instructions to start using this tool.

Help Demo

Table of Contents

Usage Instructions

Installing via PyPI

  1. Open Terminal/Command Prompt.

  2. Install the Tool:

    pip install gh-echo
    
  3. Verify Installation: To check if the tool was installed correctly, run:

    gh-echo --version
    

    If successful, this will display the version of the tool.

  4. View Available Commands: To view the commands and their descriptions:

    gh-echo --help
    

Configuration

Config File (.github-echo.toml)

This tool uses a configuration file named .github-echo.toml located in your home directory. The file allows you to set default values for various options, such as the LLM to use, token usage, and output file paths.

Create the Config File

To generate the .github-echo.toml configuration file, use the following command:

gh-echo init

This will create the configuration file at your home directory. The configuration file will look like this:

[settings]
model = "gemini"
token_usage = true

[api_keys]
# google_gemini_api_key=''
# github_api_token=''
# groq_api_key=''
  • model: The default LLM to use (options: gemini, groq).
  • token_usage: A boolean flag indicating whether to track token usage.

Adding API Keys

To use Gemini or Groq, you'll need API keys. You can obtain them from the following sources:

Make sure to replace YOUR_GEMINI_API_KEY and YOUR_GROQ_API_KEY in the configuration file with your actual API keys. If you want to use the GitHub API, you'll also need a GitHub API token. You can generate one here.

Add your keys to the api_keys section in the .github-echo.toml file. You can also choose to provide them as command-line options.

Removing the Config File

To remove the .github-echo.toml configuration file from your home directory, use the following command:

gh-echo remove-config

Command Structure

The general command structure for the tool is as follows:

gh-echo [OPTIONS] COMMAND [ARGS]...

You can see a list of available commands by running:

gh-echo --help

Available Commands

Command Description Example Command
analyze Analyze a GitHub repository and optionally output the results to a file. gh-echo analyze https://github.com/username/repository -o result.md
init Create the .github-echo.toml config file in the user's home directory. gh-echo init
remove-config Remove the .github-echo.toml configuration file from the user's home directory. gh-echo remove-config

analyze Command

The analyze command analyzes a specified GitHub repository and generates insights. You can configure various options like model choice, temperature setting, and whether to track token usage.

Usage

gh-echo analyze [OPTIONS] GITHUB_REPOSITORY_URL

Arguments

Argument Description Required
GITHUB_REPOSITORY_URL The URL of the GitHub repository to analyze. Yes

Options

Option Description Default
-m, --model Choose the LLM to generate insights (gemini or groq). gemini
-t, --model-temperature Set the temperature for the model (ranges from 0.0 to 1.0). 0.5
--show-token-usage Flag to print token usage during the process. False
-o, --output-file Specify an output file path to save the results. Could be an absolute or a relative path. None

Example

gh-echo analyze https://github.com/AryanK1511/github-echo -o result.md -t 0.5 -m gemini --show-token-usage

Error Handling

If you encounter errors, the tool will print relevant messages to the console. For instance, missing configuration files will trigger a warning, and exceptions during the analysis process will be handled and displayed in the console.

Example Run

Let's walk through an example of using the analyze command:

  1. First, create the configuration file:

    gh-echo init
    
  2. Next, use the analyze command with the desired options:

    gh-echo analyze https://github.com/AryanK1511/github-echo -o result.md -t 0.5 -m gemini --show-token-usage
    
  3. This will analyze the specified GitHub repository, use the Gemini model with a temperature of 0.5, and save the results to result.md.

This tool is designed to help you easily analyze GitHub repositories and generate insights. By configuring the .github-echo.toml file and using the appropriate command-line options, you can customize the analysis process to suit your needs.

For more information:

Contributing

For contributions, please refer to the CONTRIBUTING file.

Code of Conduct

Please read and adhere to our CODE_OF_CONDUCT.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Author

Aryan Khurana

Metadata

Release files for gh-echo 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gh-echo 1.0.0
File Size Uploaded
gh_echo-1.0.0.tar.gz 15.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for gh-echo 1.0.0
File Interpreter ABI Platform
gh_echo-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 34.5 kB

Release files / gh_echo-1.0.0.tar.gz

Download URL gh_echo-1.0.0.tar.gz
Size 15.9 kB
Tags Source
SHA-256 checksum
How to use checksums
31c8b83bbdfb16308b92a91cc0d46981595563fa55e8c16a86454835ae971c58
BLAKE2b-256 checksum
How to use checksums
69237d154ce3377867dfeb4a088f04979b9524e818eed917071a4e33f52fcc4b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.4 CPython/3.13.0 Darwin/24.0.0

Release files / gh_echo-1.0.0-py3-none-any.whl

Download URL gh_echo-1.0.0-py3-none-any.whl
Size 18.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
92c329fb1c845cb2a52164d6257ccee8f40f3a949e54a1141af375988eb35f8a
BLAKE2b-256 checksum
How to use checksums
b32a9110010a5a8202ab927fa31d503caf5e70172ab51bb4b9a197c95bbaf6a9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.4 CPython/3.13.0 Darwin/24.0.0

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page