GitLines seamlessly integrates with GitHub's interface to provide instant code statistics directly on repository pages. With a sleek, interactive visualization, you can quickly see:
- Total lines of code in the repository
- Breakdown by programming language
- Visual distribution with an interactive donut chart
- Direct links to explore specific file types
- Real-time Analysis: Instantly analyze repositories as you browse GitHub
- Language Breakdown: See code distribution across different programming languages
- Interactive Chart: Hover over segments to see detailed statistics
- Branch Selection: Analyze specific branches or all branches
- Configurable Performance: Adjust concurrent file processing for optimal speed
- GitHub API Integration: Uses official GitHub API for accurate results
- Wide Language Support: Detects over 30 programming languages
- Visit the GitLines Add-on page
- Click "Add to Firefox"
- Follow the prompts to complete installation
- Click the puzzle icon in the toolbar
- Find "GitLines" and click the gear icon
- Select "Pin to Toolbar" to make the extension easily accessible
- Download the repository:
or download the ZIP file and extract it.
git clone https://github.com/Stefanos0710/GitLines.git
- Open Firefox and navigate to
about:debugging - Click "This Firefox"
- Click "Load Temporary Add-on..."
- Navigate to the GitLines folder and select
manifest.json - Pin the extension to your toolbar as described above
A personal access token is required to access GitHub's API:
- Sign in to GitHub
- Click your profile picture β Settings β Developer settings β Personal access tokens β Tokens (classic) (or just go to https://github.com/settings/tokens)
- Click Generate new token β Generate new token (classic)
- Give your token a descriptive name (e.g., "GitLines Extension")
- Set the expiration as desired
- Select the following permissions:
repo- For private repositories (if needed)
- Click Generate token
- IMPORTANT: Copy the token immediately - you won't see it again!
- Click the GitLines icon in your browser toolbar
- Enter your GitHub API token in the designated field
- Adjust settings as desired:
- Concurrent Files: Number of files to process simultaneously (3-10 recommended)
- Branch Selection: Specify which branch(es) to analyze
- Click Save
Once installation and setup are complete:
-
Visit any GitHub Repository:
- The extension will automatically detect GitHub repository pages
-
View Statistics:
- Look for the "Lines of Code" section in the repository sidebar
- See total lines and breakdown by language
- Interact with the chart for more details
-
Customization:
- Click the GitLines icon to adjust settings
- Modify concurrent processing for speed/resource balance
- Select specific branches to analyze
- Verify that the extension is enabled in the popup
- Check that you've entered a valid GitHub API token
- Ensure you have sufficient API rate limits remaining
- Decrease the "Concurrent Files" setting
- Analyze specific branches instead of all branches
- Check your network connection
- GitHub API has rate limits that may affect usage
- Consider authenticating with a token that has higher rate limits
- Wait for rate limits to reset if you've reached them
- Basic knowledge of JavaScript, HTML, and CSS
- Firefox for testing
GitLines/
βββ manifest.json # Extension manifest
βββ gitlines.js # Main content script
βββ popup/
β βββ popup.html # Popup interface
β βββ popup.js # Popup functionality
β βββ style.css # Popup styling
βββ icons/ # Extension icons
βββ README.md # Documentation
- Clone the repository
- Make your changes
- Test using Firefox's
about:debuggingpage - Load as a temporary add-on
This project is licensed under the MIT License - see the LICENSE file for details.
Contributions are welcome! To contribute:
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
If you encounter any issues or have questions:
- Open an issue on GitHub
- Provide details about your browser, OS, and the problem you're experiencing