# GitHub Echo
<p align="left">
<a href="https://python.org">
<img src="https://img.shields.io/badge/Python-3.11-blue?logo=python&logoColor=white" alt="Python Version">
</a>
<a href="https://pypi.org/project/gh-echo/">
<img src="https://img.shields.io/pypi/v/gh-echo?color=blue&label=pypi%20package" alt="PyPI Version">
</a>
<a href="https://github.com/AryanK1511/github-echo">
<img src="https://img.shields.io/github/stars/AryanK1511/github-echo?style=social" alt="GitHub Stars">
</a>
<a href="https://github.com/AryanK1511/github-echo/graphs/contributors">
<img src="https://img.shields.io/github/contributors/AryanK1511/github-echo" alt="GitHub Contributors">
</a>
<a href="https://opensource.org/licenses/MIT">
<img src="https://img.shields.io/github/license/AryanK1511/github-echo" alt="License">
</a>
<a href="https://github.com/AryanK1511/github-echo/issues">
<img src="https://img.shields.io/github/issues/AryanK1511/github-echo" alt="GitHub Issues">
</a>
</p>
<p align="center">
<img width="100%" src="https://github.com/AryanK1511/github-echo/blob/main/assets/logo.png?raw=true"><br /><br />
</p>
**A command-line tool built to obtain in-depth, actionable information about GitHub repositories that is often challenging to decipher manually.**
> [!NOTE]
>
> You should have **Python 3+** installed before using this tool. Download from [python.org](https://www.python.org/downloads/).
Check out the [examples](./_examples/README.md) and read the [usage instructions](#usage-instructions) to start using this tool.
![Help Demo](./assets/help-demo.gif)
## Table of Contents
- [Usage Instructions](#usage-instructions)
- [Installing via PyPI](#installing-via-pypi)
- [Configuration](#configuration)
- [Config File (`.github-echo.toml`)](#config-file-github-echotoml)
- [Create the Config File](#create-the-config-file)
- [Adding API Keys](#adding-api-keys)
- [Removing the Config File](#removing-the-config-file)
- [Command Structure](#command-structure)
- [Available Commands](#available-commands)
- [`analyze` Command](#analyze-command)
- [Usage](#usage)
- [Arguments](#arguments)
- [Options](#options)
- [Example](#example)
- [Error Handling](#error-handling)
- [Example Run](#example-run)
- [Contributing](#contributing)
- [Code of Conduct](#code-of-conduct)
- [License](#license)
- [Author](#author)
## Usage Instructions
### Installing via PyPI
1. **Open Terminal/Command Prompt**.
2. **Install the Tool**:
```bash
pip install gh-echo
```
3. **Verify Installation**:
To check if the tool was installed correctly, run:
```bash
gh-echo --version
```
If successful, this will display the version of the tool.
4. **View Available Commands**:
To view the commands and their descriptions:
```bash
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:
```bash
gh-echo init
```
This will create the configuration file at your home directory. The configuration file will look like this:
```toml
[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:
- **Gemini API Key**: [Google Gemini API](https://developers.google.com/ai/gemini)
- **Groq API Key**: [Groq API](https://groq.com/)
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](https://github.com/settings/tokens).
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:
```bash
gh-echo remove-config
```
## Command Structure
The general command structure for the tool is as follows:
```bash
gh-echo [OPTIONS] COMMAND [ARGS]...
```
You can see a list of available commands by running:
```bash
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
```bash
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
```bash
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:
```bash
gh-echo init
```
2. Next, use the `analyze` command with the desired options:
```bash
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:
- [Gemini API](https://developers.google.com/ai/gemini)
- [Groq API](https://groq.com/)
- [GitHub](https://github.com)
## Contributing
For contributions, please refer to the [CONTRIBUTING](./CONTRIBUTING.md) file.
## Code of Conduct
Please read and adhere to our [CODE_OF_CONDUCT](./CODE_OF_CONDUCT.md).
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
## Author
[Aryan Khurana](https://www.github.com/AryanK1511)
Raw data
{
"_id": null,
"home_page": "https://pypi.org/project/gh-echo/o",
"name": "gh-echo",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.9",
"maintainer_email": null,
"keywords": "GitHub, GenAI, Python3, CLI",
"author": "Aryan Khurana",
"author_email": "aryankhurana1511@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/69/23/7d154ce3377867dfeb4a088f04979b9524e818eed917071a4e33f52fcc4b/gh_echo-1.0.0.tar.gz",
"platform": null,
"description": "# GitHub Echo\n\n<p align=\"left\">\n <a href=\"https://python.org\">\n <img src=\"https://img.shields.io/badge/Python-3.11-blue?logo=python&logoColor=white\" alt=\"Python Version\">\n </a>\n <a href=\"https://pypi.org/project/gh-echo/\">\n <img src=\"https://img.shields.io/pypi/v/gh-echo?color=blue&label=pypi%20package\" alt=\"PyPI Version\">\n </a>\n <a href=\"https://github.com/AryanK1511/github-echo\">\n <img src=\"https://img.shields.io/github/stars/AryanK1511/github-echo?style=social\" alt=\"GitHub Stars\">\n </a>\n <a href=\"https://github.com/AryanK1511/github-echo/graphs/contributors\">\n <img src=\"https://img.shields.io/github/contributors/AryanK1511/github-echo\" alt=\"GitHub Contributors\">\n </a>\n <a href=\"https://opensource.org/licenses/MIT\">\n <img src=\"https://img.shields.io/github/license/AryanK1511/github-echo\" alt=\"License\">\n </a>\n <a href=\"https://github.com/AryanK1511/github-echo/issues\">\n <img src=\"https://img.shields.io/github/issues/AryanK1511/github-echo\" alt=\"GitHub Issues\">\n </a>\n</p>\n\n<p align=\"center\">\n <img width=\"100%\" src=\"https://github.com/AryanK1511/github-echo/blob/main/assets/logo.png?raw=true\"><br /><br />\n</p>\n\n**A command-line tool built to obtain in-depth, actionable information about GitHub repositories that is often challenging to decipher manually.**\n\n> [!NOTE]\n>\n> You should have **Python 3+** installed before using this tool. Download from [python.org](https://www.python.org/downloads/).\n\nCheck out the [examples](./_examples/README.md) and read the [usage instructions](#usage-instructions) to start using this tool.\n\n![Help Demo](./assets/help-demo.gif)\n\n## Table of Contents\n\n- [Usage Instructions](#usage-instructions)\n - [Installing via PyPI](#installing-via-pypi)\n- [Configuration](#configuration)\n - [Config File (`.github-echo.toml`)](#config-file-github-echotoml)\n - [Create the Config File](#create-the-config-file)\n - [Adding API Keys](#adding-api-keys)\n - [Removing the Config File](#removing-the-config-file)\n- [Command Structure](#command-structure)\n - [Available Commands](#available-commands)\n - [`analyze` Command](#analyze-command)\n - [Usage](#usage)\n - [Arguments](#arguments)\n - [Options](#options)\n - [Example](#example)\n- [Error Handling](#error-handling)\n- [Example Run](#example-run)\n- [Contributing](#contributing)\n- [Code of Conduct](#code-of-conduct)\n- [License](#license)\n- [Author](#author)\n\n## Usage Instructions\n\n### Installing via PyPI\n\n1. **Open Terminal/Command Prompt**.\n2. **Install the Tool**:\n\n ```bash\n pip install gh-echo\n ```\n\n3. **Verify Installation**:\n To check if the tool was installed correctly, run:\n\n ```bash\n gh-echo --version\n ```\n\n If successful, this will display the version of the tool.\n\n4. **View Available Commands**:\n To view the commands and their descriptions:\n\n ```bash\n gh-echo --help\n ```\n\n## Configuration\n\n### Config File (`.github-echo.toml`)\n\nThis 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.\n\n#### Create the Config File\n\nTo generate the `.github-echo.toml` configuration file, use the following command:\n\n```bash\ngh-echo init\n```\n\nThis will create the configuration file at your home directory. The configuration file will look like this:\n\n```toml\n[settings]\nmodel = \"gemini\"\ntoken_usage = true\n\n[api_keys]\n# google_gemini_api_key=''\n# github_api_token=''\n# groq_api_key=''\n```\n\n- **model**: The default LLM to use (options: `gemini`, `groq`).\n- **token_usage**: A boolean flag indicating whether to track token usage.\n\n#### Adding API Keys\n\nTo use **Gemini** or **Groq**, you'll need API keys. You can obtain them from the following sources:\n\n- **Gemini API Key**: [Google Gemini API](https://developers.google.com/ai/gemini)\n- **Groq API Key**: [Groq API](https://groq.com/)\n\nMake 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](https://github.com/settings/tokens).\n\nAdd your keys to the `api_keys` section in the `.github-echo.toml` file. You can also choose to provide them as command-line options.\n\n#### Removing the Config File\n\nTo remove the `.github-echo.toml` configuration file from your home directory, use the following command:\n\n```bash\ngh-echo remove-config\n```\n\n## Command Structure\n\nThe general command structure for the tool is as follows:\n\n```bash\ngh-echo [OPTIONS] COMMAND [ARGS]...\n```\n\nYou can see a list of available commands by running:\n\n```bash\ngh-echo --help\n```\n\n### Available Commands\n\n| Command | Description | Example Command |\n| --------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------- |\n| `analyze` | Analyze a GitHub repository and optionally output the results to a file. | `gh-echo analyze https://github.com/username/repository -o result.md` |\n| `init` | Create the `.github-echo.toml` config file in the user's home directory. | `gh-echo init` |\n| `remove-config` | Remove the `.github-echo.toml` configuration file from the user's home directory. | `gh-echo remove-config` |\n\n### `analyze` Command\n\nThe `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.\n\n#### Usage\n\n```bash\ngh-echo analyze [OPTIONS] GITHUB_REPOSITORY_URL\n```\n\n#### Arguments\n\n| Argument | Description | Required |\n| ----------------------- | -------------------------------------------- | -------- |\n| `GITHUB_REPOSITORY_URL` | The URL of the GitHub repository to analyze. | Yes |\n\n#### Options\n\n| Option | Description | Default |\n| ------------------------- | ----------------------------------------------------------------------------------------- | -------- |\n| `-m, --model` | Choose the LLM to generate insights (`gemini` or `groq`). | `gemini` |\n| `-t, --model-temperature` | Set the temperature for the model (ranges from `0.0` to `1.0`). | `0.5` |\n| `--show-token-usage` | Flag to print token usage during the process. | `False` |\n| `-o, --output-file` | Specify an output file path to save the results. Could be an absolute or a relative path. | `None` |\n\n#### Example\n\n```bash\ngh-echo analyze https://github.com/AryanK1511/github-echo -o result.md -t 0.5 -m gemini --show-token-usage\n```\n\n## Error Handling\n\nIf 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.\n\n## Example Run\n\nLet's walk through an example of using the `analyze` command:\n\n1. First, create the configuration file:\n\n ```bash\n gh-echo init\n ```\n\n2. Next, use the `analyze` command with the desired options:\n\n ```bash\n gh-echo analyze https://github.com/AryanK1511/github-echo -o result.md -t 0.5 -m gemini --show-token-usage\n ```\n\n3. This will analyze the specified GitHub repository, use the Gemini model with a temperature of 0.5, and save the results to `result.md`.\n\nThis 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.\n\nFor more information:\n\n- [Gemini API](https://developers.google.com/ai/gemini)\n- [Groq API](https://groq.com/)\n- [GitHub](https://github.com)\n\n## Contributing\n\nFor contributions, please refer to the [CONTRIBUTING](./CONTRIBUTING.md) file.\n\n## Code of Conduct\n\nPlease read and adhere to our [CODE_OF_CONDUCT](./CODE_OF_CONDUCT.md).\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Author\n\n[Aryan Khurana](https://www.github.com/AryanK1511)\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A command-line tool built to obtain in-depth, actionable information about GitHub repositories.",
"version": "1.0.0",
"project_urls": {
"Documentation": "https://github.com/AryanK1511/github-echo/blob/main/README.md",
"Homepage": "https://pypi.org/project/gh-echo/o",
"Repository": "https://github.com/AryanK1511/github-echo"
},
"split_keywords": [
"github",
" genai",
" python3",
" cli"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "b32a9110010a5a8202ab927fa31d503caf5e70172ab51bb4b9a197c95bbaf6a9",
"md5": "032d53ccf0d9d3d0fc3d9163f8b2de51",
"sha256": "92c329fb1c845cb2a52164d6257ccee8f40f3a949e54a1141af375988eb35f8a"
},
"downloads": -1,
"filename": "gh_echo-1.0.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "032d53ccf0d9d3d0fc3d9163f8b2de51",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.9",
"size": 18553,
"upload_time": "2024-11-17T22:33:40",
"upload_time_iso_8601": "2024-11-17T22:33:40.659140Z",
"url": "https://files.pythonhosted.org/packages/b3/2a/9110010a5a8202ab927fa31d503caf5e70172ab51bb4b9a197c95bbaf6a9/gh_echo-1.0.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "69237d154ce3377867dfeb4a088f04979b9524e818eed917071a4e33f52fcc4b",
"md5": "6951e579fb37bc2a4c9bee7ed69b4a79",
"sha256": "31c8b83bbdfb16308b92a91cc0d46981595563fa55e8c16a86454835ae971c58"
},
"downloads": -1,
"filename": "gh_echo-1.0.0.tar.gz",
"has_sig": false,
"md5_digest": "6951e579fb37bc2a4c9bee7ed69b4a79",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.9",
"size": 15905,
"upload_time": "2024-11-17T22:33:41",
"upload_time_iso_8601": "2024-11-17T22:33:41.743621Z",
"url": "https://files.pythonhosted.org/packages/69/23/7d154ce3377867dfeb4a088f04979b9524e818eed917071a4e33f52fcc4b/gh_echo-1.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-17 22:33:41",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "AryanK1511",
"github_project": "github-echo",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "gh-echo"
}