Skip to main content

gh-copilot-pydantic-ai

License: MIT PyPI version Python Version

GitHub Copilot Provider for Pydantic AI.

Inspired by ericc-ch/copilot-api/.

Installation

Install the package using pipx or your favorite package manager:

pip install gh-pydantic-ai
# or with uv
uv tool install gh-pydantic-ai

CLI Usage

Authentication

First, you need to authenticate with your GitHub account.

gh-clai-internal auth

Query

After authentication, you can use the gh-clai command to interact with GitHub Copilot:

gh-clai "What is the capital of France?"

Library Usage

This library also provides GHCopilotModel for integration with Pydantic AI.

from gh_pydantic_ai import GHCopilotChatModel
from pydantic_ai import Agent

agent = Agent(
    model=GHCopilotChatModel()
)

result = agent.run_sync("What is the capital of France?")
print(result)

Commands

  • gh-clai: Main command to interact with GitHub Copilot, works same as clai command from pydantic-ai.
  • gh-clai-internal: Internal commands for authentication and other utilities.
    • auth: Authenticate with GitHub.
    • models: List available models.
    • usage: Show usage information.

Metadata

Release files for gh-pydantic-ai 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gh-pydantic-ai 0.4.0
File Size Uploaded
gh_pydantic_ai-0.4.0.tar.gz 49.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for gh-pydantic-ai 0.4.0
File Interpreter ABI Platform
gh_pydantic_ai-0.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 60.8 kB

Release files / gh_pydantic_ai-0.4.0.tar.gz

Download URL gh_pydantic_ai-0.4.0.tar.gz
Size 49.7 kB
Tags Source
SHA-256 checksum
How to use checksums
97d8fe09a1ad1b9408a32d857f3967fe3e00e4dc3fc5633299d205dfcb6bb29a
BLAKE2b-256 checksum
How to use checksums
024d78a1dab8a808cec34cf637e349bd162a2016c770be35abaed92df397e292
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / gh_pydantic_ai-0.4.0-py3-none-any.whl

Download URL gh_pydantic_ai-0.4.0-py3-none-any.whl
Size 11.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
23af6a53b1b1b65b5dc4b73900fba23c4fb2a8ee7e13ac3527abd992891cef4c
BLAKE2b-256 checksum
How to use checksums
26ddce4095f5f3648afa078bcbf14397fc71f87422d678333c9fec6a956e1491
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page