auto-context-cli 1.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- auto_context/__init__.py +3 -0
- auto_context/commands/__init__.py +2 -0
- auto_context/commands/import_cmd.py +144 -0
- auto_context/commands/init_cmd.py +309 -0
- auto_context/commands/mcp.py +304 -0
- auto_context/commands/memory.py +236 -0
- auto_context/commands/share.py +122 -0
- auto_context/config.py +65 -0
- auto_context/main.py +121 -0
- auto_context/security.py +162 -0
- auto_context/templates/AGENTS.template.md +49 -0
- auto_context/templates/GEMINI.template.md +49 -0
- auto_context/templates/context.local.template.md +52 -0
- auto_context/templates/context.template.md +94 -0
- auto_context/templates/maintain_context.template.md +36 -0
- auto_context/templates/mcp_config.template.json +13 -0
- auto_context/templates/profile.template.md +20 -0
- auto_context/templates/rule.template.md +19 -0
- auto_context/templates/rules/code-standards.md +24 -0
- auto_context/templates/rules/security-boundaries.md +21 -0
- auto_context/templates/skill.template.md +39 -0
- auto_context/templates/skills/browser-testing/SKILL.md +59 -0
- auto_context/templates/skills/docker-ops/SKILL.md +79 -0
- auto_context/templates/skills/git-workflow/SKILL.md +59 -0
- auto_context/templates/skills/server-diagnostics/SKILL.md +55 -0
- auto_context_cli-1.0.0.dist-info/METADATA +577 -0
- auto_context_cli-1.0.0.dist-info/RECORD +30 -0
- auto_context_cli-1.0.0.dist-info/WHEEL +4 -0
- auto_context_cli-1.0.0.dist-info/entry_points.txt +2 -0
- auto_context_cli-1.0.0.dist-info/licenses/LICENSE +0 -0
|
@@ -0,0 +1,577 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: auto-context-cli
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: Autonomous context & instruction manager for AI coding assistants
|
|
5
|
+
Author: Arghya Biswas
|
|
6
|
+
License: MIT
|
|
7
|
+
License-File: LICENSE
|
|
8
|
+
Requires-Python: >=3.11
|
|
9
|
+
Requires-Dist: httpx>=0.27
|
|
10
|
+
Requires-Dist: python-dotenv>=1
|
|
11
|
+
Requires-Dist: rich>=13
|
|
12
|
+
Requires-Dist: typer>=0.12
|
|
13
|
+
Description-Content-Type: text/markdown
|
|
14
|
+
|
|
15
|
+
<div align="center">
|
|
16
|
+
|
|
17
|
+
# đ§ Auto-Context
|
|
18
|
+
|
|
19
|
+
**Autonomous Context & Instruction Management Protocol for AI Coding Assistants**
|
|
20
|
+
|
|
21
|
+
[](https://opensource.org/licenses/MIT)
|
|
22
|
+
[](#-quick-one-line-install)
|
|
23
|
+
[](#-supported-ai-assistants)
|
|
24
|
+
[](https://github.com/Cyber-arghya/auto-context/pulls)
|
|
25
|
+
|
|
26
|
+
*Never lose context, forgotten architecture decisions, or unlogged bug fixes again.*
|
|
27
|
+
|
|
28
|
+
[English](#-english-documentation) âĸ [āĻŦāĻžāĻāϞāĻž āύāĻŋāϰā§āĻĻā§āĻļāĻŋāĻāĻž](#-āĻŦāĻžāĻāϞāĻž-āύāĻŋāϰā§āĻĻā§āĻļāĻŋāĻāĻž-bengali-guide) âĸ [Installation](#-quick-one-line-install) âĸ [CLI Usage](#-cli-usage)
|
|
29
|
+
|
|
30
|
+
</div>
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## ⥠Quick One-Line Install
|
|
35
|
+
|
|
36
|
+
No manual downloads or complex PATH configurations required. Run the command matching your terminal:
|
|
37
|
+
|
|
38
|
+
### đĻ Universal via `uv` (Fastest, Windows / Mac / Linux / WSL2):
|
|
39
|
+
```bash
|
|
40
|
+
uv tool install git+https://github.com/Cyber-arghya/auto-context.git
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### đĒ Windows (PowerShell / `pwsh` 1-Click):
|
|
44
|
+
```powershell
|
|
45
|
+
irm https://raw.githubusercontent.com/Cyber-arghya/auto-context/main/install.ps1 | iex
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### đ§ Linux / WSL2 / macOS (Bash / Zsh 1-Click):
|
|
49
|
+
```bash
|
|
50
|
+
curl -sSL https://raw.githubusercontent.com/Cyber-arghya/auto-context/main/install.sh | bash
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
> **Note:** The installer automatically configures `init-context` in your user `PATH`, registers shell functions, and provisions the global **Antigravity AI Agent Plugin**.
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## đ CLI Usage
|
|
58
|
+
|
|
59
|
+
Inside any existing or brand new project folder, simply run:
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
# Navigate to your project
|
|
63
|
+
cd /path/to/any-project
|
|
64
|
+
|
|
65
|
+
# Initialize autonomous context tracking
|
|
66
|
+
init-context
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### Options & Flags:
|
|
70
|
+
```text
|
|
71
|
+
init-context [OPTIONS] [DIRECTORY]
|
|
72
|
+
|
|
73
|
+
OPTIONS (CONTEXT & RULES):
|
|
74
|
+
-r, --new-rule <NAME> Scaffold a new rule file (.agents/rules/<name>.md)
|
|
75
|
+
-s, --new-skill <NAME> Scaffold a new skill folder (.agents/skills/<name>/SKILL.md)
|
|
76
|
+
-g, --global Target global plugin scope (~/.gemini/config/plugins/auto-context/)
|
|
77
|
+
-f, --force Overwrite existing context.md and standing rule files
|
|
78
|
+
-d, --dry-run Preview generated structure without writing to disk
|
|
79
|
+
-v, --version Display current version
|
|
80
|
+
-h, --help Show help documentation
|
|
81
|
+
|
|
82
|
+
OPTIONS (CENTRAL MEMORY & GRANULAR SHARING):
|
|
83
|
+
memory init [REPO] Initialize private central memory repo (~/.auto-context/memory)
|
|
84
|
+
memory push Audit secrets & push memory brain to private GitHub repo
|
|
85
|
+
memory pull [URL] Pull & sync central memory brain from remote repo
|
|
86
|
+
memory status Show status of central memory brain
|
|
87
|
+
share <NAME> Audit & publish skill or rule to GitHub Gist
|
|
88
|
+
import <URL> Audit & import skill or rule from GitHub Gist or URL
|
|
89
|
+
--as <NAME> Custom name when importing a skill or rule
|
|
90
|
+
--public Publish shared Gist as public (default)
|
|
91
|
+
--secret, --private Publish shared Gist as unlisted/secret
|
|
92
|
+
|
|
93
|
+
OPTIONS (MCP TOOLING):
|
|
94
|
+
--add-mcp <NAME> Add or update an MCP server configuration
|
|
95
|
+
--remove-mcp <NAME> Remove an MCP server from configuration
|
|
96
|
+
--list-mcp List all active MCP server tools
|
|
97
|
+
--preset <PRESET> Preset template (sqlite, postgres, github, filesystem, brave, fetch)
|
|
98
|
+
--command <CMD> Executable command for stdio server (e.g. npx, uvx, python3)
|
|
99
|
+
--args <ARGS> Arguments to pass to command
|
|
100
|
+
--url <URL> Streamable HTTP endpoint URL for remote MCP server
|
|
101
|
+
--env <KEY=VAL,...> Environment variables (e.g. 'GITHUB_TOKEN=xyz')
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
## đ MCP (Model Context Protocol) Tooling Management (āĻā§āϞ āĻŽā§āϝāĻžāύā§āĻāĻŽā§āύā§āĻ)
|
|
107
|
+
|
|
108
|
+
Auto-Context allows you and your AI agents to seamlessly install, update, list, and delete **MCP servers** with single commands:
|
|
109
|
+
|
|
110
|
+
### 1ī¸âŖ Add Popular Pre-configured MCP Servers (Secure Secret Pattern)
|
|
111
|
+
Tokens and connection strings are **never stored as plaintext** in config files or committed to Git. Instead, they reference environment variables (`${VAR_NAME}`), automatically create safe placeholders in `.env.example`, and protect `.env` in `.gitignore`:
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
# Add SQLite database query tool (local file)
|
|
115
|
+
init-context --add-mcp sqlite --args "database.db"
|
|
116
|
+
|
|
117
|
+
# Add PostgreSQL tool (securely references ${DATABASE_URL} from .env)
|
|
118
|
+
init-context --add-mcp postgres
|
|
119
|
+
|
|
120
|
+
# Add GitHub API tool (securely references ${GITHUB_PERSONAL_ACCESS_TOKEN} from .env)
|
|
121
|
+
init-context --add-mcp github
|
|
122
|
+
|
|
123
|
+
# Add Brave Search tool (securely references ${BRAVE_API_KEY} from .env)
|
|
124
|
+
init-context --add-mcp brave
|
|
125
|
+
|
|
126
|
+
# Customize which environment variable holds the secret
|
|
127
|
+
init-context --add-mcp github --env-var MY_CUSTOM_GH_TOKEN
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
### 2ī¸âŖ đ Python vs. Node Runtimes: `uvx` vs. `npx`
|
|
131
|
+
Auto-Context automatically aligns stdio MCP tools with your project's ecosystem:
|
|
132
|
+
* **Auto-Detection:** If your workspace has a `pyproject.toml`, `requirements.txt`, or `Pipfile`, tools like `sqlite`, `git`, and `fetch` automatically use `uvx` (`mcp-server-*`). In Node.js / JavaScript projects, it defaults to `npx` (`@modelcontextprotocol/server-*`).
|
|
133
|
+
* **Explicit Runtime Flag (`--runtime` / `--runner`):** You can force your preferred runtime at any time:
|
|
134
|
+
```bash
|
|
135
|
+
# Force Python uvx runner
|
|
136
|
+
init-context --add-mcp sqlite --runtime uvx
|
|
137
|
+
|
|
138
|
+
# Force Node.js npx runner
|
|
139
|
+
init-context --add-mcp sqlite --runtime npx
|
|
140
|
+
|
|
141
|
+
# Python-native tools (DuckDB, Time, Git)
|
|
142
|
+
init-context --add-mcp duckdb
|
|
143
|
+
init-context --add-mcp time
|
|
144
|
+
init-context --add-mcp git --runtime uvx
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
### 3ī¸âŖ Add Custom Stdio or Remote HTTP MCP Servers
|
|
148
|
+
```bash
|
|
149
|
+
# Add custom Python/Node MCP server
|
|
150
|
+
init-context --add-mcp my-tool --command "python3" --args "server.py"
|
|
151
|
+
|
|
152
|
+
# Add remote Streamable HTTP MCP server
|
|
153
|
+
init-context --add-mcp remote-api --url "https://mcp.mycompany.com/mcp"
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
### 4ī¸âŖ List and Delete MCP Tools
|
|
157
|
+
```bash
|
|
158
|
+
# List all active project or global MCP tools
|
|
159
|
+
init-context --list-mcp
|
|
160
|
+
init-context --list-mcp -g
|
|
161
|
+
|
|
162
|
+
# Remove an MCP tool
|
|
163
|
+
init-context --remove-mcp sqlite
|
|
164
|
+
init-context --remove-mcp github -g
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
### đĄ Lifecycle Note: Mid-Flight Execution vs. Next-Session MCP (āĻšāĻžāĻāĻŦā§āϰāĻŋāĻĄ āĻŽāĻĄā§āϞ)
|
|
168
|
+
> **Host Client Reality:** Most MCP host environments (Antigravity IDE, Cursor, Claude Desktop) load MCP tools **only during session startup**. Modifying `mcp_config.json` mid-session configures the tool for future turns, but requires a session reload/restart before the LLM's active tool schema updates.
|
|
169
|
+
>
|
|
170
|
+
> **Recommended Dual-Path Strategy:**
|
|
171
|
+
> 1. **Current Session (Immediate):** The AI uses CLI commands / scripts (`sqlite3`, `gh`, `curl`) to complete the task right now without interruption.
|
|
172
|
+
> 2. **Persistent Setup (Future Sessions):** `init-context --add-mcp <name>` configures the native MCP tool so it is permanently ready upon next session start or window reload.
|
|
173
|
+
|
|
174
|
+
---
|
|
175
|
+
|
|
176
|
+
## đ ī¸ Adding Custom Skills & Rules (āĻāĻžāϏā§āĻāĻŽ āϏā§āĻāĻŋāϞ āĻ āϰā§āϞ āϝā§āĻā§āϤ āĻāϰāĻžāϰ āύāĻŋā§āĻŽ)
|
|
177
|
+
|
|
178
|
+
You can easily teach your AI assistants new abilities (**Skills**) or enforce custom guidelines (**Rules**), either for a **single project (Local)** or across your **entire computer (Global)**.
|
|
179
|
+
|
|
180
|
+
### đ§ Skills vs. Rules: What is the Difference?
|
|
181
|
+
|
|
182
|
+
| Type | Purpose | When Active | Format / Location |
|
|
183
|
+
| :--- | :--- | :--- | :--- |
|
|
184
|
+
| **Rule** | Behavioral constraints, coding standards, security boundaries, or test requirements. | Always active (`trigger: always_on`) or context-triggered. | `.agents/rules/<name>.md` or `GEMINI.md` |
|
|
185
|
+
| **Skill** | Step-by-step procedures, deployment runbooks, debugging steps, or CLI tool guides. | Activated on-demand when relevant task is requested. | `.agents/skills/<name>/SKILL.md` |
|
|
186
|
+
|
|
187
|
+
---
|
|
188
|
+
|
|
189
|
+
### 1ī¸âŖ How to Add a New Rule
|
|
190
|
+
|
|
191
|
+
#### Method A: Using 1-Command CLI (Recommended)
|
|
192
|
+
```bash
|
|
193
|
+
# In Bash / WSL2 / macOS:
|
|
194
|
+
init-context -r code-style # Create local rule for active project
|
|
195
|
+
init-context -r security-policy --global # Create global rule for ALL projects
|
|
196
|
+
|
|
197
|
+
# In Windows PowerShell:
|
|
198
|
+
init-context -NewRule code-style
|
|
199
|
+
init-context -NewRule security-policy -Global
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
#### Method B: Manual File Creation
|
|
203
|
+
Create a file at `.agents/rules/my-rule.md`:
|
|
204
|
+
```markdown
|
|
205
|
+
---
|
|
206
|
+
name: my-rule
|
|
207
|
+
description: Enforce TypeScript strict null checks and ESLint formatting.
|
|
208
|
+
trigger: always_on
|
|
209
|
+
---
|
|
210
|
+
|
|
211
|
+
# Rule: TypeScript & Formatting Standards
|
|
212
|
+
|
|
213
|
+
## Guidelines
|
|
214
|
+
- Never use 'any' type in production code.
|
|
215
|
+
- Run 'npm run lint' before finalizing any changes.
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
---
|
|
219
|
+
|
|
220
|
+
### 2ī¸âŖ How to Add a New Skill
|
|
221
|
+
|
|
222
|
+
#### Method A: Using 1-Command CLI (Recommended)
|
|
223
|
+
```bash
|
|
224
|
+
# In Bash / WSL2 / macOS:
|
|
225
|
+
init-context -s deploy-docker # Create local skill for active project
|
|
226
|
+
init-context -s server-diagnostics -g # Create global skill for ALL projects
|
|
227
|
+
|
|
228
|
+
# In Windows PowerShell:
|
|
229
|
+
init-context -NewSkill deploy-docker
|
|
230
|
+
init-context -NewSkill server-diagnostics -Global
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
#### Method B: Manual File Creation
|
|
234
|
+
Create a folder and file at `.agents/skills/deploy-docker/SKILL.md` with standard YAML frontmatter:
|
|
235
|
+
```markdown
|
|
236
|
+
---
|
|
237
|
+
name: deploy-docker
|
|
238
|
+
version: 1.0.0
|
|
239
|
+
description: Step-by-step procedure to build and deploy dockerized containers.
|
|
240
|
+
triggers: ["docker", "container", "compose", "dockerfile"]
|
|
241
|
+
---
|
|
242
|
+
|
|
243
|
+
# Skill: Docker Deployment Runbook
|
|
244
|
+
|
|
245
|
+
## When to Activate
|
|
246
|
+
- When the user asks to build, run, or deploy Docker containers.
|
|
247
|
+
|
|
248
|
+
## Step-by-Step Procedure
|
|
249
|
+
1. Build the production image:
|
|
250
|
+
```bash
|
|
251
|
+
docker compose build --no-cache
|
|
252
|
+
```
|
|
253
|
+
2. Run health check on containers:
|
|
254
|
+
```bash
|
|
255
|
+
docker compose ps
|
|
256
|
+
```
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
---
|
|
260
|
+
|
|
261
|
+
## ⥠Two-Tier Progressive Disclosure (Token-Optimized Architecture)
|
|
262
|
+
|
|
263
|
+
To avoid context window bloat and burning 20kâ30k tokens at session startup, Auto-Context enforces a **Two-Tier Progressive Disclosure Protocol**:
|
|
264
|
+
|
|
265
|
+
```
|
|
266
|
+
âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
|
|
267
|
+
â Tier 1: Lightweight Index in context.md (~150 Tokens) â
|
|
268
|
+
â - Lists: Skill Name, Version, One-line Description, Trigger Keywords â
|
|
269
|
+
â - Target Token Budget: < 800 tokens at boot â
|
|
270
|
+
ââââââââââââââââââââââââââââââââââââââââŦâââââââââââââââââââââââââââââââââââââââ
|
|
271
|
+
â When user prompt matches trigger
|
|
272
|
+
âŧ (e.g. "build docker container")
|
|
273
|
+
âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
|
|
274
|
+
â Tier 2: On-Demand Dynamic Loading (read_file) â
|
|
275
|
+
â - Agent inspects .agents/skills/<skill-name>/SKILL.md â
|
|
276
|
+
â - Executes the step-by-step procedure and concludes â
|
|
277
|
+
â - Future chats remain clean and unbloated! â
|
|
278
|
+
âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
### đĻ Default Starter Pack (Built-in Rules & Skills)
|
|
282
|
+
Every initialized project automatically comes equipped with:
|
|
283
|
+
* **Default Rules:**
|
|
284
|
+
1. `maintain_context.md`: Autonomous context sync, self-evolution, and progressive disclosure protocol.
|
|
285
|
+
2. `security-boundaries.md`: Zero plaintext secrets in Git, strict `.env` isolation.
|
|
286
|
+
3. `code-standards.md`: Clean code, DRY principles, early returns, and conventional commits.
|
|
287
|
+
* **Default Skills:**
|
|
288
|
+
1. `docker-ops`: Multi-stage Dockerfiles, compose setups, container diagnostics, cleanup.
|
|
289
|
+
2. `git-workflow`: Conventional commits, branch hygiene, safe rebasing, merge conflict resolution.
|
|
290
|
+
3. `server-diagnostics`: RAM/swap health checks, CPU load, open sockets, disk utilization.
|
|
291
|
+
4. `browser-testing`: UI and mock API automation using `context.local.md` without credential amnesia.
|
|
292
|
+
|
|
293
|
+
---
|
|
294
|
+
|
|
295
|
+
### 3ī¸âŖ Local vs. Global Scopes
|
|
296
|
+
|
|
297
|
+
* **Local Scope (`.agents/`):**
|
|
298
|
+
* Stored inside your project folder (`.agents/rules/` and `.agents/skills/`).
|
|
299
|
+
* Can be committed to Git so teammates and CI/CD share the exact same rules.
|
|
300
|
+
* **Global Scope (`~/.gemini/config/plugins/auto-context/`):**
|
|
301
|
+
* Stored machine-wide.
|
|
302
|
+
* Every single project opened in Antigravity automatically inherits these skills and rules.
|
|
303
|
+
|
|
304
|
+
---
|
|
305
|
+
|
|
306
|
+
## đ§ Central Memory Brain & Dotfiles Culture for AI Agents
|
|
307
|
+
|
|
308
|
+
Developers maintain `.dotfiles` on GitHub to configure any Linux/macOS machine in seconds. **Auto-Context** brings this exact dotfiles paradigm to **AI Coding Agents**:
|
|
309
|
+
|
|
310
|
+
```
|
|
311
|
+
âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
|
|
312
|
+
â Developer's Workstations & Cloud VMs â
|
|
313
|
+
â [Ubuntu Server / WSL2] [Windows Desktop] [macOS Laptop] â
|
|
314
|
+
â â â â â
|
|
315
|
+
â âŧ âŧ âŧ â
|
|
316
|
+
â ~/.auto-context/memory ~/.auto-context/memory ~/.auto-context... â
|
|
317
|
+
ââââââââââââââââââââââââââââââââââââââââŦâââââââââââââââââââââââââââââââââââââââ
|
|
318
|
+
â đ Pre-Push Zero-Bypass Secret Auditor
|
|
319
|
+
âŧ (Rejects tokens, certs, .env)
|
|
320
|
+
âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
|
|
321
|
+
â Private GitHub Repository: auto-context-memory â
|
|
322
|
+
â - profile.md: Developer communication style, language, & clean code rules â
|
|
323
|
+
â - rules/: Machine-wide coding guidelines synced across all projects â
|
|
324
|
+
â - skills/: Curated runbooks, workflows, and diagnostics â
|
|
325
|
+
â - Zero Data Loss: Reinstall OS and run 'init-context memory pull' to restore!â
|
|
326
|
+
âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
|
|
327
|
+
```
|
|
328
|
+
|
|
329
|
+
### 1ī¸âŖ Initialize Your Private Brain (`memory init`)
|
|
330
|
+
Initializes local storage (`~/.auto-context/memory`), generates `profile.md`, hardens `.gitignore`, and automatically creates a **strictly Private** repository on GitHub:
|
|
331
|
+
|
|
332
|
+
```bash
|
|
333
|
+
# Initialize with default private repo name (auto-context-memory)
|
|
334
|
+
init-context memory init
|
|
335
|
+
|
|
336
|
+
# Or customize private repository name
|
|
337
|
+
init-context memory init my-agent-brain
|
|
338
|
+
```
|
|
339
|
+
|
|
340
|
+
> [!IMPORTANT]
|
|
341
|
+
> **Strictly Private Flag Enforcement:** `memory init` automatically injects the `--private` flag into `gh repo create` without bypass. Your developer habits and server notes will never be published publicly by mistake.
|
|
342
|
+
|
|
343
|
+
### 2ī¸âŖ Pre-Push Secret Auditor with Zero-Bypass Hard-Block (`memory push`)
|
|
344
|
+
Before committing or pushing to your private memory repository, Auto-Context recursively audits every file:
|
|
345
|
+
* **Prohibited Files:** `.env`, `.env.*`, `id_rsa`, `id_ed25519`, `authorized_keys`, `known_hosts`
|
|
346
|
+
* **Prohibited Keys:** `*.pem`, `*.key`, `*.p12`, `*.pfx`, `*.kdbx`
|
|
347
|
+
* **Prohibited Tokens:** `ghp_`, `sk_live_`, `sk-ant-`, `AIza`, `AKIA`, `BEGIN PRIVATE KEY`, or hardcoded passwords.
|
|
348
|
+
|
|
349
|
+
If any secret is detected, the script **immediately terminates with Exit 1**, printing the exact file path, line number, pattern, and masked preview. Zero secrets reach remote storage!
|
|
350
|
+
|
|
351
|
+
```bash
|
|
352
|
+
init-context memory push
|
|
353
|
+
```
|
|
354
|
+
|
|
355
|
+
### 3ī¸âŖ Granular Sharing via GitHub Gist (`share <name>`)
|
|
356
|
+
Share a single battle-tested skill or rule with the developer community without exposing your private memory brain:
|
|
357
|
+
|
|
358
|
+
```bash
|
|
359
|
+
# Share a skill as a public GitHub Gist
|
|
360
|
+
init-context share git-workflow
|
|
361
|
+
|
|
362
|
+
# Or share as an unlisted/secret Gist
|
|
363
|
+
init-context share docker-ops --secret
|
|
364
|
+
```
|
|
365
|
+
|
|
366
|
+
Outputs a direct shareable Gist link and the exact 1-liner for other developers to import it.
|
|
367
|
+
|
|
368
|
+
### 4ī¸âŖ Gist Import with Collision Guard (`import <url>`)
|
|
369
|
+
Import any shared skill or rule directly into your local project or global brain:
|
|
370
|
+
|
|
371
|
+
```bash
|
|
372
|
+
# Import into local project (.agents/skills/<name>/SKILL.md)
|
|
373
|
+
init-context import https://gist.github.com/Cyber-arghya/4d9e7b415a772c91ba2066fa19b8df9c
|
|
374
|
+
|
|
375
|
+
# Import globally across all projects (~/.gemini/config/plugins/auto-context/skills/)
|
|
376
|
+
init-context import <gist-url> --global
|
|
377
|
+
|
|
378
|
+
# Import with a custom local name
|
|
379
|
+
init-context import <gist-url> --as custom-deploy-skill
|
|
380
|
+
```
|
|
381
|
+
|
|
382
|
+
> [!TIP]
|
|
383
|
+
> **Collision Guard (Overwrite Protection):** If an imported skill or rule already exists with the same name, Auto-Context will never silently overwrite it. In an interactive terminal, it prompts you: `[O]verwrite / [R]ename / [C]ancel`. In non-interactive CI/CD, it safely exits with `1` unless `--force` is explicitly provided.
|
|
384
|
+
|
|
385
|
+
---
|
|
386
|
+
|
|
387
|
+
## đĄ How It Works
|
|
388
|
+
|
|
389
|
+
```mermaid
|
|
390
|
+
flowchart TD
|
|
391
|
+
RunCLI["1. User runs 'init-context' in project"] --> Detect["2. Auto-detects Language & Stack (Node, Python, Go, Rust, etc.)"]
|
|
392
|
+
Detect --> GenContext["3. Generates 5-Section 'context.md' (Vault, Problem Log, Architecture, Runbook)"]
|
|
393
|
+
Detect --> GenRules["4. Generates Standing Agent Rules (GEMINI.md, AGENTS.md, maintain_context.md)"]
|
|
394
|
+
Detect --> InitGit["5. Initializes Git repository if missing"]
|
|
395
|
+
|
|
396
|
+
subgraph ActiveDevelopment ["Autonomous Pair Programming"]
|
|
397
|
+
GenContext & GenRules --> AICoding["AI writes code, modifies configs, or resolves errors"]
|
|
398
|
+
AICoding --> AutoCheck{"Rule Enforcement"}
|
|
399
|
+
AutoCheck --> AutoUpdate["AI automatically updates 'context.md' before concluding turn"]
|
|
400
|
+
end
|
|
401
|
+
```
|
|
402
|
+
|
|
403
|
+
Whenever an AI coding assistant operates in an `auto-context` repository:
|
|
404
|
+
1. **Zero-User-Prompting Mandate:** You never have to remind the AI to update notes.
|
|
405
|
+
2. **Problem & Incident Vault:** Every bug, connection timeout, DNS issue, or build error is logged alongside its root cause and exact terminal commands used to fix it.
|
|
406
|
+
3. **Master Configuration Vault:** IPs, ports, usernames, API tokens, and environment parameters stay synchronized.
|
|
407
|
+
4. **Reproducibility:** A developer or fresh OS can reconstruct the environment using the embedded runbook.
|
|
408
|
+
|
|
409
|
+
---
|
|
410
|
+
|
|
411
|
+
## đ Generated Files Overview
|
|
412
|
+
|
|
413
|
+
| File | Purpose | Security & Git Status |
|
|
414
|
+
| :--- | :--- | :--- |
|
|
415
|
+
| [`context.md`](./templates/context.template.md) | Single Source of Truth: Architecture, problem logs, and reproduction runbook. | Tracked in Git |
|
|
416
|
+
| [`context.local.md`](./templates/context.local.template.md) | đ Local Sandbox & Dummy Vault: Mock test logins, seed users, local ports. | STRICTLY GIT-IGNORED (`chmod 600`) |
|
|
417
|
+
| [`GEMINI.md`](./templates/GEMINI.template.md) | Project-level standing rule enforcing continuous autonomous synchronization. | Tracked in Git |
|
|
418
|
+
| [`AGENTS.md`](./templates/AGENTS.template.md) | Universal agent instruction file for non-Antigravity environments. | Tracked in Git |
|
|
419
|
+
| [`.agents/rules/maintain_context.md`](./templates/maintain_context.template.md) | Native Antigravity progressive disclosure rule (`trigger: always_on`). | Tracked in Git |
|
|
420
|
+
|
|
421
|
+
---
|
|
422
|
+
|
|
423
|
+
## đ Local Sandbox Vault (`context.local.md`) â Zero Prompt Injection & Leak Protection
|
|
424
|
+
|
|
425
|
+
When AI agents perform browser automation (Playwright/Puppeteer), API testing, or local dev integration, they need test credentials (e.g. `admin@test.local / pass123`).
|
|
426
|
+
|
|
427
|
+
To prevent **Prompt Injection Leaks** and keep production secrets safe:
|
|
428
|
+
1. **Mock Data Only:** `context.local.md` is strictly reserved for local mock/dummy data, seed accounts, and localhost ports.
|
|
429
|
+
2. **Zero Real Secrets:** Real production API keys, database passwords, or live payment tokens MUST NEVER be stored in `context.local.md` or `context.md`; they remain in `.env` or OS Keychain.
|
|
430
|
+
3. **Automated Git Isolation:** `init-context` automatically adds `context.local.md` and `*.local.md` to `.gitignore` and sets file permissions to `chmod 600`.
|
|
431
|
+
4. **No Chat Amnesia:** The AI assistant inspects `context.local.md` automatically, remembering how to log into your local app across new chat sessions without asking you every time.
|
|
432
|
+
|
|
433
|
+
---
|
|
434
|
+
|
|
435
|
+
## đ¤ Supported AI Assistants
|
|
436
|
+
|
|
437
|
+
* **Google Antigravity IDE & CLI (`agy`)** *(Native full plugin support)*
|
|
438
|
+
* **Cursor AI** *(Reads `AGENTS.md` and `context.md`)*
|
|
439
|
+
* **Claude Code / Anthropic Agent**
|
|
440
|
+
* **GitHub Copilot Chat & Workspace**
|
|
441
|
+
* **Windsurf IDE (Codeium)**
|
|
442
|
+
* **Cline / Roo Code**
|
|
443
|
+
|
|
444
|
+
---
|
|
445
|
+
|
|
446
|
+
## đ§đŠ āĻŦāĻžāĻāϞāĻž āύāĻŋāϰā§āĻĻā§āĻļāĻŋāĻāĻž (Bengali Guide)
|
|
447
|
+
|
|
448
|
+
### āĻāĻāĻŋ āĻā§ āĻāĻŦāĻ āĻā§āύ āĻĒā§āϰā§ā§āĻāύ?
|
|
449
|
+
āĻāĻŽāϰāĻž āϝāĻāύ āĻāĻāĻ āĻ
ā§āϝāĻžāϏāĻŋāϏā§āĻā§āϝāĻžāύā§āĻ (Antigravity, Cursor, Claude Code) āĻĻāĻŋā§ā§ āĻā§āĻĄāĻŋāĻ āĻŦāĻž āϏāĻžāϰā§āĻāĻžāϰ āĻāύāĻĢāĻŋāĻāĻžāϰ āĻāϰāĻŋ, āϤāĻāύ āĻāĻŋāĻā§āĻā§āώāĻŖ āĻĒāϰ āĻāĻāĻ āĻāĻā§āϰ āĻāύāĻĢāĻŋāĻāĻžāϰā§āĻļāύ, āϏāĻžāϰā§āĻāĻžāϰ āĻāĻāĻĒāĻŋ āĻŦāĻž āĻĒā§āϰā§āύ⧠āĻāϰāϰ āĻā§āϞ⧠āϝāĻžā§āĨ¤
|
|
450
|
+
|
|
451
|
+
**Auto-Context** āĻāĻĒāύāĻžāϰ āĻĒā§āϰāĻā§āĻā§āĻā§āϰ āϰā§āĻā§ āĻāĻāĻāĻŋ āϏā§āĻŦā§āĻāĻā§āϰāĻŋā§ `context.md` āĻāĻŦāĻ āĻāĻŋāĻā§ āĻļāĻā§āϤāĻŋāĻļāĻžāϞ⧠āύāĻŋā§āĻŽ (Rules) āϏā§āĻ āĻāϰ⧠āĻĻā§ā§āĨ¤ āĻĢāϞā§:
|
|
452
|
+
1. **āĻāĻĒāύāĻžāĻā§ āĻāϰ āĻŽāύ⧠āĻāϰāĻŋā§ā§ āĻĻāĻŋāϤ⧠āĻšāĻŦā§ āύāĻž:** āĻāĻāĻ āύāĻŋāĻā§ āĻĨā§āĻā§āĻ āĻĒā§āϰāϤāĻŋ āĻāĻžāĻā§āϰ āĻļā§āώ⧠`context.md` āĻĢāĻžāĻāϞ āĻāĻĒāĻĄā§āĻ āĻāϰ⧠āĻĻā§āĻŦā§āĨ¤
|
|
453
|
+
2. **āϏāĻŽāϏā§āϝāĻžāϰ āύāĻŋāĻā§āĻāϤ āϏāĻŽāĻžāϧāĻžāύ āϰā§āĻāϰā§āĻĄ āĻĨāĻžāĻā§:** āĻāĻžāϰā§āĻŽāĻŋāύāĻžāϞ⧠āĻā§āύ⧠āĻāϰāϰ āϏāĻŽāĻžāϧāĻžāύ āĻāϰāϞ⧠āϏā§āĻ āĻāϰāϰāĻāĻŋ āĻā§āύ āĻšā§ā§āĻāĻŋāϞ āĻāĻŦāĻ āĻā§ āĻāĻŽāĻžāύā§āĻĄ āĻĻāĻŋā§ā§ āĻ āĻŋāĻ āĻāϰāĻž āĻšā§ā§āĻā§ āϤāĻž āĻāĻžāϰā§āĻ āĻāĻāĻžāϰ⧠āϏā§āĻ āĻĨāĻžāĻāĻŦā§āĨ¤
|
|
454
|
+
3. **āĻĒāĻžāϏāĻā§āĻžāϰā§āĻĄ āĻ āĻĒā§āϰā§āĻ āĻāϞā§āĻ:** āϏāĻžāϰā§āĻāĻžāϰā§āϰ āϏā§āĻā§āϝāĻžāĻāĻŋāĻ āĻāĻāĻĒāĻŋ, āĻā§āϞāĻžāĻāĻĄāĻĢā§āϞā§āϝāĻŧāĻžāϰ āĻāĻžāύā§āϞ āĻāĻāĻĄāĻŋ āĻŦāĻž āĻĄāĻžāĻāĻžāĻŦā§āĻ āĻĒā§āϰā§āĻ āϏāĻŦāϏāĻŽā§ āĻāĻ āĻĢāĻžāĻāϞ⧠āύāĻŋāĻā§āĻāϤāĻāĻžāĻŦā§ āĻĨāĻžāĻāĻŦā§āĨ¤
|
|
455
|
+
|
|
456
|
+
### āĻāύāϏā§āĻāϞā§āĻļāύ āĻ āĻŦā§āϝāĻŦāĻšāĻžāϰ:
|
|
457
|
+
* **āĻāĻāύā§āĻĄā§āĻ āĻĒāĻžāĻā§āĻžāϰāĻļā§āϞ (PowerShell)-āĻ:**
|
|
458
|
+
```powershell
|
|
459
|
+
irm https://raw.githubusercontent.com/Cyber-arghya/auto-context/main/install.ps1 | iex
|
|
460
|
+
```
|
|
461
|
+
* **āϞāĻŋāύāĻžāĻā§āϏ / WSL2-āĻ:**
|
|
462
|
+
```bash
|
|
463
|
+
curl -sSL https://raw.githubusercontent.com/Cyber-arghya/auto-context/main/install.sh | bash
|
|
464
|
+
```
|
|
465
|
+
* **āύāϤā§āύ āĻĒā§āϰāĻā§āĻā§āĻā§ āĻŦā§āϝāĻŦāĻšāĻžāϰ:**
|
|
466
|
+
āϝā§āĻā§āύ⧠āĻĒā§āϰāĻā§āĻā§āĻ āĻĢā§āϞā§āĻĄāĻžāϰ⧠āĻĸā§āĻā§ āĻāĻžāϰā§āĻŽāĻŋāύāĻžāϞ⧠āĻļā§āϧ⧠āϞāĻŋāĻā§āύ:
|
|
467
|
+
```bash
|
|
468
|
+
init-context
|
|
469
|
+
```
|
|
470
|
+
āĻŦā§āϝāϏ! āĻāĻĒāύāĻžāϰ āĻĒā§āϰāĻā§āĻā§āĻā§ āϏā§āĻŦā§āĻāĻā§āϰāĻŋā§ āĻāύāĻā§āĻā§āϏāĻ āĻā§āϰā§āϝāĻžāĻāĻŋāĻ āĻāĻžāϞ⧠āĻšā§ā§ āϝāĻžāĻŦā§āĨ¤
|
|
471
|
+
|
|
472
|
+
### āύāϤā§āύ āϏā§āĻāĻŋāϞ āĻŦāĻž āϰā§āϞ āϤā§āϰāĻŋ āĻāϰāĻžāϰ āύāĻŋā§āĻŽ:
|
|
473
|
+
* **āύāϤā§āύ āϰā§āϞ (Rule) āϤā§āϰāĻŋ āĻāϰāϤā§:**
|
|
474
|
+
```bash
|
|
475
|
+
init-context -r my-rule-name # āĻŦāϰā§āϤāĻŽāĻžāύ āĻĒā§āϰāĻā§āĻā§āĻā§āϰ āĻāύā§āϝ
|
|
476
|
+
init-context -r my-rule-name -g # āϏāĻāϞ āĻĒā§āϰāĻā§āĻā§āĻā§āϰ āĻāύā§āϝ āĻā§āϞā§āĻŦāĻžāϞāĻŋ
|
|
477
|
+
```
|
|
478
|
+
* **āύāϤā§āύ āϏā§āĻāĻŋāϞ (Skill) āϤā§āϰāĻŋ āĻāϰāϤā§:**
|
|
479
|
+
```bash
|
|
480
|
+
init-context -s my-skill-name # āĻŦāϰā§āϤāĻŽāĻžāύ āĻĒā§āϰāĻā§āĻā§āĻā§āϰ āĻāύā§āϝ
|
|
481
|
+
init-context -s my-skill-name -g # āϏāĻāϞ āĻĒā§āϰāĻā§āĻā§āĻā§āϰ āĻāύā§āϝ āĻā§āϞā§āĻŦāĻžāϞāĻŋ
|
|
482
|
+
```
|
|
483
|
+
|
|
484
|
+
### ⥠āĻā§-āĻāĻžā§āĻžāϰ āĻĒā§āϰā§āĻā§āϰā§āϏāĻŋāĻ āĻĄāĻŋāϏāĻā§āϞā§āĻāĻžāϰ (āĻā§āĻā§āύ āϏāĻžāĻļā§āϰā§ā§ āĻāϰā§āĻāĻŋāĻā§āĻāĻāĻžāϰ):
|
|
485
|
+
āĻļā§āϰā§āϤā§āĻ āϏāĻŦ āϏā§āĻāĻŋāϞā§āϰ āĻŦā§ āĻĢāĻžāĻāϞ āϞā§āĻĄ āĻāϰ⧠āĻā§āϝāĻžāĻ āĻāĻžāϰ⧠āĻāϰāĻž āĻšā§ āύāĻžāĨ¤ āĻāĻāĻ āĻļā§āϰā§āϤ⧠āĻŽāĻžāϤā§āϰ ā§§ā§Ģā§Ļâ⧍ā§Ļā§Ļ āĻā§āĻā§āύā§āϰ āĻāĻāĻāĻŋ āĻāύāĻĄā§āĻā§āϏ (`context.md` Section 5) āĻĒā§ā§āĨ¤ āϝāĻāύ āύāĻŋāϰā§āĻĻāĻŋāώā§āĻ āĻāĻžāϏā§āĻā§āϰ āĻāĻŋāĻā§āĻžāϰā§āĻĄ āĻŽāĻŋāϞāĻŦā§ (āϝā§āĻŽāύ: "docker", "rebase", "diagnostics", "ui test"), āĻā§āĻŦāϞ āϤāĻāύāĻ āϏāĻāĻļā§āϞāĻŋāώā§āĻ āĻĒā§āϰā§āĻŖāĻžāĻā§āĻ āϏā§āĻāĻŋāϞāĻāĻŋ āĻ
āύ-āĻĄāĻŋāĻŽāĻžāύā§āĻĄ āĻŽā§āĻŽāϰāĻŋāϤ⧠āϞā§āĻĄ āĻšā§āĨ¤ āĻĢāϞ⧠āĻā§āĻā§āύ āĻāϰāĻ āĻĒā§āϰāĻžā§ ā§Žā§Ļ% āĻšā§āϰāĻžāϏ āĻĒāĻžā§!
|
|
486
|
+
|
|
487
|
+
### đ§ āϏā§āύā§āĻā§āϰāĻžāϞ āĻŽā§āĻŽāϰāĻŋ āĻŦā§āϰā§āĻāύ āĻ āĻĄāĻāĻĢāĻžāĻāϞāϏ (Disaster Recovery & Dotfiles):
|
|
488
|
+
āϝā§āĻŽāύāĻāĻžāĻŦā§ āϞāĻŋāύāĻžāĻā§āϏ⧠`.dotfiles` āĻĻāĻŋā§ā§ āĻā§āĻā§āϰ āĻĒāϞāĻā§ āϏāĻŦ āĻāύāĻĢāĻŋāĻāĻžāϰā§āĻļāύ āϏā§āĻāĻāĻĒ āĻāϰāĻž āϝāĻžā§, āϤā§āĻŽāύāĻŋ Auto-Context āĻĻāĻŋā§ā§ āĻāĻĒāύāĻžāϰ āĻāĻāĻ āĻāĻā§āύā§āĻā§āϰ āĻŽā§āĻŽāϰāĻŋ āĻ āϏā§āĻāĻŋāϞ āĻā§āϞāĻžāĻāĻĄā§ āύāĻŋāϰāĻžāĻĒāĻĻā§ āϏā§āĻ āĻĨāĻžāĻā§:
|
|
489
|
+
1. **āĻĒā§āϰāĻžāĻāĻā§āĻ āĻŽā§āĻŽāϰāĻŋ āϤā§āϰāĻŋ (`memory init`):**
|
|
490
|
+
```bash
|
|
491
|
+
init-context memory init # āϏā§āĻŦā§āĻāĻā§āϰāĻŋā§āĻāĻžāĻŦā§ āĻāĻŋāĻāĻšāĻžāĻŦā§ Private āϰāĻŋāĻĒā§āĻāĻŋāĻāϰāĻŋ āϤā§āϰāĻŋ āĻāϰāĻŦā§
|
|
492
|
+
```
|
|
493
|
+
2. **āĻāĻŋāϰā§-āĻŦāĻžāĻāĻĒāĻžāϏ āϏāĻŋāĻā§āϰā§āĻ āĻ
āĻĄāĻŋāĻāϰ āĻ āĻĒā§āĻļ (`memory push`):**
|
|
494
|
+
āĻŽā§āĻŽāϰāĻŋ āĻĒā§āĻļ āĻāϰāĻžāϰ āĻāĻā§ āϏā§āĻā§āϰāĻŋāĻĒā§āĻāĻāĻŋ āĻĒā§āϰāϤāĻŋāĻāĻŋ āĻĢāĻžāĻāϞ āϏā§āĻā§āϝāĻžāύ āĻāϰā§āĨ¤ āĻā§āύ⧠āĻĢāĻžāĻāϞ⧠āĻā§āϞāĻŦāĻļāϤ āĻā§āĻā§āύ (`ghp_`, `sk_live_`, `AIza`, āĻāϤā§āϝāĻžāĻĻāĻŋ) āĻŦāĻž `.env` āĻĢāĻžāĻāϞ āĻĨāĻžāĻāϞ⧠āϏā§āĻā§āϰāĻŋāĻĒā§āĻ āϤā§āĻā§āώāĻŖāĻžā§ Exit 1 āĻĻāĻŋā§ā§ āĻāĻāĻā§ āĻĻā§ā§ āĻāĻŦāĻ āĻĢāĻžāĻāϞā§āϰ āύāĻžāĻŽ āĻ āϞāĻžāĻāύ āύāĻžāĻŽā§āĻŦāĻžāϰ āĻĻā§āĻāĻŋā§ā§ āĻĻā§ā§:
|
|
495
|
+
```bash
|
|
496
|
+
init-context memory push # āϏāĻŋāĻā§āϰā§āĻ āĻ
āĻĄāĻŋāĻ āĻĒāĻžāϏ āĻāϰāϞ⧠āϤāĻŦā§āĻ āĻĒā§āĻļ āĻšāĻŦā§
|
|
497
|
+
```
|
|
498
|
+
3. **āĻ
āύā§āϝāĻžāύā§āϝ āĻĒāĻŋāϏāĻŋ āĻŦāĻž āĻāĻāϏ-āĻ āĻŽā§āĻŽāϰāĻŋ āϰāĻŋāĻāĻāĻžāϰāĻŋ (`memory pull`):**
|
|
499
|
+
```bash
|
|
500
|
+
init-context memory pull <repo-url> # āϏāĻŽā§āĻĒā§āϰā§āĻŖ āĻŽā§āĻŽāϰāĻŋ āĻ āϏā§āĻāĻŋāϞ āύāϤā§āύ āĻŽā§āĻļāĻŋāύ⧠āύāĻŋāĻŽā§āώā§āĻ āϏāĻāϞ
|
|
501
|
+
```
|
|
502
|
+
|
|
503
|
+
### đ¤ āĻā§āϰā§āϝāĻžāύā§āϞāĻžāϰ āĻļā§ā§āĻžāϰāĻŋāĻ āĻ āĻāϞāĻŋāĻļāύ āĻāĻžāϰā§āĻĄ (Share & Import):
|
|
504
|
+
āĻĒā§āϰ⧠āĻĒā§āϰāĻžāĻāĻā§āĻ āϰāĻŋāĻĒā§ āύāĻž āĻĒāĻžāĻ āĻŋā§ā§ āĻļā§āϧā§āĻŽāĻžāϤā§āϰ āĻāĻāĻāĻŋ āύāĻŋāϰā§āĻĻāĻŋāώā§āĻ āϏā§āĻāĻŋāϞ āĻŦāĻž āϰā§āϞ āĻŦāύā§āϧā§āĻĻā§āϰ āϏāĻžāĻĨā§ āĻāĻŋāϏā§āĻā§āϰ āĻŽāĻžāϧā§āϝāĻŽā§ āĻļā§ā§āĻžāϰ āĻāϰāϤ⧠āĻĒāĻžāϰāĻŦā§āύ:
|
|
505
|
+
* **āϏā§āĻāĻŋāϞ āĻļā§ā§āĻžāϰ āĻāϰāϤā§:**
|
|
506
|
+
```bash
|
|
507
|
+
init-context share git-workflow # GitHub Gist āϞāĻŋāĻāĻ āϤā§āϰāĻŋ āĻāϰ⧠āĻĻā§āĻŦā§
|
|
508
|
+
```
|
|
509
|
+
* **āĻļā§ā§āĻžāϰāĻā§āϤ āϏā§āĻāĻŋāϞ āĻāĻŽāĻĒā§āϰā§āĻ āĻāϰāϤ⧠(āĻāĻāĻžāϰāϰāĻžāĻāĻ āϏā§āϰāĻā§āώāĻž):**
|
|
510
|
+
```bash
|
|
511
|
+
init-context import <gist-url> # āϞā§āĻāĻžāϞ āĻĒā§āϰāĻā§āĻā§āĻā§ āϝā§āĻā§āϤ āĻāϰāĻŦā§
|
|
512
|
+
init-context import <gist-url> -g # āĻā§āϞā§āĻŦāĻžāϞ āĻāĻāĻ āĻĒā§āϞāĻžāĻāĻāύ⧠āϝā§āĻā§āϤ āĻāϰāĻŦā§
|
|
513
|
+
```
|
|
514
|
+
> **āĻāϞāĻŋāĻļāύ āĻāĻžāϰā§āĻĄ:** āϝāĻĻāĻŋ āĻāĻāĻ āύāĻžāĻŽā§āϰ āĻā§āύ⧠āϏā§āĻāĻŋāϞ āĻāĻā§ āĻĨā§āĻā§āĻ āĻĨā§āĻā§ āĻĨāĻžāĻā§, āϤāĻŦā§ āĻāĻāĻŋ āύāĻž āĻāĻžāύāĻŋā§ā§ āĻāĻāύ⧠āĻāĻāĻžāϰāϰāĻžāĻāĻ āĻāϰāĻŦā§ āύāĻžāĨ¤ āĻāĻžāϰā§āĻŽāĻŋāύāĻžāϞ⧠āĻāĻĒāύāĻžāĻā§ ā§ŠāĻāĻŋ āĻ
āĻĒāĻļāύ āĻĻā§āĻŦā§: `[O]verwrite / [R]ename / [C]ancel`āĨ¤
|
|
515
|
+
|
|
516
|
+
### āύāĻŋāϰāĻžāĻĒāĻĻ MCP āĻā§āϞ āĻŽā§āϝāĻžāύā§āĻāĻŽā§āύā§āĻ (Secure Secrets via .env):
|
|
517
|
+
āĻā§āĻā§āύ āĻŦāĻž āĻĒāĻžāϏāĻā§āĻžāϰā§āĻĄ āĻāĻāύā§āĻ āĻāύāĻĢāĻŋāĻ āĻĢāĻžāĻāϞ⧠āĻāĻĒā§āύ āĻā§āĻā§āϏāĻā§ āϏā§āĻ āĻšā§ āύāĻž, āĻŦāϰāĻ `.env` āĻāĻŦāĻ `.gitignore`-āĻāϰ āĻŽāĻžāϧā§āϝāĻŽā§ āύāĻŋāϰāĻžāĻĒāĻĻ āĻĨāĻžāĻā§:
|
|
518
|
+
* **āĻā§āϞ āϝā§āĻā§āϤ āĻāϰāϤ⧠(Node `npx` āĻŦāĻž Python `uvx` āϏāĻžāĻĒā§āϰā§āĻ):**
|
|
519
|
+
```bash
|
|
520
|
+
init-context --add-mcp sqlite # āĻ
āĻā§ āĻĄāĻŋāĻā§āĻāĻļāύ (Node āĻšāϞ⧠npx, Python āĻšāϞ⧠uvx)
|
|
521
|
+
init-context --add-mcp sqlite --runtime uvx # āĻĒāĻžāĻāĻĨāύ uvx āĻĒā§āϝāĻžāĻā§āĻ āϰāĻžāύāĻžāϰ āύāĻŋāĻļā§āĻāĻŋāϤ āĻāϰāϤā§
|
|
522
|
+
init-context --add-mcp duckdb # āĻĒāĻžāĻāĻĨāύ-āĻŦā§āϏāĻĄ DuckDB MCP āϏāĻžāϰā§āĻāĻžāϰ
|
|
523
|
+
init-context --add-mcp github # GitHub API (.env āĻĨā§āĻā§ āĻā§āĻā§āύ āĻĒā§āĻŦā§)
|
|
524
|
+
init-context --add-mcp postgres # PostgreSQL (.env āĻĨā§āĻā§ DATABASE_URL āĻĒā§āĻŦā§)
|
|
525
|
+
```
|
|
526
|
+
* **āĻā§āϞ āϤāĻžāϞāĻŋāĻāĻž āĻĻā§āĻāϤ⧠āĻ āĻŽā§āĻāϤā§:**
|
|
527
|
+
```bash
|
|
528
|
+
init-context --list-mcp # āϏāĻā§āϰāĻŋā§ āĻā§āϞ āĻĻā§āĻāϤā§
|
|
529
|
+
init-context --remove-mcp github # āĻā§āϞ āĻŽā§āĻā§ āĻĢā§āϞāϤā§
|
|
530
|
+
```
|
|
531
|
+
|
|
532
|
+
---
|
|
533
|
+
|
|
534
|
+
## đĻ Repository Structure
|
|
535
|
+
|
|
536
|
+
```text
|
|
537
|
+
auto-context/
|
|
538
|
+
âââ pyproject.toml # Modern PEP 517/621 package & CLI configuration
|
|
539
|
+
âââ src/
|
|
540
|
+
â âââ auto_context/
|
|
541
|
+
â âââ __init__.py
|
|
542
|
+
â âââ main.py # Root Typer CLI & backwards-compatible flag router
|
|
543
|
+
â âââ config.py # Centralized paths (~/.auto-context, ~/.gemini, etc.)
|
|
544
|
+
â âââ security.py # Zero-Bypass secret scanner & credential auditor
|
|
545
|
+
â âââ commands/
|
|
546
|
+
â â âââ init_cmd.py # Workspace scaffolding & stack detection
|
|
547
|
+
â â âââ memory.py # Central private git repo brain management
|
|
548
|
+
â â âââ mcp.py # Native JSON MCP registry & runtime selector
|
|
549
|
+
â â âââ share.py # Granular Gist publishing via gh / httpx
|
|
550
|
+
â â âââ import_cmd.py # Remote URL / Gist import & collision guard
|
|
551
|
+
â âââ templates/ # Package-bundled Markdown & JSON templates
|
|
552
|
+
âââ plugin/ # Antigravity Global Plugin bundle
|
|
553
|
+
â âââ plugin.json # Manifest
|
|
554
|
+
â âââ rules/AGENTS.md # Global standing rule
|
|
555
|
+
â âââ skills/auto-context/SKILL.md # Progressive disclosure skill
|
|
556
|
+
âââ install.sh # 1-Click universal installer (Linux / WSL2 / macOS)
|
|
557
|
+
âââ install.ps1 # 1-Click universal installer (Windows PowerShell)
|
|
558
|
+
âââ setup.bat # Double-clickable Windows setup
|
|
559
|
+
âââ uninstall.sh # Clean uninstaller for POSIX
|
|
560
|
+
âââ uninstall.ps1 # Clean uninstaller for Windows
|
|
561
|
+
âââ LICENSE # MIT License
|
|
562
|
+
âââ README.md # Documentation
|
|
563
|
+
```
|
|
564
|
+
|
|
565
|
+
---
|
|
566
|
+
|
|
567
|
+
## đ¤ Author
|
|
568
|
+
|
|
569
|
+
* **GitHub:** [@Cyber-arghya](https://github.com/Cyber-arghya)
|
|
570
|
+
* **Email:** [work.arghya01@gmail.com](mailto:work.arghya01@gmail.com)
|
|
571
|
+
|
|
572
|
+
---
|
|
573
|
+
|
|
574
|
+
## đ License
|
|
575
|
+
|
|
576
|
+
This project is open-source and licensed under the [MIT License](./LICENSE). Contributions and pull requests are warmly welcomed!
|
|
577
|
+
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
auto_context/__init__.py,sha256=VWP0iZV0But_V7_onEA4XmUcPhA3pPlhbTWsDwGqCQE,110
|
|
2
|
+
auto_context/config.py,sha256=AvT2rcKOn-8EB5npGrZxfaO1wRGP-3imoJtDS3VAdlM,2841
|
|
3
|
+
auto_context/main.py,sha256=b__fO3P5U9l7LNAZTP7ixMzMG06bMz7LYbyGCxb69_g,5457
|
|
4
|
+
auto_context/security.py,sha256=DSgbdQNyDG6XausfdQA_z9ykTSdbC1hSPE4EzSkMh_U,6097
|
|
5
|
+
auto_context/commands/__init__.py,sha256=tm-8FCeF3AiZBjLeIBXlr5HZHYtL_yQJquLYar8WnqI,49
|
|
6
|
+
auto_context/commands/import_cmd.py,sha256=KzL1eEBipx1m-0-AxVszXw6jhMUqkqUtCzRmFEHQJwo,5622
|
|
7
|
+
auto_context/commands/init_cmd.py,sha256=jRNDCUoma08dPwExxNV6mF0GhECpA4WVbguz3Uy-m00,13648
|
|
8
|
+
auto_context/commands/mcp.py,sha256=8juHLt8dFIj7hVOiIx55Dfrw2yavTAE2o2xR61Ubb2s,13099
|
|
9
|
+
auto_context/commands/memory.py,sha256=mW1yfftazsXXQvYRAu0dp8p-7P2nWVqpUXAND3RELRE,8991
|
|
10
|
+
auto_context/commands/share.py,sha256=11qn3xf7fH0el7yECAOhvk86a-5yBFIGaUyIwjbbEi0,4337
|
|
11
|
+
auto_context/templates/AGENTS.template.md,sha256=H9O7sDfq6hBTvOYu9E9mT6C2rdY-7L-os5pgf6HeuNI,4001
|
|
12
|
+
auto_context/templates/GEMINI.template.md,sha256=H9O7sDfq6hBTvOYu9E9mT6C2rdY-7L-os5pgf6HeuNI,4001
|
|
13
|
+
auto_context/templates/context.local.template.md,sha256=pBLkGCVy9-IrhA9s9jmjZtnDtqPhMOSSTG6mujSrbqE,2011
|
|
14
|
+
auto_context/templates/context.template.md,sha256=Rqq2Ie4rE-86JNSJetX0g0GfXAKCLtwK4dokiZIyPV8,3784
|
|
15
|
+
auto_context/templates/maintain_context.template.md,sha256=4EeCayIy9RyQ6sKqaMtJYBFJKTSBD0hKT3iHlAMLvpI,2295
|
|
16
|
+
auto_context/templates/mcp_config.template.json,sha256=CGpx4Vj9wYpfovCgjuQ8orL7ATHJuWLzn0kX7u9CVZk,268
|
|
17
|
+
auto_context/templates/profile.template.md,sha256=3T6fIGkbsoBeh_zDwK6Af96NUog-mXLqaJsLm1uVDkM,956
|
|
18
|
+
auto_context/templates/rule.template.md,sha256=70pZcUEfFEpdVkq2nRueZULkHfEf_28SDznADbQzmJ0,649
|
|
19
|
+
auto_context/templates/skill.template.md,sha256=npDjHhEfJEXh4Jni30S8kO25ybLTMbwC0ylRpDWGJnE,902
|
|
20
|
+
auto_context/templates/rules/code-standards.md,sha256=v7N7d6DtnKFsl7yqT3cHjCzEoMKyTP4fnrXOW45-AOY,1111
|
|
21
|
+
auto_context/templates/rules/security-boundaries.md,sha256=VjmpTjfHDeaK6sQwWOrNpZy_fYDeTrL1k7c1x7RBVWE,1125
|
|
22
|
+
auto_context/templates/skills/browser-testing/SKILL.md,sha256=15ZSZs5bNU6FMRjbMQuzt3p2-hhPtJC1Ja5wJQ4-KzU,2331
|
|
23
|
+
auto_context/templates/skills/docker-ops/SKILL.md,sha256=xa8ihM_uWmChIvYAYCOpCUn8FRaRAg7GCAegg7kdRTM,2611
|
|
24
|
+
auto_context/templates/skills/git-workflow/SKILL.md,sha256=QJWbxJ6no2I4SkTjhJ1lNO9pjQRy5c6WxkEa4BUyTsA,2273
|
|
25
|
+
auto_context/templates/skills/server-diagnostics/SKILL.md,sha256=xQO9vie0IP6vPFLtYnoXBDWTV4_e7Qb1FnAuQH7fQ9A,1641
|
|
26
|
+
auto_context_cli-1.0.0.dist-info/METADATA,sha256=S1EJVP5pul451hW6xWxfsL_XWqjUa7fav5deInvMGjI,32804
|
|
27
|
+
auto_context_cli-1.0.0.dist-info/WHEEL,sha256=2iZrJkDIkeDh0k9SikKMqFuRP-ua6mb4Ir1AsER4BEw,87
|
|
28
|
+
auto_context_cli-1.0.0.dist-info/entry_points.txt,sha256=aaGYgFg2sFhEyW-ig6qXzT26wRBsb0jF1Rs-aSxARNQ,56
|
|
29
|
+
auto_context_cli-1.0.0.dist-info/licenses/LICENSE,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
30
|
+
auto_context_cli-1.0.0.dist-info/RECORD,,
|
|
File without changes
|