gitraze 0.2.5__tar.gz → 0.3.0__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.
- {gitraze-0.2.5 → gitraze-0.3.0}/PKG-INFO +76 -15
- gitraze-0.3.0/README.md +270 -0
- {gitraze-0.2.5 → gitraze-0.3.0}/gitraze/__init__.py +1 -1
- {gitraze-0.2.5 → gitraze-0.3.0}/gitraze/cli.py +8 -5
- {gitraze-0.2.5 → gitraze-0.3.0}/gitraze/handlers/repo.py +6 -1
- {gitraze-0.2.5 → gitraze-0.3.0}/gitraze/handlers/search.py +6 -1
- {gitraze-0.2.5 → gitraze-0.3.0}/gitraze/handlers/user.py +7 -1
- {gitraze-0.2.5 → gitraze-0.3.0}/gitraze/modules/repo.py +8 -2
- {gitraze-0.2.5 → gitraze-0.3.0}/gitraze/modules/search.py +11 -3
- {gitraze-0.2.5 → gitraze-0.3.0}/gitraze/modules/user.py +8 -1
- {gitraze-0.2.5 → gitraze-0.3.0}/gitraze/utils/helpers.py +34 -1
- {gitraze-0.2.5 → gitraze-0.3.0}/gitraze.egg-info/PKG-INFO +76 -15
- {gitraze-0.2.5 → gitraze-0.3.0}/gitraze.egg-info/SOURCES.txt +0 -1
- {gitraze-0.2.5 → gitraze-0.3.0}/pyproject.toml +1 -1
- gitraze-0.2.5/README.md +0 -209
- gitraze-0.2.5/gitraze/core/api_graphql.py +0 -1
- {gitraze-0.2.5 → gitraze-0.3.0}/LICENSE +0 -0
- {gitraze-0.2.5 → gitraze-0.3.0}/gitraze/config.py +0 -0
- {gitraze-0.2.5 → gitraze-0.3.0}/gitraze/core/__init__.py +0 -0
- {gitraze-0.2.5 → gitraze-0.3.0}/gitraze/core/api_rest.py +0 -0
- {gitraze-0.2.5 → gitraze-0.3.0}/gitraze/handlers/__init__.py +0 -0
- {gitraze-0.2.5 → gitraze-0.3.0}/gitraze/handlers/analyze.py +0 -0
- {gitraze-0.2.5 → gitraze-0.3.0}/gitraze/modules/__init__.py +0 -0
- {gitraze-0.2.5 → gitraze-0.3.0}/gitraze/modules/analytics.py +0 -0
- {gitraze-0.2.5 → gitraze-0.3.0}/gitraze/utils/__init__.py +0 -0
- {gitraze-0.2.5 → gitraze-0.3.0}/gitraze.egg-info/dependency_links.txt +0 -0
- {gitraze-0.2.5 → gitraze-0.3.0}/gitraze.egg-info/entry_points.txt +0 -0
- {gitraze-0.2.5 → gitraze-0.3.0}/gitraze.egg-info/requires.txt +0 -0
- {gitraze-0.2.5 → gitraze-0.3.0}/gitraze.egg-info/top_level.txt +0 -0
- {gitraze-0.2.5 → gitraze-0.3.0}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: gitraze
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.0
|
|
4
4
|
Summary: A CLI and Python library for GitHub reconnaissance, search, and analysis
|
|
5
5
|
Author: AK Pandey
|
|
6
6
|
License-Expression: MIT
|
|
@@ -19,12 +19,22 @@ Dynamic: license-file
|
|
|
19
19
|
|
|
20
20
|
> A fast, hacker-style CLI for slicing through GitHub data like a blade.
|
|
21
21
|
|
|
22
|
-
Gitraze is a powerful command-line tool designed to explore, analyze, and extract insights from GitHub using
|
|
22
|
+
Gitraze is a powerful command-line tool designed to explore, analyze, and extract insights from GitHub using REST, with GraphQL support coming soon; all from your terminal.
|
|
23
23
|
|
|
24
24
|
⚠️ **Status:** Early development — expect bugs, missing features, and rapid changes. APIs and CLI may change without notice.
|
|
25
25
|
|
|
26
26
|
> Built for developers who prefer terminals over tabs.
|
|
27
27
|
|
|
28
|
+
[](https://pypi.org/project/gitraze/)
|
|
29
|
+
[](https://pypi.org/project/gitraze/)
|
|
30
|
+
[](https://pypi.org/project/gitraze/)
|
|
31
|
+
[](https://github.com/akpandey-dev/gitraze/actions)
|
|
32
|
+
[](LICENSE)
|
|
33
|
+
[](https://github.com/akpandey-dev/gitraze/issues)
|
|
34
|
+
[](https://github.com/akpandey-dev/gitraze)
|
|
35
|
+
[](https://github.com/akpandey-dev/gitraze/commits/main)
|
|
36
|
+
[](https://github.com/akpandey-dev/gitraze/graphs/contributors)
|
|
37
|
+
|
|
28
38
|
|
|
29
39
|
---
|
|
30
40
|
|
|
@@ -58,10 +68,19 @@ Most GitHub tools are either slow, bloated, or UI-heavy.
|
|
|
58
68
|
|
|
59
69
|
## Installation
|
|
60
70
|
|
|
71
|
+
### From PyPI using `pip`
|
|
72
|
+
|
|
61
73
|
```bash
|
|
62
74
|
pip install gitraze
|
|
63
75
|
```
|
|
64
76
|
|
|
77
|
+
### Using source code from Repository
|
|
78
|
+
|
|
79
|
+
> Read the `Development setup` section.
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
> There may be some gap between releases on GitHub and PyPI, as more than one commits are sometimes clustered as a single release on PyPI.
|
|
83
|
+
|
|
65
84
|
|
|
66
85
|
## Usage
|
|
67
86
|
|
|
@@ -69,14 +88,16 @@ pip install gitraze
|
|
|
69
88
|
|
|
70
89
|
Example:
|
|
71
90
|
```bash
|
|
91
|
+
gitraze --version
|
|
72
92
|
gitraze --help
|
|
73
|
-
gitraze user octocat
|
|
74
|
-
gitraze repo torvalds/linux
|
|
75
|
-
gitraze search repos "machine learning" -n 5
|
|
76
|
-
gitraze analyze
|
|
93
|
+
gitraze user octocat --format=raw
|
|
94
|
+
gitraze repo torvalds/linux --format=full # Query format must match
|
|
95
|
+
gitraze search repos "machine learning" -n 5 --format=compact
|
|
96
|
+
gitraze analyze <target> # Coming soon!
|
|
77
97
|
```
|
|
78
98
|
|
|
79
99
|
Example output:
|
|
100
|
+
|
|
80
101
|
```bash
|
|
81
102
|
$ gitraze user octocat
|
|
82
103
|
|
|
@@ -103,6 +124,7 @@ Email : None
|
|
|
103
124
|
Twitter_username : None
|
|
104
125
|
|
|
105
126
|
```
|
|
127
|
+
|
|
106
128
|
> Commands prefixed with `$` should be run in your terminal.
|
|
107
129
|
|
|
108
130
|
### Gitraze can also be used as a lightweight Python SDK.
|
|
@@ -111,21 +133,54 @@ Twitter_username : None
|
|
|
111
133
|
```python
|
|
112
134
|
import gitraze as gz
|
|
113
135
|
|
|
114
|
-
user = gz.user("octocat")
|
|
136
|
+
user = gz.user("octocat", output_format="compact")
|
|
115
137
|
|
|
116
138
|
print(user["name"])
|
|
117
139
|
print(user["followers"])
|
|
118
140
|
```
|
|
119
141
|
|
|
142
|
+
#### Repository:
|
|
143
|
+
```python
|
|
144
|
+
import gitraze as gz
|
|
145
|
+
|
|
146
|
+
repo = gz.repo("torvalds", "linux", output_format="full")
|
|
147
|
+
|
|
148
|
+
print(repo["name"])
|
|
149
|
+
print(repo["owner"])
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
> Note: Unlike the CLI, the SDK accepts owner and repository name as separate arguments.
|
|
153
|
+
|
|
120
154
|
#### Search:
|
|
121
155
|
|
|
122
156
|
```python
|
|
123
|
-
|
|
157
|
+
import gitraze as gz
|
|
158
|
+
|
|
159
|
+
results = gz.search(gz.REPOS, "machine learning", 3, output_format="compact")
|
|
124
160
|
|
|
125
161
|
for repo in results:
|
|
126
162
|
print(repo["full_name"])
|
|
127
163
|
```
|
|
128
164
|
|
|
165
|
+
### Custom Output Format:
|
|
166
|
+
|
|
167
|
+
All three SDK functions support output customization:
|
|
168
|
+
|
|
169
|
+
```python
|
|
170
|
+
import gitraze as gz
|
|
171
|
+
|
|
172
|
+
user = gz.user("octocat", output_format="full")
|
|
173
|
+
repo = gz.repo("torvalds", "linux", output_format="raw")
|
|
174
|
+
results = gz.search(gz.REPOS, "machine learning", 3, output_format="full")
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
#### Available options are:
|
|
178
|
+
|
|
179
|
+
* `output_format="compact"`: Returns a concise, human-friendly subset of the most useful fields.
|
|
180
|
+
* `output_format="full"`: Returns all available processed fields exposed by Gitraze.
|
|
181
|
+
* `output_format="raw"`: Returns the raw GitHub API response without filtering or formatting.
|
|
182
|
+
|
|
183
|
+
|
|
129
184
|
### Pretty-print results in terminal style:
|
|
130
185
|
|
|
131
186
|
```python
|
|
@@ -157,14 +212,16 @@ Twitter_username : None
|
|
|
157
212
|
|
|
158
213
|
> Note: **`import gitraze as gz`** is the recommended import.
|
|
159
214
|
|
|
215
|
+
> Note: Exact fields and values may differ from the examples shown, depending on the GitHub API response.
|
|
216
|
+
|
|
160
217
|
## Available exports:
|
|
161
218
|
|
|
162
219
|
### Functions:
|
|
163
220
|
|
|
164
|
-
- `user()`
|
|
165
|
-
- `repo()`
|
|
166
|
-
- `search()`
|
|
167
|
-
- `display()`
|
|
221
|
+
- `user(username, output_format="compact")`
|
|
222
|
+
- `repo(owner, repo, output_format="compact")`
|
|
223
|
+
- `search(category, query, limit=1, output_format="compact")`
|
|
224
|
+
- `display(data)`
|
|
168
225
|
|
|
169
226
|
### Constants:
|
|
170
227
|
|
|
@@ -174,9 +231,10 @@ Twitter_username : None
|
|
|
174
231
|
- `ISSUES`
|
|
175
232
|
- `TOPICS`
|
|
176
233
|
|
|
234
|
+
> Constants depend on the module internals and may change without prior notice.
|
|
177
235
|
|
|
236
|
+
> CLI commands and SDK APIs are still evolving and may change between releases.
|
|
178
237
|
|
|
179
|
-
⚠️ CLI commands are still evolving and may change.
|
|
180
238
|
|
|
181
239
|
## Philosophy
|
|
182
240
|
|
|
@@ -204,14 +262,17 @@ Gitraze is in active development:
|
|
|
204
262
|
- Expect breaking changes
|
|
205
263
|
- Some commands may not work
|
|
206
264
|
- Features are being added rapidly
|
|
207
|
-
- GraphQL feature is basically absent now, but is
|
|
265
|
+
- GraphQL feature is basically absent now, but integration is planned; currently REST-focused.
|
|
208
266
|
|
|
209
|
-
If you're here early — you're basically a beta tester
|
|
267
|
+
If you're here early — you're basically a beta tester.
|
|
210
268
|
|
|
211
269
|
## Contributing
|
|
212
270
|
|
|
213
271
|
PRs, ideas, bug reports, and feature suggestions are welcome.
|
|
214
272
|
If you want to improve or modify Gitraze, go ahead.
|
|
273
|
+
* Fork the repository
|
|
274
|
+
* Create a feature branch
|
|
275
|
+
* Submit a PR with clean commit messages
|
|
215
276
|
|
|
216
277
|
```bash
|
|
217
278
|
git checkout -b feature/cool-thing
|
gitraze-0.3.0/README.md
ADDED
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
# Gitraze
|
|
2
|
+
|
|
3
|
+
> A fast, hacker-style CLI for slicing through GitHub data like a blade.
|
|
4
|
+
|
|
5
|
+
Gitraze is a powerful command-line tool designed to explore, analyze, and extract insights from GitHub using REST, with GraphQL support coming soon; all from your terminal.
|
|
6
|
+
|
|
7
|
+
⚠️ **Status:** Early development — expect bugs, missing features, and rapid changes. APIs and CLI may change without notice.
|
|
8
|
+
|
|
9
|
+
> Built for developers who prefer terminals over tabs.
|
|
10
|
+
|
|
11
|
+
[](https://pypi.org/project/gitraze/)
|
|
12
|
+
[](https://pypi.org/project/gitraze/)
|
|
13
|
+
[](https://pypi.org/project/gitraze/)
|
|
14
|
+
[](https://github.com/akpandey-dev/gitraze/actions)
|
|
15
|
+
[](LICENSE)
|
|
16
|
+
[](https://github.com/akpandey-dev/gitraze/issues)
|
|
17
|
+
[](https://github.com/akpandey-dev/gitraze)
|
|
18
|
+
[](https://github.com/akpandey-dev/gitraze/commits/main)
|
|
19
|
+
[](https://github.com/akpandey-dev/gitraze/graphs/contributors)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## Why Gitraze?
|
|
25
|
+
|
|
26
|
+
Most GitHub tools are either slow, bloated, or UI-heavy.
|
|
27
|
+
|
|
28
|
+
**Gitraze is different:**
|
|
29
|
+
- Fast, minimal, no nonsense
|
|
30
|
+
- Built for developers who think in terminals
|
|
31
|
+
- Deep GitHub data access (REST + GraphQL)
|
|
32
|
+
- Modular and extensible architecture
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## Features
|
|
37
|
+
|
|
38
|
+
- Modular system (easy to extend and hack on)
|
|
39
|
+
- CLI-first workflow
|
|
40
|
+
- GitHub API integration (REST + GraphQL)
|
|
41
|
+
- Repository insights
|
|
42
|
+
- User analysis
|
|
43
|
+
- Filter PRs vs issues automatically
|
|
44
|
+
- Human-readable timestamps
|
|
45
|
+
- Cleaned descriptions (HTML stripped)
|
|
46
|
+
- Analytics modules (in progress)
|
|
47
|
+
- Search users, repos, issues, PRs, and topics
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## Installation
|
|
53
|
+
|
|
54
|
+
### From PyPI using `pip`
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
pip install gitraze
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### Using source code from Repository
|
|
61
|
+
|
|
62
|
+
> Read the `Development setup` section.
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
> There may be some gap between releases on GitHub and PyPI, as more than one commits are sometimes clustered as a single release on PyPI.
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
## Usage
|
|
69
|
+
|
|
70
|
+
### Run directly from your terminal:
|
|
71
|
+
|
|
72
|
+
Example:
|
|
73
|
+
```bash
|
|
74
|
+
gitraze --version
|
|
75
|
+
gitraze --help
|
|
76
|
+
gitraze user octocat --format=raw
|
|
77
|
+
gitraze repo torvalds/linux --format=full # Query format must match
|
|
78
|
+
gitraze search repos "machine learning" -n 5 --format=compact
|
|
79
|
+
gitraze analyze <target> # Coming soon!
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Example output:
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
$ gitraze user octocat
|
|
86
|
+
|
|
87
|
+
[+] Fetching user data...
|
|
88
|
+
[✓] Done
|
|
89
|
+
|
|
90
|
+
User: octocat
|
|
91
|
+
-------------
|
|
92
|
+
Name : The Octocat
|
|
93
|
+
Login : octocat
|
|
94
|
+
Id : 583231
|
|
95
|
+
Node_id : MDQ6VXNlcjU4MzIzMQ==
|
|
96
|
+
Type : User
|
|
97
|
+
User_view_type : public
|
|
98
|
+
Bio : None
|
|
99
|
+
Followers : 22312
|
|
100
|
+
Following : 9
|
|
101
|
+
Public_repos : 8
|
|
102
|
+
Public_gists : 8
|
|
103
|
+
Location : San Francisco
|
|
104
|
+
Profile_url : https://github.com/octocat
|
|
105
|
+
Created_at : 25 Jan 2011
|
|
106
|
+
Email : None
|
|
107
|
+
Twitter_username : None
|
|
108
|
+
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
> Commands prefixed with `$` should be run in your terminal.
|
|
112
|
+
|
|
113
|
+
### Gitraze can also be used as a lightweight Python SDK.
|
|
114
|
+
|
|
115
|
+
#### User:
|
|
116
|
+
```python
|
|
117
|
+
import gitraze as gz
|
|
118
|
+
|
|
119
|
+
user = gz.user("octocat", output_format="compact")
|
|
120
|
+
|
|
121
|
+
print(user["name"])
|
|
122
|
+
print(user["followers"])
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
#### Repository:
|
|
126
|
+
```python
|
|
127
|
+
import gitraze as gz
|
|
128
|
+
|
|
129
|
+
repo = gz.repo("torvalds", "linux", output_format="full")
|
|
130
|
+
|
|
131
|
+
print(repo["name"])
|
|
132
|
+
print(repo["owner"])
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
> Note: Unlike the CLI, the SDK accepts owner and repository name as separate arguments.
|
|
136
|
+
|
|
137
|
+
#### Search:
|
|
138
|
+
|
|
139
|
+
```python
|
|
140
|
+
import gitraze as gz
|
|
141
|
+
|
|
142
|
+
results = gz.search(gz.REPOS, "machine learning", 3, output_format="compact")
|
|
143
|
+
|
|
144
|
+
for repo in results:
|
|
145
|
+
print(repo["full_name"])
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
### Custom Output Format:
|
|
149
|
+
|
|
150
|
+
All three SDK functions support output customization:
|
|
151
|
+
|
|
152
|
+
```python
|
|
153
|
+
import gitraze as gz
|
|
154
|
+
|
|
155
|
+
user = gz.user("octocat", output_format="full")
|
|
156
|
+
repo = gz.repo("torvalds", "linux", output_format="raw")
|
|
157
|
+
results = gz.search(gz.REPOS, "machine learning", 3, output_format="full")
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
#### Available options are:
|
|
161
|
+
|
|
162
|
+
* `output_format="compact"`: Returns a concise, human-friendly subset of the most useful fields.
|
|
163
|
+
* `output_format="full"`: Returns all available processed fields exposed by Gitraze.
|
|
164
|
+
* `output_format="raw"`: Returns the raw GitHub API response without filtering or formatting.
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
### Pretty-print results in terminal style:
|
|
168
|
+
|
|
169
|
+
```python
|
|
170
|
+
from gitraze import *
|
|
171
|
+
|
|
172
|
+
display(user("octocat"))
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
Example output:
|
|
176
|
+
|
|
177
|
+
```bash
|
|
178
|
+
Name : The Octocat
|
|
179
|
+
Login : octocat
|
|
180
|
+
Id : 583231
|
|
181
|
+
Node_id : MDQ6VXNlcjU4MzIzMQ==
|
|
182
|
+
Type : User
|
|
183
|
+
User_view_type : public
|
|
184
|
+
Bio : None
|
|
185
|
+
Followers : 22578
|
|
186
|
+
Following : 9
|
|
187
|
+
Public_repos : 8
|
|
188
|
+
Public_gists : 8
|
|
189
|
+
Location : San Francisco
|
|
190
|
+
Profile_url : https://github.com/octocat
|
|
191
|
+
Created_at : 25 Jan 2011
|
|
192
|
+
Email : None
|
|
193
|
+
Twitter_username : None
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
> Note: **`import gitraze as gz`** is the recommended import.
|
|
197
|
+
|
|
198
|
+
> Note: Exact fields and values may differ from the examples shown, depending on the GitHub API response.
|
|
199
|
+
|
|
200
|
+
## Available exports:
|
|
201
|
+
|
|
202
|
+
### Functions:
|
|
203
|
+
|
|
204
|
+
- `user(username, output_format="compact")`
|
|
205
|
+
- `repo(owner, repo, output_format="compact")`
|
|
206
|
+
- `search(category, query, limit=1, output_format="compact")`
|
|
207
|
+
- `display(data)`
|
|
208
|
+
|
|
209
|
+
### Constants:
|
|
210
|
+
|
|
211
|
+
- `USERS`
|
|
212
|
+
- `REPOS`
|
|
213
|
+
- `PRS`
|
|
214
|
+
- `ISSUES`
|
|
215
|
+
- `TOPICS`
|
|
216
|
+
|
|
217
|
+
> Constants depend on the module internals and may change without prior notice.
|
|
218
|
+
|
|
219
|
+
> CLI commands and SDK APIs are still evolving and may change between releases.
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
## Philosophy
|
|
223
|
+
|
|
224
|
+
Gitraze is built for speed, clarity, and control.
|
|
225
|
+
|
|
226
|
+
No GUI. No clutter. No distractions.
|
|
227
|
+
Just raw access to GitHub data — the way it should be.
|
|
228
|
+
|
|
229
|
+
If you live in the terminal, Gitraze lives with you.
|
|
230
|
+
|
|
231
|
+
## Development Setup
|
|
232
|
+
|
|
233
|
+
Clone the repo and install locally:
|
|
234
|
+
|
|
235
|
+
```bash
|
|
236
|
+
git clone https://github.com/akpandey-dev/gitraze.git
|
|
237
|
+
cd gitraze
|
|
238
|
+
pip install -e .
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
## Project Status
|
|
242
|
+
|
|
243
|
+
Gitraze is in active development:
|
|
244
|
+
|
|
245
|
+
- Expect breaking changes
|
|
246
|
+
- Some commands may not work
|
|
247
|
+
- Features are being added rapidly
|
|
248
|
+
- GraphQL feature is basically absent now, but integration is planned; currently REST-focused.
|
|
249
|
+
|
|
250
|
+
If you're here early — you're basically a beta tester.
|
|
251
|
+
|
|
252
|
+
## Contributing
|
|
253
|
+
|
|
254
|
+
PRs, ideas, bug reports, and feature suggestions are welcome.
|
|
255
|
+
If you want to improve or modify Gitraze, go ahead.
|
|
256
|
+
* Fork the repository
|
|
257
|
+
* Create a feature branch
|
|
258
|
+
* Submit a PR with clean commit messages
|
|
259
|
+
|
|
260
|
+
```bash
|
|
261
|
+
git checkout -b feature/cool-thing
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
Just keep the code clean and the terminal fast.
|
|
265
|
+
|
|
266
|
+
|
|
267
|
+
## License
|
|
268
|
+
|
|
269
|
+
MIT License — do whatever you want, just don’t blame me if you break stuff.
|
|
270
|
+
|
|
@@ -2,7 +2,7 @@ from .modules.user import get_user_rest as user
|
|
|
2
2
|
from .modules.repo import get_repo_rest as repo
|
|
3
3
|
from .modules.search import get_search_rest as search
|
|
4
4
|
|
|
5
|
-
from .utils.helpers import
|
|
5
|
+
from .utils.helpers import display
|
|
6
6
|
|
|
7
7
|
__version__ = "0.2.5"
|
|
8
8
|
|
|
@@ -15,32 +15,35 @@ def main():
|
|
|
15
15
|
parser.add_argument(
|
|
16
16
|
"--version",
|
|
17
17
|
action="version",
|
|
18
|
-
version="gitraze 0.
|
|
18
|
+
version="gitraze 0.3.0"
|
|
19
19
|
)
|
|
20
20
|
|
|
21
21
|
subparsers = parser.add_subparsers(dest="command", required=True)
|
|
22
22
|
|
|
23
|
-
#
|
|
23
|
+
# USER
|
|
24
24
|
user_parser = subparsers.add_parser("user", help="Fetch user info (GitHub username)")
|
|
25
25
|
user_parser.add_argument("username", help="Format: username")
|
|
26
|
+
user_parser.add_argument("--format", choices=["compact", "full", "raw"], default="compact", help="Output format (default: compact)")
|
|
26
27
|
user_parser.set_defaults(func=handle_user)
|
|
27
28
|
|
|
28
29
|
|
|
29
|
-
#
|
|
30
|
+
# REPO
|
|
30
31
|
repo_parser = subparsers.add_parser("repo", help="Fetch repo info (Repository in owner/repo format)")
|
|
31
32
|
repo_parser.add_argument("repo", help="Format: owner/repo")
|
|
33
|
+
repo_parser.add_argument("--format", choices=["compact", "full", "raw"], default="compact", help="Output format (default: compact)")
|
|
32
34
|
repo_parser.set_defaults(func=handle_repo)
|
|
33
35
|
|
|
34
36
|
|
|
35
|
-
#
|
|
37
|
+
# SEARCH
|
|
36
38
|
search_parser = subparsers.add_parser("search", help="Search GitHub")
|
|
37
39
|
search_parser.add_argument("category",choices=["repos", "users", "issues", "prs", "topics"],help="repos | users | issues | prs | topics")
|
|
38
40
|
search_parser.add_argument("query", nargs="+", help="Search category (repos, users, issues, topics)")
|
|
39
41
|
search_parser.add_argument("-n", "--limit", type=int, default=1, help="Number of results to show")
|
|
42
|
+
search_parser.add_argument("--format", choices=["compact", "full", "raw"], default="compact", help="Output format (default: compact)")
|
|
40
43
|
search_parser.set_defaults(func=handle_search)
|
|
41
44
|
|
|
42
45
|
|
|
43
|
-
#
|
|
46
|
+
# ANALYZE
|
|
44
47
|
analyze_parser = subparsers.add_parser("analyze", help="Analyze target")
|
|
45
48
|
analyze_parser.add_argument("target", nargs="+")
|
|
46
49
|
analyze_parser.set_defaults(func=handle_analysis)
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import json
|
|
1
2
|
from gitraze.utils.helpers import pretty_print
|
|
2
3
|
from gitraze.modules.repo import get_repo_rest
|
|
3
4
|
|
|
@@ -9,11 +10,15 @@ def handle_repo(args):
|
|
|
9
10
|
print("Invalid format. Use: owner/repo")
|
|
10
11
|
return
|
|
11
12
|
owner, repo = parts
|
|
12
|
-
data = get_repo_rest(owner, repo)
|
|
13
|
+
data = get_repo_rest(owner, repo, output_format=args.format)
|
|
13
14
|
|
|
14
15
|
if "error" in data:
|
|
15
16
|
print(data["error"])
|
|
16
17
|
return
|
|
17
18
|
|
|
18
19
|
print("[✓] Done")
|
|
20
|
+
|
|
21
|
+
if args.format == "raw":
|
|
22
|
+
print(json.dumps(data, indent=2))
|
|
23
|
+
return
|
|
19
24
|
pretty_print(data, title=f"User: {owner}, Repository: {repo}")
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import json
|
|
1
2
|
from gitraze.utils.helpers import pretty_print
|
|
2
3
|
from gitraze.modules.search import get_search_rest
|
|
3
4
|
|
|
@@ -11,7 +12,7 @@ def handle_search(args):
|
|
|
11
12
|
print(f"[+] Searching {category} for {query}...")
|
|
12
13
|
|
|
13
14
|
|
|
14
|
-
data = get_search_rest(category, query, args.limit)
|
|
15
|
+
data = get_search_rest(category, query, args.limit, output_format=args.format)
|
|
15
16
|
|
|
16
17
|
if "error" in data:
|
|
17
18
|
print(data["error"])
|
|
@@ -19,6 +20,10 @@ def handle_search(args):
|
|
|
19
20
|
|
|
20
21
|
print("[✓] Done")
|
|
21
22
|
|
|
23
|
+
if args.format == "raw":
|
|
24
|
+
print(json.dumps(data, indent=2))
|
|
25
|
+
return
|
|
26
|
+
|
|
22
27
|
if isinstance(data, list):
|
|
23
28
|
for i, item in enumerate(data, 1):
|
|
24
29
|
pretty_print(item, title=f"{category} [{i}] -> {query}")
|
|
@@ -1,13 +1,19 @@
|
|
|
1
|
+
import json
|
|
1
2
|
from gitraze.utils.helpers import pretty_print
|
|
2
3
|
from gitraze.modules.user import get_user_rest
|
|
3
4
|
|
|
4
5
|
def handle_user(args):
|
|
5
6
|
print("[+] Fetching user data...")
|
|
6
|
-
data = get_user_rest(args.username)
|
|
7
|
+
data = get_user_rest(args.username, output_format=args.format)
|
|
7
8
|
|
|
8
9
|
if "error" in data:
|
|
9
10
|
print(data["error"])
|
|
10
11
|
return
|
|
11
12
|
|
|
12
13
|
print("[✓] Done")
|
|
14
|
+
|
|
15
|
+
if args.format == "raw":
|
|
16
|
+
print(json.dumps(data, indent=2))
|
|
17
|
+
return
|
|
18
|
+
|
|
13
19
|
pretty_print(data, title=f"User: {args.username}")
|
|
@@ -1,13 +1,19 @@
|
|
|
1
1
|
# repo.py
|
|
2
2
|
from gitraze.utils.helpers import format_date
|
|
3
|
+
from gitraze.utils.helpers import normalize_api_data
|
|
3
4
|
from gitraze.core.api_rest import get_repo as rest_get_repo
|
|
4
5
|
|
|
5
|
-
def get_repo_rest(owner, repo):
|
|
6
|
+
def get_repo_rest(owner, repo, output_format="compact"):
|
|
6
7
|
data = rest_get_repo(owner, repo)
|
|
7
8
|
|
|
8
9
|
if "error" in data:
|
|
9
10
|
return data
|
|
10
|
-
|
|
11
|
+
|
|
12
|
+
if output_format == "raw":
|
|
13
|
+
return data
|
|
14
|
+
if output_format == "full":
|
|
15
|
+
return normalize_api_data(data)
|
|
16
|
+
|
|
11
17
|
return {
|
|
12
18
|
"name": data.get("name"),
|
|
13
19
|
"full_name": data.get("full_name"),
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
# search.py
|
|
2
2
|
from gitraze.utils.helpers import format_date
|
|
3
3
|
from gitraze.utils.helpers import clean_html
|
|
4
|
+
from gitraze.utils.helpers import normalize_api_data
|
|
4
5
|
from gitraze.core.api_rest import get_search
|
|
5
6
|
|
|
6
7
|
|
|
7
|
-
def get_search_rest(category, query, limit=1):
|
|
8
|
+
def get_search_rest(category, query, limit=1, output_format="compact"):
|
|
8
9
|
if category not in ["repos", "users", "issues", "prs", "topics"]:
|
|
9
10
|
return {"error": "Invalid category"}
|
|
11
|
+
if output_format not in ["compact", "full", "raw"]:
|
|
12
|
+
return {"error": "Invalid output format"}
|
|
13
|
+
|
|
10
14
|
data = get_search(category, query)
|
|
11
15
|
if "error" in data:
|
|
12
16
|
return data
|
|
@@ -20,6 +24,12 @@ def get_search_rest(category, query, limit=1):
|
|
|
20
24
|
if not items:
|
|
21
25
|
return {"error": "No results found"}
|
|
22
26
|
items = items[:limit]
|
|
27
|
+
|
|
28
|
+
if output_format == "raw":
|
|
29
|
+
return items
|
|
30
|
+
if output_format == "full":
|
|
31
|
+
return [normalize_api_data(item) for item in items]
|
|
32
|
+
|
|
23
33
|
results = []
|
|
24
34
|
|
|
25
35
|
for item in items:
|
|
@@ -41,7 +51,6 @@ def get_search_rest(category, query, limit=1):
|
|
|
41
51
|
"visibility": item.get("visibility"),
|
|
42
52
|
"default_branch": item.get("default_branch"),
|
|
43
53
|
"owner": item.get("owner", {}).get("login"),
|
|
44
|
-
"For More, use": "$ gitraze repo <owner/repo>"
|
|
45
54
|
})
|
|
46
55
|
|
|
47
56
|
case "users":
|
|
@@ -55,7 +64,6 @@ def get_search_rest(category, query, limit=1):
|
|
|
55
64
|
"followers_url": item.get("followers_url"),
|
|
56
65
|
"following_url": item.get("following_url"),
|
|
57
66
|
"organizations_url": item.get("organizations_url"),
|
|
58
|
-
"For More, use": "$ gitraze user <username>"
|
|
59
67
|
})
|
|
60
68
|
|
|
61
69
|
case "issues":
|
|
@@ -1,13 +1,20 @@
|
|
|
1
1
|
# user.py
|
|
2
2
|
from gitraze.utils.helpers import format_date
|
|
3
|
+
from gitraze.utils.helpers import normalize_api_data
|
|
3
4
|
from gitraze.core.api_rest import get_user as rest_get_user
|
|
4
5
|
|
|
5
|
-
def get_user_rest(username):
|
|
6
|
+
def get_user_rest(username, output_format="compact"):
|
|
6
7
|
data = rest_get_user(username)
|
|
7
8
|
|
|
8
9
|
if "error" in data:
|
|
9
10
|
return data
|
|
10
11
|
|
|
12
|
+
|
|
13
|
+
if output_format == "raw":
|
|
14
|
+
return data
|
|
15
|
+
if output_format == "full":
|
|
16
|
+
return normalize_api_data(data)
|
|
17
|
+
|
|
11
18
|
return {
|
|
12
19
|
"name": data.get("name"),
|
|
13
20
|
"login": data.get("login"),
|
|
@@ -30,6 +30,24 @@ def pretty_print(data, title=None):
|
|
|
30
30
|
|
|
31
31
|
print() # spacing
|
|
32
32
|
|
|
33
|
+
def display(data, title=None):
|
|
34
|
+
|
|
35
|
+
if isinstance(data, list):
|
|
36
|
+
|
|
37
|
+
if not data:
|
|
38
|
+
print(Fore.RED + "No results found")
|
|
39
|
+
return
|
|
40
|
+
|
|
41
|
+
for i, item in enumerate(data, 1):
|
|
42
|
+
|
|
43
|
+
item_title = f"{title} [{i}]" if title else f"Result [{i}]"
|
|
44
|
+
|
|
45
|
+
pretty_print(item, title=item_title)
|
|
46
|
+
|
|
47
|
+
return
|
|
48
|
+
|
|
49
|
+
pretty_print(data, title=f"Result: ")
|
|
50
|
+
|
|
33
51
|
def format_date(date_str):
|
|
34
52
|
if not date_str:
|
|
35
53
|
return None
|
|
@@ -40,4 +58,19 @@ def format_date(date_str):
|
|
|
40
58
|
return date_str # fallback (don’t crash)
|
|
41
59
|
|
|
42
60
|
def clean_html(text):
|
|
43
|
-
return re.sub(r"<.*?>", "", text) if text else text
|
|
61
|
+
return re.sub(r"<.*?>", "", text) if text else text
|
|
62
|
+
|
|
63
|
+
def normalize_api_data(data):
|
|
64
|
+
cleaned = {}
|
|
65
|
+
|
|
66
|
+
for key, value in data.items():
|
|
67
|
+
|
|
68
|
+
if key.endswith("_at") and isinstance(value, str):
|
|
69
|
+
value = format_date(value)
|
|
70
|
+
|
|
71
|
+
if isinstance(value, str):
|
|
72
|
+
value = clean_html(value)
|
|
73
|
+
|
|
74
|
+
cleaned[key] = value
|
|
75
|
+
|
|
76
|
+
return cleaned
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: gitraze
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.0
|
|
4
4
|
Summary: A CLI and Python library for GitHub reconnaissance, search, and analysis
|
|
5
5
|
Author: AK Pandey
|
|
6
6
|
License-Expression: MIT
|
|
@@ -19,12 +19,22 @@ Dynamic: license-file
|
|
|
19
19
|
|
|
20
20
|
> A fast, hacker-style CLI for slicing through GitHub data like a blade.
|
|
21
21
|
|
|
22
|
-
Gitraze is a powerful command-line tool designed to explore, analyze, and extract insights from GitHub using
|
|
22
|
+
Gitraze is a powerful command-line tool designed to explore, analyze, and extract insights from GitHub using REST, with GraphQL support coming soon; all from your terminal.
|
|
23
23
|
|
|
24
24
|
⚠️ **Status:** Early development — expect bugs, missing features, and rapid changes. APIs and CLI may change without notice.
|
|
25
25
|
|
|
26
26
|
> Built for developers who prefer terminals over tabs.
|
|
27
27
|
|
|
28
|
+
[](https://pypi.org/project/gitraze/)
|
|
29
|
+
[](https://pypi.org/project/gitraze/)
|
|
30
|
+
[](https://pypi.org/project/gitraze/)
|
|
31
|
+
[](https://github.com/akpandey-dev/gitraze/actions)
|
|
32
|
+
[](LICENSE)
|
|
33
|
+
[](https://github.com/akpandey-dev/gitraze/issues)
|
|
34
|
+
[](https://github.com/akpandey-dev/gitraze)
|
|
35
|
+
[](https://github.com/akpandey-dev/gitraze/commits/main)
|
|
36
|
+
[](https://github.com/akpandey-dev/gitraze/graphs/contributors)
|
|
37
|
+
|
|
28
38
|
|
|
29
39
|
---
|
|
30
40
|
|
|
@@ -58,10 +68,19 @@ Most GitHub tools are either slow, bloated, or UI-heavy.
|
|
|
58
68
|
|
|
59
69
|
## Installation
|
|
60
70
|
|
|
71
|
+
### From PyPI using `pip`
|
|
72
|
+
|
|
61
73
|
```bash
|
|
62
74
|
pip install gitraze
|
|
63
75
|
```
|
|
64
76
|
|
|
77
|
+
### Using source code from Repository
|
|
78
|
+
|
|
79
|
+
> Read the `Development setup` section.
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
> There may be some gap between releases on GitHub and PyPI, as more than one commits are sometimes clustered as a single release on PyPI.
|
|
83
|
+
|
|
65
84
|
|
|
66
85
|
## Usage
|
|
67
86
|
|
|
@@ -69,14 +88,16 @@ pip install gitraze
|
|
|
69
88
|
|
|
70
89
|
Example:
|
|
71
90
|
```bash
|
|
91
|
+
gitraze --version
|
|
72
92
|
gitraze --help
|
|
73
|
-
gitraze user octocat
|
|
74
|
-
gitraze repo torvalds/linux
|
|
75
|
-
gitraze search repos "machine learning" -n 5
|
|
76
|
-
gitraze analyze
|
|
93
|
+
gitraze user octocat --format=raw
|
|
94
|
+
gitraze repo torvalds/linux --format=full # Query format must match
|
|
95
|
+
gitraze search repos "machine learning" -n 5 --format=compact
|
|
96
|
+
gitraze analyze <target> # Coming soon!
|
|
77
97
|
```
|
|
78
98
|
|
|
79
99
|
Example output:
|
|
100
|
+
|
|
80
101
|
```bash
|
|
81
102
|
$ gitraze user octocat
|
|
82
103
|
|
|
@@ -103,6 +124,7 @@ Email : None
|
|
|
103
124
|
Twitter_username : None
|
|
104
125
|
|
|
105
126
|
```
|
|
127
|
+
|
|
106
128
|
> Commands prefixed with `$` should be run in your terminal.
|
|
107
129
|
|
|
108
130
|
### Gitraze can also be used as a lightweight Python SDK.
|
|
@@ -111,21 +133,54 @@ Twitter_username : None
|
|
|
111
133
|
```python
|
|
112
134
|
import gitraze as gz
|
|
113
135
|
|
|
114
|
-
user = gz.user("octocat")
|
|
136
|
+
user = gz.user("octocat", output_format="compact")
|
|
115
137
|
|
|
116
138
|
print(user["name"])
|
|
117
139
|
print(user["followers"])
|
|
118
140
|
```
|
|
119
141
|
|
|
142
|
+
#### Repository:
|
|
143
|
+
```python
|
|
144
|
+
import gitraze as gz
|
|
145
|
+
|
|
146
|
+
repo = gz.repo("torvalds", "linux", output_format="full")
|
|
147
|
+
|
|
148
|
+
print(repo["name"])
|
|
149
|
+
print(repo["owner"])
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
> Note: Unlike the CLI, the SDK accepts owner and repository name as separate arguments.
|
|
153
|
+
|
|
120
154
|
#### Search:
|
|
121
155
|
|
|
122
156
|
```python
|
|
123
|
-
|
|
157
|
+
import gitraze as gz
|
|
158
|
+
|
|
159
|
+
results = gz.search(gz.REPOS, "machine learning", 3, output_format="compact")
|
|
124
160
|
|
|
125
161
|
for repo in results:
|
|
126
162
|
print(repo["full_name"])
|
|
127
163
|
```
|
|
128
164
|
|
|
165
|
+
### Custom Output Format:
|
|
166
|
+
|
|
167
|
+
All three SDK functions support output customization:
|
|
168
|
+
|
|
169
|
+
```python
|
|
170
|
+
import gitraze as gz
|
|
171
|
+
|
|
172
|
+
user = gz.user("octocat", output_format="full")
|
|
173
|
+
repo = gz.repo("torvalds", "linux", output_format="raw")
|
|
174
|
+
results = gz.search(gz.REPOS, "machine learning", 3, output_format="full")
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
#### Available options are:
|
|
178
|
+
|
|
179
|
+
* `output_format="compact"`: Returns a concise, human-friendly subset of the most useful fields.
|
|
180
|
+
* `output_format="full"`: Returns all available processed fields exposed by Gitraze.
|
|
181
|
+
* `output_format="raw"`: Returns the raw GitHub API response without filtering or formatting.
|
|
182
|
+
|
|
183
|
+
|
|
129
184
|
### Pretty-print results in terminal style:
|
|
130
185
|
|
|
131
186
|
```python
|
|
@@ -157,14 +212,16 @@ Twitter_username : None
|
|
|
157
212
|
|
|
158
213
|
> Note: **`import gitraze as gz`** is the recommended import.
|
|
159
214
|
|
|
215
|
+
> Note: Exact fields and values may differ from the examples shown, depending on the GitHub API response.
|
|
216
|
+
|
|
160
217
|
## Available exports:
|
|
161
218
|
|
|
162
219
|
### Functions:
|
|
163
220
|
|
|
164
|
-
- `user()`
|
|
165
|
-
- `repo()`
|
|
166
|
-
- `search()`
|
|
167
|
-
- `display()`
|
|
221
|
+
- `user(username, output_format="compact")`
|
|
222
|
+
- `repo(owner, repo, output_format="compact")`
|
|
223
|
+
- `search(category, query, limit=1, output_format="compact")`
|
|
224
|
+
- `display(data)`
|
|
168
225
|
|
|
169
226
|
### Constants:
|
|
170
227
|
|
|
@@ -174,9 +231,10 @@ Twitter_username : None
|
|
|
174
231
|
- `ISSUES`
|
|
175
232
|
- `TOPICS`
|
|
176
233
|
|
|
234
|
+
> Constants depend on the module internals and may change without prior notice.
|
|
177
235
|
|
|
236
|
+
> CLI commands and SDK APIs are still evolving and may change between releases.
|
|
178
237
|
|
|
179
|
-
⚠️ CLI commands are still evolving and may change.
|
|
180
238
|
|
|
181
239
|
## Philosophy
|
|
182
240
|
|
|
@@ -204,14 +262,17 @@ Gitraze is in active development:
|
|
|
204
262
|
- Expect breaking changes
|
|
205
263
|
- Some commands may not work
|
|
206
264
|
- Features are being added rapidly
|
|
207
|
-
- GraphQL feature is basically absent now, but is
|
|
265
|
+
- GraphQL feature is basically absent now, but integration is planned; currently REST-focused.
|
|
208
266
|
|
|
209
|
-
If you're here early — you're basically a beta tester
|
|
267
|
+
If you're here early — you're basically a beta tester.
|
|
210
268
|
|
|
211
269
|
## Contributing
|
|
212
270
|
|
|
213
271
|
PRs, ideas, bug reports, and feature suggestions are welcome.
|
|
214
272
|
If you want to improve or modify Gitraze, go ahead.
|
|
273
|
+
* Fork the repository
|
|
274
|
+
* Create a feature branch
|
|
275
|
+
* Submit a PR with clean commit messages
|
|
215
276
|
|
|
216
277
|
```bash
|
|
217
278
|
git checkout -b feature/cool-thing
|
gitraze-0.2.5/README.md
DELETED
|
@@ -1,209 +0,0 @@
|
|
|
1
|
-
# Gitraze
|
|
2
|
-
|
|
3
|
-
> A fast, hacker-style CLI for slicing through GitHub data like a blade.
|
|
4
|
-
|
|
5
|
-
Gitraze is a powerful command-line tool designed to explore, analyze, and extract insights from GitHub using both REST and GraphQL APIs — all from your terminal.
|
|
6
|
-
|
|
7
|
-
⚠️ **Status:** Early development — expect bugs, missing features, and rapid changes. APIs and CLI may change without notice.
|
|
8
|
-
|
|
9
|
-
> Built for developers who prefer terminals over tabs.
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
---
|
|
13
|
-
|
|
14
|
-
## Why Gitraze?
|
|
15
|
-
|
|
16
|
-
Most GitHub tools are either slow, bloated, or UI-heavy.
|
|
17
|
-
|
|
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
|
|
23
|
-
|
|
24
|
-
---
|
|
25
|
-
|
|
26
|
-
## Features
|
|
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
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
---
|
|
41
|
-
|
|
42
|
-
## Installation
|
|
43
|
-
|
|
44
|
-
```bash
|
|
45
|
-
pip install gitraze
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
## Usage
|
|
50
|
-
|
|
51
|
-
### Run directly from your terminal:
|
|
52
|
-
|
|
53
|
-
Example:
|
|
54
|
-
```bash
|
|
55
|
-
gitraze --help
|
|
56
|
-
gitraze user octocat
|
|
57
|
-
gitraze repo torvalds/linux
|
|
58
|
-
gitraze search repos "machine learning" -n 5 # Will show top 5 results, but it is optional flag
|
|
59
|
-
gitraze analyze github # Coming soon!
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
Example output:
|
|
63
|
-
```bash
|
|
64
|
-
$ gitraze user octocat
|
|
65
|
-
|
|
66
|
-
[+] Fetching user data...
|
|
67
|
-
[✓] Done
|
|
68
|
-
|
|
69
|
-
User: octocat
|
|
70
|
-
-------------
|
|
71
|
-
Name : The Octocat
|
|
72
|
-
Login : octocat
|
|
73
|
-
Id : 583231
|
|
74
|
-
Node_id : MDQ6VXNlcjU4MzIzMQ==
|
|
75
|
-
Type : User
|
|
76
|
-
User_view_type : public
|
|
77
|
-
Bio : None
|
|
78
|
-
Followers : 22312
|
|
79
|
-
Following : 9
|
|
80
|
-
Public_repos : 8
|
|
81
|
-
Public_gists : 8
|
|
82
|
-
Location : San Francisco
|
|
83
|
-
Profile_url : https://github.com/octocat
|
|
84
|
-
Created_at : 25 Jan 2011
|
|
85
|
-
Email : None
|
|
86
|
-
Twitter_username : None
|
|
87
|
-
|
|
88
|
-
```
|
|
89
|
-
> Commands prefixed with `$` should be run in your terminal.
|
|
90
|
-
|
|
91
|
-
### Gitraze can also be used as a lightweight Python SDK.
|
|
92
|
-
|
|
93
|
-
#### User:
|
|
94
|
-
```python
|
|
95
|
-
import gitraze as gz
|
|
96
|
-
|
|
97
|
-
user = gz.user("octocat")
|
|
98
|
-
|
|
99
|
-
print(user["name"])
|
|
100
|
-
print(user["followers"])
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
#### Search:
|
|
104
|
-
|
|
105
|
-
```python
|
|
106
|
-
results = gz.search(gz.REPOS, "machine learning", 3)
|
|
107
|
-
|
|
108
|
-
for repo in results:
|
|
109
|
-
print(repo["full_name"])
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
### Pretty-print results in terminal style:
|
|
113
|
-
|
|
114
|
-
```python
|
|
115
|
-
from gitraze import *
|
|
116
|
-
|
|
117
|
-
display(user("octocat"))
|
|
118
|
-
```
|
|
119
|
-
|
|
120
|
-
Example output:
|
|
121
|
-
|
|
122
|
-
```bash
|
|
123
|
-
Name : The Octocat
|
|
124
|
-
Login : octocat
|
|
125
|
-
Id : 583231
|
|
126
|
-
Node_id : MDQ6VXNlcjU4MzIzMQ==
|
|
127
|
-
Type : User
|
|
128
|
-
User_view_type : public
|
|
129
|
-
Bio : None
|
|
130
|
-
Followers : 22578
|
|
131
|
-
Following : 9
|
|
132
|
-
Public_repos : 8
|
|
133
|
-
Public_gists : 8
|
|
134
|
-
Location : San Francisco
|
|
135
|
-
Profile_url : https://github.com/octocat
|
|
136
|
-
Created_at : 25 Jan 2011
|
|
137
|
-
Email : None
|
|
138
|
-
Twitter_username : None
|
|
139
|
-
```
|
|
140
|
-
|
|
141
|
-
> Note: **`import gitraze as gz`** is the recommended import.
|
|
142
|
-
|
|
143
|
-
## Available exports:
|
|
144
|
-
|
|
145
|
-
### Functions:
|
|
146
|
-
|
|
147
|
-
- `user()`
|
|
148
|
-
- `repo()`
|
|
149
|
-
- `search()`
|
|
150
|
-
- `display()`
|
|
151
|
-
|
|
152
|
-
### Constants:
|
|
153
|
-
|
|
154
|
-
- `USERS`
|
|
155
|
-
- `REPOS`
|
|
156
|
-
- `PRS`
|
|
157
|
-
- `ISSUES`
|
|
158
|
-
- `TOPICS`
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
⚠️ CLI commands are still evolving and may change.
|
|
163
|
-
|
|
164
|
-
## Philosophy
|
|
165
|
-
|
|
166
|
-
Gitraze is built for speed, clarity, and control.
|
|
167
|
-
|
|
168
|
-
No GUI. No clutter. No distractions.
|
|
169
|
-
Just raw access to GitHub data — the way it should be.
|
|
170
|
-
|
|
171
|
-
If you live in the terminal, Gitraze lives with you.
|
|
172
|
-
|
|
173
|
-
## Development Setup
|
|
174
|
-
|
|
175
|
-
Clone the repo and install locally:
|
|
176
|
-
|
|
177
|
-
```bash
|
|
178
|
-
git clone https://github.com/akpandey-dev/gitraze.git
|
|
179
|
-
cd gitraze
|
|
180
|
-
pip install -e .
|
|
181
|
-
```
|
|
182
|
-
|
|
183
|
-
## Project Status
|
|
184
|
-
|
|
185
|
-
Gitraze is in active development:
|
|
186
|
-
|
|
187
|
-
- Expect breaking changes
|
|
188
|
-
- Some commands may not work
|
|
189
|
-
- Features are being added rapidly
|
|
190
|
-
- GraphQL feature is basically absent now, but is coming soon
|
|
191
|
-
|
|
192
|
-
If you're here early — you're basically a beta tester 😈
|
|
193
|
-
|
|
194
|
-
## Contributing
|
|
195
|
-
|
|
196
|
-
PRs, ideas, bug reports, and feature suggestions are welcome.
|
|
197
|
-
If you want to improve or modify Gitraze, go ahead.
|
|
198
|
-
|
|
199
|
-
```bash
|
|
200
|
-
git checkout -b feature/cool-thing
|
|
201
|
-
```
|
|
202
|
-
|
|
203
|
-
Just keep the code clean and the terminal fast.
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
## License
|
|
207
|
-
|
|
208
|
-
MIT License — do whatever you want, just don’t blame me if you break stuff.
|
|
209
|
-
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
# api_graphql.py
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|