recon-github 0.1.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.
- recon_github-0.1.0/LICENSE +21 -0
- recon_github-0.1.0/PKG-INFO +241 -0
- recon_github-0.1.0/README.md +227 -0
- recon_github-0.1.0/app/cli.py +13 -0
- recon_github-0.1.0/app/commands/auth.py +17 -0
- recon_github-0.1.0/app/commands/me.py +23 -0
- recon_github-0.1.0/app/commands/repo.py +202 -0
- recon_github-0.1.0/app/services/auth.py +79 -0
- recon_github-0.1.0/app/services/github.py +184 -0
- recon_github-0.1.0/app/services/github_errors.py +39 -0
- recon_github-0.1.0/app/services/storage.py +27 -0
- recon_github-0.1.0/app/ui/avatar.py +24 -0
- recon_github-0.1.0/app/ui/display.py +53 -0
- recon_github-0.1.0/app/ui/repo.py +365 -0
- recon_github-0.1.0/pyproject.toml +28 -0
- recon_github-0.1.0/recon_github.egg-info/PKG-INFO +241 -0
- recon_github-0.1.0/recon_github.egg-info/SOURCES.txt +27 -0
- recon_github-0.1.0/recon_github.egg-info/dependency_links.txt +1 -0
- recon_github-0.1.0/recon_github.egg-info/requires.txt +5 -0
- recon_github-0.1.0/recon_github.egg-info/top_level.txt +1 -0
- recon_github-0.1.0/setup.cfg +4 -0
- recon_github-0.1.0/tests/test_auth_service.py +51 -0
- recon_github-0.1.0/tests/test_cli.py +17 -0
- recon_github-0.1.0/tests/test_cli_commands.py +80 -0
- recon_github-0.1.0/tests/test_github_errors.py +78 -0
- recon_github-0.1.0/tests/test_github_service.py +127 -0
- recon_github-0.1.0/tests/test_repo_helpers.py +47 -0
- recon_github-0.1.0/tests/test_storage.py +30 -0
- recon_github-0.1.0/tests/test_ui_repo.py +56 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 owenpalfreymandev
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: recon-github
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Recon is a powerful CLI companion for developers and tools for agents, turning GitHub activity and repository data into useful insights from your terminal
|
|
5
|
+
Requires-Python: >=3.12
|
|
6
|
+
Description-Content-Type: text/markdown
|
|
7
|
+
License-File: LICENSE
|
|
8
|
+
Requires-Dist: dotenv>=0.9.9
|
|
9
|
+
Requires-Dist: requests>=2.34.2
|
|
10
|
+
Requires-Dist: rich>=15.0.0
|
|
11
|
+
Requires-Dist: rich-pixels>=3.0.1
|
|
12
|
+
Requires-Dist: typer>=0.27.1
|
|
13
|
+
Dynamic: license-file
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
# Recon CLI
|
|
17
|
+
|
|
18
|
+
Recon is a powerful CLI companion for developers and tools for agents, turning GitHub activity and repository data into useful insights from your terminal.
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
[](https://choosealicense.com/licenses/mit/)
|
|
23
|
+
[](https://github.com/owenpalfreymandev/reconcli/actions/workflows/ci.yml)
|
|
24
|
+
[](https://www.python.org/)
|
|
25
|
+
[](https://pypi.org/)
|
|
26
|
+
[](https://github.com/owenpalfreymandev/reconcli/blob/main/LICENSE)
|
|
27
|
+
## Overview
|
|
28
|
+
|
|
29
|
+
Recon allows for developers to view basic GitHub analytics in the terminal quickly, rather than opening up their browser. This means it allows agents to interect with the service without having browser capabilities.
|
|
30
|
+
|
|
31
|
+
It is powered by [Typer](github.com/fastapi/typer), a library for building fast CLI tools, and made pretty by [Rich](https://github.com/textualize/rich) and it's prebuilt components.
|
|
32
|
+
## Features
|
|
33
|
+
|
|
34
|
+
* **GitHub Authentication** — Securely authenticate with GitHub using OAuth device flow.
|
|
35
|
+
* **User Information** — View information about your authenticated GitHub account.
|
|
36
|
+
* **Repository Explorer** — List and inspect GitHub repositories directly from the terminal.
|
|
37
|
+
* **Repository Statistics** — Explore repository languages, contributors, and other useful statistics.
|
|
38
|
+
* **Rich Terminal UI** — Clean, structured terminal output powered by Rich.
|
|
39
|
+
* **Fast CLI Workflow** — Quickly access GitHub information without leaving the command line.
|
|
40
|
+
* **Modular Architecture** — Built with reusable services and components to make Recon easy to maintain and extend.
|
|
41
|
+
* **Automated Testing** — Tested with an automated CI pipeline to help maintain reliability and code quality.
|
|
42
|
+
|
|
43
|
+
## Installation
|
|
44
|
+
|
|
45
|
+
Since we want you to be able to use Recon from anywhere - not just one directory - we recomend you install it with [uv package manager](https://docs.astral.sh/uv/getting-started/installation/).
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
uv tool install recon-gh
|
|
49
|
+
```
|
|
50
|
+
For the best experience, then login to your GitHub account (this step is not strictly required).
|
|
51
|
+
```bash
|
|
52
|
+
recon login
|
|
53
|
+
```
|
|
54
|
+
## Usage
|
|
55
|
+
|
|
56
|
+
Here you can learn how to get started with terminal commands, and learn how to find more.
|
|
57
|
+
|
|
58
|
+
### View Your GitHub Profile
|
|
59
|
+
|
|
60
|
+
The `me` command displays information about your authenticated GitHub account.
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
recon me
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Example output:
|
|
67
|
+
|
|
68
|
+
```text
|
|
69
|
+
╭────── Owen Palfreyman ───────╮ ╭──────────────────────────────╮
|
|
70
|
+
│ Repositories 2 │ │ │
|
|
71
|
+
│ Followers 7 │ │ │
|
|
72
|
+
│ Following 2 │ │ │
|
|
73
|
+
│ Location United Kingdom │ │ │
|
|
74
|
+
│ Company — │ │ │
|
|
75
|
+
│ Joined 2023-11-02 │ │ │
|
|
76
|
+
╰───── @owenpalfreymandev ─────╯ │ │
|
|
77
|
+
╰──────────────────────────────╯
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### Scout Another GitHub User
|
|
81
|
+
|
|
82
|
+
Use `scout` to explore another GitHub user's profile.
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
recon scout torvalds
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Example output:
|
|
89
|
+
|
|
90
|
+
```text
|
|
91
|
+
╭──────── Linus Torvalds ────────╮ ╭──────────────────────────────╮
|
|
92
|
+
│ Repositories 12 │ │ │
|
|
93
|
+
│ Followers 318572 │ │ │
|
|
94
|
+
│ Following 0 │ │ │
|
|
95
|
+
│ Location Portland, OR │ │ │
|
|
96
|
+
│ Company Linux Foundation │ │ │
|
|
97
|
+
│ Joined 2011-09-03 │ │ │
|
|
98
|
+
╰────────── @torvalds ───────────╯ │ │
|
|
99
|
+
╰──────────────────────────────╯
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### List Your Repositories
|
|
103
|
+
|
|
104
|
+
The `list` command displays your GitHub repositories.
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
recon list
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
This provides a quick way to see your repositories before using `details` to explore a specific project.
|
|
111
|
+
|
|
112
|
+
### Authentication
|
|
113
|
+
|
|
114
|
+
Recon uses GitHub's device flow for authentication.
|
|
115
|
+
|
|
116
|
+
To log in:
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
recon login
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
To log out:
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
recon logout
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
### Explore a Repository
|
|
129
|
+
|
|
130
|
+
The `details` command gives you an overview of a GitHub repository.
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
recon details owenpalfreymandev fpark
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
The command takes two arguments:
|
|
137
|
+
|
|
138
|
+
* `owner` — The GitHub username or organisation that owns the repository.
|
|
139
|
+
* `repo` — The name of the repository.
|
|
140
|
+
|
|
141
|
+
### Need Some Help?
|
|
142
|
+
|
|
143
|
+
Not sure what a command can do? Recon has built-in help for every command.
|
|
144
|
+
|
|
145
|
+
```bash
|
|
146
|
+
recon details --help
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
This shows you the available arguments and options for the command, including additional ways to get information from a repository.
|
|
150
|
+
|
|
151
|
+
```text
|
|
152
|
+
Usage: recon details [OPTIONS] {owner} {repo}
|
|
153
|
+
|
|
154
|
+
Gain insights into your repo
|
|
155
|
+
|
|
156
|
+
Arguments:
|
|
157
|
+
owner Repository owner, e.g. owenpalfreymandev
|
|
158
|
+
repo Repository name, e.g. reconcli
|
|
159
|
+
|
|
160
|
+
Options:
|
|
161
|
+
--contributors View contributors in more detail.
|
|
162
|
+
--languages View language usage in more detail.
|
|
163
|
+
--help Show this message and exit.
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
For example, the `--languages` option can be used to get a more detailed breakdown of the languages used in a repository:
|
|
167
|
+
|
|
168
|
+
```bash
|
|
169
|
+
recon details owenpalfreymandev fpark --languages
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
```text
|
|
173
|
+
╭──────────────────────────────────────────────────────────╮
|
|
174
|
+
│ LANGUAGES │
|
|
175
|
+
│ owenpalfreymandev/fpark │
|
|
176
|
+
╰──────────────────────────────────────────────────────────╯
|
|
177
|
+
4 languages returned by GitHub · 100% of reported code
|
|
178
|
+
|
|
179
|
+
LANGUAGE BREAKDOWN
|
|
180
|
+
──────────────────────────────────────────────────────────
|
|
181
|
+
1 TypeScript 279.9 KB
|
|
182
|
+
████████████████████████████████ 95.9%
|
|
183
|
+
|
|
184
|
+
2 PLpgSQL 7.0 KB
|
|
185
|
+
█ 2.4%
|
|
186
|
+
|
|
187
|
+
3 CSS 4.3 KB
|
|
188
|
+
█ 1.5%
|
|
189
|
+
|
|
190
|
+
4 JavaScript 559 B
|
|
191
|
+
█ 0.2%
|
|
192
|
+
──────────────────────────────────────────────────────────
|
|
193
|
+
Showing all 4 languages
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
### Explore Further
|
|
198
|
+
|
|
199
|
+
These are just some of the commands available in Recon. There are plenty more options to play with, with more commands and features coming soon. Check the [roadmap](https://github.com/owenpalfreymandev/reconcli/blob/main/README.md) for more details.
|
|
200
|
+
|
|
201
|
+
## Contributing
|
|
202
|
+
|
|
203
|
+
Contributions are always welcome!
|
|
204
|
+
|
|
205
|
+
To clone the repo and download all dependencies, run:
|
|
206
|
+
```bash
|
|
207
|
+
git clone https://github.com/owenpalfreymandev/reconcli.git
|
|
208
|
+
uv sync
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
You can run unit tests and type tests with:
|
|
212
|
+
```bash
|
|
213
|
+
uv run pytest
|
|
214
|
+
uv run pyright
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
Be sure to lint before commiting, or it will fail CI/CD:
|
|
218
|
+
```bash
|
|
219
|
+
uv run ruff check --fix .
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
### Workflow
|
|
223
|
+
|
|
224
|
+
A basic workflow to follow is:
|
|
225
|
+
|
|
226
|
+
1. Fork the repository
|
|
227
|
+
2. Create a branch
|
|
228
|
+
3. Make changes
|
|
229
|
+
4. Run tests/lint/type checks
|
|
230
|
+
5. Open a PR
|
|
231
|
+
## License
|
|
232
|
+
|
|
233
|
+
Recon is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.
|
|
234
|
+
## Author
|
|
235
|
+
|
|
236
|
+
Recon is developed by Owen Palfreyman.
|
|
237
|
+
|
|
238
|
+
GitHub: @owenpalfreymandev
|
|
239
|
+
Repository: owenpalfreymandev/reconcli
|
|
240
|
+
|
|
241
|
+
*or could could just run `recon details owenpalfreymandev reconcli --contributors` wink wink*
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
|
|
2
|
+
# Recon CLI
|
|
3
|
+
|
|
4
|
+
Recon is a powerful CLI companion for developers and tools for agents, turning GitHub activity and repository data into useful insights from your terminal.
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
[](https://choosealicense.com/licenses/mit/)
|
|
9
|
+
[](https://github.com/owenpalfreymandev/reconcli/actions/workflows/ci.yml)
|
|
10
|
+
[](https://www.python.org/)
|
|
11
|
+
[](https://pypi.org/)
|
|
12
|
+
[](https://github.com/owenpalfreymandev/reconcli/blob/main/LICENSE)
|
|
13
|
+
## Overview
|
|
14
|
+
|
|
15
|
+
Recon allows for developers to view basic GitHub analytics in the terminal quickly, rather than opening up their browser. This means it allows agents to interect with the service without having browser capabilities.
|
|
16
|
+
|
|
17
|
+
It is powered by [Typer](github.com/fastapi/typer), a library for building fast CLI tools, and made pretty by [Rich](https://github.com/textualize/rich) and it's prebuilt components.
|
|
18
|
+
## Features
|
|
19
|
+
|
|
20
|
+
* **GitHub Authentication** — Securely authenticate with GitHub using OAuth device flow.
|
|
21
|
+
* **User Information** — View information about your authenticated GitHub account.
|
|
22
|
+
* **Repository Explorer** — List and inspect GitHub repositories directly from the terminal.
|
|
23
|
+
* **Repository Statistics** — Explore repository languages, contributors, and other useful statistics.
|
|
24
|
+
* **Rich Terminal UI** — Clean, structured terminal output powered by Rich.
|
|
25
|
+
* **Fast CLI Workflow** — Quickly access GitHub information without leaving the command line.
|
|
26
|
+
* **Modular Architecture** — Built with reusable services and components to make Recon easy to maintain and extend.
|
|
27
|
+
* **Automated Testing** — Tested with an automated CI pipeline to help maintain reliability and code quality.
|
|
28
|
+
|
|
29
|
+
## Installation
|
|
30
|
+
|
|
31
|
+
Since we want you to be able to use Recon from anywhere - not just one directory - we recomend you install it with [uv package manager](https://docs.astral.sh/uv/getting-started/installation/).
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
uv tool install recon-gh
|
|
35
|
+
```
|
|
36
|
+
For the best experience, then login to your GitHub account (this step is not strictly required).
|
|
37
|
+
```bash
|
|
38
|
+
recon login
|
|
39
|
+
```
|
|
40
|
+
## Usage
|
|
41
|
+
|
|
42
|
+
Here you can learn how to get started with terminal commands, and learn how to find more.
|
|
43
|
+
|
|
44
|
+
### View Your GitHub Profile
|
|
45
|
+
|
|
46
|
+
The `me` command displays information about your authenticated GitHub account.
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
recon me
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Example output:
|
|
53
|
+
|
|
54
|
+
```text
|
|
55
|
+
╭────── Owen Palfreyman ───────╮ ╭──────────────────────────────╮
|
|
56
|
+
│ Repositories 2 │ │ │
|
|
57
|
+
│ Followers 7 │ │ │
|
|
58
|
+
│ Following 2 │ │ │
|
|
59
|
+
│ Location United Kingdom │ │ │
|
|
60
|
+
│ Company — │ │ │
|
|
61
|
+
│ Joined 2023-11-02 │ │ │
|
|
62
|
+
╰───── @owenpalfreymandev ─────╯ │ │
|
|
63
|
+
╰──────────────────────────────╯
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### Scout Another GitHub User
|
|
67
|
+
|
|
68
|
+
Use `scout` to explore another GitHub user's profile.
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
recon scout torvalds
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Example output:
|
|
75
|
+
|
|
76
|
+
```text
|
|
77
|
+
╭──────── Linus Torvalds ────────╮ ╭──────────────────────────────╮
|
|
78
|
+
│ Repositories 12 │ │ │
|
|
79
|
+
│ Followers 318572 │ │ │
|
|
80
|
+
│ Following 0 │ │ │
|
|
81
|
+
│ Location Portland, OR │ │ │
|
|
82
|
+
│ Company Linux Foundation │ │ │
|
|
83
|
+
│ Joined 2011-09-03 │ │ │
|
|
84
|
+
╰────────── @torvalds ───────────╯ │ │
|
|
85
|
+
╰──────────────────────────────╯
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### List Your Repositories
|
|
89
|
+
|
|
90
|
+
The `list` command displays your GitHub repositories.
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
recon list
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
This provides a quick way to see your repositories before using `details` to explore a specific project.
|
|
97
|
+
|
|
98
|
+
### Authentication
|
|
99
|
+
|
|
100
|
+
Recon uses GitHub's device flow for authentication.
|
|
101
|
+
|
|
102
|
+
To log in:
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
recon login
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
To log out:
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
recon logout
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### Explore a Repository
|
|
115
|
+
|
|
116
|
+
The `details` command gives you an overview of a GitHub repository.
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
recon details owenpalfreymandev fpark
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
The command takes two arguments:
|
|
123
|
+
|
|
124
|
+
* `owner` — The GitHub username or organisation that owns the repository.
|
|
125
|
+
* `repo` — The name of the repository.
|
|
126
|
+
|
|
127
|
+
### Need Some Help?
|
|
128
|
+
|
|
129
|
+
Not sure what a command can do? Recon has built-in help for every command.
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
recon details --help
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
This shows you the available arguments and options for the command, including additional ways to get information from a repository.
|
|
136
|
+
|
|
137
|
+
```text
|
|
138
|
+
Usage: recon details [OPTIONS] {owner} {repo}
|
|
139
|
+
|
|
140
|
+
Gain insights into your repo
|
|
141
|
+
|
|
142
|
+
Arguments:
|
|
143
|
+
owner Repository owner, e.g. owenpalfreymandev
|
|
144
|
+
repo Repository name, e.g. reconcli
|
|
145
|
+
|
|
146
|
+
Options:
|
|
147
|
+
--contributors View contributors in more detail.
|
|
148
|
+
--languages View language usage in more detail.
|
|
149
|
+
--help Show this message and exit.
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
For example, the `--languages` option can be used to get a more detailed breakdown of the languages used in a repository:
|
|
153
|
+
|
|
154
|
+
```bash
|
|
155
|
+
recon details owenpalfreymandev fpark --languages
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
```text
|
|
159
|
+
╭──────────────────────────────────────────────────────────╮
|
|
160
|
+
│ LANGUAGES │
|
|
161
|
+
│ owenpalfreymandev/fpark │
|
|
162
|
+
╰──────────────────────────────────────────────────────────╯
|
|
163
|
+
4 languages returned by GitHub · 100% of reported code
|
|
164
|
+
|
|
165
|
+
LANGUAGE BREAKDOWN
|
|
166
|
+
──────────────────────────────────────────────────────────
|
|
167
|
+
1 TypeScript 279.9 KB
|
|
168
|
+
████████████████████████████████ 95.9%
|
|
169
|
+
|
|
170
|
+
2 PLpgSQL 7.0 KB
|
|
171
|
+
█ 2.4%
|
|
172
|
+
|
|
173
|
+
3 CSS 4.3 KB
|
|
174
|
+
█ 1.5%
|
|
175
|
+
|
|
176
|
+
4 JavaScript 559 B
|
|
177
|
+
█ 0.2%
|
|
178
|
+
──────────────────────────────────────────────────────────
|
|
179
|
+
Showing all 4 languages
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
### Explore Further
|
|
184
|
+
|
|
185
|
+
These are just some of the commands available in Recon. There are plenty more options to play with, with more commands and features coming soon. Check the [roadmap](https://github.com/owenpalfreymandev/reconcli/blob/main/README.md) for more details.
|
|
186
|
+
|
|
187
|
+
## Contributing
|
|
188
|
+
|
|
189
|
+
Contributions are always welcome!
|
|
190
|
+
|
|
191
|
+
To clone the repo and download all dependencies, run:
|
|
192
|
+
```bash
|
|
193
|
+
git clone https://github.com/owenpalfreymandev/reconcli.git
|
|
194
|
+
uv sync
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
You can run unit tests and type tests with:
|
|
198
|
+
```bash
|
|
199
|
+
uv run pytest
|
|
200
|
+
uv run pyright
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
Be sure to lint before commiting, or it will fail CI/CD:
|
|
204
|
+
```bash
|
|
205
|
+
uv run ruff check --fix .
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
### Workflow
|
|
209
|
+
|
|
210
|
+
A basic workflow to follow is:
|
|
211
|
+
|
|
212
|
+
1. Fork the repository
|
|
213
|
+
2. Create a branch
|
|
214
|
+
3. Make changes
|
|
215
|
+
4. Run tests/lint/type checks
|
|
216
|
+
5. Open a PR
|
|
217
|
+
## License
|
|
218
|
+
|
|
219
|
+
Recon is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.
|
|
220
|
+
## Author
|
|
221
|
+
|
|
222
|
+
Recon is developed by Owen Palfreyman.
|
|
223
|
+
|
|
224
|
+
GitHub: @owenpalfreymandev
|
|
225
|
+
Repository: owenpalfreymandev/reconcli
|
|
226
|
+
|
|
227
|
+
*or could could just run `recon details owenpalfreymandev reconcli --contributors` wink wink*
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import typer
|
|
2
|
+
|
|
3
|
+
from app.commands import auth, me, repo
|
|
4
|
+
|
|
5
|
+
app = typer.Typer()
|
|
6
|
+
|
|
7
|
+
# Commands that can be ran in the CLI
|
|
8
|
+
app.command(name="login")(auth.login)
|
|
9
|
+
app.command(name="logout")(auth.logout)
|
|
10
|
+
app.command(name="me")(me.me)
|
|
11
|
+
app.command(name="scout")(me.scout)
|
|
12
|
+
app.command(name="list")(repo.list)
|
|
13
|
+
app.command(name="details")(repo.details)
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import typer
|
|
2
|
+
|
|
3
|
+
from app.services import auth
|
|
4
|
+
|
|
5
|
+
app = typer.Typer()
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
@app.command()
|
|
9
|
+
def login():
|
|
10
|
+
"""Login to GitHub using the device flow."""
|
|
11
|
+
auth.login()
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@app.command()
|
|
15
|
+
def logout():
|
|
16
|
+
"""Logout of GitHub."""
|
|
17
|
+
auth.logout()
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import typer
|
|
2
|
+
|
|
3
|
+
from app.ui.display import display_user
|
|
4
|
+
|
|
5
|
+
app = typer.Typer()
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
@app.command()
|
|
9
|
+
def me():
|
|
10
|
+
"""Get information about me!"""
|
|
11
|
+
from app.services.github import get_authenticated_user
|
|
12
|
+
|
|
13
|
+
user = get_authenticated_user()
|
|
14
|
+
display_user(user)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
@app.command()
|
|
18
|
+
def scout(user: str):
|
|
19
|
+
"""Scout another GitHub user."""
|
|
20
|
+
from app.services.github import get_user
|
|
21
|
+
|
|
22
|
+
profile = get_user(user)
|
|
23
|
+
display_user(profile)
|