gitraze 0.2.2__tar.gz → 0.2.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. {gitraze-0.2.2 → gitraze-0.2.4}/PKG-INFO +16 -15
  2. {gitraze-0.2.2 → gitraze-0.2.4}/README.md +16 -15
  3. gitraze-0.2.4/gitraze/cli.py +61 -0
  4. {gitraze-0.2.2 → gitraze-0.2.4}/gitraze/config.py +2 -9
  5. {gitraze-0.2.2 → gitraze-0.2.4}/gitraze/core/api_rest.py +10 -8
  6. gitraze-0.2.4/gitraze/handlers/analyze.py +7 -0
  7. gitraze-0.2.4/gitraze/handlers/repo.py +19 -0
  8. gitraze-0.2.4/gitraze/handlers/search.py +26 -0
  9. gitraze-0.2.4/gitraze/handlers/user.py +13 -0
  10. {gitraze-0.2.2 → gitraze-0.2.4}/gitraze/modules/search.py +2 -2
  11. gitraze-0.2.4/gitraze/utils/__init__.py +0 -0
  12. {gitraze-0.2.2 → gitraze-0.2.4}/gitraze.egg-info/PKG-INFO +16 -15
  13. {gitraze-0.2.2 → gitraze-0.2.4}/gitraze.egg-info/SOURCES.txt +5 -0
  14. {gitraze-0.2.2 → gitraze-0.2.4}/pyproject.toml +1 -1
  15. gitraze-0.2.2/gitraze/cli.py +0 -116
  16. {gitraze-0.2.2 → gitraze-0.2.4}/LICENSE +0 -0
  17. {gitraze-0.2.2 → gitraze-0.2.4}/gitraze/__init__.py +0 -0
  18. {gitraze-0.2.2 → gitraze-0.2.4}/gitraze/core/__init__.py +0 -0
  19. {gitraze-0.2.2 → gitraze-0.2.4}/gitraze/core/api_graphql.py +0 -0
  20. {gitraze-0.2.2/gitraze/modules → gitraze-0.2.4/gitraze/handlers}/__init__.py +0 -0
  21. {gitraze-0.2.2/gitraze/utils → gitraze-0.2.4/gitraze/modules}/__init__.py +0 -0
  22. {gitraze-0.2.2 → gitraze-0.2.4}/gitraze/modules/analytics.py +0 -0
  23. {gitraze-0.2.2 → gitraze-0.2.4}/gitraze/modules/repo.py +0 -0
  24. {gitraze-0.2.2 → gitraze-0.2.4}/gitraze/modules/user.py +0 -0
  25. {gitraze-0.2.2 → gitraze-0.2.4}/gitraze/utils/helpers.py +0 -0
  26. {gitraze-0.2.2 → gitraze-0.2.4}/gitraze.egg-info/dependency_links.txt +0 -0
  27. {gitraze-0.2.2 → gitraze-0.2.4}/gitraze.egg-info/entry_points.txt +0 -0
  28. {gitraze-0.2.2 → gitraze-0.2.4}/gitraze.egg-info/requires.txt +0 -0
  29. {gitraze-0.2.2 → gitraze-0.2.4}/gitraze.egg-info/top_level.txt +0 -0
  30. {gitraze-0.2.2 → gitraze-0.2.4}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gitraze
3
- Version: 0.2.2
3
+ Version: 0.2.4
4
4
  Summary: A CLI and Python library for GitHub reconnaissance, search, and analysis
5
5
  Author: AK Pandey
6
6
  License-Expression: MIT
@@ -33,25 +33,25 @@ Gitraze is a powerful command-line tool designed to explore, analyze, and extrac
33
33
  Most GitHub tools are either slow, bloated, or UI-heavy.
34
34
 
35
35
  **Gitraze is different:**
36
- -Fast, minimal, no nonsense
37
- - 🧠 Built for developers who think in terminals
38
- - 🔍 Deep GitHub data access (REST + GraphQL)
39
- - 🧩 Modular and extensible architecture
36
+ - Fast, minimal, no nonsense
37
+ - Built for developers who think in terminals
38
+ - Deep GitHub data access (REST + GraphQL)
39
+ - Modular and extensible architecture
40
40
 
41
41
  ---
42
42
 
43
43
  ## Features
44
44
 
