惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

E
Exploit-DB.com RSS Feed
Last Week in AI
Last Week in AI
月光博客
月光博客
博客园 - 三生石上(FineUI控件)
爱范儿
爱范儿
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
罗磊的独立博客
S
SegmentFault 最新的问题
Jina AI
Jina AI
V
V2EX
博客园 - Franky
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
WordPress大学
WordPress大学
博客园 - 叶小钗
大猫的无限游戏
大猫的无限游戏
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
博客园_首页
P
Proofpoint News Feed
Recorded Future
Recorded Future
G
GRAHAM CLULEY
T
Tailwind CSS Blog
李成银的技术随笔
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Hugging Face - Blog
Hugging Face - Blog
Apple Machine Learning Research
Apple Machine Learning Research
IT之家
IT之家
Latest news
Latest news
Recent Announcements
Recent Announcements
酷 壳 – CoolShell
酷 壳 – CoolShell
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
博客园 - 【当耐特】
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
宝玉的分享
宝玉的分享
P
Privacy International News Feed
Scott Helme
Scott Helme
Cyberwarzone
Cyberwarzone
N
News and Events Feed by Topic
小众软件
小众软件
Stack Overflow Blog
Stack Overflow Blog
D
Darknet – Hacking Tools, Hacker News & Cyber Security
C
CXSECURITY Database RSS Feed - CXSecurity.com
F
Full Disclosure
Blog — PlanetScale
Blog — PlanetScale
P
Proofpoint News Feed
G
Google Developers Blog
博客园 - 聂微东
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
The Cloudflare Blog
T
ThreatConnect
C
Cybersecurity and Infrastructure Security Agency CISA

DEV Community

