https://github.com/vishalyadav0987/github-user-activity-cli
https://roadmap.sh/projects/github-user-activity/solutions?u=69e11c4635198b31d63d8f6d
https://github.com/vishalyadav0987/github-user-activity-cli
cli-tool ddd-architecture github github-api golang
Last synced: 14 days ago
JSON representation
https://roadmap.sh/projects/github-user-activity/solutions?u=69e11c4635198b31d63d8f6d
- Host: GitHub
- URL: https://github.com/vishalyadav0987/github-user-activity-cli
- Owner: vishalyadav0987
- Created: 2026-04-27T06:30:52.000Z (about 2 months ago)
- Default Branch: main
- Last Pushed: 2026-04-27T07:45:56.000Z (about 2 months ago)
- Last Synced: 2026-04-27T09:20:03.982Z (about 2 months ago)
- Topics: cli-tool, ddd-architecture, github, github-api, golang
- Language: Go
- Homepage:
- Size: 6.84 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ๐ GitHub Activity CLI (Golang)
๐ **Project URL:**
https://roadmap.sh/projects/github-user-activity
---
A lightweight and efficient **Command Line Interface (CLI)** application built in **Go (Golang)** to fetch and display a GitHub user's recent activity directly in the terminal.
---
## ๐ Features
* ๐ค Fetch GitHub user activity using username
* ๐ก Uses GitHub public API (no authentication required)
* ๐งพ Clean and readable terminal output
* ๐ Supports multiple event types (Push, Issues, Stars, etc.)
* โก Fast and lightweight CLI tool
* โ Graceful error handling (invalid user, API failure, etc.)
* ๐ง Clean Architecture (Domain + Application + Infrastructure)
---
## ๐ Project Structure
```
github-user-activity
โโ README.md
โโ cmd
โ โโ github-user-activity
โ โโ main.go
โโ go.mod
โโ interfaces
โ โโ cli
โ โโ handler.go
โ โโ output.go
โ โโ parser.go
โโ internal
โโ application
โ โโ github-activity
โ โโ service.go
โโ config
โโ domain
โ โโ github-activity
โ โโ entity.go
โ โโ errors.go
โโ infrastructure
โโ client
โ โโ github_client.go
โโ github-activity
โโ service_implementation.go
```
---
## โ๏ธ Installation
### 1. Clone repo
```bash
git clone https://github.com/vishalyadav0987/github-activity-cli.git
cd github-activity-cli
```
---
### 2. Build binary
```bash
go build -o github-activity cmd/github-activity/main.go
```
---
### 3. Make it global (Mac/Linux)
```bash
sudo mv github-activity /usr/local/bin/
```
---
## ๐งช Usage
### โถ๏ธ Fetch GitHub Activity
```bash
github-activity
```
---
### ๐ Example
```bash
github-activity vishalyadav0987
```
---
## ๐ฅ๏ธ Example Output
```
- Pushed commits to vishalyadav0987/github-user-activity-cli
- Did CreateEvent on vishalyadav0987/github-user-activity-cli
- Pushed commits to vishalyadav0987/task-tracker-cli
- Pushed commits to vishalyadav0987/task-tracker-cli
- Pushed commits to vishalyadav0987/task-tracker-cli
- Pushed commits to vishalyadav0987/task-tracker-cli
- Pushed commits to vishalyadav0987/task-tracker-cli
- Pushed commits to vishalyadav0987/task-tracker-cli
- Pushed commits to vishalyadav0987/task-tracker-cli
- Pushed commits to vishalyadav0987/task-tracker-cli
- Pushed commits to vishalyadav0987/task-tracker-cli
- Pushed commits to vishalyadav0987/task-tracker-cli
- Did CreateEvent on vishalyadav0987/task-tracker-cli
- Pushed commits to vishalyadav0987/vishalyadav0987
- Pushed commits to vishalyadav0987/vishalyadav0987
- Pushed commits to vishalyadav0987/go-auth-ddd
- Pushed commits to vishalyadav0987/go-auth-ddd
- Did CreateEvent on vishalyadav0987/go-auth-ddd
```
---
## โ ๏ธ Error Handling
* โ Invalid username โ "user not found"
* โ API failure โ "failed to fetch data"
* โ No activity โ "no recent activity found"
* โ Rate limit exceeded โ "github api rate limit exceeded"
---
## ๐ง Tech Stack
* Go (Golang)
* GitHub REST API
* Clean Architecture (DDD inspired)
* CLI Interface
* Net/http package (no external libraries)
---
## ๐๏ธ Architecture Highlights
* ๐น Domain-driven structure
* ๐น Dependency Injection (manual)
* ๐น Interface-based design
* ๐น Separation of concerns (CLI / Service / Infra)
---
## ๐ฅ Future Improvements
* ๐ฏ Add caching for repeated users
* โฑ๏ธ Add rate limit handling & retry logic
* ๐จ Colored and formatted CLI output
* ๐ Group events by type (Push / Star / Issue)
* ๐ GitHub token support for higher API limits
* ๐งช Unit tests with mocked GitHub client
---
## ๐จโ๐ป Author
**Vishal Yadav**
---
## โญ If you like this project
Give it a โญ on GitHub! ๐