*nix 시스템을 위한 자연어 쉘 인터페이스입니다.
Orphic은 GPT를 사용하여 복잡한 작업을 시스템에서 실행될 셸 명령으로 변환하는 CLI 도구입니다. 상대적으로 간단하지만 완료하려면 복잡하고 모호한 명령이 필요한 작업에 탁월합니다.
$ orphic delete all installers or tars from ~/Downloads that are more than a week old
find ~/Downloads -name '*.tar.*' -mtime +7 -delete; find ~/Downloads -name '*.dmg' -mtime +7 -delete
Execute? [Y/n] Y
참고: Orphic은 기본적으로 안전 모드로 설정되어 있으며 안전하지 않은 모드가 지정되지 않는 한 확인 없이 명령을 자동으로 실행하지 않습니다.
cargo install orphic
OPENAI_API_KEY
환경 변수를 설정해야 합니다. 여기서 생성할 수 있습니다.Orphic은 다른 CLI 도구를 사용하는 것처럼 사용하도록 설계되었습니다.
$ orphic sort ~/Downloads into folders based on media type
$ orphic how strong is my network connection
$ orphic what version kernel am i running
$ orphic show me the name and size of all files larger than 8MB in ~/Downloads/
$ orphic <do task that would otherwise require complex commands that you don't know off the top of your head>
-u
또는 --unsafe
사용자 확인 없이 명령을 실행합니다.
-4
또는 --gpt4
GPT-3.5-Turbo 대신 GPT-4를 사용하려고 시도합니다. 이는 OpenAI 계정이 모델에 액세스할 수 있는 경우에만 작동합니다.
-i
또는 --interpret
작업의 출력을 자연어로 설명합니다(일반적으로 속도가 매우 느림).
$ orphic -u -i how much disk space is available
You have 16GB available out of a total of 113GB on your main hard
drive, which is mounted on the root directory.
Other partitions and file systems are also listed with their
respective usage percentages and mount points.
-d
또는 --debug
안전하지 않은 모드에서도 일반 출력과 함께 원시 GPT 텍스트를 표시합니다.
$ orphic -u -d count the lines of rust code in this directory excluding /target/.
{"command": "find . -name target -prune -o -name '*.rs' -type f -print0 | xargs -0 wc -l"}
61 ./src/prompts.rs
219 ./src/main.rs
280 total
-r
또는 --repl
REPL 환경에서 Orphic을 시작합니다.
$ orphic -u -r
orphic> when did i last login
wtmp begins Sat Mar 18 14:55
orphic> quit
$
때로는 Orphic이 작동합니다. 때로는 그렇지 않습니다. GPT는 일관성이 없으며 내가 사용하는 프롬프트는 아쉬운 점이 많습니다. 질문 대신 명령으로 작업 형식을 지정하면("현재 열려 있는 포트" 대신 "현재 열려 있는 포트 나열") 결과가 더 좋아 보입니다. 자주 발생하는 오류는 GPT가 다른 OS/배포판에 대한 명령이나 패키지를 사용하려고 시도하거나 현재 설치되지 않은 도구를 사용하려고 시도한다는 것입니다. 작업에 OS별 도구가 필요하다고 생각되면 빠른 수정 방법은 OS를 지정하는 것입니다. 하지만 저는 Orphic이 사용할 수 있는 명령과 그렇지 않은 명령을 더 잘 인식할 수 있도록 노력하고 있습니다.
풀 요청을 환영합니다. Orphic을 사용하여 좋고/흥미로운 결과물을 얻으면 저에게 보내주세요. 마찬가지로, 결과가 매우 좋지 않은 경우 저에게도 보내주시거나 이슈를 열어주세요. 이 시스템은 매우 실험적이며 프롬프트 및 구성과 관련하여 무엇이 작동하고 무엇이 작동하지 않는지 파악하려고 여전히 노력하고 있습니다.
MIT
저작권 (c) Will Savage, 2023