I built a free AI observability tool, prove your AI is useful, not just running Building Instagram-Powered Apps with HikerAPI (Without Fighting Scrapers) Checkpoints, Not Transcripts: Rethinking AI Coding Agent Memory From Side Project to Student Savior: My AI PPT & Resume Tool Crossed 1.5K+ Users Why Story Points Don’t Work in the AI Era, And What Should Take Their Place Instead. Self-Hosted Document AI: How to Run Document Intelligence On Your Own Infrastructure (2026) How to Extract Tables from PDFs with AI: 4 Methods That Actually Work (2026) IDP vs OCR: What's the Difference — and Which Does Your Business Actually Need? Automated PII Detection and Redaction in Business Documents: A Practical Guide Human-in-the-Loop Document Review: When to Use It and How to Set It Up (2026) Document Processing Without RPA: A Modern Approach for Small Teams Reducto Alternative: When You Need More Than a Document Parser (2026) Hermes Agent vs LangChain vs CrewAI: When to Reach for Each SparshAI: I Built an Offline AI Tutor for Students Using Gemma 4 — Here's What Happened Building NeuroSense AI: A Human-Centered Stress Insight Assistant Powered by Gemma Why I Built a Privacy-First Dev Toolkit GAS Input Tags: Ability Activation Without Hardcoded Bindings AI Legal Document Advisor Supported By Gemm 4 Model Building Convertify in Public Week 10: PDF Cluster + Blog Launch CureNet AI: Decentralized Health Intelligence for India, Powered by Gemma 4 and ABHA Standardization When Open-Weights AI Meets a Broken Healthcare System: Deploying Gemma 4 in Rural India V.A.L.I.D. Google I/O 2026: The Year Google Stopped Building AI Assistants and Started Shipping AI Engineers Bondmap: AI-Powered Relationship Network That Maps How You're Connected to Everyone Using Gemma 4 Gemma 4 challenge inspired me to build my first app! 96. LoRA: Fine-Tune a Billion-Parameter Model on a Laptop From a Student Who Used CircuitVerse to a GSoC Contributor — My Community Bonding Story How Bf-Tree Keeps Mini-Pages Small, Hot, and Cheap to Evict I asked Claude to explain the chip war and ended up understanding modern geopolitics differently Stop Manually Checking for Server Updates: Automate With Email Notifications Nostalgia Meets Cybersecurity: Spotting Modern Scams in a Retro OS Simulator - Forward or Fraud CRACKING CODING INTERVIEW From Python to Production Pipeline :A Practical guide to Apache Airflow Antigravity 2.0: Google Just Changed What It Means to Be an Engineer I Built a Free Sticker Maker Because Every Other One Hid the Export How I bypassed Blazor WebAssembly's Virtual DOM using raw WASM pointers Distributed Tracing for LLM Agents: When MCP Makes Tool Calls Observable The Zero-Budget Memory Setup Behind My AI Agent Workflow No database. No framework. Just files, startup order, correction logs, and discipline. I Built an AI Second Brain with Gemma 4 The Most Exciting Google I/O 2026 Announcement for Me: HTML-in-Canvas CrisisLens: Compressing Disaster Scenes into 200-Byte Emergency Payloads with Gemma 4 I'm 15 and I built a todo app with Telegram Stars payments — only legal way for me to monetize before turning 18 Crypto Branding After the Token Launch Building an on-chain alerts bot in Python without any blockchain library FinePrint — An AI Pocket Lawyer That Decodes Predatory Contracts Using Gemma 4 How to Connect OpenAI with Supabase in 10 Minutes for a Lightning-Fast AI MVP One AI Gateway for AWS Bedrock, Google Vertex AI, Gemini, and Anthropic Reading Log #9 — Aoashi The Tacit Dimension Thinking, Fast and Slow Web3 Onboarding Is Not a Wallet Problem. It Is a Trust Problem. FHE Prompt Privacy: The Metadata Leak Your Demo Still Has Software Might Be Becoming Agent-Aware: What if software starts coordinating itself? The Silent Killers of Go Concurrency: Mutexes, Semaphores, and Goroutine Leaks Lynx framework first look Building Aries AI: A Solo-Built AI Abacus Tutor on OpenAI + Supabase + Render + Razorpay I built a paid Telegram bot. Here's what Telegram Stars actually pay. Transfer Fees, Metadata, and Soulbound Tokens: A Tour of Solana Token Extensions Improving AI resume matching with prompt iteration — 7.37 to 8.37/10 7 things you can do with Rogue Studio that no other AI IDE will let you do Why I Think WordPress Still Matters Reading Log #7 — Aoashi Guns, Germs, and Steel Distinction Open Models and the Sub-Saharan Region What 12 Months of AI-Generated Pull Requests Taught My Engineering Team Feature Flags in .NET 8: ASP.NET Core, Minimal APIs, Blazor The Quiet Architecture of Systems That Refuse to Die From OOP to SOLID: Everything You Need to Know in One Article I Scanned 5 Common LangChain Agent Patterns. Every Single One Was Over-Permissioned. Production-Ready MCP Servers in 60 Seconds (Auth, Rate Limits, Audit Logs Included) Dari OOP ke SOLID: Semua yang Perlu Kamu Tahu dalam Satu Artikel The Most Important Part of Google I/O 2026 Wasn’t a Model — It Was the Infrastructure When SafetyCo Goes to War: Anthropic, the DOD, and the Limits of Ideals-Based Frameworks Why AI Memory Resolves Too Much — And What to Preserve Instead What Gemma 4 Means for the Future of Local AI (And Why It Matters More Than GPT-5) The Classroom Gap: Why Applied AI Has Yet to Transform How the World Learns Cell-to-Sentence (C2S): LLM-Powered scRNA-seq Annotation with Gemma 4 GitHub rust-2026-template — my Rust starter in 2026 Stop Editing JSON by Hand How I Turned an Old Movie Recommendation Project Into a Cinematic AI Platform Linux Command Line: The 25 Commands I Use Every Day (2026) The Multilingual SEO Trap: When Your Meta Description Speaks the Wrong Language young-colleague-job-worries What I Learned About Token Design on Solana as a Web2 Developer 19/30 Days System Design Questions! My first Android App - NightLock Tabula vs Camelot vs pdfplumber in 2026: Which Python Library Actually Wins? AI Agent Failure Loops: When Persistence Becomes a Quality Bug Experienced devs are slower with AI and they don't even know it Building a No-KYC Poker Bot: What I Learned Automating Crypto Tables React.lazy + chunk errors: how to recover users stuck after a deploy How I Built Clinical Trials API - From Public Data to RapidAPI in 2 Weeks Where is the Code Editor?! - Reception for Antigravity 2.0 I built a tool to catch AI coding agents misbehaving — and put zero AI in it Reading Log #5 — Aoashi Seeing Like a State Distinction [Boost] How to Build a Clinical Trial Search App in 5 Minutes - Clinical Trials API Tutorial Gemma For Dummies: I Knew Nothing. Now I'm Running AI on My Laptop. I gave an AI a Kill Switch. Here's what I learned about trust in local-first tooling. Notification System Technical Specification What ElumKit v0.1 already does (and the one primitive I missed) Why Every Student Developer Should Know About Microsoft Imagine Cup 🚀 Mikplanu: Empowering Education through Edge AI Sovereignty
터미널 AI 에이전트 구축 (v12)
matias yoon · 2026-05-25 · via DEV Community

