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

推荐订阅源

Y
Y Combinator Blog
IT之家
IT之家
博客园_首页
量子位
博客园 - 三生石上(FineUI控件)
小众软件
小众软件
博客园 - 聂微东
罗磊的独立博客
酷 壳 – CoolShell
酷 壳 – CoolShell
Hugging Face - Blog
Hugging Face - Blog
V
V2EX
爱范儿
爱范儿
大猫的无限游戏
大猫的无限游戏
宝玉的分享
宝玉的分享
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
雷峰网
雷峰网
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Google DeepMind News
Google DeepMind News
Microsoft Azure Blog
Microsoft Azure Blog
有赞技术团队
有赞技术团队
S
SegmentFault 最新的问题
Engineering at Meta
Engineering at Meta
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com

Show HN

Show HN: AI agents for UK GDAD PCF roles and their skills The Two Pillars: Mixer Mode and Meta-Software in the Reorganization of Software Work After AI GitHub - JaiCode08/teleport-env What 1,000+ Harness Experiments Taught Me About Self-Improving Agents Show HN: Liiists, a Markdown-first, iOS and CLI list app SwiperTab – Get this Extension for 🦊 Firefox (en-US) GitHub - kouhxp/fftext: Summarize, explain, fact-check, or translate any text, URL, or file. No GPU. No cloud. One command GitHub - sweetpad-dev/sweetpad: Develop Swift/iOS projects using VSCode GitHub - dogmaticdev/IRON: IRON a.k.a. Intermediate Representation Object Notation is a Interpreter/Database that is used to create Programming Languages. GitHub - sjhalani7/vaen: Package your AI coding harness into a portable .agent file, and share it across repos, teams, & the community without ever having to copy-paste instructions, skills, MCP config, or secrets. Show HN: Gandalf the Grader Show HN: Citadeld – replay any CI failure locally from a single file GitHub - tdortman/cuSBF: High-Performance GPU Super Bloom Filter coral-ai/claude-code-token-xray at main · Coral-Bricks-AI/coral-ai GitHub - ulyssestenn/funes: Funes is a Git-based framework for LLM-managed knowledge work: an AI Librarian ingests raw sources, builds an interlinked Markdown knowledge base, and uses it to produce cited reports, analyses, and other outputs. GitHub - ThatXliner/gah: Git Add Hunk, built for agents to use GitHub - harmont-dev/harmont-cli: Command-line client for the Harmont CI platform GitHub - brooksmcmillin/mcp-authflow: OAuth 2.0 Authorization Server framework for MCP servers GitHub - javaid-codes/audit-supply-chain-agents GitHub - amorey/gochan: A small library of common channel architectures for Go, inspired by Rust GitHub - arifozgun/OpenGem: Free, Open-Source AI API Gateway with Gemini, OpenAI & Anthropic Compatibility in 1 file GitHub - Pranesh950/BioPetals: 🌸 Run BIOxAI models at home, BitTorrent-style. Fine-tuning and inference up to 10x faster than offloading GitHub - cnguyen14/bounty-doctor: Diagnose a GitHub bounty issue before you waste hours: detects honeypot scam repos, AI-bot attempt swarms, and stale contests. Show HN: CoreMCP – MCP Server for On-Prem DBs Show HN: KittyHTML – Render HTML/CSS as an inline image in your terminal GitHub - bingud/filemat: Web-based file manager Show HN: TruthLens – Free multi-signal deepfake image detector GitHub - apexlocal-jz/claude-usage-tray: Windows system-tray app showing your Claude Code rate-limit usage at a glance. Zero deps, ~300 lines of PowerShell. Cross-IDE (works regardless of VS Code, Cursor, plain terminal). Release v0.1.2.1 · kouhxp/yapsnap GitHub - noopolis/moltnet: Self-hostable chat network for AI agents. Pre-built bridges for Claude Code, Codex, and the Claws. Rooms, DMs, history. No Slack bots, no Matrix, no glue code.
GitHub - akatzmann/slash-agent: Native LLM Copilot for Yo...
akatzmann · 2026-06-20 · via Show HN

License: MIT Python: 3.10+ Shell: Bash PRs Welcome

