{"id":5813,"date":"2026-06-20T06:59:04","date_gmt":"2026-06-19T23:59:04","guid":{"rendered":"https:\/\/daiilynews.cu.ma\/?p=5813"},"modified":"2026-06-20T06:59:04","modified_gmt":"2026-06-19T23:59:04","slug":"akatzmann-slash-agent-native-llm-copilot-for-your-terminal-no-daemons-zero-idle-memory-100-on-demand-%c2%b7-github","status":"publish","type":"post","link":"https:\/\/daiilynews.cu.ma\/?p=5813","title":{"rendered":"akatzmann\/slash-agent: Native LLM Copilot for Your Terminal \u2013 **No Daemons. Zero Idle Memory. 100% On-Demand.** \u00b7 GitHub"},"content":{"rendered":"<p> <br \/>\n<\/p>\n<p>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).<br \/>\nImportantA Natural Coding Partner in Your Shell\u2014Zero Workflow Interruption.<br \/>\nslash-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\u2014automatically syncing directory changes (cd) and environment exports back to your parent shell session when it exits.<\/p>\n<p>\u26a1 Quick Start (5-Second Install)<br \/>\nGet up and running instantly. Run the quick installer script in your shell (supports Bash, Zsh, Ksh, and Fish):<br \/>\ncurl -fsSL https:\/\/raw.githubusercontent.com\/akatzmann\/slash-agent\/master\/bin\/installer.sh | bash<br \/>\n(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.)<\/p>\n<p>\ud83e\udd16 LLM Agnostic &#038; 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.<\/p>\n<p>\ud83d\udd0c Zero-Overhead Integration: Completely passive. Consumes zero CPU\/memory until you run \/agent\u2014no running background daemons, cron jobs, or log listeners.<\/p>\n<p>\ud83d\udd0d 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.<\/p>\n<p>\u26a1 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.<\/p>\n<p>\ud83c\udf09 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.<\/p>\n<p>\ud83d\udd79\ufe0f Steerable Confirmation Loop: Full control over every action:<\/p>\n<p>y (yes): Run the command.<br \/>\nn (no): Refuse the command and inform the agent.<br \/>\ne (edit): Inline edit the command before running it.<br \/>\nc (comment): Type natural language guidance back to the agent (e.g. &#8220;Use yarn instead of npm&#8221;).<\/p>\n<p>\ud83d\udee1\ufe0f Dry-run &#038; Auto-confirm Modes: Preview agent actions safely with -n \/ &#8211;dry-run, or run fully unattended with -y \/ &#8211;yes.<\/p>\n<p>$ npm run build<br \/>\n\u274c ERROR: Build failed. Cannot find module &#8216;dotenv&#8217; in server.js:12<\/p>\n<p>$ \/agent Fix this<br \/>\n(Agent Shell) Initializing with model &#8216;gemma4:e4b-it-qat&#8217; at &#8216;http:\/\/127.0.0.1:11434&#8217;&#8230;<br \/>\n(Agent Started Task)<br \/>\nAnalyzing terminal context&#8230; Identified missing dependency &#8216;dotenv&#8217; in server.js.<\/p>\n<p>(Agent) Proposed Command:<br \/>\n  $ npm install dotenv &#038;&#038; npm run build<\/p>\n<p>Confirm action: (y)es \/ (n)o \/ (e)dit \/ (c)omment ? y<br \/>\n(Agent Running): npm install dotenv &#038;&#038; npm run build<br \/>\n&#8230;<br \/>\nadded 1 package, and audited 120 packages in 1s<br \/>\n\u2713 Build completed successfully!<\/p>\n<p>I have installed the missing &#8216;dotenv&#8217; package and verified that the build now passes.<\/p>\n<p>\ud83d\udee0\ufe0f Build &#038; 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.<br \/>\n\ud83d\udce6 Dependency Resolution: Missing package imports? The agent reads the import error, installs the package, and verifies the build.<br \/>\n\ud83d\udcbb Quick Scripting &#038; Automation: Ask the agent to generate helper scripts, configure development environments, or perform regex logs processing on the fly.<br \/>\n\u2699\ufe0f System Configuration: Easily set up local databases, systemd services, or configuration files without looking up command flags.<\/p>\n<p>Unlike standard agents that run in isolated subshells (and cannot modify your current directory or environment), slash-agent uses a lightweight state synchronization protocol:<\/p>\n<p>      graph TD<br \/>\n  A(Active Bash Session) &#8211;>|1. Type \/agent| B(Bash Sourcing Wrapper bin\/slash-agent.sh)<br \/>\n  B &#8211;>|2. Capture Screen Output| C(Python Orchestrator slash_agent\/main.py)<br \/>\n  C &#8211;>|3. Interface with local\/cloud LLM| C<br \/>\n  C &#8211;>|4. Propose commands| D(PTY Execution Bridge)<br \/>\n  D &#8211;>|5. Interactive Steering Loop| A<br \/>\n  D &#8211;>|6. Capture exit code, PWD, env updates| B<br \/>\n  B &#8211;>|7. Source sync file on exit| A<\/p>\n<p>    Loading<\/p>\n<p>Context Capture: The shell wrapper automatically captures the active tmux pane buffer (or history) to give the LLM immediate context.<br \/>\nInteractive 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).<br \/>\nParent 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.<\/p>\n<p>If you prefer to set up the agent manually instead of using the Quick Start script:<\/p>\n<p>Clone the Repository:<br \/>\ngit clone https:\/\/github.com\/akatzmann\/slash-agent.git ~\/.slash-agent<br \/>\ncd ~\/.slash-agent<\/p>\n<p>Install Python Requirements:<br \/>\npip install -r requirements.txt<\/p>\n<p>Register Shell Integration:<br \/>\nAdd the appropriate sourcing statement to your shell configuration file:<\/p>\n<p>Bash (Linux): source ~\/.slash-agent\/bin\/slash-agent.sh in ~\/.bashrc<br \/>\nBash (macOS): source ~\/.slash-agent\/bin\/slash-agent.sh in ~\/.bash_profile (or ~\/.profile)<br \/>\nZsh: source ~\/.slash-agent\/bin\/slash-agent.sh in ~\/.zshrc<br \/>\nKsh: source ~\/.slash-agent\/bin\/slash-agent.sh in ~\/.kshrc<br \/>\nFish: source ~\/.slash-agent\/bin\/slash-agent.fish in ~\/.config\/fish\/config.fish<\/p>\n<p>\ud83d\udcbb Windows Support (WSL2)<br \/>\nslash-agent runs natively inside Unix-like PTY environments. Native Windows execution (under standard CMD or PowerShell) is not supported due to PTY emulation limitations.<br \/>\nHowever, 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.<\/p>\n<p>Configure the LLM backend, endpoint, model, and capture settings in your .env file or shell profile:<br \/>\n# LLM Backend: openai (default), ollama, azure_openai, dummy<br \/>\nexport AGENT_BACKEND=&#8221;openai&#8221;<\/p>\n<p># Model name (Defaults: gpt-4o-mini for openai, gemma4:e4b-it-qat for ollama)<br \/>\nexport AGENT_MODEL=&#8221;gpt-4o-mini&#8221;<\/p>\n<p># API endpoint base URL (defaults to official OpenAI API endpoint)<br \/>\nexport AGENT_ENDPOINT=&#8221;&#8221;<\/p>\n<p># OpenAI API Key (required for default OpenAI backend)<br \/>\nexport OPENAI_API_KEY=&#8221;your-api-key-here&#8221;<\/p>\n<p># Context extraction settings<br \/>\nexport AGENT_TMUX_LINES=50          # Lines captured from active tmux scrollback<br \/>\nexport AGENT_HISTORY_COMMANDS=20    # Commands captured from history fallback<br \/>\nFor a full list of configuration variables (e.g., Azure OpenAI variables), see the .env.template file.<\/p>\n<p>1. General Command Execution<br \/>\n\/agent create a new directory named &#8216;sandbox&#8217; and write a basic python flask server inside it<\/p>\n<p>If a compiler, build tool, or script crashes, run \/agent with no arguments (or a request to fix it):<\/p>\n<p>Simulate proposed steps and check the agent&#8217;s plan without making actual system changes:<br \/>\n\/agent -n setup a docker compose file for PostgreSQL and Redis<\/p>\n<p>Run tasks without any confirmation prompts for safe, low, or moderate risk commands:<br \/>\n\/agent -y update package lists and install tree<br \/>\n5. Auto-confirm Critical Commands<br \/>\nBy 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 &#8211;unsafe-yes flag:<br \/>\n\/agent &#8211;unsafe-yes clean up docker volumes and system cache<\/p>\n<p>For more technical details on the architecture, the interactive PTY bridge loop, and the environment state-synchronization protocol, read the Technical Documentation.<br \/>\n<br \/><br \/>\n<br \/><a href=\"https:\/\/github.com\/akatzmann\/slash-agent\">Source link <\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>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). ImportantA Natural Coding Partner in Your Shell\u2014Zero [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":5814,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[676],"tags":[],"class_list":["post-5813","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tech-ai"],"_links":{"self":[{"href":"https:\/\/daiilynews.cu.ma\/index.php?rest_route=\/wp\/v2\/posts\/5813","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/daiilynews.cu.ma\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/daiilynews.cu.ma\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/daiilynews.cu.ma\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/daiilynews.cu.ma\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5813"}],"version-history":[{"count":0,"href":"https:\/\/daiilynews.cu.ma\/index.php?rest_route=\/wp\/v2\/posts\/5813\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/daiilynews.cu.ma\/index.php?rest_route=\/wp\/v2\/media\/5814"}],"wp:attachment":[{"href":"https:\/\/daiilynews.cu.ma\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5813"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/daiilynews.cu.ma\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5813"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/daiilynews.cu.ma\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5813"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}