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

推荐订阅源

N
News and Events Feed by Topic
Malwarebytes
Malwarebytes
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
C
Cybersecurity and Infrastructure Security Agency CISA
F
Future of Privacy Forum
C
Cisco Blogs
T
The Exploit Database - CXSecurity.com
A
Arctic Wolf
S
Securelist
K
Kaspersky official blog
S
Schneier on Security
T
ThreatConnect
T
Tenable Blog
Spread Privacy
Spread Privacy
T
True Tiger Recordings
AWS News Blog
AWS News Blog
F
Fox-IT International blog
量子位
T
Threatpost
V
Vulnerabilities – Threatpost
C
CERT Recently Published Vulnerability Notes
Cisco Talos Blog
Cisco Talos Blog
GbyAI
GbyAI
宝玉的分享
宝玉的分享
腾讯CDC
G
Google Developers Blog
aimingoo的专栏
aimingoo的专栏
Cyberwarzone
Cyberwarzone
有赞技术团队
有赞技术团队
S
SegmentFault 最新的问题
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
V
Visual Studio Blog
U
Unit 42
雷峰网
雷峰网
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Simon Willison's Weblog
Simon Willison's Weblog
O
OpenAI News
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
The GitHub Blog
The GitHub Blog
The Register - Security
The Register - Security
MyScale Blog
MyScale Blog
小众软件
小众软件
A
About on SuperTechFans
Last Week in AI
Last Week in AI
Y
Y Combinator Blog
博客园 - 三生石上(FineUI控件)
美团技术团队
Google Online Security Blog
Google Online Security Blog
P
Proofpoint News Feed
MongoDB | Blog
MongoDB | Blog

DEV Community

