https://github.com/elsayed85/laravel-github-copilot-chat
https://github.com/elsayed85/laravel-github-copilot-chat
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/elsayed85/laravel-github-copilot-chat
- Owner: elsayed85
- License: mit
- Created: 2023-08-20T12:55:32.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-10-09T02:44:15.000Z (over 2 years ago)
- Last Synced: 2025-04-10T23:53:35.742Z (about 1 year ago)
- Language: PHP
- Size: 49.8 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# This is my package laravel-github-copilot-chat
[](https://packagist.org/packages/elsayed85/laravel-github-copilot-chat)
[](https://github.com/elsayed85/laravel-github-copilot-chat/actions?query=workflow%3Arun-tests+branch%3Amain)
[](https://github.com/elsayed85/laravel-github-copilot-chat/actions?query=workflow%3A"Fix+PHP+code+style+issues"+branch%3Amain)
[](https://packagist.org/packages/elsayed85/laravel-github-copilot-chat)
Chat With Github Copilot inside Command Line using Laravel.
## Installation
You can install the package via composer:
```bash
composer require elsayed85/laravel-github-copilot-chat
```
You can publish the config file with:
```bash
php artisan vendor:publish --tag="laravel-github-copilot-chat-config"
```
This is the contents of the published config file:
```php
return [
'stream' => true,
'intent' => false,
'model' => 'copilot-chat',
'temperature' => 0.1,
'top_p' => 1,
'n' => 1,
'client_id' => '01ab8ac9400c4e429b23', // Don't change this
'user_agent' => 'GithubCopilot/3.99.99', // Don't change this
];
```
## Usage
## [Github Copilot Chat](https://marketplace.visualstudio.com/items?itemName=GitHub.copilot-chat)
Run :
```bash
php artisan copilot:chat
```
for First Time You need to login to your github account and copy the code from the terminal and auth with github
``` bash
Got To https://github.com/login/device/ and enter the code: B720-C162
```
then after auth you need to confirm that
``` bash
┌ Do you entered the code successfully? ───────────────────────┐
Yes / No
└──────────────────────────────────────────────────────────────┘
```
## Github Copilot CLI
### [NodeJs Package](https://www.npmjs.com/package/@githubnext/github-copilot-cli)
To use github-copilot-cli
A CLI experience for letting GitHub Copilot help you on the command line.
GitHub Copilot CLI translates natural language into shell commands, with modes for different domains. After installation, you can use the following three command:
```php
use Elsayed85\CopilotChat\CopilotCli;
$cli = new CopilotCli();
$q = "install laravel";
$cli = $cli->init();
$cli->setQuestion($q);
$a = $cli->shell(); // you can use shell() or git() or gitCli()
// call explanation() after shell() or git() or gitCli() to get explanation of the generated cli command
$explanation = $cli->explanation();
dd($a , $explanation);
```
Then We Will Generate Copilot Token and it will be saved locally using cache for (30 min) and
when it expired another token will be generated automatically.
and Now You can Chat With Github copilot Have Fun :)
## Changelog
Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.
## Contributing
Please see [CONTRIBUTING](CONTRIBUTING.md) for details.
## Security Vulnerabilities
Please review [our security policy](../../security/policy) on how to report security vulnerabilities.
## Credits
- [elsayed kamal](https://github.com/elsayed85)
- [All Contributors](../../contributors)
## License
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.