slash-agent in action

slash-agent is an ultra-lightweight, zero-overhead AI coding partner that integrates natively into your active Bash shell. It is designed to act as a seamless extension of your command line, keeping you focused in your terminal with 100% local, private LLM support (via Ollama) or cloud powerhouses (OpenAI/Azure OpenAI).

Important

A Natural Coding Partner in Your Shell—Zero Workflow Interruption. slash-agent operates directly inside your active Bash session. It stays completely out of your way and consumes zero background resources (no running daemons, no background processes) when not in use. Simply type /agent when you hit a blocker: it instantly grabs your recent terminal context (tmux pane scrollback or command history) to diagnose errors, edit files, and execute commands—automatically syncing directory changes (cd) and environment exports back to your parent shell session when it exits.


⚡ Quick Start (5-Second Install)

Get up and running instantly. Run the quick installer script in your shell (supports Bash, Zsh, Ksh, and Fish):

curl -fsSL https://raw.githubusercontent.com/akatzmann/slash-agent/master/bin/installer.sh | bash

(This automatically clones the repo to ~/.slash-agent, configures a Python virtual environment, installs requirements, and registers the shell integration in your appropriate shell profile file, e.g. ~/.zshrc, ~/.bashrc, ~/.bash_profile, or config.fish.)


🌟 Key Features

  • 🤖 LLM Agnostic & Privacy First: Supports local offline models (like Ollama) with zero keys required and zero data leaving your machine, as well as OpenAI and Azure OpenAI.

  • 🔌 Zero-Overhead Integration: Completely passive. Consumes zero CPU/memory until you run /agent—no running background daemons, cron jobs, or log listeners.

  • 🔍 Context-Aware Diagnoses: Instantly extracts the last 50 lines of your active tmux pane or terminal history, letting the LLM read error outputs and tracebacks without manual copy-pasting.

  • ⚡ State Synchronization: Working directory transitions (cd) and environment exports (export KEY=VAL) made by the agent automatically sync back to your parent shell session on exit.

  • 🌉 Interactive PTY Bridge: Executes proposed commands in a pseudo-terminal (PTY), allowing you to interactively type passwords (e.g. sudo), view colored output, and see progress bars.

  • 🕹️ Steerable Confirmation Loop: Full control over every action:

    • y (yes): Run the command.
    • n (no): Refuse the command and inform the agent.
    • e (edit): Inline edit the command before running it.
    • c (comment): Type natural language guidance back to the agent (e.g. "Use yarn instead of npm").
  • 🛡️ Dry-run & Auto-confirm Modes: Preview agent actions safely with -n / --dry-run, or run fully unattended with -y / --yes.


🎬 See it in Action

$ npm run build
❌ ERROR: Build failed. Cannot find module 'dotenv' in server.js:12

$ /agent Fix this
[Agent Shell] Initializing with model 'gemma4:e4b-it-qat' at 'http://127.0.0.1:11434'...
[Agent Started Task]
Analyzing terminal context... Identified missing dependency 'dotenv' in server.js.

[Agent] Proposed Command:
  $ npm install dotenv && npm run build

Confirm action: [y]es / [n]o / [e]dit / [c]omment ? y
[Agent Running]: npm install dotenv && npm run build
...
added 1 package, and audited 120 packages in 1s
✓ Build completed successfully!

I have installed the missing 'dotenv' package and verified that the build now passes.

🎯 Common Use Cases

  • 🛠️ Build & Test Crashes: When a compiler error, script traceback, or unit test fails, simply run /agent to let it read the error logs directly and propose a fix.
  • 📦 Dependency Resolution: Missing package imports? The agent reads the import error, installs the package, and verifies the build.
  • 💻 Quick Scripting & Automation: Ask the agent to generate helper scripts, configure development environments, or perform regex logs processing on the fly.
  • ⚙️ System Configuration: Easily set up local databases, systemd services, or configuration files without looking up command flags.

🔍 How it Works

Unlike standard agents that run in isolated subshells (and cannot modify your current directory or environment), slash-agent uses a lightweight state synchronization protocol:

