k-cli-for-devs 1.0.0__tar.gz

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.
Files changed (135) hide show
  1. k_cli_for_devs-1.0.0/LICENSE +21 -0
  2. k_cli_for_devs-1.0.0/MANIFEST.in +3 -0
  3. k_cli_for_devs-1.0.0/PKG-INFO +461 -0
  4. k_cli_for_devs-1.0.0/README.md +405 -0
  5. k_cli_for_devs-1.0.0/k_cli/__init__.py +77 -0
  6. k_cli_for_devs-1.0.0/k_cli/agents/__init__.py +0 -0
  7. k_cli_for_devs-1.0.0/k_cli/agents/adversarial_swarm.py +338 -0
  8. k_cli_for_devs-1.0.0/k_cli/agents/agent_core.py +255 -0
  9. k_cli_for_devs-1.0.0/k_cli/agents/background_daemon.py +141 -0
  10. k_cli_for_devs-1.0.0/k_cli/agents/orchestrator.py +376 -0
  11. k_cli_for_devs-1.0.0/k_cli/agents/persona.py +649 -0
  12. k_cli_for_devs-1.0.0/k_cli/agents/scaffold_engine.py +121 -0
  13. k_cli_for_devs-1.0.0/k_cli/agents/strands_agent.py +832 -0
  14. k_cli_for_devs-1.0.0/k_cli/agents/subagents.py +1496 -0
  15. k_cli_for_devs-1.0.0/k_cli/cli.py +3297 -0
  16. k_cli_for_devs-1.0.0/k_cli/core/__init__.py +0 -0
  17. k_cli_for_devs-1.0.0/k_cli/core/airgap.py +95 -0
  18. k_cli_for_devs-1.0.0/k_cli/core/credentials.py +548 -0
  19. k_cli_for_devs-1.0.0/k_cli/core/intent_sensor.py +177 -0
  20. k_cli_for_devs-1.0.0/k_cli/core/llm_driver.py +1028 -0
  21. k_cli_for_devs-1.0.0/k_cli/core/model_manager.py +1109 -0
  22. k_cli_for_devs-1.0.0/k_cli/core/models_hub.py +913 -0
  23. k_cli_for_devs-1.0.0/k_cli/core/prompting.py +41 -0
  24. k_cli_for_devs-1.0.0/k_cli/core/sdk.py +322 -0
  25. k_cli_for_devs-1.0.0/k_cli/core/session.py +826 -0
  26. k_cli_for_devs-1.0.0/k_cli/core/smart_router.py +230 -0
  27. k_cli_for_devs-1.0.0/k_cli/core/storage_manager.py +176 -0
  28. k_cli_for_devs-1.0.0/k_cli/core/viewport_engine.py +117 -0
  29. k_cli_for_devs-1.0.0/k_cli/demo/demo_runner.py +579 -0
  30. k_cli_for_devs-1.0.0/k_cli/git/__init__.py +0 -0
  31. k_cli_for_devs-1.0.0/k_cli/git/ai_bisect.py +208 -0
  32. k_cli_for_devs-1.0.0/k_cli/git/conflict_resolver.py +1039 -0
  33. k_cli_for_devs-1.0.0/k_cli/git/git_guard.py +417 -0
  34. k_cli_for_devs-1.0.0/k_cli/git/patcher.py +1175 -0
  35. k_cli_for_devs-1.0.0/k_cli/git/repo_map.py +1780 -0
  36. k_cli_for_devs-1.0.0/k_cli/git/smart_git.py +928 -0
  37. k_cli_for_devs-1.0.0/k_cli/git/verifier.py +969 -0
  38. k_cli_for_devs-1.0.0/k_cli/github/__init__.py +0 -0
  39. k_cli_for_devs-1.0.0/k_cli/github/dedup_engine.py +787 -0
  40. k_cli_for_devs-1.0.0/k_cli/github/github_client.py +1702 -0
  41. k_cli_for_devs-1.0.0/k_cli/github/github_engine.py +641 -0
  42. k_cli_for_devs-1.0.0/k_cli/github/local_hub.py +209 -0
  43. k_cli_for_devs-1.0.0/k_cli/github/pr_watcher.py +129 -0
  44. k_cli_for_devs-1.0.0/k_cli/github/trending.py +205 -0
  45. k_cli_for_devs-1.0.0/k_cli/tools/__init__.py +0 -0
  46. k_cli_for_devs-1.0.0/k_cli/tools/audit.py +79 -0
  47. k_cli_for_devs-1.0.0/k_cli/tools/chaos_immunity.py +377 -0
  48. k_cli_for_devs-1.0.0/k_cli/tools/codebase_qa.py +106 -0
  49. k_cli_for_devs-1.0.0/k_cli/tools/command_runner.py +256 -0
  50. k_cli_for_devs-1.0.0/k_cli/tools/diagram_generator.py +547 -0
  51. k_cli_for_devs-1.0.0/k_cli/tools/doc_retriever.py +1332 -0
  52. k_cli_for_devs-1.0.0/k_cli/tools/feature.py +105 -0
  53. k_cli_for_devs-1.0.0/k_cli/tools/ghost_daemon.py +122 -0
  54. k_cli_for_devs-1.0.0/k_cli/tools/incident_triage.py +1365 -0
  55. k_cli_for_devs-1.0.0/k_cli/tools/mcp_client.py +1846 -0
  56. k_cli_for_devs-1.0.0/k_cli/tools/repo_gardener.py +142 -0
  57. k_cli_for_devs-1.0.0/k_cli/tools/rules.py +109 -0
  58. k_cli_for_devs-1.0.0/k_cli/tools/security.py +52 -0
  59. k_cli_for_devs-1.0.0/k_cli/tools/security_healer.py +999 -0
  60. k_cli_for_devs-1.0.0/k_cli/tools/synapse_graph.py +155 -0
  61. k_cli_for_devs-1.0.0/k_cli/tui/__init__.py +0 -0
  62. k_cli_for_devs-1.0.0/k_cli/tui/diff_viewer.py +223 -0
  63. k_cli_for_devs-1.0.0/k_cli/tui/tui.py +1145 -0
  64. k_cli_for_devs-1.0.0/k_cli/tui/tui_animations.py +648 -0
  65. k_cli_for_devs-1.0.0/k_cli/tui/tui_app.py +2788 -0
  66. k_cli_for_devs-1.0.0/k_cli/ui/__init__.py +10 -0
  67. k_cli_for_devs-1.0.0/k_cli/ui/simple_repl.py +315 -0
  68. k_cli_for_devs-1.0.0/k_cli/web/__init__.py +7 -0
  69. k_cli_for_devs-1.0.0/k_cli/web/server.py +624 -0
  70. k_cli_for_devs-1.0.0/k_cli/web/static/app.js +830 -0
  71. k_cli_for_devs-1.0.0/k_cli/web/static/index.html +495 -0
  72. k_cli_for_devs-1.0.0/k_cli/web/static/monitor.html +189 -0
  73. k_cli_for_devs-1.0.0/k_cli/web/static/style.css +838 -0
  74. k_cli_for_devs-1.0.0/k_cli_for_devs.egg-info/PKG-INFO +461 -0
  75. k_cli_for_devs-1.0.0/k_cli_for_devs.egg-info/SOURCES.txt +133 -0
  76. k_cli_for_devs-1.0.0/k_cli_for_devs.egg-info/dependency_links.txt +1 -0
  77. k_cli_for_devs-1.0.0/k_cli_for_devs.egg-info/entry_points.txt +2 -0
  78. k_cli_for_devs-1.0.0/k_cli_for_devs.egg-info/requires.txt +13 -0
  79. k_cli_for_devs-1.0.0/k_cli_for_devs.egg-info/top_level.txt +1 -0
  80. k_cli_for_devs-1.0.0/pyproject.toml +63 -0
  81. k_cli_for_devs-1.0.0/setup.cfg +4 -0
  82. k_cli_for_devs-1.0.0/tests/test_adaptive_smart_router.py +90 -0
  83. k_cli_for_devs-1.0.0/tests/test_adversarial_knowledge.py +743 -0
  84. k_cli_for_devs-1.0.0/tests/test_adversarial_m6_patcher_git_session.py +869 -0
  85. k_cli_for_devs-1.0.0/tests/test_challenger_m1_driver_and_mock.py +391 -0
  86. k_cli_for_devs-1.0.0/tests/test_challenger_m1_streaming.py +604 -0
  87. k_cli_for_devs-1.0.0/tests/test_chaos_immunity.py +71 -0
  88. k_cli_for_devs-1.0.0/tests/test_cli.py +372 -0
  89. k_cli_for_devs-1.0.0/tests/test_cli_fuzzer_traversal.py +143 -0
  90. k_cli_for_devs-1.0.0/tests/test_cli_github_conflict_mcp.py +505 -0
  91. k_cli_for_devs-1.0.0/tests/test_codex_hub.py +183 -0
  92. k_cli_for_devs-1.0.0/tests/test_command_runner.py +57 -0
  93. k_cli_for_devs-1.0.0/tests/test_conflict_resolver.py +502 -0
  94. k_cli_for_devs-1.0.0/tests/test_credentials.py +44 -0
  95. k_cli_for_devs-1.0.0/tests/test_dedup_engine.py +269 -0
  96. k_cli_for_devs-1.0.0/tests/test_devdocs_expansion.py +218 -0
  97. k_cli_for_devs-1.0.0/tests/test_diagram_generator.py +342 -0
  98. k_cli_for_devs-1.0.0/tests/test_doc_retriever.py +735 -0
  99. k_cli_for_devs-1.0.0/tests/test_dynamic_discovery_and_audit.py +167 -0
  100. k_cli_for_devs-1.0.0/tests/test_e2e_suite.py +1504 -0
  101. k_cli_for_devs-1.0.0/tests/test_git_guard.py +330 -0
  102. k_cli_for_devs-1.0.0/tests/test_github_client.py +751 -0
  103. k_cli_for_devs-1.0.0/tests/test_github_engine.py +176 -0
  104. k_cli_for_devs-1.0.0/tests/test_hackathon_bedrock_and_daemon.py +51 -0
  105. k_cli_for_devs-1.0.0/tests/test_incident_triage.py +533 -0
  106. k_cli_for_devs-1.0.0/tests/test_intent_sensor.py +78 -0
  107. k_cli_for_devs-1.0.0/tests/test_k_cli_full_e2e.py +908 -0
  108. k_cli_for_devs-1.0.0/tests/test_killer_features.py +160 -0
  109. k_cli_for_devs-1.0.0/tests/test_llm_driver.py +95 -0
  110. k_cli_for_devs-1.0.0/tests/test_local_hub.py +125 -0
  111. k_cli_for_devs-1.0.0/tests/test_mcp_client.py +1111 -0
  112. k_cli_for_devs-1.0.0/tests/test_model_manager.py +315 -0
  113. k_cli_for_devs-1.0.0/tests/test_models_hub.py +129 -0
  114. k_cli_for_devs-1.0.0/tests/test_multi_provider_llm_driver.py +490 -0
  115. k_cli_for_devs-1.0.0/tests/test_orchestrator.py +153 -0
  116. k_cli_for_devs-1.0.0/tests/test_patcher.py +589 -0
  117. k_cli_for_devs-1.0.0/tests/test_persona_system.py +395 -0
  118. k_cli_for_devs-1.0.0/tests/test_repo_map.py +798 -0
  119. k_cli_for_devs-1.0.0/tests/test_rules.py +30 -0
  120. k_cli_for_devs-1.0.0/tests/test_sdk.py +92 -0
  121. k_cli_for_devs-1.0.0/tests/test_security_healer.py +264 -0
  122. k_cli_for_devs-1.0.0/tests/test_session.py +341 -0
  123. k_cli_for_devs-1.0.0/tests/test_simple_ui_and_rules.py +56 -0
  124. k_cli_for_devs-1.0.0/tests/test_smart_git.py +282 -0
  125. k_cli_for_devs-1.0.0/tests/test_storage_manager.py +67 -0
  126. k_cli_for_devs-1.0.0/tests/test_strands_agent.py +144 -0
  127. k_cli_for_devs-1.0.0/tests/test_subagents.py +517 -0
  128. k_cli_for_devs-1.0.0/tests/test_tui.py +330 -0
  129. k_cli_for_devs-1.0.0/tests/test_tui_animations.py +352 -0
  130. k_cli_for_devs-1.0.0/tests/test_tui_app.py +90 -0
  131. k_cli_for_devs-1.0.0/tests/test_tui_app_screens.py +69 -0
  132. k_cli_for_devs-1.0.0/tests/test_tui_pilot.py +48 -0
  133. k_cli_for_devs-1.0.0/tests/test_verifier.py +341 -0
  134. k_cli_for_devs-1.0.0/tests/test_viewport_engine.py +45 -0
  135. k_cli_for_devs-1.0.0/tests/test_web_ui.py +158 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 K-CLI contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,3 @@