45
- - 🔌 Modular system (easy to extend and hack on)
46
- - 💻 CLI-first workflow
47
- - 🌐 GitHub API integration (REST + GraphQL)
48
- - 📦 Repository insights
49
- - 👤 User analysis
50
- - 🧵 Filter PRs vs issues automatically
51
- - 🕒 Human-readable timestamps
52
- - 🧹 Cleaned descriptions (HTML stripped)
53
- - 📊 Analytics modules (in progress)
54
- - 🔎 Search users, repos, issues, PRs, and topics
45
+ - Modular system (easy to extend and hack on)
46
+ - CLI-first workflow
47
+ - GitHub API integration (REST + GraphQL)
48
+ - Repository insights
49
+ - User analysis
50
+ - Filter PRs vs issues automatically
51
+ - Human-readable timestamps
52
+ - Cleaned descriptions (HTML stripped)
53
+ - Analytics modules (in progress)
54
+ - Search users, repos, issues, PRs, and topics
55
55
 
56
56
 
57
57
  ---
@@ -146,3 +146,4 @@ If you're here early — you're basically a beta tester 😈
146
146
  ## License
147
147
 
148
148
  MIT License — do whatever you want, just don’t blame me if you break stuff.
149
+
@@ -16,25 +16,25 @@ Gitraze is a powerful command-line tool designed to explore, analyze, and extrac
16
16
  Most GitHub tools are either slow, bloated, or UI-heavy.
17
17
 
18
18
  **Gitraze is different:**
19
- -Fast, minimal, no nonsense
20
- - 🧠 Built for developers who think in terminals
21
- - 🔍 Deep GitHub data access (REST + GraphQL)
22
- - 🧩 Modular and extensible architecture
19
+ - Fast, minimal, no nonsense
20
+ - Built for developers who think in terminals
21
+ - Deep GitHub data access (REST + GraphQL)
22
+ - Modular and extensible architecture
23
23
 
24
24
  ---
25
25
 
26
26
  ## Features
27
27
 
28
- - 🔌 Modular system (easy to extend and hack on)
29
- - 💻 CLI-first workflow
30
- - 🌐 GitHub API integration (REST + GraphQL)
31
- - 📦 Repository insights
32
- - 👤 User analysis
33
- - 🧵 Filter PRs vs issues automatically
34
- - 🕒 Human-readable timestamps
35
- - 🧹 Cleaned descriptions (HTML stripped)
36
- - 📊 Analytics modules (in progress)
37
- - 🔎 Search users, repos, issues, PRs, and topics
28
+ - Modular system (easy to extend and hack on)
29
+ - CLI-first workflow
30
+ - GitHub API integration (REST + GraphQL)
31
+ - Repository insights
32
+ - User analysis
33
+ - Filter PRs vs issues automatically
34
+ - Human-readable timestamps
35
+ - Cleaned descriptions (HTML stripped)
36
+ - Analytics modules (in progress)
37
+ - Search users, repos, issues, PRs, and topics
38
38
 
39
39
 
40
40
  ---
@@ -128,4 +128,5 @@ If you're here early — you're basically a beta tester 😈
128
128
 
129
129
  ## License
130
130
 
131
- MIT License — do whatever you want, just don’t blame me if you break stuff.
131
+ MIT License — do whatever you want, just don’t blame me if you break stuff.
132
+
@@ -0,0 +1,61 @@
1
+ import argparse
2
+ from gitraze.handlers.user import handle_user
3
+ from gitraze.handlers.repo import handle_repo
4
+ from gitraze.handlers.search import handle_search
5
+ from gitraze.handlers.analyze import handle_analysis
6
+
7
+
8
+ def main():
9
+ parser = argparse.ArgumentParser(
10
+ prog="gitraze",
11
+ description="GitRaze CLI Tool"
12
+ )
13
+
14
+ # Global flag
15
+ parser.add_argument(
16
+ "--version",
17
+ action="version",
18
+ version="gitraze 0.2.4"
19
+ )
20
+
21
+ subparsers = parser.add_subparsers(dest="command", required=True)
22
+
23
+ # --- USER ---
24
+ user_parser = subparsers.add_parser("user", help="Fetch user info (GitHub username)")
25
+ user_parser.add_argument("username", help="Format: username")
26
+ user_parser.set_defaults(func=handle_user)
27
+
28
+
29
+ # --- REPO ---
30
+ repo_parser = subparsers.add_parser("repo", help="Fetch repo info (Repository in owner/repo format)")
31
+ repo_parser.add_argument("repo", help="Format: owner/repo")
32
+ repo_parser.set_defaults(func=handle_repo)
33
+
34
+
35
+ # --- SEARCH ---
36
+ search_parser = subparsers.add_parser("search", help="Search GitHub")
37
+ search_parser.add_argument("category",choices=["repos", "users", "issues", "prs", "topics"],help="repos | users | issues | prs | topics")
38
+ search_parser.add_argument("query", nargs="+", help="Search category (repos, users, issues, topics)")
39
+ search_parser.add_argument("-n", "--limit", type=int, default=1, help="Number of results to show")
40
+ search_parser.set_defaults(func=handle_search)
41
+
42
+
43
+ # --- ANALYZE ---
44
+ analyze_parser = subparsers.add_parser("analyze", help="Analyze target")
45
+ analyze_parser.add_argument("target", nargs="+")
46
+ analyze_parser.set_defaults(func=handle_analysis)
47
+
48
+ args = parser.parse_args()
49
+ args.func(args)
50
+
51
+
52
+
53
+
54
+ if __name__ == "__main__":
55
+ main()
56
+
57
+
58
+
59
+
60
+
61
+
@@ -7,16 +7,9 @@ REST_BASE_URL = "https://api.github.com"
7
7
  GRAPHQL_URL = "https://api.github.com/graphql"
