Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mattrltrent/ghloc
Counts the total number of LOC you've written across your entire GitHub account.
https://github.com/mattrltrent/ghloc
github-api github-profile homebrew homebrew-tap
Last synced: 21 days ago
JSON representation
Counts the total number of LOC you've written across your entire GitHub account.
- Host: GitHub
- URL: https://github.com/mattrltrent/ghloc
- Owner: mattrltrent
- License: mit
- Created: 2024-02-01T00:56:25.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-02-05T05:43:35.000Z (9 months ago)
- Last Synced: 2024-02-05T06:39:06.585Z (9 months ago)
- Topics: github-api, github-profile, homebrew, homebrew-tap
- Language: Rust
- Homepage: https://matthewtrent.me/articles/ghloc
- Size: 132 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# GitHub LOC counter: `ghloc`
[Blog post](https://matthewtrent.me/articles/ghloc) covering its creation 📚
### Example output
This scans all your repositories and aggregates your commit data (`ghloc stats`):
### Install via Homebrew
To install, run:
```sh
brew tap mattrltrent/tap ; brew install ghloc
```To verify installation, run:
```sh
ghloc --version
```### Quick start
**Get your GitHub token**
1. Go to [GitHub's token manager](https://github.com/settings/tokens?type=beta) (you may need to login) and click the **Generate new token** button in the top-right.
2. Give your new token a name, an optional description, and set its expiration. The specifics of what you enter don't matter. However, if your token expires, you'll have to re-enter a new one in the tool.
3. Under **Repository access**, select **All repositories**.
4. Under the **Permissions** > **Repository permissions** dropdown, grant your token **Access: Read-only** for:
- **Contents**
- **Commit statuses****Use the CLI tool**
Run this to set your credentials with your GitHub username and newfound token:
```sh
ghloc set --username --token
```You can check they were added and saved correctly by running:
```sh
ghloc creds
```And if needed, clear them by running:
```sh
ghloc clear
```Then run this to check your stats (it will take a while):
```sh
ghloc stats
```If you're ever lost, try:
```sh
ghloc help
```or:
```sh
ghloc example
```