Gitana CLI is a powerful command-line tool designed for generating Git analytics. This tool provides various statistics from Git repositories, making it easier for developers to analyze their code contributions and project history.
You can read more on MEDIUM
- First Commit Info: Retrieve the date and author of the first commit in the repository.
- Contributors List: List all contributors to the repository along with their commit counts.
- Branch count: Count and list branches, including merged branches.
- Commit Count: Get the total number of commits in the repository.
- Line Count: Count lines of code in the repository.
- Docker Integration: Generate Docker commands for GitHub repository analytics.
Docker installed on your system
Git repository URL
To install Gitana CLI, follow these steps:
-
Clone the repository:
git clone https://github.com/No-platforms/gitana.git
-
Navigate to the project directory:
cd gitana
-
Build the application:
go build -o gitana
-
(Optional) Move the binary to a directory in your PATH for easier access:
mv gitana /usr/local/bin/
-
(Optional) Config permission:
sudo chmod +x /usr/local/bin/gitana
Another way to build and install easily:
make
gitana [command] [subcommand]
-
Git Commands:
git first_commit
: Get information about the first commit.git contributors
: List all contributors.git merged_branches_count
: Count all branches created and merged.git branches
: List all merge commits in the repository.git branches_count
: Count all merge commits.git commit_count
: Count total commits in the repository.
-
Other Commands:
stat [repository_url]
: Generate Docker commands for analytics.lines
: Count lines of code in the repository.
-
Get information about the first commit:
gitana git first_commit
-
List all contributors:
gitana git contributors
-
Count all branches:
gitana git merged_branches_count
-
List all merge commits:
gitana git branches
-
Count total commits:
gitana git commit_count
-
Generate Git Stats based on https://github.com/src-d/hercules package for specific repository
Important Considerations:
- First argument is git repository URL
- Report generation time depends on repository size
- Process may take several minutes for large repositories
- Requires pulling the Hercules Docker image before analysis
- Command Syntax:
gitana stat https://github.com/user/repo.git
- Count lines of code in the repository:
gitana lines
Contributions are welcome! If you would like to contribute to Gitana CLI, please follow these steps:
- Fork the repository.
- Create a new branch (
git checkout -b feature/YourFeature
). - Make your changes and commit them (
git commit -m 'Add some feature'
). - Push to the branch (
git push origin feature/YourFeature
). - Open a Pull Request.
This project is licensed under the Apache License - see the LICENSE file for details.
- Thanks to urfave/cli for providing an easy-to-use CLI framework.
- Thanks to Docker for making containerization accessible.
- Thanks to src-d/hercules for making containerization git stats and export images.
For more information or questions, please open an issue or contact me directly!