graph TD
  A[Active Bash Session] -->|1. Type /agent| B(Bash Sourcing Wrapper bin/slash-agent.sh)
  B -->|2. Capture Screen Output| C(Python Orchestrator slash_agent/main.py)
  C -->|3. Interface with local/cloud LLM| C
  C -->|4. Propose commands| D(PTY Execution Bridge)
  D -->|5. Interactive Steering Loop| A
  D -->|6. Capture exit code, PWD, env updates| B
  B -->|7. Source sync file on exit| A
Loading
  1. Context Capture: The shell wrapper automatically captures the active tmux pane buffer (or history) to give the LLM immediate context.
  2. Interactive PTY Bridge: Commands run inside a real pseudo-terminal (PTY) so you see colored outputs, progress bars, and can interact with prompts (like typing passwords for sudo).
  3. Parent Shell Sync: Directory changes (cd) or environment variables (export) are safely passed back to your main shell session via a temporary sourcing script on exit.

🔧 Manual Installation

If you prefer to set up the agent manually instead of using the Quick Start script:

  1. Clone the Repository:
    git clone https://github.com/akatzmann/slash-agent.git ~/.slash-agent
    cd ~/.slash-agent
  2. Install Python Requirements:
    pip install -r requirements.txt
  3. Register Shell Integration: Add the appropriate sourcing statement to your shell configuration file:
    • Bash (Linux): source ~/.slash-agent/bin/slash-agent.sh in ~/.bashrc
    • Bash (macOS): source ~/.slash-agent/bin/slash-agent.sh in ~/.bash_profile (or ~/.profile)
    • Zsh: source ~/.slash-agent/bin/slash-agent.sh in ~/.zshrc
    • Ksh: source ~/.slash-agent/bin/slash-agent.sh in ~/.kshrc
    • Fish: source ~/.slash-agent/bin/slash-agent.fish in ~/.config/fish/config.fish

💻 Windows Support (WSL2)

slash-agent runs natively inside Unix-like PTY environments. Native Windows execution (under standard CMD or PowerShell) is not supported due to PTY emulation limitations.

However, the tool is 100% compatible with WSL2 (Windows Subsystem for Linux). Windows users can run slash-agent by opening any WSL2 Linux terminal (such as Ubuntu or Debian) and running the standard Quick Start installation command.


⚙️ Configuration

Configure the LLM backend, endpoint, model, and capture settings in your .env file or shell profile:

# LLM Backend: openai (default), ollama, azure_openai, dummy
export AGENT_BACKEND="openai"

# Model name (Defaults: gpt-4o-mini for openai, gemma4:e4b-it-qat for ollama)
export AGENT_MODEL="gpt-4o-mini"

# API endpoint base URL (defaults to official OpenAI API endpoint)
export AGENT_ENDPOINT=""

# OpenAI API Key (required for default OpenAI backend)
export OPENAI_API_KEY="your-api-key-here"

# Context extraction settings
export AGENT_TMUX_LINES=50          # Lines captured from active tmux scrollback
export AGENT_HISTORY_COMMANDS=20    # Commands captured from history fallback

For a full list of configuration variables (e.g., Azure OpenAI variables), see the .env.template file.


🛠️ Usage Examples

1. General Command Execution

/agent create a new directory named 'sandbox' and write a basic python flask server inside it

2. Post-Crash Diagnosis

If a compiler, build tool, or script crashes, run /agent with no arguments (or a request to fix it):

3. Dry-run Mode

Simulate proposed steps and check the agent's plan without making actual system changes:

/agent -n setup a docker compose file for PostgreSQL and Redis

4. Auto-confirm Mode

Run tasks without any confirmation prompts for safe, low, or moderate risk commands:

/agent -y update package lists and install tree

5. Auto-confirm Critical Commands

By default, critical commands (like rm -rf or commands using sudo) are not auto-confirmed by -y to prevent accidental damage. To auto-confirm even critical commands, pass the --unsafe-yes flag:

/agent --unsafe-yes clean up docker volumes and system cache

📘 Deep Dive

For more technical details on the architecture, the interactive PTY bridge loop, and the environment state-synchronization protocol, read the Technical Documentation.