SAGE Wrapper

io.github.PsYcGoDPublished by GitHub account PsYcGoDv2.6.2Updated Oct 24, 2026

Command wrapper MCP server for coding agents, compression, workflows, and local automation.

Overview

AI-generated overview

A local-first command wrapper that runs terminal commands for coding agents and returns compressed summaries instead of full noisy output.

What you can do
Run terminal commands such as tests, builds and git through a wrapper that stores raw output locally and returns a compact summary to the agent, with shortcuts like sage pytest or sage git status and an explicit workspace option for host integrations. Review local metrics and history: token savings, compression reports, recent command history, and explanations or fix suggestions for the latest failed command, including an option to apply an automatic fix. Activate and verify the setup for supported local AI agents, and optionally start a local dashboard or configure MCP manually.
When to use it
Useful when an AI coding agent keeps burning context on repeated test logs, stack traces, install noise or build spam, and you want the raw output to stay on your machine while the agent sees only the useful summary.
Requirements
Runs as a local process on the user's machine (desktop only). Install the Python package psycgod-sage via pip, or the npm package psycgod-sage, which delegates to the Python core, so Python is needed either way. After installing, run sage install once to activate it for supported agents and restart open agent sessions. No accounts, API keys or environment variables are declared; SAGE_WORKSPACE_CWD can optionally set the workspace folder.
Before you install
Package installation is passive by design; activation only happens when you run sage install, which repairs global and project agent instructions on your machine. The fix command can apply an automatic fix, so review changes before relying on it. Raw command output, history and metrics are stored in a local database; data leaves the machine only if you opt into debug telemetry, which sends redacted diagnostic summaries. MCP is optional and manual, and MCP can disconnect in some stdio agent-sesst

Installation

In SourceWeft

  1. Open SAGE Wrapper in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

README

SAGE - Smart Agent Guidance Engine

[CI] [Python] [PyPI] [npm] [License] [SAGE Wrapper MCP server]

SAGE is a local-first command wrapper for AI coding agents. It keeps full terminal output on your machine, sends agents a clean compressed summary, and tracks proof metrics without uploading your raw logs.

Use it with Claude Code, Codex, Cursor, Windsurf, OpenCode, Cline, custom agents, CI scripts, and normal terminal workflows.

Start Here: Install SAGE, Use once sage run -- python -m pytest, Then Use Any AI Agent

Package installation is passive for package-registry safety. After installing, run sage install once to activate SAGE for supported local AI agents.

PyPI / pip

powershell
pip install psycgod-sage# orpython -m pip install --upgrade psycgod-sagesage installsage run -- python -m pytest

npm / npx

bash
npm install -g psycgod-sagenpx -y psycgod-sage installnpx -y psycgod-sage run -- npm test

After install, restart any open AI-agent sessions. New sessions should read the SAGE instructions automatically and route terminal commands through SAGE.

Example prompt after restarting your AI agent:

text
Please help me with my general book in this folder.

Natural shortcuts also work:

bash
sage pytestsage npm testsage git status

These are treated as:

bash
sage run -- pytestsage run -- npm testsage run -- git status

What SAGE Does

StepResult
sage installActivates the machine locally, repairs global/project agent instructions, and verifies activation
sage run -- <command>Runs the command, stores raw output locally, and returns a compact useful summary
Agent memory/hooksTell supported AI agents to use SAGE for noisy terminal work
Local databaseKeeps command history, compression proof, and retry context on the user's machine
Local proofKeeps command and compression metrics on the user's machine

SAGE does not auto-enable MCP. MCP is optional and manual for users who want it.

Recorded Local Metrics

Latest pulled stats as of 2026-08-01:

MetricValue
SAGE telemetry command events27,892
Tokens processed799.5M
Tokens saved783.7M
Compression rate98.02%
Estimated savings$16,261.90
Command success rate88.3%
PyPI downloads, last 7 days632
npm downloads, last 7 days362
GitHub clones, last 14 days574

Why It Helps

AI coding agents burn context on repeated logs, failed test output, install noise, stack traces, and build spam. SAGE sits between the command and the agent.

Without SAGEWith SAGE
Agent sees full noisy terminal outputAgent sees the useful summary
Context disappears fastContext lasts longer
Repeated failures waste tokensErrors are grouped and explained
Raw logs may enter promptsRaw logs stay local
Hard to prove savingsSAGE records proof metrics

Distribution

ChannelPackageStatus
PyPIpsycgod-sageCanonical Python package
npm / npxpsycgod-sageNode launcher for the Python core
MCP Registryio.github.PsYcGoD/sageOptional/manual MCP entry
GlamaPsYcGoD/sageOptional/manual hosted MCP listing

The npm package delegates to the Python implementation so both install paths use the same local database, telemetry rules, compression, and command behavior.

Common Commands

bash
sage install                       # Activate this machine and AI-agent instructionssage doctor --activation           # Verify activationnpx -y psycgod-sage doctor --activationsage run -- <command>              # Wrap any commandsage run --cwd /project -- <command> # Explicit workspace for host integrationssage pytest                        # Shortcut for: sage run -- pytestsage npm test                      # Shortcut for: sage run -- npm testsage git status                    # Shortcut for: sage run -- git statussage context stats                 # Token savings summarysage context report                # Full compression reportsage history --limit 10            # Recent command historysage explain --failed              # Explain the latest failed commandsage suggest --failed              # Suggest the next fixsage fix --apply                   # Try an automatic fixsage ml setup                      # Optional ML V2 dependenciessage mcp install                   # Optional/manual MCP configsage dashboard start               # Local dashboard

Privacy Modes

ModeRequires login?Sends data?What leaves the machine?
Local-onlyNoNoNothing
Debug telemetryOptionalOpt-in onlyRedacted diagnostic summaries

SAGE is designed to keep prompts, source code, credentials, raw command output, and project files local unless the user deliberately enables a feature that requires sending data.

Known Limitations

LimitationWhat To Do
Already-open AI-agent sessions may not reload new instructionsRestart Claude/Codex/Cursor/Windsurf/OpenCode after sage install
Locked-down host apps can disable shell toolsSAGE cannot enable tools the host application has blocked
A host starts its shell in the wrong folderPass sage run --cwd <project> -- <command> or set SAGE_WORKSPACE_CWD
npm/PyPI installs cannot safely auto-run activationRun sage install once after package install
MCP can disconnect in some stdio agent sessionsUse normal sage run -- <command> by default; enable MCP manually only if needed
Package installs are passive by designReal activation starts with sage install

Demos

FlowPreview
PyPI install[PyPI install flow]
npm install[npm install flow]
sage run --[sage run]
CLI run[SAGE CLI demo]

Links

License

MIT. See LICENSE.

Source: README.md at commit 0b57e69

Tools

0
SourceWeft has not started this package in its sandbox yet, so its tools are not known.

Version history

1
  1. v2.6.2LatestSep 16, 2026

Score

50% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts

    Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.

  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listed15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts