शेल हुक

शेल आउटपुट शोर है।
इसे ठीक करें।

lean-ctx शेल हुक git, npm, cargo, docker, kubectl और 95+ अन्य कमांड से शोर स्वचालित रूप से हटाता है। AI टूल्स को स्वच्छ, संपीड़ित आउटपुट मिलता है - शून्य कॉन्फ़िगरेशन।

34+ कमांड श्रेणियाँ 95+ विशिष्ट पैटर्न 60–90% आउटपुट कटौती
फ़्लो

यह कैसे काम करता है।

शेल हुक आपके कमांड्स को पारदर्शी रूप से लपेटता है। AI संपीड़ित आउटपुट देखता है - आपको कोई अंतर नहीं दिखता।

1

कमांड

AI git status चलाता है

2

हुक

lean-ctx आउटपुट इंटरसेप्ट करता है

3

संपीड़न

पैटर्न-मिलान कटौती

4

परिणाम

AI संक्षिप्त आउटपुट देखता है

34+ श्रेणियाँ

हर टूल जो आप पहले से इस्तेमाल करते हैं।

lean-ctx सभी प्रमुख डेवलपर टूल्स के आउटपुट पैटर्न पहचानता है और प्रत्येक को विशेष नियमों से संपीड़ित करता है।

संस्करण नियंत्रण

git status git diff git log git branch git stash git remote

JavaScript और Node

npm install npm run npm test yarn pnpm tsc

Rust पारिस्थितिकी

cargo build cargo test cargo clippy cargo check cargo run

कंटेनर और ऑर्केस्ट्रेशन

docker ps docker build docker logs kubectl get kubectl describe

पाइथन

pip install pytest python -m poetry uv

सिस्टम और यूटिलिटी

ls / find ps / top curl make env cat / head
पहले और बाद में

देखें अंतर।

शेल हुक के बिना ~580 tokens
git status
On branch feature/auth
Your branch is ahead of 'origin/feature/auth'
by 3 commits.
  (use "git push" to publish your local
   commits)

Changes to be committed:
  (use "git restore --staged <file>..."
   to unstage)
        new file:   src/session.ts
        modified:   src/login.ts
        modified:   src/api.ts

Changes not staged for commit:
  (use "git add <file>..." to update
   what will be committed)
  (use "git restore <file>..." to
   discard changes in working directory)
        modified:   src/session.ts

Untracked files:
  (use "git add <file>..." to include
   in what will be committed)
        src/session.test.ts
शेल हुक के साथ ~75 tokens
git status (compressed)
feature/auth ↑3
staged: +session.ts ~login.ts ~api.ts
unstaged: ~session.ts
untracked: session.test.ts
[534 tok saved (87%)]
और उदाहरण

हर कमांड, संपीड़ित।

npm install - कच्चा ~420 tokens
npm install
npm warn deprecated inflight@1.0.6:
  This module is not supported...
npm warn deprecated glob@7.2.3:
  Glob versions prior to v9...
npm warn deprecated rimraf@3.0.2:
  Rimraf versions prior to v4...

added 847 packages, and audited
848 packages in 12s

127 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
npm install - संपीड़ित ~35 tokens
npm install (compressed)
 847 packages 12s
 3 deprecated (inflight, glob, rimraf)
0 vulnerabilities
[385 tok saved (92%)]
cargo build - कच्चा ~310 tokens
cargo build
   Compiling proc-macro2 v1.0.86
   Compiling unicode-ident v1.0.12
   Compiling syn v2.0.72
   Compiling serde_derive v1.0.204
   Compiling serde v1.0.204
   Compiling tokio v1.39.2
   Compiling lean-ctx v2.1.0
    Finished `dev` profile [unoptimized
    + debuginfo] target(s) in 24.3s
cargo build - संपीड़ित ~30 tokens
cargo build (compressed)
 build dev 24.3s
7 crates compiled
[280 tok saved (90%)]

स्वतंत्र रूप से काम करता है

शेल हुक कॉन्टेक्स्ट सर्वर से स्वतंत्र चलता है। अभी तक कॉन्फ़िग न किए गए AI टूल भी संपीड़ित शेल आउटपुट का लाभ लेते हैं। हुक शेल स्तर पर इंटरसेप्ट करता है, इसलिए कमांड चलाने वाला हर टूल बचत पाता है।

Cursor Claude Code GitHub Copilot Aider Any shell-based AI
कवरेज

पैटर्न कवरेज एक नज़र में।

34+
कमांड श्रेणियाँ
95+
विशिष्ट पैटर्न
87%
औसत git संपीड़न
0
कॉन्फ़िग आवश्यक

Docker & Container Environments

In containers, non-interactive shells skip ~/.bashrc. Set BASH_ENV to point at lean-ctx's dedicated env.sh file, which has no interactive-mode guard. For Claude Code, also set CLAUDE_ENV_FILE.

# In your Dockerfile:
ENV BASH_ENV="/root/.lean-ctx/env.sh"
ENV CLAUDE_ENV_FILE="/root/.lean-ctx/env.sh"

lean-ctx includes self-healing: if the env.sh file is removed (e.g., by a container rebuild), lean-ctx init --global re-creates it automatically.

रॉ मोड: जब आपको इसकी आवश्यकता हो।

जब आपको पूर्ण, अपरिवर्तित आउटपुट चाहिए - lean-ctx-off एलियास या LEAN_CTX_RAW=1 पर्यावरण चर का उपयोग करें।

# CLI flag - skip compression for one command
lean-ctx -c --raw kubectl get pods -o yaml

# Shell function - quick bypass
lean-ctx-raw gh pr view 42

# Kill-switch - disable ALL compression
LEAN_CTX_DISABLED=1 lean-ctx -c git log

# MCP parameter - for AI agents
ctx_shell(command="cat config.json", raw=true)

शेल आउटपुट चुपचाप कम्प्रेस करें।

lean-ctx इंस्टॉल करें, setup चलाएँ, और हर शेल कमांड स्वचालित रूप से कम्प्रेस होना शुरू हो जाता है।