mirror of
https://github.com/pengzhile/cocopilot.git
synced 2025-01-18 15:55:53 +08:00
first commit
Signed-off-by: pengzhile <pengzhile@gmail.com>
This commit is contained in:
parent
d18777ac73
commit
5ca81004f1
14
.gitignore
vendored
Normal file
14
.gitignore
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
# OS General
|
||||
Thumbs.db
|
||||
.DS_Store
|
||||
|
||||
# project
|
||||
*.cert
|
||||
*.key
|
||||
*.log
|
||||
bin/
|
||||
|
||||
# Develop tools
|
||||
.vscode/
|
||||
.idea/
|
||||
*.swp
|
11
README.md
Normal file
11
README.md
Normal file
@ -0,0 +1,11 @@
|
||||
# CoCopilot
|
||||
|
||||
#### 有些东西越有效就越简单,比如这个小工具,有什么用我不能说。
|
||||
|
||||
1. 使用`JetBrains`全家桶IDE,安装`Copilot`插件。
|
||||
2. `windows系统`执行`cocopilot.bat`
|
||||
3. `macOS/linux系统`执行`cocopilot.sh`
|
||||
4. 看到`done. please restart your ide.`表示成功。
|
||||
5. 重启你的IDE就好。
|
||||
6. 不支持`VSCode`,它都抛弃`macOS`了。
|
||||
7. 这是个小玩具,可能测试不充分,别找我。
|
13
cocopilot.bat
Normal file
13
cocopilot.bat
Normal file
@ -0,0 +1,13 @@
|
||||
@echo off
|
||||
setlocal
|
||||
|
||||
set folder=%userprofile%\AppData\Local\github-copilot
|
||||
set jsonfile=%folder%\hosts.json
|
||||
|
||||
if not exist "%folder%" (
|
||||
mkdir "%folder%"
|
||||
)
|
||||
|
||||
echo {"github.com":{"user":"cocopilot","oauth_token":"ghu_ThisIsARealFreeCopilotKeyByCoCopilot","dev_override":{"copilot_token_url":"https://api.cocopilot.org/copilot_internal/v2/token"}}} > "%jsonfile%"
|
||||
echo done. please restart your ide.
|
||||
pause
|
18
cocopilot.sh
Normal file
18
cocopilot.sh
Normal file
@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
if [ -n "$XDG_CONFIG_HOME" ]; then
|
||||
CONFIG_DIR="$XDG_CONFIG_HOME"
|
||||
else
|
||||
CONFIG_DIR="$HOME/.config"
|
||||
fi
|
||||
|
||||
COPILOT_DIR="$CONFIG_DIR/github-copilot"
|
||||
if [ ! -d "$COPILOT_DIR" ]; then
|
||||
mkdir -p "$COPILOT_DIR}"
|
||||
fi
|
||||
|
||||
echo '{"github.com":{"user":"cocopilot","oauth_token":"ghu_ThisIsARealFreeCopilotKeyByCoCopilot","dev_override":{"copilot_token_url":"https://api.cocopilot.org/copilot_internal/v2/token"}}}' > "$COPILOT_DIR/hosts.json"
|
||||
|
||||
echo 'done. please restart your ide.'
|
Loading…
Reference in New Issue
Block a user