Skip to main content

Local-first command wrapper for AI coding agents with compressed terminal output and privacy-safe proof metrics.

Project description

SAGE

CI Python License Release

SAGE is a local-first command wrapper for AI coding agents that compresses terminal output, preserves raw logs locally, and proves token savings with privacy-safe metrics.

Not only that—it uses 10+ specialized AI agents and ML learning to analyze every command in real-time, detecting security risks, optimizing compression strategies, and continuously improving from your usage patterns. Your terminal becomes smarter with every command you run.

The public package is CLI-first. The desktop GUI is not included in this public repository yet.

Live Public Proof Dashboard

Live dashboard: https://sage.api.marketingstudios.in/dashboard

SAGE Live Public Proof Dashboard

Current public proof includes:

  • Total commands processed through SAGE
  • Tokens processed, compressed, and saved
  • Estimated savings by model/provider
  • Compression rate and command success rate
  • ML prediction scoring from local command history

Latest verified snapshot:

Metric Value
Commands processed 5,650
Tokens processed 17,614,532
Tokens compressed 1,378,116
Tokens saved 16,236,416
Estimated savings $93.36
Compression rate 92.18%
Success rate 99.01%

These stats reflect the public CLI proof snapshot after the hosted dashboard went live. Raw commands, outputs, file paths, and logs stay local by default. Public proof uses aggregate counters only.

Install From GitHub Until PyPI Is Live

PyPI publishing is prepared but still blocked by the Trusted Publisher project-name mismatch. Until the PyPI project is live, install the public CLI directly from GitHub:

pip install git+https://github.com/PsYcGoD/sage.git
sage --version

After PyPI is live, the install command will be:

pip install psycgod-sage
sage --version

For local development:

git clone https://github.com/PsYcGoD/sage.git
cd sage
pip install -e .
sage --version

The prepared PyPI distribution is psycgod-sage; the installed CLI command is still sage.

Connect Your Account

Most public API-backed commands require GitHub OAuth:

sage connect
sage whoami
sage api status

SAGE stores the API key in the operating system keyring when available. Local command history and raw outputs remain on your machine.

System-Wide Installation for AI Agents

Make SAGE mandatory for all AI agents on your system:

sage install

This automatically installs SAGE instructions into:

  • ~/.claude/CLAUDE.md - Claude Code
  • ~/.claude/settings.json - MCP server registration
  • ~/.cursorrules - Cursor IDE
  • ~/.codex/AGENTS.md - Codex
  • ~/.aider.conf.yml - Aider (if exists)

After running sage install, all AI agents will automatically:

  • Route commands through sage run -- <command>
  • Use SAGE MCP tools for file operations
  • Benefit from context compression and tracking

For per-project setup:

sage init

This writes SAGE.md in the current project with the mandatory wrapper rule.

Run Commands Through SAGE

sage run -- python -m pytest
sage run -- npm test
sage run -- git status

SAGE stores full raw command output locally, summarizes noisy output for AI context, tracks compression, and sends only allowed aggregate proof metrics to the dashboard.

Useful CLI Commands

sage context stats
sage context report
sage history --limit 10
sage explain
sage suggest
sage fix
sage fix --apply --confidence 0.9
sage savings --agent claude-sonnet
sage firewall status
sage firewall rules list
sage github-bot comment --kind summary
sage mcp install
sage dashboard start --port 8765

Team View Preview

Team Dashboard is not published yet. It will open by invite after SAGE reaches 100 users.

SAGE Team View Preview

The planned Team View will show aggregate workspace proof only: tokens saved, success rate, safety events, and protected secrets. It will not publish raw commands, source code, file paths, .env data, or raw logs.

Screenshots

Command Preview
sage run -- sage run terminal capture
sage context report sage context report terminal capture
sage mcp install sage mcp install terminal capture
Dashboard proof SAGE Live Public Proof Dashboard

Starter demo GIFs:

Agents & ML