800G to 400G Breakout: How to Scale 400G Networks with 800G Ports Topical Authority Architecture Inside Hermes Agent's Session Memory: What X-Hermes-Session-Id Actually Does How Logs Travel From Your EKS Pod to Datadog The Hidden Journey Inside / Kubernetes Is it safe to connect my bank account to AI? No Room — The World of Aying (8/12) Familiar Stranger — The World of Aying (9/12) Fossils — The World of Aying (10/12) Being Seen — The World of Aying (7/12) [I Ran an AI Agent for 30 Days Straight — Here's the Boring Engineering That Made It Work] Gemma 4: The 128K Multimodal Powerhouse in Your Terminal How to Consolidate Your QA Toolstack: A Practical Buyer's Guide The Thank-You Email Almost Nobody Sends (And Why That's Your Edge) Schema Types 2026 Idempotency Keys: The API Safety Net You're Probably Not Using How to let Claude see my Plaid bank data Kiro Did It: Build a Simple Portfolio Website with Kiro IDE | From Prompt to HTML Prototype Islands of Commerce: What Marketplace Founders Can Learn from 60 Years of Island Biogeography React Pointer Hooks: Hover, Long-Press, Double-Click, Scratch, and Click-Outside Without the Bugs Engineering decisions for my video call tool VBScript Still Lives: How a Custom Go VM Brought Classic ASP to Linux and Mac What Happens When You Teach Old Scripting Languages New Runtime Tricks? I Tested 6 AI Coding Assistants for a Month. Here's What Actually Works. Extendscript Still Has Life Afriex Webhook Integration Guide: Signature Verification, Event Handling, and Production Best Practices The Blind Alleys of Veltrix Configuration How an ESP32 Turned a LEGO WALL-E Into a Real Working Robot The Flawed Promise of Real-Time Event Handling SSH Login Taking Forever? Check Your DNS Settings Found 897 Fake Followers on DEV.to. Here's How I Proved It. Retry logic, Kafka consumer lag, and the hidden failure pattern that Kubernetes won’t catch WebMCP Might Be the Most Important Announcement at Google I/O 2026 Build a Secure API with Rails 8 - Part-3: Auth Controllers I A/B tested 4 LLMs on the same 500 queries. The results surprised me. Google I/O 2026’s Smartest Developer Release Wasn’t a Model, It Was the Runtime - Managed Agents in Gemini API OSS Monthly Recap: What My Daily Commit Challenge Taught Me About Open Source “Culture” GemmaNotes Cognitive Debt: AI Is Building Your Systems. Do You Actually Understand Them? GeekNews Frontend Weekly Deep Dive - 2026-05-25 I Built a Universal Silicon Loader That Runs on Any SOC (No Bootrom Exploit) Docker容器化部署Node.js应用最佳实践 I Put a Neural Network in a Thermometer — Then It Got Out of Hand Building MGZon: Developer Portfolio + AI Bot + Social Network (9 min demo) Bearing Life (L10): What the Catalog Number Really Tells You Longhorn Volume Health: The Gap Between 'Healthy' and Actually Working Stop Prompting. Start Specifying: How Spec-Driven Development Fixes AI Coding TIL a PowerPoint file is just a zip — so I converted .pptx to Word entirely in the browser 로컬 LLM 셋업 가이드 (v18) Cx Dev Log — 2026-04-24 github's agent audit api is the boring feature that matters # From Teaching Code to Building Real-World Applications Vivado 2026.1 and Linux: why this decision matters beyond the headline Vivado 2026.1 y Linux: por qué la decisión importa más allá del titular ORA-00206 오류 원인과 해결 방법 완벽 가이드 Entidades finas e composição: o design que escolhi para a nova plataforma 10 Open Source Tools Every Developer Should Know 🔥 SSH Config File Mastery: Turning `~/.ssh/config` Into a Productivity Tool I tried to create a programming language... in python I Replaced 70MB Node.js Log Viewer with a 172KB Zig Binary I Turned npm outdated into a CI Gate — Here's How Don't fall for the Claude Mythos hype Vestige: A Gemma 4 Brain Tracker That Won't Blow Smoke Up Your Ass Gemminate: Transforming Static Textbooks into Interactive Learning Journeys with Gemma 4 Where Did All the Code Playgrounds Go? I built PROOFER - Privacy first Chrome extension that proofreads your texts using Gemma 4 I Automated My Entire Digital Product Business on a $13/Month GCP VM. Here's the Architecture. Beginner's Mind in Engineering and AI How I use AI agents to turn ideas into public demos I Built a Quotation Generator for Kenyan Street Welders Using Gemma 4's Vision The Math Behind Neural Networks — Explained Like Nobody Did for Me 🧨 Understanding TPC with IEEE802.11h What I’m Starting to Look for in Engineers An npm Downloads Comparison Chart in 300 Lines of Vanilla JS — Nice-Tick Math and API-Direct Fetch Vitreus: Local-First Spreadsheet Intelligence with Gemma 4 Transfer Fees, Metadata, and Soulbound Tokens: A Tour of Solana Token Extensions I got tired of re-explaining my codebase to ChatGPT — so I built a VS Code extension Revisiting My Phone AI After Gemma 4: The Upgrade I Didn't Know I Needed I built a privacy-first PDF merger in 7 hours — here's the stack and the lessons Google I/O 2026 made me ask an uncomfortable question: are we still coding, or are we managing builders? SSR with JavaScript: Escaping Node.js Clunkiness with AxonASP My CKA Exam-Day Experience: What Went Right, What Went Wrong, and Lessons Learned Gemma 4 Soft Tokens: The Rise and Fall of 16x16 Words ⚡👀 Two weeks ago, I built a private AI brain on my phone using Gemma 4. Yesterday, Google dropped a new variant that made everything I built feel like a beta test. 256M parameters. MoE architecture. Apache 2.0 license. I broke down what changed and why it mat I got tired of clicking through the Stripe dashboard, so I built a CLI Getting Data from Multiple Sources in Power BI: A Practical Guide to Modern Data Integration Google Is No Longer Just a Search Engine I built GemmaPod - A truly composable and portable AI agent solution powered by your local LLM Gemma 4 E4B caught three planted fabrications in 50 seconds — on a laptop, no cloud How to build an AI-powered content moderation pipeline for user comments Running Gemma 4 on a Modest Machine: Unsloth vs LM Studio vs llama.cpp vs Ollama AI Makes Building Cheap. Our Product Architectures Still Assume It’s Expensive. I built an in-browser Roku TV remote with ~80 lines of TypeScript. Here's how Roku's ECP API actually works The Direction of Blame babbled notes: a sound-to-music agent for people who could not make music before How I Built a Live SQL Workshop Where Students Can't Break Anything Rescuing a Stranded Protocol: Re-Skinning Legacy Code for the Trestle DeFi Flywheel SOLID Heuristics Reveal Incomplete Domain Knowledge — Nothing More AllasCode Intitute / FullAgenticStack: The Intent-Based Router Introducing LogicGrid — Multi-Agent AI Orchestration for .NET AI Prompt Injection, Drupal SQLi Exploitation, and Nmap for Hardening
터미널 AI 에이전트 구축 (v20)
matias yoon · 2026-05-25 · via DEV Community

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

