dotfiles-coach์(๋) ๋ฌด์์ ํ๋์?
๐ ์ ธ ๊ธฐ๋ก์ ๋ถ์ํ์ฌ ์ค๋งํธ ๋ณ์นญ๊ณผ ์์ ๊ธฐ๋ฅ์ GitHub Copilot CLI๋ก ์์ฑ, ์ ธ ์ํฌํ๋ก์ฐ๋ฅผ ์๋ํํ์ธ์.
๊ฐ์
dotfiles-coach๋ ์ฌ์ฉ์์ ์
ธ ๋ช
๋ น์ด ๊ธฐ๋ก(์: .bash_history, .zhistory)์ ๋ถ์ํ์ฌ ๋ฐ๋ณต์ ์ด๊ฑฐ๋ ์ํํ ๋ช
๋ น์ด ํจํด์ ์ฐพ์๋
๋๋ค. ์ด๋ฅผ ๋ฐํ์ผ๋ก GitHub Copilot CLI๋ฅผ ํ์ฉํด ๋ค์์ ์ ์ํฉ๋๋ค.
- ์ค๋งํธ ๋ณ์นญ: ์์ฃผ ์ฌ์ฉํ๋ ๊ธด ๋ช ๋ น์ด๋ฅผ ์งง์ ๋ณ์นญ์ผ๋ก ๋ฑ๋ก
- ์์ ์ฅ์น: ์ํ ๋ช
๋ น์ด ์คํ ์ ํ์ธ ๋ฉ์์ง ์ถ๊ฐ (์:
rm -rfโrm -rf --interactive) - ์ํฌํ๋ก์ฐ ์ต์ ํ: ์ฌ๋ฌ ๋จ๊ณ ๋ช ๋ น์ด๋ฅผ ํ๋์ ํจ์๋ก ๊ฒฐํฉ
์ง์ ํ๋ซํผ
- GitHub Copilot CLI
- ์ ธ: bash, zsh, fish
- ์ด์์ฒด์ : macOS, Linux, WSL
์ฌ์ฉ ๋ฐฉ๋ฒ
- ํฐ๋ฏธ๋์์
copilot๋ช ๋ น์ด๋ฅผ ์คํํฉ๋๋ค. what-the-shell๋ชจ๋๋ก ์ ํํฉ๋๋ค.- ๋ค์๊ณผ ๊ฐ์ด ์ง๋ฌธํฉ๋๋ค:
- "Analyze my shell history and suggest 5 new aliases"
- "Add safety confirmation to dangerous commands"
- "Optimize my docker workflow with aliases"
- ์ ์๋ ๋ณ์นญ์
~/.zshrc๋๋~/.bashrc์ ์ถ๊ฐํฉ๋๋ค.
์์
# ์ฌ์ฉ์ ์ง๋ฌธ
$ copilot what-the-shell? Analyze my last 50 commands for alias opportunities
# Copilot CLI ์๋ต (์์)
๐ Found 3 repeat patterns:
1. `git add . && git commit -m "update" && git push` โ alias `gup`
2. `docker compose up -d --build` โ alias `dcup`
3. `kubectl get pods --all-namespaces` โ alias `kgp`
# ์์ ์ฅ์น ์ ์
โ ๏ธ Dangerous command `rm -rf` detected. Suggested alias: `rmrf` with confirm.
ํ๊ฒฝ ๋ณ์
| ๋ณ์๋ช | ์ค๋ช | ๊ธฐ๋ณธ๊ฐ |
|---|---|---|
COPILOT_HISTORY_FILE | ๋ถ์ํ history ํ์ผ ๊ฒฝ๋ก | ~/.zhistory |
COPILOT_ALIAS_FILE | ๋ณ์นญ์ ์ ์ฅํ ์ค์ ํ์ผ | ~/.zshrc |
COPILOT_SAFE_MODE | ์์ ์ฅ์น ์๋ ์ ์ฉ ์ฌ๋ถ | false |