GitHubCopilotSDKExample/
β
βββ interactive_assistant.py
βββ README.md
βββ requirements.txt
βββ .gitignore
β
βββ assets/
β βββ image1.png
β βββ image2.png
β
βββ LICENSE
A ChatGPT-style terminal assistant built using:
- π¨ Rich terminal UI
- β‘ Async Python
- π€ LLM-powered responses
- π§ Tool calling (weather simulation)
- π¬ Chat-style terminal interface (user & assistant bubbles)
- π¨ Beautiful UI using Rich
- π Markdown rendering (tables, lists, summaries)
- β‘ Async streaming responses
- π§ Tool calling (weather simulation)
- π Continuous conversation loop
- :contentReference[oaicite:0]{index=0}
- Asyncio
- CopilotClient SDK
- Pydantic
Before writing any code, make sure your development environment meets the following requirements.
The GitHub Copilot CLI does not itself perform AI inference. Instead, it communicates with the Copilot backend via JSON-RPC.
In this architecture, the CLI acts as the engine, while your SDK/application acts as the interface layer (steering wheel).
winget install copilot-cli # Windows
brew install copilot-cli # Mac/Linuxcopilot --versionSign in using your GitHub account:
copilot login
β οΈ You must have an active GitHub Copilot subscription (individual or enterprise).
If you are using BYOK (Bring Your Own Key) mode, authentication can be skipped.
Run the following command to ensure everything is working correctly:
copilot -p "Explain recursion in one sentence"If the setup is correct, you should see an AI-generated response in the terminal.
- β If you receive a response β environment is ready
- β If not β recheck installation or authentication steps
git clone https://github.com/Tarak-Chandra-Sarkar/GitHubCopilotSDKExample
cd GitHubCopilotSDKExamplepython -m venv venv
source venv/bin/activate # Mac/Linux
venv\Scripts\activate # Windowspip install -r requirements.txtpython interactive_assistant.py- What's the weather in Mumbai?
- Compare weather in Kolkata and Chennai
- Is it raining in Delhi?
You can change the model:
model="gpt-4o"- Model calls
get_weather(city) - Returns structured JSON
- Used in response generation
assistant.message_deltaβ builds responsesession.idleβ marks completion
Panelβ chat bubblesMarkdownβ formatted outputs
- π Real weather API integration
- π§ Memory-based conversations
- β‘ Streaming inside bubbles (typing effect)
- π₯οΈ Full TUI (scrollable chat history)
- π Web version (FastAPI + React)
PRs welcome! Feel free to improve UI, tools, or architecture.
MIT License
If you like this project, consider giving it a star β