8
8
  DEFAULT_TIMEOUT = 10
9
9
  DEFAULT_HEADERS = {
10
- "Accept": "application/vnd.github+json"
11
- }
12
-
13
- # --- USER CONFIG ---
14
-
15
-
16
- # --- REPO CONFIG ---
17
-
10
+ "Accept": "application/vnd.github+json"}
18
11
 
19
- # --- SEARCH CONFIG ---
12
+ # --- SEARCH CATEGORIES CONFIG ---
20
13
  SEARCH_MAP = {
21
14
  "repos": "repositories",
22
15
  "users": "users",
@@ -41,26 +41,28 @@ def get_repo(owner, repo):
41
41
 
42
42
  def get_search(category, query):
43
43
  url = f"{REST_BASE_URL}/search/{SEARCH_MAP.get(category)}"
44
+
44
45
  filters = []
45
46
  if category == "prs":
46
47
  filters.append("type:pr")
47
48
  elif category == "issues":
48
49
  filters.append("type:issue")
49
50
 
50
- filters.extend([
51
- "in:title",
52
- "comments:1..50",
53
- "-author:app",
54
- ])
51
+ if category in ["issues", "prs"]:
52
+ filters.extend([
53
+ "in:title",
54
+ "comments:1..50",
55
+ "-author:app",
56
+ ])
57
+
58
+ final_query = f"{query} {' '.join(filters)}".strip()
55
59
 
56
- final_query = f"{query} {' '.join(filters)}"
57
60
  params = {
58
61
  "q": final_query,
59
62
  "per_page": 100,
60
- "sort": "comments",
63
+ "sort": "comments" if category in ["issues", "prs"] else "best-match",
61
64
  "order": "desc"
62
65
  }
63
-
64
66
  try:
65
67
  response = requests.get(
66
68
  url,
@@ -0,0 +1,7 @@
1
+ from gitraze.utils.helpers import pretty_print
2
+
3
+
4
+ def handle_analysis(args):
5
+ target = " ".join(args.target)
6
+ print(f"[ANALYZE] Analyzing '{target}'")
7
+ print("Not implemented yet")
@@ -0,0 +1,19 @@
1
+ from gitraze.utils.helpers import pretty_print
2
+ from gitraze.modules.repo import get_repo_rest
3
+
4
+ def handle_repo(args):
5
+ print("[+] Fetching repository data...")
6
+ parts = args.repo.split("/")
7
+
8
+ if len(parts) != 2:
9
+ print("Invalid format. Use: owner/repo")
10
+ return
11
+ owner, repo = parts
12
+ data = get_repo_rest(owner, repo)
13
+
14
+ if "error" in data:
15
+ print(data["error"])
16
+ return
17
+
18
+ print("[✓] Done")
19
+ pretty_print(data, title=f"User: {owner}, Repository: {repo}")
@@ -0,0 +1,26 @@
1
+ from gitraze.utils.helpers import pretty_print
2
+ from gitraze.modules.search import get_search_rest
3
+
4
+ def handle_search(args):
5
+ category = args.category
6
+
7
+ raw_query = " ".join(args.query)
8
+ clean_query = raw_query.replace('"', '')
9
+ query = f'"{clean_query}"'
10
+
11
+ print(f"[+] Searching {category} for {query}...")
12
+
13
+
14
+ data = get_search_rest(category, query, args.limit)
15
+
16
+ if "error" in data:
17
+ print(data["error"])
18
+ return
19
+
20
+ print("[✓] Done")
21
+
22
+ if isinstance(data, list):
23
+ for i, item in enumerate(data, 1):
24
+ pretty_print(item, title=f"{category} [{i}] -> {query}")
25
+ else:
26
+ pretty_print(data, title=f"Search: {category} -> {query}")
@@ -0,0 +1,13 @@
1
+ from gitraze.utils.helpers import pretty_print
2
+ from gitraze.modules.user import get_user_rest
3
+
4
+ def handle_user(args):
5
+ print("[+] Fetching user data...")
6
+ data = get_user_rest(args.username)
7
+
8
+ if "error" in data:
9
+ print(data["error"])
10
+ return
11
+
12
+ print("[✓] Done")
13
+ pretty_print(data, title=f"User: {args.username}")
@@ -5,6 +5,8 @@ from gitraze.core.api_rest import get_search
5
5
 
6
6
 
7
7
  def get_search_rest(category, query, limit=1):
8
+ if category not in ["repos", "users", "issues", "prs", "topics"]:
9
+ return {"error": "Invalid category"}
8
10
  data = get_search(category, query)
9
11
  if "error" in data:
10
12
  return data
@@ -15,8 +17,6 @@ def get_search_rest(category, query, limit=1):
15
17
  elif category == "prs":
16
18
  items = [i for i in items if "pull_request" in i]
17
19
 
18
- if category not in ["repos", "users", "issues", "prs", "topics"]:
19
- return {"error": "Invalid category"}
20
20
  if not items:
21
21
  return {"error": "No results found"}
22
22
  items = items[:limit]
File without changes
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gitraze
3
- Version: 0.2.2
3
+ Version: 0.2.4
4
4
  Summary: A CLI and Python library for GitHub reconnaissance, search, and analysis
5
5
  Author: AK Pandey
6
6
  License-Expression: MIT
@@ -33,25 +33,25 @@ Gitraze is a powerful command-line tool designed to explore, analyze, and extrac
33
33
  Most GitHub tools are either slow, bloated, or UI-heavy.
34
34
 
35
35
  **Gitraze is different:**
36
- -Fast, minimal, no nonsense
37
- - 🧠 Built for developers who think in terminals
38
- - 🔍 Deep GitHub data access (REST + GraphQL)
39
- - 🧩 Modular and extensible architecture
36
+ - Fast, minimal, no nonsense
37
+ - Built for developers who think in terminals
38
+ - Deep GitHub data access (REST + GraphQL)
39
+ - Modular and extensible architecture
40
40
 
41
41
  ---
42
42
 
43
43
  ## Features
44
44
 
45
- - 🔌 Modular system (easy to extend and hack on)
46
- - 💻 CLI-first workflow
47
- - 🌐 GitHub API integration (REST + GraphQL)
48
- - 📦 Repository insights
49
- - 👤 User analysis
50
- - 🧵 Filter PRs vs issues automatically
51
- - 🕒 Human-readable timestamps
52
- - 🧹 Cleaned descriptions (HTML stripped)
53
- - 📊 Analytics modules (in progress)
54
- - 🔎 Search users, repos, issues, PRs, and topics
45
+ - Modular system (easy to extend and hack on)
46
+ - CLI-first workflow
47
+ - GitHub API integration (REST + GraphQL)
48
+ - Repository insights
49
+ - User analysis
50
+ - Filter PRs vs issues automatically
51
+ - Human-readable timestamps
52
+ - Cleaned descriptions (HTML stripped)
53
+ - Analytics modules (in progress)
54
+ - Search users, repos, issues, PRs, and topics
55
55
 
56
56
 
57
57
  ---
@@ -146,3 +146,4 @@ If you're here early — you're basically a beta tester 😈
146
146
  ## License
147
147
 
148
148
  MIT License — do whatever you want, just don’t blame me if you break stuff.
149
+
@@ -13,6 +13,11 @@ gitraze.egg-info/top_level.txt
13
13
  gitraze/core/__init__.py
14
14
  gitraze/core/api_graphql.py
15
15
  gitraze/core/api_rest.py
16
+ gitraze/handlers/__init__.py
17
+ gitraze/handlers/analyze.py
18
+ gitraze/handlers/repo.py
19
+ gitraze/handlers/search.py
20
+ gitraze/handlers/user.py
16
21
  gitraze/modules/__init__.py
17
22
  gitraze/modules/analytics.py
18
23
  gitraze/modules/repo.py
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "gitraze"
3
- version = "0.2.2"
3
+ version = "0.2.4"
4
4
  description = "A CLI and Python library for GitHub reconnaissance, search, and analysis"
5
5
  authors = [{ name = "AK Pandey" }]
6
6
  dependencies = ["requests", "colorama"]
@@ -1,116 +0,0 @@
1
- import argparse
2
- from gitraze.utils.helpers import pretty_print
3
- from gitraze.modules.user import get_user_rest
4
- from gitraze.modules.repo import get_repo_rest
5
- from gitraze.modules.search import get_search_rest
6
-
7
-
8
- def main():
9
- parser = argparse.ArgumentParser(
10
- prog="gitraze",
11
- description="GitRaze CLI Tool"
12
- )
13
-
14
- # Global flag
15
- parser.add_argument(
16
- "--version",
17
- action="version",
18
- version="gitraze 0.2.2"
19
- )
20
-
21
- subparsers = parser.add_subparsers(dest="command", required=True)
22
-
23
- # --- USER ---
24
- user_parser = subparsers.add_parser("user", help="Fetch user info (GitHub username)")
25
- user_parser.add_argument("username", help="Format: username")
26
-
27
- # --- REPO ---
28
- repo_parser = subparsers.add_parser("repo", help="Fetch repo info (Repository in owner/repo format)")
29
- repo_parser.add_argument("repo", help="Format: owner/repo")
30
-
31
- # --- SEARCH ---
32
- search_parser = subparsers.add_parser("search", help="Search GitHub")
33
- search_parser.add_argument("category",choices=["repos", "users", "issues", "prs", "topics"],help="repos | users | issues | prs | topics")
34
- search_parser.add_argument("query", nargs="+", help="Search category (repos, users, issues, topics)")
35
- search_parser.add_argument("-n", "--limit", type=int, default=1, help="Number of results to show")
36
-
37
- # --- ANALYZE ---
38
- analyze_parser = subparsers.add_parser("analyze", help="Analyze target")
39
- analyze_parser.add_argument("target", nargs="+")
40
-
41
- args = parser.parse_args()
42
-
43
- # --- ROUTING ---
44
- if args.command == "user":
45
- handle_user(args)
46
- elif args.command == "repo":
47
- handle_repo(args)
48
- elif args.command == "search":
49
- handle_search(args)
50
- elif args.command == "analyze":
51
- handle_analysis(args)
52
- else:
53
- parser.print_help()
54
-
55
-
56
- # --- HANDLERS ---
57
-
58
- def handle_user(args):
59
- print("[+] Fetching user data...")
60
- data = get_user_rest(args.username)
61
-
62
- if "error" in data:
63
- print(data["error"])
64
- return
65
-
66
- print("[✓] Done")
67
- pretty_print(data, title=f"User: {args.username}")
68
-
69
-
70
- def handle_repo(args):
71
- print("[+] Fetching repository data...")
72
- parts = args.repo.split("/")
73
-
74
- if len(parts) != 2:
75
- print("Invalid format. Use: owner/repo")
76
- return
77
- owner, repo = parts
78
- data = get_repo_rest(owner, repo)
79
-
80
- if "error" in data:
81
- print(data["error"])
82
- return
83
-
84
- print("[✓] Done")
85
- pretty_print(data, title=f"User: {owner}, Repository: {repo}")
86
-
87
-
88
- def handle_search(args):
89
- category = args.category
90
-
91
- raw_query = " ".join(args.query)
92
- clean_query = raw_query.replace('"', '')
93
- query = f'"{clean_query}"'
94
-
95
- print(f"[+] Searching {category} for {query}...")
96
-
97
-
98
- data = get_search_rest(category, query, args.limit)
99
-
100
- if "error" in data:
101
- print(data["error"])
102
- return
103
-
104
- print("[✓] Done")
105
-
106
- if isinstance(data, list):
107
- for i, item in enumerate(data, 1):
108
- pretty_print(item, title=f"{category} [{i}] -> {query}")
109
- else:
110
- pretty_print(data, title=f"Search: {category} -> {query}")
111
-
112
-
113
- def handle_analysis(args):
114
- target = " ".join(args.target)
115
- print(f"[ANALYZE] Analyzing '{target}'")
116
- print("Not implemented yet")
File without changes
File without changes
File without changes
File without changes
File without changes