HN 표시: PyClaw

hackernews | | 📦 오픈소스
#ai #cli #python #tip #보안 #크로스플랫폼
원문 출처: hackernews · Genesis Park에서 요약 및 분석

요약

PyClaw는 파이썬 3.8 이상을 기반으로 제작된 AI 모델 대화용 명령줄 인터페이스(CLI) 도구로, 단일 쿼리 및 문맥을 유지하는 연속 대화 기능을 제공합니다. 사용자는 최초 실행 시 안내 과정을 통해 API 키, 모델 설정, 어조, 이모지 등의 선호도를 설정하며, 이러한 개인화된 응답 스타일은 시스템 프롬프트로 일관되게 적용됩니다. 특히 keyring 라이브러리를 통해 API 키를 운영체제 키체인에 안전하게 저장해 디스크 내 평문 노출을 방지하고, 터미널 출력에 맞게 마크다운을 제거하는 보안 및 최적화 기능을 갖췄습니다. 현재 Groq API를 통한 대화 및 크론 작업 예약 실행이 가능하며, 향후 LangSearch 연동 및 대화 로그 마크다운 저장 기능이 추가될 예정입니다.

본문

A Python CLI for talking to AI models. Inspired by PicoClaw - built with security, extensibility, and cross-platform support in mind. PyClaw gives you a command-line interface for AI conversations - quick one-off queries, back-and-forth chat sessions, and scheduled tasks. Configuration lives in ~/.pyclaw/config.json and is set up through a guided onboarding flow. Main use cases: - Single queries and continuous conversations via Groq - Scheduled jobs via cron - Python 3.8+ pyinputplus - input validation during onboardinggroq - Groq APIkeyring - secure API key storage via OS keychainrequests - LangSearch integration (upcoming) Query mode - ask one question, get one answer, done. Chat mode - back-and-forth conversation that remembers context for the session. Onboarding - walks you through API keys, model settings, tone, response length, and emoji preferences on first run. Personality system - tone, response length, and emoji usage are saved during onboarding and applied consistently across sessions via a system prompt. Secure key storage - API keys are stored in your OS keychain via keyring . No plaintext credentials on disk. Markdown stripping - responses are cleaned up for terminal output. No stray **bold** leaking into your shell. git clone https://github.com/venkatram-s/pyclaw.git cd pyclaw pip install -r requirements.txt Run onboarding first: python __main__.py onboard It asks for your API keys, model name, and how you want the AI to behave. Everything gets saved to ~/.pyclaw/config.json . API keys are stored separately in your OS keychain. | Command | What it does | |---|---| python __main__.py onboard | first-time setup, or reconfigure | python __main__.py query | single question, single answer | python __main__.py chat | start a conversation | python __main__.py cron | manage scheduled tasks | python __main__.py version | show version | python __main__.py help | show help | __main__.py parses the command and routes it. onboard.py handles config creation and stores API keys in the OS keychain. ai.py builds the system prompt from your personality settings and makes the API call. The flow is: command -> __main__.py -> src/ module -> Groq -> output to terminal. A few known limitations worth being upfront about: - API rate limits apply (Groq) - Cron jobs don't survive process restarts yet - Cron system - scheduled job runner with markdown templates and file output - LangSearch integration - wire LangSearch into ai.py for web-aware responses - Chat session logging - save conversations to markdown files in ~/.pyclaw/logs/ - Fork the repo - Create a feature branch - Open a pull request Use pylint orflake8 before submitting. - Status: active - Maintainer: venkatram-s - License: GPL v3

Genesis Park 편집팀이 AI를 활용하여 작성한 분석입니다. 원문은 출처 링크를 통해 확인할 수 있습니다.

공유

관련 저널 읽기

전체 보기 →