Shell Hook

95+ কমান্ড প্যাটার্ন।
স্বচ্ছ কম্প্রেশন।

Shell hook আপনার AI দেখার আগে CLI আউটপুট ইন্টারসেপ্ট করে। Git ডিফ, npm ইনস্টল, cargo বিল্ড, docker লগ - সবই তাদের অপরিহার্য তথ্যে কম্প্রেস করা হয়। কোনো কনফিগারেশন নেই, কোনো অ্যালিয়াস শেখার প্রয়োজন নেই।

34+ কমান্ড ক্যাটাগরি 95+ নির্দিষ্ট প্যাটার্ন 60–90% আউটপুট হ্রাস
ফ্লো

কিভাবে কাজ করে।

Shell hook আপনার কমান্ড স্বচ্ছভাবে র‍্যাপ করে। 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

Python

pip install pytest python -m poetry uv

সিস্টেম ও ইউটিলিটি

ls / find ps / top curl make env cat / head
আগে ও পরে

দেখুন পার্থক্য।

Shell hook ছাড়া ~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
Shell hook সহ ~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%)]

স্বাধীনভাবে কাজ করে

Shell hook কনটেক্সট সার্ভার থেকে স্বাধীনভাবে কাজ করে। যে 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.

পুরো আউটপুট প্রয়োজন? raw মোড ব্যবহার করুন।

যখন আপনার আনকম্প্রেসড আউটপুট প্রয়োজন, একটি একক ফ্ল্যাগ দিয়ে কম্প্রেশন বাইপাস করুন। আর নীরব ডেটা ক্ষতি নেই - ট্রাঙ্কেশন সবসময় স্বচ্ছ।

# 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)

প্রতিটি কমান্ডে সাশ্রয় শুরু করুন।

একটি সেটআপ কমান্ড আপনার শেলের জন্য shell hook সক্রিয় করে। এরপর প্রতিটি AI কমান্ড স্বয়ংক্রিয়ভাবে কম্প্রেস হয়।