-
[ChatGPT] 터미널 AI shell_gpt 소개개발 2023. 3. 29. 08:33
터미널에서 GPT를 사용할 수 있는 도구가 있어 소개한다.
대화를 하기 위해서는 사실 chatGPT가 아직은 가장 유용한 것 같기는 한데, 다양한 기능들이 있어 활용만 잘 한다면 좋은 도구가 될 것 같다. 관련 기능들은 조금 더 써봐야 할 것 같지만, 아마 command line으로 파일을 바로 쓸 수 있는 것들이 장점이 되지 않을까 싶다.
이 글에서는 우선 설치 과정을 소개하였다.
shell_gpt를 설치하기 위해선 pip가 필요해 파이썬을 우선 설치해야 한다. 그리고 API key를 발급 받고 gpt를 이용하면 된다. 파이썬 설치만 window command 기준이며, 그 외의 것들은 mac에서도 동일하게 적용할 수 있다. mac에서의 파이썬을 설치는 이 블로그에 잘 나와있다.
GitHub
GitHub - TheR1D/shell_gpt: A command-line productivity tool powered by ChatGPT, will help you accomplish your tasks faster and m
A command-line productivity tool powered by ChatGPT, will help you accomplish your tasks faster and more efficiently. - GitHub - TheR1D/shell_gpt: A command-line productivity tool powered by ChatGP...
github.com
Installation
1. python3 설치
choco install python3
2. env refresh 후 터미널 재실행
refreshenv
3. 파이썬 설치 확인
python --version
4. pip 설치
> python -m pip install -U pip > refreshenv > pip --version
5. shell_gpt 설치
- API Key: https://platform.openai.com/account/api-keys
- 발급받은 API Key 입력
> pip install shell-gpt > spgt Please enter your OpenAI API key:
5-1. API key config
혹시 첫 실행 시점에 API key를 입력하지 못했다면 아래 config 파일에서 수정할 수 있다. (window)
> cd ~ > notepad .\.config\shell_gpt\.sgptrc OPENAI_API_KEY= ...
맥에서는 vi로 실행하면 된다.
vi ~/.config/shell_gpt/.sgptrc
6. shell_gpt 실행
- Command
sgpt "안녕 gpt"
References
OpenAI API
An API for accessing new AI models developed by OpenAI
platform.openai.com
'개발' 카테고리의 다른 글
SVN 사용하기 (CLI, svn branch) (0) 2023.03.24 개발 생산성을 높이는 원자적 커밋(Atomic commit) (0) 2023.03.22 Java #validation api - custom constraints 추가, 조건부 검증 (0) 2022.10.23