matias yoon

터미널 AI 에이전트 구축 (v12)

터미널에서 직접 작동하는 AI 에이전트를 구축하여 개발 워크플로우를 최적화하세요. 이 가이드는 개발자들이 직접 구축하고 커스터마이징할 수 있는 실질적인 터미널 AI 에이전트를 제공합니다.

1. CLI AI 에이전트 생태계

현재 CLI AI 에이전트 생태계는 다음과 같은 주요 도구들로 구성되어 있습니다:

Aider

# 설치
pip install aider

# 기본 사용
aider --help

Enter fullscreen mode Exit fullscreen mode

Continue.dev

# VS Code 확장으로 설치
# https://marketplace.visualstudio.com/items?itemName=Continue.continue

Enter fullscreen mode Exit fullscreen mode

OpenCode

# GitHub 저장소에서 직접 설치
git clone https://github.com/open-code/open-code.git
cd open-code
pip install -e .

Enter fullscreen mode Exit fullscreen mode

커스텀 스크립트

# 간단한 래퍼 스크립트 예제
#!/bin/bash
# aider-wrapper.sh
aider "$@" --model gpt-4-turbo

Enter fullscreen mode Exit fullscreen mode

2. 로컬 LLM API 엔드포인트 설정

로컬 LLM을 사용하여 비용을 절감하고 성능을 향상시키세요:

Ollama 설치

# Ubuntu/Debian
curl -fsSL https://ollama.com/install.sh | sh

# macOS
brew install ollama

# 시작
ollama serve

# 모델 다운로드
ollama pull llama3
ollama pull codellama:7b

Enter fullscreen mode Exit fullscreen mode

API 엔드포인트 생성

# llm_api.py
from flask import Flask, request, jsonify
import ollama

app = Flask(__name__)

@app.route('/chat', methods=['POST'])
def chat():
    data = request.json
    prompt = data.get('prompt', '')
    model = data.get('model', 'llama3')

    response = ollama.chat(
        model=model,
        messages=[{'role': 'user', 'content': prompt}]
    )

    return jsonify({
        'response': response['message']['content']
    })

if __name__ == '__main__':
    app.run(host='0.0.0.0', port=11434)

Enter fullscreen mode Exit fullscreen mode

3. 함수 호출 기능이 있는 Python CLI 에이전트

다음은 간단한 Python CLI 에이전트 예제입니다:

#!/usr/bin/env python3
# smart_agent.py
import subprocess
import json
import sys
from typing import Dict, List
import openai

class TerminalAgent:
    def __init__(self, api_key: str, model: str = "gpt-4-turbo"):
        self.client = openai.OpenAI(api_key=api_key)
        self.model = model

    def run_command(self, command: str) -> str:
        """명령어 실행"""
        try:
            result = subprocess.run(
                command, 
                shell=True, 
                capture_output=True, 
                text=True,
                timeout=30
            )
            return result.stdout
        except subprocess.TimeoutExpired:
            return "Command timed out"

    def call_function(self, function_name: str, args: Dict) -> str:
        """함수 호출"""
        if function_name == "run_command":
            return self.run_command(args.get("command", ""))
        elif function_name == "list_files":
            return self.run_command("ls -la")
        elif function_name == "git_status":
            return self.run_command("git status")
        else:
            return f"Unknown function: {function_name}"

    def process_request(self, user_prompt: str) -> str:
        """사용자 요청 처리"""
        system_prompt = """
        You are a terminal assistant. You can execute shell commands and 
        return their output. You have access to these functions:
        - run_command(command): execute shell command
        - list_files(): list all files in current directory
        - git_status(): show git status
        """

        try:
            response = self.client.chat.completions.create(
                model=self.model,
                messages=[
                    {"role": "system", "content": system_prompt},
                    {"role": "user", "content": user_prompt}
                ],
                functions=[
                    {
                        "name": "run_command",
                        "description": "Execute shell command",
                        "parameters": {
                            "type": "object",
                            "properties": {
                                "command": {"type": "string"}
                            },
                            "required": ["command"]
                        }
                    },
                    {
                        "name": "list_files",
                        "description": "List all files in directory",
                        "parameters": {
                            "type": "object",
                            "properties": {}
                        }
                    },
                    {
                        "name": "git_status",
                        "description": "Show git status",
                        "parameters": {
                            "type": "object",
                            "properties": {}
                        }
                    }
                ],
                function_call="auto"
            )

            # 함수 호출 처리
            if response.choices[0].finish_reason == "function_call":
                function_call = response.choices[0].message.function_call
                result = self.call_function(
                    function_call.name,
                    json.loads(function_call.arguments)
                )

                return f"Command result: {result}"
            else:
                return response.choices[0].message.content

        except Exception as e:
            return f"Error: {str(e)}"