1. CLI AI 에이전트 생태계

터미널에서 작동하는 AI 에이전트는 최근 두드러진 트렌드입니다. 주요 플랫폼들:

Aider

# 설치
pip install aider
# 사용 예시
aider --model gpt-4 --yes

Enter fullscreen mode Exit fullscreen mode

Continue.dev

# VSCode 확장 설치
# 또는 CLI 모드로 사용
continue serve

Enter fullscreen mode Exit fullscreen mode

오픈소스 도구

# OpenCode (기본 기능)
opencode --help

# 커스텀 스크립트
./my-ai-agent.py --prompt "Write a Python function to sort an array"

Enter fullscreen mode Exit fullscreen mode

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

로컬 모델을 터미널에서 사용하기 위해 API 서버를 설정합니다:

# Ollama 설치 (가장 간단한 방법)
curl -fsSL https://ollama.com/install.sh | sh

# 모델 다운로드
ollama pull llama3

# API 서버 실행
ollama serve &

Enter fullscreen mode Exit fullscreen mode

# local-llm-api.py - 로컬 API 서버
from flask import Flask, request, jsonify
import ollama

app = Flask(__name__)

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

    response = ollama.generate(model='llama3', prompt=prompt)
    return jsonify({
        'response': response['response']
    })

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

Enter fullscreen mode Exit fullscreen mode

3. 간단한 Python CLI 에이전트 구축

# ai-agent.py
import openai
import argparse
import os
import json

class TerminalAI:
    def __init__(self):
        self.client = openai.OpenAI(
            base_url="http://localhost:11434/v1",
            api_key="ollama"
        )

    def generate(self, prompt, max_tokens=1000):
        response = self.client.chat.completions.create(
            model="llama3",
            messages=[{"role": "user", "content": prompt}],
            max_tokens=max_tokens
        )
        return response.choices[0].message.content

def main():
    parser = argparse.ArgumentParser()
    parser.add_argument("--prompt", "-p", required=True)
    parser.add_argument("--file", "-f", help="파일 경로")

    args = parser.parse_args()

    agent = TerminalAI()

    if args.file:
        with open(args.file, 'r') as f:
            content = f.read()
        prompt = f"{args.prompt}\n\nCode:\n{content}"
    else:
        prompt = args.prompt

    result = agent.generate(prompt)
    print(result)

if __name__ == "__main__":
    main()

Enter fullscreen mode Exit fullscreen mode

사용법:

# 기본 사용
python ai-agent.py --prompt "Write a Python class for user authentication"

# 파일 기반
python ai-agent.py --prompt "Explain this code" --file main.py

Enter fullscreen mode Exit fullscreen mode

4. tmux와 통합

터미널 분할에서 AI 도움을 받기 위해 tmux와 통합:

# tmux 세션 생성
tmux new-session -s ai-agent -d
# 새로운 윈도우 생성
tmux new-window -t ai-agent
# 윈도우 1에 AI 에이전트 실행
tmux send-keys -t ai-agent:1 "python ai-agent.py" Enter

Enter fullscreen mode Exit fullscreen mode

# tmux 스크립트 (tmux-ai.sh)
#!/bin/bash
tmux new-session -s coding-session -d
tmux new-window -t coding-session
tmux new-window -t coding-session
tmux send-keys -t coding-session:0 "vim" Enter
tmux send-keys -t coding-session:1 "python ai-agent.py" Enter
tmux attach -t coding-session

Enter fullscreen mode Exit fullscreen mode

5. 사용자 정의 도구 개발

코드 검색 도구

# code-search.py
import os
import re