1
+ include README.md
2
+ include LICENSE
3
+ recursive-include k_cli/web/static *
@@ -0,0 +1,461 @@
1
+ Metadata-Version: 2.4
2
+ Name: k-cli-for-devs
3
+ Version: 1.0.0
4
+ Summary: K-CLI for Devs: Autonomous Self-Healing DevOps & Engineering Agent built with AWS Strands Agents SDK
5
+ License: MIT License
6
+
7
+ Copyright (c) 2026 K-CLI contributors
8
+
9
+ Permission is hereby granted, free of charge, to any person obtaining a copy
10
+ of this software and associated documentation files (the "Software"), to deal
11
+ in the Software without restriction, including without limitation the rights
12
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13
+ copies of the Software, and to permit persons to whom the Software is
14
+ furnished to do so, subject to the following conditions:
15
+
16
+ The above copyright notice and this permission notice shall be included in all
17
+ copies or substantial portions of the Software.
18
+
19
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25
+ SOFTWARE.
26
+
27
+ Project-URL: Homepage, https://github.com/krishivjoshi219-collab/K-Cli-for-Devs
28
+ Project-URL: Repository, https://github.com/krishivjoshi219-collab/K-Cli-for-Devs
29
+ Project-URL: Issues, https://github.com/krishivjoshi219-collab/K-Cli-for-Devs/issues
30
+ Keywords: ai,strands-agents,aws-bedrock,devops,agentic,tui,incident-triage,ast-verification
31
+ Classifier: Development Status :: 4 - Beta
32
+ Classifier: Environment :: Console
33
+ Classifier: Intended Audience :: Developers
34
+ Classifier: License :: OSI Approved :: MIT License
35
+ Classifier: Programming Language :: Python :: 3.11
36
+ Classifier: Programming Language :: Python :: 3.12
37
+ Classifier: Topic :: Software Development :: Build Tools
38
+ Classifier: Topic :: Terminals
39
+ Requires-Python: >=3.11
40
+ Description-Content-Type: text/markdown
41
+ License-File: LICENSE
42
+ Requires-Dist: strands-agents>=1.0.0
43
+ Requires-Dist: boto3>=1.29.0
44
+ Requires-Dist: typer>=0.9.0
45
+ Requires-Dist: rich>=13.0.0
46
+ Requires-Dist: psutil>=5.9.0
47
+ Requires-Dist: requests>=2.28.0
48
+ Requires-Dist: httpx>=0.24.0
49
+ Requires-Dist: pytest>=8.0.0
50
+ Requires-Dist: prompt-toolkit>=3.0.0
51
+ Requires-Dist: textual>=0.80.0
52
+ Requires-Dist: ollama>=0.4.0
53
+ Requires-Dist: fastapi>=0.100.0
54
+ Requires-Dist: uvicorn>=0.20.0
55
+ Dynamic: license-file
56
+
57
+ # โšก K-CLI for Devs: Verification-First Autonomous AI DevOps Workstation
58
+
59
+ ### Engineered by **Krishiv Joshi** ([@krishivjoshi219-collab](https://github.com/krishivjoshi219-collab)) | AWS Builder ID: `krishivjoshi219-collab`
60
+ ### Built for the [AWS *Agents for Humans* Hackathon](https://agentsforhumans.devpost.com/) โ€” *Professional Agents Track* ($40,000 Prize Pool)
61
+
62
+ ---
63
+
64
+ [![MIT License](https://img.shields.io/badge/License-MIT-blue.svg?style=flat-square)](LICENSE)
65
+ [![Python 3.11+](https://img.shields.io/badge/Python-3.11%20%7C%203.12-brightgreen.svg?style=flat-square)](https://python.org)
66
+ [![AWS Strands Agents](https://img.shields.io/badge/AWS-Strands%20Agents%20SDK-orange.svg?style=flat-square)](https://strandsagents.com)
67
+ [![Amazon Bedrock Ready](https://img.shields.io/badge/Amazon-Bedrock%20AgentCore-purple.svg?style=flat-square)](https://aws.amazon.com/bedrock/)
68
+ [![Tests Passing](https://img.shields.io/badge/Tests-100%25%20Passing-success.svg?style=flat-square)](tests/)
69
+ [![Architecture](https://img.shields.io/badge/Architecture-Verification--First%20AST-blueviolet.svg?style=flat-square)](#-zero-trust-ast-compiler-verification-guardrails)
70
+ [![Offline Ready](https://img.shields.io/badge/Air--Gapped-100%25%20Offline%20Ready-teal.svg?style=flat-square)](#-sovereign-air-gapped-offline-engine)
71
+
72
+ > **K-CLI is the next-generation autonomous developer workstation that unites 3 unified UI tiers, zero-latency intent sensing, compiler-grounded AST verification, Google Antigravity-grade local shell execution, and AWS Bedrock AgentCore into a sovereign, production-grade CLI.**
73
+
74
+ ---
75
+
76
+ ## ๐Ÿ“‘ Table of Contents
77
+
78
+ - [๐ŸŽฏ What K-CLI Is, Who It's For, and Why It Matters](#-what-k-cli-is-who-its-for-and-why-it-matters)
79
+ - [โš”๏ธ Production-Grade Comparison: K-CLI vs. Aider vs. Claude Code vs. OpenCode](#๏ธ-production-grade-comparison-k-cli-vs-aider-vs-claude-code-vs-opencode)
80
+ - [โšก Key Architectural Innovations](#-key-architectural-innovations)
81
+ - [1. Google Antigravity-Grade Local Shell Execution Engine](#1-google-antigravity-grade-local-shell-execution-engine)
82
+ - [2. AWS Strands Agents SDK & Amazon Bedrock AgentCore](#2-aws-strands-agents-sdk--amazon-bedrock-agentcore)
83
+ - [3. Zero-Trust AST Compiler Verification Guardrails](#3-zero-trust-ast-compiler-verification-guardrails)
84
+ - [4. Sub-Millisecond Adaptive Intent Sensor & Smart Router](#4-sub-millisecond-adaptive-intent-sensor--smart-router)
85
+ - [5. Sovereign Air-Gapped Offline Engine](#5-sovereign-air-gapped-offline-engine)
86
+ - [๐Ÿ–ฅ๏ธ 3 Unified Interface Tiers](#๏ธ-3-unified-interface-tiers)
87
+ - [๐Ÿ›ก๏ธ The 4 Autonomous Superpowers](#๏ธ-the-4-autonomous-superpowers)
88
+ - [๐ŸŒŸ The 13 Production-Grade Killer Features](#-the-13-production-grade-killer-features)
89
+ - [๐Ÿ›๏ธ System Architecture Diagram](#๏ธ-system-architecture-diagram)
90
+ - [๐Ÿ“ฆ Installation & Quickstart](#-installation--quickstart)
91
+ - [๐Ÿ’ป Comprehensive CLI Command Catalog](#-comprehensive-cli-command-catalog)
92
+ - [โ˜๏ธ Amazon Bedrock AgentCore Export & Cloud Deployment](#๏ธ-amazon-bedrock-agentcore-export--cloud-deployment)
93
+ - [๐Ÿงช Test Suite & Reliability Scorecard](#-test-suite--reliability-scorecard)
94
+ - [๐ŸŽฌ 5-Minute Championship Demo Video](#-5-minute-championship-demo-video)
95
+ - [๐Ÿ“„ License & Authorship](#-license--authorship)
96
+
97
+ ---
98
+
99
+ ## ๐ŸŽฏ What K-CLI Is, Who It's For, and Why It Matters
100
+
101
+ ### 1. What K-CLI Is
102
+ K-CLI is **not** another conversational wrapper or prompt forwarding tool. It is a **production-grade, sovereign autonomous AI developer workstation** engineered from first principles for professional software engineers, DevOps teams, and site reliability engineers.
103
+
104
+ While conventional coding assistants require developers to constantly copy-paste snippets, manually execute tests, and repair hallucinated syntax, K-CLI acts as an **autonomous background engineer**. It natively unites:
105
+ * **A 5-Persona Agentic State Machine**: Dispatches coordinated sub-agents (Researcher, Architect, Coder, Critic, Verifier) to analyze, implement, and audit tasks.
106
+ * **Closed-Loop AST Compiler Verification**: Every code synthesis undergoes Abstract Syntax Tree parsing (`ast.parse`), compiler execution (`py_compile`, `g++`, `cargo check`), and isolated sandbox `pytest` runs before any diff is ever staged.
107
+ * **Google Antigravity-Grade Local Shell Runner**: Natively executes shell and terminal commands on the host machine with automated virtualenv binary resolution and timeout enforcement.
108
+ * **AWS Strands SDK and Amazon Bedrock AgentCore Integration**: Powered by multi-step agent loops with frontier cloud LLMs (Claude 3.5 Sonnet, Amazon Nova Pro) and 1-click cloud deployment.
109
+ * **3 Unified Ergonomic Tiers**: Full-screen 60fps Textual TUI (`k-cli ui`), reactive 1080p Web Station (`k-cli web-ui`), and ultra-fast terminal REPL (`k-cli chat`).
110
+
111
+ ---
112
+
113
+ ### 2. Who It's For (Target Personas and Real-World Use Cases)
114
+
115
+ K-CLI is purpose-built for the **Professional Agents Track** of the AWS Hackathon, serving technical professionals who cannot afford hallucinations or broken builds:
116
+
117
+ | Developer Persona | Core Daily Friction | How K-CLI Solves It End-to-End |
118
+ |:---|:---|:---|
119
+ | **Backend and Systems Engineers** | Cryptic asynchronous deadlocks, type regressions, and breaking changes during large refactors. | K-CLI's Synapse AST code graph compresses repository context into minimal subgraphs, while its closed-loop compiler verifier guarantees that generated refactors pass type checks and unit tests before committing. |
120
+ | **DevOps and Site Reliability Engineers (SREs)** | 300-line multi-runtime stack traces, broken CI/CD pipelines, and midnight production crash triage. | `k-cli auto-heal` ingests raw logs across 7 runtimes (Python, Node, Rust, Go, C++, Docker, GitHub Actions), pinpoints culprit line and AST parent node, and synthesizes a verified surgical patch. |
121
+ | **Open-Source Maintainers and Tech Leads** | PR review backlog, regression hunting across dozens of commits, and git merge hell. | `k-cli watch` runs as an autonomous background daemon that reviews PRs and auto-merges clean diffs, `k-cli bisect` automates binary regression hunting, and `k-cli conflict` semantically resolves 3-way git conflicts. |
122
+ | **Security Engineers and Code Auditors** | Leaked cloud keys, SQL injections, ReDoS regexes, and vulnerable subprocess calls. | `k-cli security scan` audits the entire repository in under 3 seconds using AST pattern matching, and applies 1-click surgical auto-healing using environment variables and parameterized statements. |
123
+ | **Air-Gapped and Enterprise Developers** | Strict data governance policies prohibiting code transmission to third-party cloud LLMs. | `k-cli airgap` operates with zero external network connectivity, running local Bankai SLMs (7B/14B) and an embedded offline DevDocs SQLite database with zero telemetry and zero data leakage. |
124
+
125
+ ---
126
+
127
+ ### 3. Why It Matters: The Verification-First Paradigm Shift
128
+ Current industry coding assistants follow a **Generation-First, Human-Debugs** paradigm:
129
+ 1. User prompts the model.
130
+ 2. Model generates code based on probabilistic token prediction.
131
+ 3. Developer is forced to manually test, run compilers, catch hallucinations, and fix syntax errors.
132
+
133
+ K-CLI reverses this with the **Verification-First** paradigm:
134
+ 1. User provides a goal or an incident stack trace occurs.
135
+ 2. The agent synthesizes an implementation candidate.
136
+ 3. The candidate is compiled in an isolated sandbox (`py_compile`, `g++`, `cargo`).
137
+ 4. Automated unit tests (`pytest`) verify behavioral correctness.
138
+ 5. If errors occur, the compiler diagnostics are fed back into the agent for automated self-healing (up to 3 iterations).
139
+ 6. **Only 100% verified, compilable, and tested code is presented to the developer.**
140
+
141
+ ---
142
+
143
+ ## โš”๏ธ Production-Grade Comparison: K-CLI vs. Aider vs. Claude Code vs. OpenCode
144
+
145
+ How does K-CLI compare against leading CLI developer assistants like **Aider**, **Claude Code**, and **OpenCode / Copilot Workspace**?
146
+
147
+ | Capability / Architecture | K-CLI for Devs (Ours) | Aider | Claude Code | OpenCode / Copilot |
148
+ |:---|:---:|:---:|:---:|:---:|
149
+ | **Local Host Shell Execution** | โœ… **Full Engine** (`k-cli exec`, Strands tool, Web UI) | โš ๏ธ Partial (`/run` only) | โœ… Yes (Built-in bash) | โŒ No (Cloud-only sandbox) |
150
+ | **Closed-Loop Compiler AST Verification** | โœ… **Built-in Ground Truth** (`py_compile`, `ast`) | โŒ No (Relies on git undo) | โŒ No (Human must verify) | โŒ No (Human must verify) |
151
+ | **Autonomous 3-Way Git Conflict Resolver** | โœ… **AST Semantic Resolver** | โŒ No (Manual text edits) | โŒ No (Standard LLM diff) | โŒ No (Manual web UI) |
152
+ | **Multi-Language Crash Triage and Auto-Heal** | โœ… **Built-in (7 Runtimes)** | โŒ No (Chat prompt only) | โš ๏ธ Partial (Single prompt) | โŒ No (Static suggestions) |
153
+ | **Autonomous Chaos Immunity Engine** | โœ… **AST Inoculation and Edge-Case Probing** | โŒ None | โŒ None | โŒ None |
154
+ | **AWS Strands Agents SDK Integration** | โœ… **Native Multi-Step Agent Core** | โŒ None | โŒ No (Proprietary Anthropic) | โŒ No (Proprietary Azure) |
155
+ | **Amazon Bedrock AgentCore OpenAPI 3.0 Export**| โœ… **1-Click SAM Template Export** | โŒ None | โŒ None | โŒ None |
156
+ | **Sub-Millisecond Intent Sensing** | โœ… **Heuristic Sensor (under 0.1ms)** | โŒ None | โŒ None | โŒ None |
157
+ | **3 Unified Interfaces (TUI, Web UI, REPL)**| โœ… **Textual TUI + 1080p Web + Terminal** | โš ๏ธ No (Terminal CLI only) | โš ๏ธ No (Terminal CLI only) | โš ๏ธ No (Web / IDE only) |
158
+ | **100% Air-Gapped Sovereign Offline Mode** | โœ… **Local SLMs (Bankai) + Offline DevDocs** | โš ๏ธ Partial (Ollama, no offline docs) | โŒ No (Cloud only) | โŒ No (Cloud only) |
159
+ | **Multi-Model Adversarial Consensus** | โœ… **Red Team / Blue Team Swarms** | โŒ No (Single model) | โŒ No (Single model) | โŒ No (Single model) |
160
+ | **Background Auto-Healing Daemon** | โœ… **Autonomous Watcher (`k-cli daemon`)** | โŒ No (Interactive only) | โŒ No (Interactive only) | โŒ No (Cloud webhooks only) |
161
+
162
+ ---
163
+
164
+ ## โšก Key Architectural Innovations
165
+
166
+ ### 1. Google Antigravity-Grade Local Shell Execution Engine
167
+ Inspired by state-of-the-art agentic runtime environments like Google Antigravity, K-CLI provides a native, non-blocking local machine execution engine (`LocalCommandExecutor` in [`k_cli/tools/command_runner.py`](k_cli/tools/command_runner.py)):
168
+ * **Host Execution Across All Tiers**: Available directly via terminal (`k-cli exec "<cmd>"`), via the Web UI interactive command runner bar, and as a first-class tool for autonomous agents.
169
+ * **Autonomous Strands Agent Tool**: Exposed via `@tool def execute_command(command: str, cwd: str, timeout_seconds: int)` so the autonomous agent can run tests, check linters, inspect processes, and compile binaries in real time.
170
+ * **Subprocess Isolation & Environment Auto-Injection**: Injects active virtual environment binaries (`sys.prefix/bin`) into `PATH` and sets `PYTHONPATH` dynamically, ensuring commands like `pytest`, `ruff`, and `git` run flawlessly.
171
+
172
+ ### 2. AWS Strands Agents SDK & Amazon Bedrock AgentCore
173
+ K-CLI is architected natively around the AWS agentic ecosystem:
174
+ * **Strands Autonomous Loop**: Utilizes `@tool` decorated deterministic Python functions registered to `StrandsDevAgent` (`triage_and_heal_incident`, `verify_code_file`, `apply_surgical_patch`, `resolve_git_merge_conflict`, `execute_command`, `inspect_repo_structure`, `search_offline_docs`, `generate_chaos_immunity_patch`).
175
+ * **Amazon Bedrock AgentCore Action Groups**: `k-cli bedrock export` compiles K-CLI's deterministic tools into a compliant OpenAPI 3.0 action group schema and generates an AWS SAM CloudFormation template (`template.yaml`) for serverless cloud deployment.
176
+
177
+ ### 3. Zero-Trust AST Compiler Verification Guardrails
178
+ K-CLI enforces a closed-loop verification pipeline before any file modification is staged:
179
+ 1. **Abstract Syntax Tree (AST) Parsing**: Inspects syntax nodes across Python (`ast.parse`), JavaScript/TypeScript, and Rust.
180
+ 2. **Compiler Ground-Truth Check**: Invokes native compilers (`py_compile`, `g++`, `cargo check`) in an isolated subprocess.
181
+ 3. **Sandbox Regression Testing**: Runs targeted `pytest` runs to guarantee zero regression before presenting diffs.
182
+ 4. **Self-Healing Retry Loop**: If compilation or tests fail, the compiler error is fed back into the agent to synthesize an updated patch (up to 3 automated iterations).
183
+
184
+ ### 4. Sub-Millisecond Adaptive Intent Sensor & Smart Router
185
+ K-CLI includes a heuristic **intent sensor (under 0.1ms execution latency)** that evaluates user prompts and dynamically selects the optimal execution path and model:
186
+
187
+ | Sensed Intent | Trigger Patterns | Autonomous Strategy | Recommended Model Routing |
188
+ |:---|:---|:---|:---|
189
+ | **`CHAT`** | Greetings, questions, concept explanation | Direct fast stream (under 200ms) | Gemini 2.0 Flash / Claude 3.5 Haiku / Groq Llama 3.3 |
190
+ | **`PLAN`** | "Design", "architecture", "milestones" | Structured Milestone Blueprint | Claude 3.5 Sonnet / Gemini 2.5 Pro / Amazon Nova Pro |
191
+ | **`BUILD`** | "Create function", "refactor", "implement" | Closed-loop AST verification | Bankai-14B / Claude 3.5 Sonnet / Bedrock Titan |
192
+ | **`TRIAGE`** | Stack traces, `ZeroDivisionError`, CI crash | Strands Agent surgical auto-heal | Premier diagnostic model with AST localizer |
193
+ | **`IMMUNITY`** | "Edge cases", "probe nulls", "audit brittle" | Adversarial pytest synthesis | Chaos Inoculation Engine |
194
+
195
+ ### 5. Sovereign Air-Gapped Offline Engine
196
+ For security-sensitive, defense, or offline flight environments, K-CLI operates with **zero external internet connectivity**:
197
+ * Bundles local SLMs via Ollama / GGUF (`bankai-7b`, `bankai-14b`).
198
+ * Includes an embedded SQLite full-text documentation database (DevDocs offline index) covering Python, FastAPI, Docker, Git, and Rust.
199
+ * Transmits **zero telemetry, zero metrics, and zero data leakage**.
200
+
201
+ ---
202
+
203
+ ## ๐Ÿ–ฅ๏ธ 3 Unified Interface Tiers
204
+
205
+ K-CLI provides 3 purpose-built interfaces tailored to developer workflows:
206
+
207
+ ```
208
+ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
209
+ โ”‚ K-CLI WORKSTATION MATRIX โ”‚
210
+ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
211
+ โ”‚ Tier 1: Cyber TUI โ”‚ Tier 2: Cyber Station Web โ”‚ Tier 3: Minimal REPL โ”‚
212
+ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
213
+ โ”‚ โ€ข Full-screen Textual โ”‚ โ€ข Modern reactive Web UI โ”‚ โ€ข Ultra-fast terminal โ”‚
214
+ โ”‚ โ€ข 60fps animations โ”‚ โ€ข Real-time token streaming โ”‚ โ€ข Slash commands โ”‚
215
+ โ”‚ โ€ข 5-persona state โ”‚ โ€ข Antigravity command bar โ”‚ โ€ข Low RAM footprint โ”‚
216
+ โ”‚ โ€ข Live telemetry HUD โ”‚ โ€ข AST visual diff viewer โ”‚ โ€ข Scriptable piping โ”‚
217
+ โ”‚ โ€ข `k-cli ui` โ”‚ โ€ข `k-cli web-ui` โ”‚ โ€ข `k-cli chat` โ”‚
218
+ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
219
+ ```
220
+
221
+ ---
222
+
223
+ ## ๐Ÿ›ก๏ธ The 4 Autonomous Superpowers
224
+
225
+ ### 1. Incident Crash Triage Studio (`k-cli auto-heal`)
226
+ * Ingests raw stack traces from Python, Node.js, Rust, Go, C++, Docker, and CI/CD logs.
227
+ * Pinpoints culprit file, culprit line, and AST parent node.
228
+ * Synthesizes a surgical patch, verifies it with `py_compile`, and stages it with a conventional commit message.
229
+
230
+ ### 2. 3-Way Git Merge Conflict Studio (`k-cli conflict`)
231
+ * Scans workspaces for conflicted git markers (`<<<<<<<`, `=======`, `>>>>>>>`).
232
+ * Performs AST semantic analysis of incoming vs. current changes rather than naive text matching.
233
+ * Produces clean, syntactically verified merged outputs without human intervention.
234
+
235
+ ### 3. AST Security Shield (`k-cli security scan`)
236
+ * Scans repositories for hardcoded AWS access keys, GitHub tokens, SQL injection patterns, ReDoS vulnerabilities, and insecure subprocess invocations (`shell=True`).
237
+ * Provides single-click auto-healing that replaces unsafe patterns with parameterized, secure alternatives.
238
+
239
+ ### 4. Chaos Immunity Engine (`k-cli immune`)
240
+ * Systematically probes source files for brittle AST patterns: unchecked dictionary subscripts, unvalidated JSON parsing, missing network timeouts, and unhandled division.
241
+ * Automatically synthesizes adversarial unit tests in `tests/chaos/` to guarantee edge-case inoculation.
242
+
243
+ ---
244
+
245
+ ## ๐ŸŒŸ The 13 Production-Grade Killer Features
246
+
247
+ 1. **`k-cli exec` / `cmd`**: Google Antigravity-style host machine shell command execution with environment auto-injection.
248
+ 2. **`k-cli watch`**: Autonomous PR Review & Watcher Daemon that monitors repos, reviews diffs, and auto-merges clean PRs.
249
+ 3. **`k-cli bisect`**: AI-Powered Git Bisect & Regression Hunter that tests historical commits to isolate root causes.
250
+ 4. **`k-cli route`**: Cost & Latency Smart Model Router dynamically steering prompts across frontier and local models.
251
+ 5. **`k-cli garden`**: Nightly Autonomous Repository Maintenance Sweep optimizing dependencies and removing dead code.
252
+ 6. **`k-cli explain`**: Codebase Semantic Natural Language Search & Q&A answering complex architectural queries.
253
+ 7. **`k-cli ghost`**: Ghost Terminal Autopilot wrapping commands (e.g. `pytest`) to intercept failures and self-heal in real time.
254
+ 8. **`k-cli swarm`**: Adversarial Red Team / Blue Team Multi-Model Consensus generating hyper-robust code.
255
+ 9. **`k-cli synapse`**: AST Neural Code Graph & Context Compressor generating minimal token context subgraphs.
256
+ 10. **`k-cli airgap`**: Sovereign Air-Gapped Offline Engine utilizing local Bankai SLMs and offline DevDocs SQLite.
257
+ 11. **`k-cli scaffold`**: Natural Language Full-Stack Scaffolder building complete microservices and APIs from a single prompt.
258
+ 12. **`k-cli strands`**: AWS Strands Autonomous Developer Agent executing multi-step engineering goals.
259
+ 13. **`k-cli immune`**: Autonomous Chaos Immunity Engine probing brittle AST nodes and synthesizing edge-case tests.
260
+
261
+ ---
262
+
263
+ ## ๐Ÿ›๏ธ System Architecture Diagram
264
+
265
+ ```mermaid
266
+ flowchart TD
267
+ subgraph Ingestion ["๐Ÿ“ฅ Incident & Multi-Interface Ingestion Layer"]
268
+ TUI["๐Ÿ–ฅ๏ธ Tier 1: Cyberstation TUI (`k-cli ui`)"]
269
+ WEB["๐ŸŒ Tier 2: Cyber Station Web (`k-cli web-ui`)"]
270
+ REPL["โŒจ๏ธ Tier 3: Streamlined REPL (`k-cli chat`)"]
271
+ EXEC["โšก Host Shell Runner (`k-cli exec`)"]
272
+ DAEMON["๐Ÿ”„ Background Healer Daemon (`k-cli daemon`)"]
273
+ end
274
+
275
+ subgraph AWSStrands ["๐Ÿง  AWS Strands Agent & Amazon Bedrock"]
276
+ Agent["StrandsDevAgent\n(`from strands import Agent, tool`)"]
277
+ Bedrock["Amazon Bedrock & Frontier Models\nโ€ข Amazon Nova Pro\nโ€ข Google Gemini 2.5 Flash\nโ€ข Sovereign Bankai SLMs"]
278
+ AgentCore["Amazon Bedrock AgentCore\n(OpenAPI 3.0 Action Groups & SAM)"]
279
+ Agent <--> Bedrock
280
+ Agent <--> AgentCore
281
+ end
282
+
283
+ subgraph Tools ["๐Ÿ› ๏ธ Registered Deterministic Agent Tools (@tool)"]
284
+ T1["๐Ÿ” triage_and_heal_incident"]
285
+ T2["๐Ÿ›ก๏ธ verify_code_file"]
286
+ T3["๐Ÿฉน apply_surgical_patch"]
287
+ T4["โš”๏ธ resolve_git_merge_conflict"]
288
+ T5["โšก execute_command (Local Runner)"]
289
+ T6["๐Ÿ—บ๏ธ inspect_repo_structure"]
290
+ T7["๐Ÿ“š search_offline_docs"]
291
+ T8["๐Ÿ›ก๏ธ generate_chaos_immunity_patch"]
292
+ end
293
+
294
+ subgraph Guardrails ["๐Ÿ” Closed-Loop AST Verification Guardrail"]
295
+ AST["AST Syntax Tree Validator"]
296
+ Compiler["Local Compilers (py_compile, g++, cargo)"]
297
+ Pytest["Isolated Sandbox Pytest Execution"]
298
+ Gate{"Verification Passed?"}
299
+ Retry["Auto-Repair Retry Loop (Max 3 Attempts)"]
300
+ end
301
+
302
+ subgraph Delivery ["๐Ÿš€ Verified Production Delivery"]
303
+ Patch["โœ” Staged Surgical Patch"]
304
+ Commit["โœ” AST Conventional Commit"]
305
+ Output["โœ” Real-time UI Telemetry & Logs"]
306
+ end
307
+
308
+ Ingestion --> Agent
309
+ Agent --> Tools
310
+ Tools --> Guardrails
311
+ AST --> Compiler --> Pytest --> Gate
312
+ Gate -- "Failed" --> Retry --> Tools
313
+ Gate -- "Passed" --> Delivery
314
+ ```
315
+
316
+ ---
317
+
318
+ ## ๐Ÿ“ฆ Installation & Quickstart
319
+
320
+ ### 1. Prerequisites
321
+ * **Python 3.11** or **Python 3.12**
322
+ * **Git** installed on host machine
323
+ * (Optional) **AWS Credentials** configured for Amazon Bedrock / Strands Agents
324
+
325
+ ### 2. Clone and Install
326
+ ```bash
327
+ # Clone repository
328
+ git clone https://github.com/krishivjoshi219-collab/K-Cli-for-Devs.git
329
+ cd K-Cli-for-Devs
330
+
331
+ # Create and activate a clean virtual environment
332
+ python3 -m venv k_cli_env
333
+ source k_cli_env/bin/activate
334
+
335
+ # Install K-CLI dependencies and package
336
+ pip install -r requirements.txt
337
+ pip install -e .
338
+ ```
339
+
340
+ ### 3. Universal 1-Click Credential Vault Setup
341
+ Launch K-CLI's interactive onboarding wizard to configure API keys (AWS Bedrock, Anthropic, Gemini, OpenAI, Groq) or work 100% offline:
342
+ ```bash
343
+ k-cli codex
344
+ ```
345
+ Or export your environment variables directly:
346
+ ```bash
347
+ export AWS_ACCESS_KEY_ID="your-key"
348
+ export AWS_SECRET_ACCESS_KEY="your-secret"
349
+ export AWS_REGION="us-east-1"
350
+ ```
351
+
352
+ ### 4. Verify System Health
353
+ Run `doctor` to check runtime dependencies, model connectivity, and workspace health:
354
+ ```bash
355
+ k-cli doctor
356
+ ```
357
+
358
+ ---
359
+
360
+ ## ๐Ÿ’ป Comprehensive CLI Command Catalog
361
+
362
+ | Category | Command | Description |
363
+ |:---|:---|:---|
364
+ | **Local Execution** | `k-cli exec "<cmd>"` | Execute any shell command on host (Google Antigravity style) |
365
+ | | `k-cli cmd "<cmd>"` | Alias for `k-cli exec` |
366
+ | **Interfaces** | `k-cli ui` | Launch Tier 1 Full-Screen Cyberstation TUI (Textual) |
367
+ | | `k-cli web-ui` | Launch Tier 2 Cyber Station Web Dashboard server |
368
+ | | `k-cli chat` | Launch Tier 3 Streamlined Terminal AI Chat REPL |
369
+ | | `k-cli demo-ui` | Launch TUI in pure offline Zero-AI Demo Mode |
370
+ | **Autonomous Agents**| `k-cli strands "<prompt>"` | Run AWS Strands Autonomous Agent to achieve multi-step goals |
371
+ | | `k-cli auto-heal <log>` | Triage stack trace log and synthesize compiler-verified patch |
372
+ | | `k-cli immune <file>` | Proactive chaos edge-case audit and inoculation |
373
+ | | `k-cli daemon` | Launch background daemon monitoring repo and healing errors |
374
+ | **Git & Workflows** | `k-cli conflict list` | Scan and resolve 3-way Git merge conflicts via AST |
375
+ | | `k-cli bisect "<cmd>"` | Automated AI Git bisect to hunt regressions |
376
+ | | `k-cli watch` | Autonomous PR review and watcher daemon |
377
+ | | `k-cli commit` | Generate AST-grounded conventional git commit |
378
+ | | `k-cli diff` | View side-by-side or uncommitted git diffs |
379
+ | **Security & Audits**| `k-cli security scan` | AST Security Shield scan for secrets and injection flaws |
380
+ | | `k-cli audit` | Multi-model consensus review with 5+ models in parallel |
381
+ | | `k-cli swarm "<task>"` | Adversarial Red Team / Blue Team consensus generation |
382
+ | **Architecture** | `k-cli map` | Display AST codebase architecture map |
383
+ | | `k-cli synapse "<q>"` | Neural code graph context compressor |
384
+ | | `k-cli scaffold "<spec>"`| Natural language full-stack application scaffolder |
385
+ | **Docs & Knowledge** | `k-cli doc <symbol>` | Search offline DevDocs SQLite database |
386
+ | | `k-cli devdocs` | Download and index offline documentation suites |
387
+ | **Cloud & Bedrock** | `k-cli bedrock export` | Export Bedrock AgentCore OpenAPI 3.0 & SAM bundle |
388
+ | | `k-cli bedrock deploy` | 1-Click deploy to Amazon Bedrock AgentCore |
389
+ | **Vault & Status** | `k-cli status` | Inspect RAM budget, model status, and git branch |
390
+ | | `k-cli keys` | Interactive API credentials vault |
391
+ | | `k-cli codex` | Interactive onboarding and configuration wizard |
392
+
393
+ ---
394
+
395
+ ## โ˜๏ธ Amazon Bedrock AgentCore Export & Cloud Deployment
396
+
397
+ Deploying K-CLI to **Amazon Bedrock AgentCore** bridges local developer workstations with enterprise cloud infrastructure:
398
+
399
+ ### Exporting Action Groups
400
+ ```bash
401
+ k-cli bedrock export --out-dir bedrock_deployment/
402
+ ```
403
+ Generates:
404
+ 1. `openapi_schema.json`: Complete OpenAPI 3.0 specification defining action groups for `ExecuteCommand`, `VerifyCode`, `ApplyPatch`, `TriageIncident`, `ResolveConflict`, and `ChaosImmunity`.
405
+ 2. `template.yaml`: AWS SAM (Serverless Application Model) CloudFormation template creating AWS Lambda integration, IAM execution roles, and Bedrock Agent configurations.
406
+ 3. `lambda_handler.py`: Production Lambda bridge mapping Bedrock action group invocations to K-CLI deterministic engines.
407
+
408
+ ### 1-Click Bedrock Deployment
409
+ ```bash
410
+ k-cli bedrock deploy
411
+ ```
412
+
413
+ ---
414
+
415
+ ## ๐Ÿงช Test Suite & Reliability Scorecard
416
+
417
+ K-CLI is backed by an extensive, battle-tested automated test suite:
418
+
419
+ ```bash
420
+ # Run the complete test suite
421
+ pytest tests/ -v
422
+ ```
423
+
424
+ ### Verified Test Categories:
425
+ * **AWS Strands Agent Suite** ([`tests/test_strands_agent.py`](tests/test_strands_agent.py)): **`15/15 Passed`** โ€” Verifies agent initialization, deterministic tools count, and fallback loops.
426
+ * **CLI Fuzzer Traversal Suite** ([`tests/test_cli_fuzzer_traversal.py`](tests/test_cli_fuzzer_traversal.py)): **`42/42 Passed`** โ€” Traverses every command and sub-command with boundary inputs to ensure zero unhandled tracebacks.
427
+ * **Google Antigravity Command Runner** ([`tests/test_command_runner.py`](tests/test_command_runner.py)): **`6/6 Passed`** โ€” Tests synchronous/asynchronous execution, working directory overrides, and timeout enforcement.
428
+ * **TUI & Pilot Automation** ([`tests/test_tui_pilot.py`](tests/test_tui_pilot.py)): **`Passed`** โ€” Headless screen navigation and widget event simulation.
429
+ * **Security & Sanitization**: Comprehensive testing against secret leakage and shell injection.
430
+
431
+ ---
432
+
433
+ ## ๐ŸŽฌ 5-Minute Championship Demo Video
434
+
435
+ The official submission video for the AWS "Agents for Humans" Hackathon is rendered in **Full HD 1080p @ 30fps** with an exact duration of **`00:05:00.00`** (300.0s), strictly adhering to the 5-minute rule:
436
+
437
+ - **โ–ถ๏ธ Watch Live on YouTube**: [**https://youtu.be/iA42MnXQafc**](https://youtu.be/iA42MnXQafc)
438
+ - **Master Video File**: [`demo_production/output/k_cli_5min_championship_demo.mp4`](demo_production/output/k_cli_5min_championship_demo.mp4)
439
+ - **Audio & Captions**: High-fidelity neural voiceover narration (`48 kHz Stereo`) with embedded soft English Subtitles / Closed Captions (CC)
440
+ - **Subtitles File**: [`demo_production/output/k_cli_5min_championship_demo.srt`](demo_production/output/k_cli_5min_championship_demo.srt)
441
+
442
+ ### Storyboard Breakdown:
443
+ * **Act 1 (0:00 - 0:58, 58s)**: *The DevOps Crisis & K-CLI Intro* โ€” Live terminal diagnostics, memory HUD, and value pitch.
444
+ * **Act 2 (0:58 - 1:58, 60s)**: *Cyber-Workstation TUI* โ€” 5-persona state machine, live keyboard navigation, and prompt generation.
445
+ * **Act 3 (1:58 - 2:51, 53s)**: *Reactive Web Dashboard & Real-Time Streaming* โ€” Live Gemini 2.5 Flash token streaming and the new Antigravity Local Command Runner.
446
+ * **Act 4 (2:51 - 4:06, 75s)**: *4 Autonomous Superpowers (Frame-Accurate Synced)*:
447
+ - `0:00 - 0:23`: Incident Crash Triage Studio (`ZeroDivisionError` diagnosis & auto-heal)
448
+ - `0:23 - 0:38`: 3-Way Git Merge Conflict Studio (AST-aware conflict resolution)
449
+ - `0:38 - 0:58`: AST Security Shield (Secrets & injection detection)
450
+ - `0:58 - 1:15`: Chaos Immunity Engine (Edge-case probing & inoculation)
451
+ * **Act 5 (4:06 - 5:00, 54s)**: *AWS Bedrock AgentCore & Grand Finale* โ€” OpenAPI action group export, benchmark scorecard, and vision.
452
+
453
+ ---
454
+
455
+ ## ๐Ÿ“„ License & Authorship
456
+
457
+ * **Author & Lead Architect**: **Krishiv Joshi**
458
+ * **GitHub Profile**: [@krishivjoshi219-collab](https://github.com/krishivjoshi219-collab)
459
+ * **AWS Builder ID**: `krishivjoshi219-collab`
460
+ * **Hackathon**: [AWS *Agents for Humans* Hackathon](https://agentsforhumans.devpost.com/) โ€” Professional Agents Track
461
+ * **License**: Open-source under the [MIT License](LICENSE).