def main():
    if len(sys.argv) < 2:
        print("Usage: python smart_agent.py \"your prompt here\"")
        sys.exit(1)

    agent = TerminalAgent(api_key="your-api-key-here")
    prompt = sys.argv[1]
    result = agent.process_request(prompt)
    print(result)

if __name__ == "__main__":
    main()

Enter fullscreen mode Exit fullscreen mode

4. tmux와 통합

터미널 멀티플렉서와의 통합을 통해 더 효율적인 워크플로우 구축:

tmux 스크립트 생성

#!/bin/bash
# tmux_agent.sh
# 새로운 세션 생성
tmux new-session -d -s agent-session

# 창 분할
tmux split-window -h
tmux split-window -v

# 첫 번째 창에 에이전트 실행
tmux send-keys -t agent-session:0.0 "python smart_agent.py" Enter

# 두 번째 창에 코드 편집기 열기
tmux send-keys -t agent-session:0.0 "vim" Enter

# 세션 연결
tmux attach -t agent-session

Enter fullscreen mode Exit fullscreen mode

tmux와 에이전트 통신

# tmux_integration.py
import subprocess
import json

class TmuxAgent:
    def __init__(self, session_name: str = "agent-session"):
        self.session_name = session_name

    def send_to_window(self, window_index: int, command: str):
        """특정 창에 명령어 전송"""
        subprocess.run([
            "tmux", "send-keys", "-t", f"{self.session_name}:{window_index}", 
            command, "Enter"
        ])

    def create_window(self):
        """새 창 생성"""
        subprocess.run([
            "tmux", "new-window", "-t", self.session_name
        ])

    def get_window_output(self, window_index: int):
        """창의 출력 얻기"""
        result = subprocess.run([
            "tmux", "capture-pane", "-p", "-t", f"{self.session_name}:{window_index}"
        ], capture_output=True, text=True)
        return result.stdout

# 사용 예제
agent = TmuxAgent("my-session")
agent.send_to_window(0, "ls -la")

Enter fullscreen mode Exit fullscreen mode

5. 맞춤형 도구 개발

코드 검색 도구


python
# code_search.py
import os
import re
from typing import List, Dict

class CodeSearcher:
    def __init__(self, root_dir: str = "."):
        self.root_dir = root_dir

    def find_files(self, pattern: str, file_types: List[str] = None) -> List[str]:
        """파일 찾기"""
        matches = []
        for root, dirs, files in os.walk(self.root_dir):
            for file in files:
                if file_types and not any(file.endswith(ft) for ft in file_types):
                    continue
                if re.search(pattern, file):
                    matches.append(os.path.join(root, file))
        return matches

    def search_in_files(self, pattern: str, file_extensions: List[str] = None) -> Dict[str, List[str]]:
        """파일 내에서 패턴 검색"""
        results = {}
        search_files = self.find_files(r".*", file_extensions)

        for file_path in search_files:
            try:
                with open(file_path, 'r', encoding='utf-8') as f:
                    content = f.read()
                    matches = re.finditer(pattern, content)
                    line_numbers = [m.start() for m in matches]

                    if line_numbers:
                        results[file_path] = line_numbers
            except Exception:
                continue
        return results

# 사용 예제
searcher =

---

📥 **Get the full guide on Gumroad**: https://gumroad.com/l/auto ($5)

Enter fullscreen mode Exit fullscreen mode