AI agents and ML features are fully operational in all SAGE installations (pip, GitHub clone, or any install method). They run automatically with every command execution.

Active Agent Types

SAGE includes 10+ specialized agents that analyze every command:

  • Security Agent - Detects secrets, credentials, and security risks
  • Code Agent - Checks syntax, scope, and file changes
  • Debug Agent - Analyzes errors and suggests fixes
  • Test Agent - Identifies test patterns and coverage
  • Dependency Agent - Tracks package installations and versions
  • Research Agent - Code analysis and pattern detection
  • Frontend Agent - UI/UX and browser-related analysis
  • Performance Agent - Performance and optimization insights
  • Workflow Agent - Multi-step task orchestration
  • Red Team Agent - Adversarial security testing

ML Training & Metrics

All installations automatically collect ML training data for improving agent quality:

# View live statistics
sage dashboard

Example stats from production use:

  • ML Training Examples: 8,431+ examples
  • Agent Runs Completed: 40,275+ runs
  • Agent Quality Metrics: 48 tracked metrics
  • Agent Tasks Processed: 42,040+ tasks

The ML system learns from your command patterns to optimize compression strategies and agent responses.

GUI Status

The desktop GUI is not available in this public repo right now.

sage gui

This command prints the roadmap status instead of launching a desktop app. The GUI will be released later after it is stable enough for public use.

Known Limitations

  • The GUI is not public yet and is intentionally absent from the CLI package.
  • GitHub OAuth / a SAGE API key is required for most API-backed commands and public proof sync.
  • Telemetry level 0 is local-only; higher levels are opt-in and constrained by account/key policy.
  • The public dashboard is aggregate-only and does not expose raw commands, raw outputs, file paths, or local logs.
  • ML training and agent quality improve with usage volume - fresh installations have minimal training data initially.

Privacy

  • Raw commands and full outputs stay local by default.
  • Public dashboard data is aggregate proof only.
  • API connection is handled through GitHub OAuth.
  • Higher telemetry is opt-in.
  • API keys are stored in the OS keyring when available.

See PRIVACY.md and SECURITY.md for the detailed data and security model.

Development

python -m pytest -q

The public package is CLI-first. GUI source, GUI tests, and GUI-only dependencies are intentionally not shipped in this repo at this time.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

psycgod_sage-2.0.3.tar.gz (162.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

psycgod_sage-2.0.3-py3-none-any.whl (169.4 kB view details)

Uploaded Python 3

File details

Details for the file psycgod_sage-2.0.3.tar.gz.

File metadata

  • Download URL: psycgod_sage-2.0.3.tar.gz
  • Upload date:
  • Size: 162.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for psycgod_sage-2.0.3.tar.gz
Algorithm Hash digest
SHA256 74a3c1ac18625b190f659630c932a643d1e47f61fa4a223e27aa2281b482b8c0
MD5 818016b860b5647f6d1c823ef70d05be
BLAKE2b-256 6c462078dfaedcd0737e6e733915855e5c7fb276eb15cd117bbdd9edda6e0c46

See more details on using hashes here.

Provenance

The following attestation bundles were made for psycgod_sage-2.0.3.tar.gz:

Publisher: pypi-publish.yml on PsYcGoD/sage

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file psycgod_sage-2.0.3-py3-none-any.whl.

File metadata

  • Download URL: psycgod_sage-2.0.3-py3-none-any.whl
  • Upload date:
  • Size: 169.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for psycgod_sage-2.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 31d4167ba4418cde15148d72fa312c2433df69210b862716d2f3f65b81f3bc94
MD5 5d0486eb3d6597ddd3edca9be536fd6a
BLAKE2b-256 235af6d583fe4587f5e458dd86a9e51d1e8c5d38b20a3fa4fa52c5d77858f9c3

See more details on using hashes here.

Provenance

The following attestation bundles were made for psycgod_sage-2.0.3-py3-none-any.whl:

Publisher: pypi-publish.yml on PsYcGoD/sage

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page