class CodeSearcher:
    def __init__(self, project_root):
        self.project_root = project_root

    def find_function(self, func_name):
        results = []
        for root, dirs, files in os.walk(self.project_root):
            for file in files:
                if file.endswith(('.py', '.js', '.ts')):
                    filepath = os.path.join(root, file)
                    with open(filepath, 'r') as f:
                        content = f.read()
                        if func_name in content:
                            # 함수 정의 찾기
                            pattern = rf'def {func_name}\s*\([^)]*\):'
                            matches = re.finditer(pattern, content)
                            for match in matches:
                                line_num = content[:match.start()].count('\n') + 1
                                results.append({
                                    'file': filepath,
                                    'line': line_num,
                                    'context': self._get_context(content, match.start())
                                })
        return results

    def _get_context(self, content, start_pos, context_lines=3):
        lines = content[:start_pos].split('\n')
        start_line = max(0, len(lines) - context_lines)
        end_line = min(len(lines), len(lines) + context_lines)
        return '\n'.join(lines[start_line:end_line])

# 사용 예시
searcher = CodeSearcher('.')
results = searcher.find_function('calculate_sum')
for result in results:
    print(f"Found in {result['file']} line {result['line']}")

Enter fullscreen mode Exit fullscreen mode

Git 통합 도구

# git-helper.py
import subprocess
import json

class GitHelper:
    @staticmethod
    def get_last_commits(n=5):
        cmd = ['git', 'log', '--oneline', f'-{n}']
        result = subprocess.run(cmd, capture_output=True, text=True)
        return result.stdout.strip().split('\n')

    @staticmethod
    def get_diff():
        cmd = ['git', 'diff']
        result = subprocess.run(cmd, capture_output=True, text=True)
        return result.stdout

    @staticmethod
    def get_status():
        cmd = ['git', 'status', '--porcelain']
        result = subprocess.run(cmd, capture_output=True, text=True)
        return result.stdout.strip().split('\n')

# 통합 예시
git_helper = GitHelper()
commits = git_helper.get_last_commits(3)
for commit in commits:
    print(f"Commit: {commit}")

Enter fullscreen mode Exit fullscreen mode

6. 컨텍스트 창 관리

대규모 코드베이스에서 성능 문제를 해결하기 위한 컨텍스트 관리:

# context-manager.py
import os
import hashlib

class ContextManager:
    def __init__(self, max_context_size=20000):
        self.max_context_size = max_context_size
        self.context_cache = {}

    def add_file_context(self, filepath, content):
        # 파일 해시 생성
        file_hash = hashlib.md5(content.encode()).hexdigest()
        self.context_cache[filepath] = {
            'hash': file_hash,
            'content': content,
            'size': len(content)
        }

    def get_context_window(self, files_list):
        total_size = 0
        context_files = []

        for file_path in files_list:
            if file_path in self.context_cache:
                file_info = self.context_cache[file_path]
                if total_size + file_info['size'] <= self.max_context_size:
                    context_files.append({
                        'path': file_path,
                        'content': file_info['content']
                    })
                    total_size += file_info['size']
                else:
                    break
        return context_files

# 사용 예시
context_manager = ContextManager(15000)
files = ['main.py', 'utils.py', 'models.py']
context = context_manager.get_context_window(files)

Enter fullscreen mode Exit fullscreen mode

7. 로컬 vs API 모델 최적화

성능 비교 스크립트

# performance-test.py
import time
import subprocess

def test_local_model():
    start_time = time.time()
    result = subprocess.run([
        'ollama', 'run', 'llama3', 
        'Explain the Fibonacci sequence in simple terms'
    ], capture_output=True, text=True)
    end_time = time.time()
    return end_time - start_time, result.stdout

def test_api_model():
    start_time = time.time()
    # 실제 API 호출 구현
    end_time = time.time()
    return end_time - start_time, "API result"

# 성능 비교
local_time, local_result = test_local_model()
print(f"Local: {local_time:.2f}s")

Enter fullscreen mode Exit fullscreen mode

메모리 최적화


python
# memory-optimized.py
import gc
import psutil

def monitor_memory():
    process = psutil.Process()
    memory_info = process.memory_info()
    return memory_info.rss / 1024 / 1024  # MB

class MemoryEfficientAI:
    def __init__(self):
        self.cache = {}

    def process_with_cleanup(self, prompt):
        #

---

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

Enter fullscreen mode Exit fullscreen mode