You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+34-22Lines changed: 34 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,10 +4,12 @@ An interactive terminal REPL for chatting with GitHub Copilot, built with Python
4
4
5
5
## Features
6
6
7
-
- Multi-turn conversations with GitHub Copilot in your terminal
8
-
- GitHub OAuth device flow authentication
9
-
- Automatic Copilot token refresh during session
10
-
- GPT-4o model
7
+
-**Multi-turn conversations** with GitHub Copilot in your terminal.
8
+
-**Native Tool Calling**: Automatically triggers web searches when real-time information is needed.
9
+
-**Customizable**: Select search providers and models during the session.
10
+
-**GitHub OAuth device flow** authentication.
11
+
-**Automatic token refresh** during sessions.
12
+
-**Modern Default**: Uses GPT-5.2 as the default model.
11
13
12
14
## Installation
13
15
@@ -19,40 +21,50 @@ pip install -e .
19
21
20
22
## Usage
21
23
22
-
1. Authenticate with GitHub (once):
24
+
1.**Authenticate with GitHub** (once):
23
25
```bash
24
26
mini-copilot-login
25
27
```
26
28
This runs the GitHub device authorization flow and saves your token to `~/.config/mini-copilot/config.json`.
27
29
28
-
2. Start the REPL:
30
+
2.**Start the REPL**:
29
31
```bash
30
32
mini-copilot
31
33
```
32
34
33
-
```
34
-
> What is a closure in Python?
35
-
36
-
GitHub Copilot: A closure is ...
37
-
38
-
> Can you give me an example?
39
-
40
-
GitHub Copilot: Sure! Here's an example ...
41
-
```
35
+
### CLI Commands
36
+
-`/login`: Authenticate with GitHub.
37
+
-`/model`: View and switch between available models.
38
+
-`/search_provider`: View and switch web search providers (default: DuckDuckGo).
39
+
-`/copy`: Copy the last response to your clipboard.
40
+
-`/help`: Show available commands.
41
+
-`.exit`: Quit the REPL.
42
42
43
-
Type `.exit` or press `Ctrl+C` to quit.
43
+
## Web Search (Native Tool Calling)
44
+
The agent is equipped with a `web_search` tool. When you ask about recent events or real-time data, the model will autonomously invoke the tool, fetch content, and provide an answer based on live results.
44
45
45
46
---
46
47
47
48
[中文说明 (README_CN.md)](README_CN.md)
48
49
49
-
## Project Structure
50
+
## Development
50
51
52
+
### Running Tests
53
+
We use `unittest` and `coverage` for testing.
54
+
```bash
55
+
python3 -m coverage run -m unittest discover tests
56
+
python3 -m coverage report -m
51
57
```
52
-
mini_copilot/
53
-
├── main.py # Interactive REPL
54
-
└── login.py # CLI login utility
55
58
56
-
pyproject.toml # Package metadata and entry points
59
+
### Project Structure
60
+
```
61
+
mini_copilot/
62
+
├── commands/ # Modular CLI command handlers
63
+
├── main.py # Core REPL loop and tool definitions
64
+
├── github_api.py # GitHub/Copilot API communication
65
+
├── web_search.py # DuckDuckGo search and extraction logic
0 commit comments