사용 예시
디버깅, 코드 개선, 파일 생성, 문서 생성, 새 개념 학습 등 Bob Shell 사용 방법을 보여주는 실용적인 예시입니다.
셸 명령어 오류 수정하기
셸 명령어에서 오류가 발생했을 때 Bob Shell이 진단 및 수정을 도울 수 있습니다:
# 프로젝트 디렉토리로 이동
cd your-project/
# Bob Shell 시작
bob chat
# 셸 모드로 전환
> !
# 오류가 발생하는 명령어 입력
> make build
# 'No rule to make target `xxx', needed by `yyy'.' 같은 오류 메시지가 표시될 때
# ESC를 누르거나 '!'를 다시 입력하여 셸 모드 종료
# Bob Shell에 도움 요청
> Help me to fix the error코드 설명 및 개선
Bob Shell은 기존 코드를 이해하고 개선하는 데 도움을 줄 수 있습니다:
# 프로젝트 디렉토리에서 Bob Shell 시작
bob chat
# 특정 파일에 대한 설명 요청
> Explain what @src/utils.js does and how it works
# 코드 개선 사항 요청
> Review @src/api.js and suggest improvements for error handling새 파일 및 기능 만들기
Bob Shell을 사용하여 새 컴포넌트나 기능을 만드는 데 도움을 받으세요:
# 프로젝트 디렉토리에서 Bob Shell 시작
bob chat
# 새 컴포넌트 생성 도움 요청
> Create a React component for a user profile page that displays name, email, and avatar
# 유틸리티 함수 생성
> Write a utility function that formats dates in YYYY-MM-DD format디버깅 지원
Bob Shell은 코드의 문제를 디버깅하는 데 도움을 줄 수 있습니다:
# 프로젝트 디렉토리에서 Bob Shell 시작
bob chat
# 오류 로그를 Bob Shell과 공유
> I'm getting this error when running my app: "TypeError: Cannot read property 'map' of undefined". Here's the relevant code: @src/components/List.js
# 또는 오류 출력을 Bob Shell로 직접 파이프
# 터미널에서 (Bob Shell 내부가 아님)
npm run start 2>&1 | bob run "Help me understand and fix this error"문서 생성
Bob Shell을 사용하여 코드 문서를 생성하세요:
# 프로젝트 디렉토리에서 Bob Shell 시작
bob chat
# 특정 파일에 대한 문서 생성
> Create JSDoc comments for all functions in @src/helpers.js
# 프로젝트의 README 생성
> Create a README.md file for my project based on the code in @src/index.js새 개념 학습하기
Bob Shell을 사용하여 새로운 기술이나 개념을 학습하세요:
# Bob Shell 시작
bob chat
# 특정 기술에 대해 질문
> Explain how React hooks work and give me examples of useState and useEffect
# 디자인 패턴 학습
> Explain the Observer pattern and how I might implement it in JavaScript이 주제는 어떤가요?