Show HN: Rai – 셸, 스크립트 또는 CI/CD 파이프라인에 AI 단계 추가
hackernews
|
|
📰 뉴스
#ai
#ai 딜
#anthropic
#ci/cd
#cli
#gpt-4
#llama
#openai
#shell
#유닉스
원문 출처: hackernews · Genesis Park에서 요약 및 분석
요약
Rai is a tool designed to integrate artificial intelligence capabilities directly into command-line shell environments, scripts, and automated CI/CD pipelines. It enables developers to incorporate AI-powered steps or actions within existing workflow processes without requiring separate standalone applications.
본문
Run AI in your shell — pipe and chain it like any Unix tool, from quick one-liners to structured markdown runbooks. $ rai "whois github.com" Registrar: MarkMonitor Inc. $ ls -al | rai "count all file size" Total: 42 files, 1.2 MB combined $ rai --model kimi-k2.5 "FIX_TODO.md" ~/my-project Fixed 5 TODOs across 3 files. See diff below. Supercharge your project workflows with AI-powered scripts. { "scripts": { "test": "npm run test", "check": "rai rules-check.md & rai security.md" } } Drop any AI steps into your build pipeline. steps: - run: npm install - run: npm run build - run: rai script/translate.md - run: npm run deploy Single binary, no runtime dependencies. Installs in seconds and starts instantly. Supports arguments, piping, and chaining. Fits seamlessly into your existing shell scripts and workflows. Choose your own provider and model — from OpenAI, Anthropic, and Google to local LLMs via Ollama. Fine-grained tool permissions and rule-based guardrails keep AI actions safe and scoped. Quick AI tasks, script automation, and CI/CD steps — use it like grep or curl . Complex multi-hour tasks or long-running persistent AI agents. Install # via cargo $ cargo install rai-cli # or via curl $ curl -sSL https://appmakes.github.io/Rai/install.sh | sh # uninstall (curl install only) $ curl -sSL https://appmakes.github.io/Rai/uninstall.sh | sh Setup & configure First-time setup picks your provider, API key, and default model. Revisit anytime with rai config . $ rai start ? Select provider: OpenAI ? API key: sk-•••••••• ? Default model: gpt-4o ✓ Config saved to ~/.config/rai/config.toml Common flags -m, --model Override model per run -y, --yes Auto-approve tool calls -s, --silent No follow-up input --no-tools Disable tool calling --bill Print token & cost summary --profile Use a named config profile -- Pass custom variables to task files Task files Run prompts directly, or write them as markdown files for complex, reusable tasks. Task files support frontmatter for model config and {{ variables }} for templating. # Run a prompt directly $ rai "test my network speed" # Or run a task file $ rai review.md Example task file with variables: # review.md --- model: gpt-4o args: - target - language - focus? --- Review {{ target }} written in {{ language }}. Focus on {{ focus }} if specified. Pass variables as positional or named args: $ rai review.md src/main.rs rust $ rai review.md --target src/ --language rust --focus security
Genesis Park 편집팀이 AI를 활용하여 작성한 분석입니다. 원문은 출처 링크를 통해 확인할 수 있습니다.
공유