know-cli 0.1.1__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.
@@ -0,0 +1,3 @@
1
+ venv/
2
+ *.pyc
3
+ __pycache__/
@@ -0,0 +1,49 @@
1
+ project:
2
+ name: know-cli
3
+ description: ''
4
+ version: 1.0.0
5
+ languages:
6
+ - python
7
+ - javascript
8
+ - typescript
9
+ - go
10
+ - rust
11
+ include:
12
+ - src/
13
+ - lib/
14
+ - app/
15
+ exclude:
16
+ - '**/node_modules/**'
17
+ - '**/.git/**'
18
+ - '**/tests/**'
19
+ - '**/__pycache__/**'
20
+ - '**/vendor/**'
21
+ - '**/.venv/**'
22
+ - '**/venv/**'
23
+ - '**/.know/**'
24
+ ai:
25
+ provider: anthropic
26
+ model: claude-3-sonnet-20240229
27
+ api_key_env: ANTHROPIC_API_KEY
28
+ generate:
29
+ summaries: true
30
+ architecture: true
31
+ api_docs: true
32
+ onboarding: true
33
+ output:
34
+ format: markdown
35
+ directory: docs
36
+ git:
37
+ auto_commit: false
38
+ commit_message: 'docs: update generated documentation'
39
+ watch:
40
+ enabled: true
41
+ debounce_seconds: 5
42
+ diagrams:
43
+ format: mermaid
44
+ include_dependencies: true
45
+ max_depth: 3
46
+ api:
47
+ frameworks: []
48
+ include_schemas: true
49
+ include_examples: true
@@ -0,0 +1,188 @@
1
+ Metadata-Version: 2.4
2
+ Name: know-cli
3
+ Version: 0.1.1
4
+ Summary: Living documentation generator - docs that stay in sync with your code
5
+ Project-URL: Homepage, https://github.com/vic/know-cli
6
+ Project-URL: Repository, https://github.com/vic/know-cli
7
+ Author-email: Vic <vic@example.com>
8
+ License-Expression: MIT
9
+ Keywords: ai,cli,codebase,documentation,generator
10
+ Classifier: Development Status :: 3 - Alpha
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: License :: OSI Approved :: MIT License
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Programming Language :: Python :: 3.10
15
+ Classifier: Programming Language :: Python :: 3.11
16
+ Classifier: Programming Language :: Python :: 3.12
17
+ Classifier: Topic :: Software Development :: Documentation
18
+ Classifier: Topic :: Utilities
19
+ Requires-Python: >=3.10
20
+ Requires-Dist: anthropic>=0.8.0
21
+ Requires-Dist: click-completion>=0.5.2
22
+ Requires-Dist: click>=8.1.0
23
+ Requires-Dist: gitpython>=3.1.0
24
+ Requires-Dist: jinja2>=3.1.0
25
+ Requires-Dist: pathspec>=0.11.0
26
+ Requires-Dist: pydantic>=2.0.0
27
+ Requires-Dist: pyyaml>=6.0
28
+ Requires-Dist: rich>=13.0.0
29
+ Requires-Dist: watchdog>=3.0.0
30
+ Requires-Dist: xxhash>=3.0.0
31
+ Provides-Extra: dev
32
+ Requires-Dist: black>=23.0.0; extra == 'dev'
33
+ Requires-Dist: mypy>=1.0.0; extra == 'dev'
34
+ Requires-Dist: pytest-cov>=4.0.0; extra == 'dev'
35
+ Requires-Dist: pytest>=7.0.0; extra == 'dev'
36
+ Requires-Dist: ruff>=0.1.0; extra == 'dev'
37
+ Provides-Extra: parser
38
+ Requires-Dist: tree-sitter-languages>=1.10.0; extra == 'parser'
39
+ Requires-Dist: tree-sitter>=0.20.0; extra == 'parser'
40
+ Description-Content-Type: text/markdown
41
+
42
+ # know
43
+
44
+ > Living documentation for your codebase. Docs that actually stay current.
45
+
46
+ [![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)
47
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
48
+ [![PyPI version](https://img.shields.io/pypi/v/know-cli.svg)](https://pypi.org/project/know-cli/)
49
+
50
+ **know** is a CLI tool that automatically generates and maintains documentation for your codebase. It uses AST analysis to understand your code structure and AI to generate intelligent summaries that stay in sync as your code evolves.
51
+
52
+ ## ✨ Features
53
+
54
+ - **🔄 Continuous Sync** - Documentation updates automatically via git hooks
55
+ - **🧠 AI-Powered** - Uses Claude/GPT for intelligent code understanding
56
+ - **📊 Architecture Diagrams** - Auto-generates C4 and Mermaid diagrams
57
+ - **📚 OpenAPI Specs** - Extracts API routes and generates specs
58
+ - **🎯 Onboarding Guides** - Creates tailored guides for new team members
59
+ - **🤖 LLM-Ready** - Generates AI-optimized codebase digests
60
+ - **⚡ Multi-Language** - Supports Python, JavaScript/TypeScript, Go, Rust
61
+
62
+ ## 🚀 Quick Start
63
+
64
+ ```bash
65
+ # Install
66
+ pip install know-cli
67
+
68
+ # Initialize in your project
69
+ cd your-project
70
+ know init
71
+
72
+ # Generate documentation
73
+ know update
74
+
75
+ # Start watching for changes
76
+ know watch
77
+ ```
78
+
79
+ ## 📖 Commands
80
+
81
+ | Command | Description |
82
+ |---------|-------------|
83
+ | `know init` | Scan codebase, create config, generate initial docs |
84
+ | `know watch` | Background process that updates docs on file changes |
85
+ | `know explain -c <name>` | AI explains a specific component |
86
+ | `know diagram --type architecture` | Generate architecture diagrams |
87
+ | `know api --openapi` | Generate OpenAPI spec from API routes |
88
+ | `know onboard --for "new devs"` | Create onboarding guide |
89
+ | `know digest --for-llm` | Generate AI-optimized codebase summary |
90
+ | `know update` | Manually trigger documentation update |
91
+ | `know hooks install` | Install git hooks for auto-update |
92
+
93
+ ## 🎯 Use Cases
94
+
95
+ ### 1. **Team Onboarding**
96
+ ```bash
97
+ know onboard --for "backend devs"
98
+ # Creates: docs/onboarding-backend-devs.md
99
+ ```
100
+
101
+ ### 2. **AI-Assisted Development**
102
+ ```bash
103
+ know digest --for-llm
104
+ # Creates: docs/digest-llm.md - optimized for Claude/ChatGPT
105
+ ```
106
+
107
+ ### 3. **Architecture Documentation**
108
+ ```bash
109
+ know diagram --type architecture
110
+ # Creates: docs/architecture.md with Mermaid diagrams
111
+ ```
112
+
113
+ ### 4. **API Documentation**
114
+ ```bash
115
+ know api --openapi
116
+ # Creates: docs/openapi.json from your API routes
117
+ ```
118
+
119
+ ## ⚙️ Configuration
120
+
121
+ Create `.know/config.yaml`:
122
+
123
+ ```yaml
124
+ project:
125
+ name: "My Project"
126
+ description: "A brief description"
127
+ version: "1.0.0"
128
+
129
+ languages:
130
+ - python
131
+ - typescript
132
+ - go
133
+
134
+ include:
135
+ - "src/"
136
+ - "packages/"
137
+ - "apps/"
138
+
139
+ exclude:
140
+ - "**/node_modules/**"
141
+ - "**/.git/**"
142
+ - "**/tests/**"
143
+
144
+ ai:
145
+ provider: "anthropic"
146
+ model: "claude-3-sonnet-20240229"
147
+ api_key_env: "ANTHROPIC_API_KEY"
148
+
149
+ output:
150
+ directory: "docs"
151
+ ```
152
+
153
+ ## 🔧 Installation
154
+
155
+ ```bash
156
+ # From PyPI (when published)
157
+ pip install know-cli
158
+
159
+ # From source
160
+ git clone https://github.com/sushilk1991/know-cli.git
161
+ cd know-cli
162
+ pip install -e .
163
+ ```
164
+
165
+ ## 🏗️ Supported Languages
166
+
167
+ | Language | Parser | Status |
168
+ |----------|--------|--------|
169
+ | Python | AST (built-in) | ✅ Full support |
170
+ | JavaScript/TypeScript | Regex-based | ✅ Supported |
171
+ | Go | Regex-based | ✅ Supported |
172
+ | Rust | Planned | 🚧 Coming soon |
173
+
174
+ ## 🔗 Git Hooks
175
+
176
+ Automatically update docs on every commit:
177
+
178
+ ```bash
179
+ know hooks install
180
+ ```
181
+
182
+ ## 📄 License
183
+
184
+ MIT License - see [LICENSE](LICENSE) file.
185
+
186
+ ---
187
+
188
+ <p align="center">Built by <a href="https://github.com/sushilk1991">@sushilk1991</a></p>
@@ -0,0 +1,147 @@
1
+ # know
2
+
3
+ > Living documentation for your codebase. Docs that actually stay current.
4
+
5
+ [![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)
6
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
7
+ [![PyPI version](https://img.shields.io/pypi/v/know-cli.svg)](https://pypi.org/project/know-cli/)
8
+
9
+ **know** is a CLI tool that automatically generates and maintains documentation for your codebase. It uses AST analysis to understand your code structure and AI to generate intelligent summaries that stay in sync as your code evolves.
10
+
11
+ ## ✨ Features
12
+
13
+ - **🔄 Continuous Sync** - Documentation updates automatically via git hooks
14
+ - **🧠 AI-Powered** - Uses Claude/GPT for intelligent code understanding
15
+ - **📊 Architecture Diagrams** - Auto-generates C4 and Mermaid diagrams
16
+ - **📚 OpenAPI Specs** - Extracts API routes and generates specs
17
+ - **🎯 Onboarding Guides** - Creates tailored guides for new team members
18
+ - **🤖 LLM-Ready** - Generates AI-optimized codebase digests
19
+ - **⚡ Multi-Language** - Supports Python, JavaScript/TypeScript, Go, Rust
20
+
21
+ ## 🚀 Quick Start
22
+
23
+ ```bash
24
+ # Install
25
+ pip install know-cli
26
+
27
+ # Initialize in your project
28
+ cd your-project
29
+ know init
30
+
31
+ # Generate documentation
32
+ know update
33
+
34
+ # Start watching for changes
35
+ know watch
36
+ ```
37
+
38
+ ## 📖 Commands
39
+
40
+ | Command | Description |
41
+ |---------|-------------|
42
+ | `know init` | Scan codebase, create config, generate initial docs |
43
+ | `know watch` | Background process that updates docs on file changes |
44
+ | `know explain -c <name>` | AI explains a specific component |
45
+ | `know diagram --type architecture` | Generate architecture diagrams |
46
+ | `know api --openapi` | Generate OpenAPI spec from API routes |
47
+ | `know onboard --for "new devs"` | Create onboarding guide |
48
+ | `know digest --for-llm` | Generate AI-optimized codebase summary |
49
+ | `know update` | Manually trigger documentation update |
50
+ | `know hooks install` | Install git hooks for auto-update |
51
+
52
+ ## 🎯 Use Cases
53
+
54
+ ### 1. **Team Onboarding**
55
+ ```bash
56
+ know onboard --for "backend devs"
57
+ # Creates: docs/onboarding-backend-devs.md
58
+ ```
59
+
60
+ ### 2. **AI-Assisted Development**
61
+ ```bash
62
+ know digest --for-llm
63
+ # Creates: docs/digest-llm.md - optimized for Claude/ChatGPT
64
+ ```
65
+
66
+ ### 3. **Architecture Documentation**
67
+ ```bash
68
+ know diagram --type architecture
69
+ # Creates: docs/architecture.md with Mermaid diagrams
70
+ ```
71
+
72
+ ### 4. **API Documentation**
73
+ ```bash
74
+ know api --openapi
75
+ # Creates: docs/openapi.json from your API routes
76
+ ```
77
+
78
+ ## ⚙️ Configuration
79
+
80
+ Create `.know/config.yaml`:
81
+
82
+ ```yaml
83
+ project:
84
+ name: "My Project"
85
+ description: "A brief description"
86
+ version: "1.0.0"
87
+
88
+ languages:
89
+ - python
90
+ - typescript
91
+ - go
92
+
93
+ include:
94
+ - "src/"
95
+ - "packages/"
96
+ - "apps/"
97
+
98
+ exclude:
99
+ - "**/node_modules/**"
100
+ - "**/.git/**"
101
+ - "**/tests/**"
102
+
103
+ ai:
104
+ provider: "anthropic"
105
+ model: "claude-3-sonnet-20240229"
106
+ api_key_env: "ANTHROPIC_API_KEY"
107
+
108
+ output:
109
+ directory: "docs"
110
+ ```
111
+
112
+ ## 🔧 Installation
113
+
114
+ ```bash
115
+ # From PyPI (when published)
116
+ pip install know-cli
117
+
118
+ # From source
119
+ git clone https://github.com/sushilk1991/know-cli.git
120
+ cd know-cli
121
+ pip install -e .
122
+ ```
123
+
124
+ ## 🏗️ Supported Languages
125
+
126
+ | Language | Parser | Status |
127
+ |----------|--------|--------|
128
+ | Python | AST (built-in) | ✅ Full support |
129
+ | JavaScript/TypeScript | Regex-based | ✅ Supported |
130
+ | Go | Regex-based | ✅ Supported |
131
+ | Rust | Planned | 🚧 Coming soon |
132
+
133
+ ## 🔗 Git Hooks
134
+
135
+ Automatically update docs on every commit:
136
+
137
+ ```bash
138
+ know hooks install
139
+ ```
140
+
141
+ ## 📄 License
142
+
143
+ MIT License - see [LICENSE](LICENSE) file.
144
+
145
+ ---
146
+
147
+ <p align="center">Built by <a href="https://github.com/sushilk1991">@sushilk1991</a></p>
@@ -0,0 +1,7 @@
1
+ # Architecture Diagram
2
+
3
+ ```mermaid
4
+ graph TB
5
+ ```
6
+
7
+ *Generated by know*
@@ -0,0 +1,12 @@
1
+ # Codebase Digest
2
+
3
+ ## Project Structure
4
+
5
+
6
+ ## Statistics
7
+ - Files: 0
8
+ - Modules: 0
9
+ - Functions: 0
10
+ - Classes: 0
11
+
12
+ *Install anthropic package and set ANTHROPIC_API_KEY for AI-powered digests*
@@ -0,0 +1,91 @@
1
+ [build-system]
2
+ requires = ["hatchling"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "know-cli"
7
+ version = "0.1.1"
8
+ description = "Living documentation generator - docs that stay in sync with your code"
9
+ readme = "README.md"
10
+ license = "MIT"
11
+ requires-python = ">=3.10"
12
+ authors = [
13
+ { name = "Vic", email = "vic@example.com" }
14
+ ]
15
+ keywords = ["documentation", "cli", "codebase", "ai", "generator"]
16
+ classifiers = [
17
+ "Development Status :: 3 - Alpha",
18
+ "Intended Audience :: Developers",
19
+ "License :: OSI Approved :: MIT License",
20
+ "Programming Language :: Python :: 3",
21
+ "Programming Language :: Python :: 3.10",
22
+ "Programming Language :: Python :: 3.11",
23
+ "Programming Language :: Python :: 3.12",
24
+ "Topic :: Software Development :: Documentation",
25
+ "Topic :: Utilities",
26
+ ]
27
+ dependencies = [
28
+ "click>=8.1.0",
29
+ "click-completion>=0.5.2",
30
+ "rich>=13.0.0",
31
+ "pyyaml>=6.0",
32
+ "jinja2>=3.1.0",
33
+ "watchdog>=3.0.0",
34
+ "anthropic>=0.8.0",
35
+ "gitpython>=3.1.0",
36
+ "pydantic>=2.0.0",
37
+ "pathspec>=0.11.0",
38
+ "xxhash>=3.0.0",
39
+ ]
40
+
41
+ [project.optional-dependencies]
42
+ parser = [
43
+ "tree-sitter>=0.20.0",
44
+ "tree-sitter-languages>=1.10.0",
45
+ ]
46
+ dev = [
47
+ "pytest>=7.0.0",
48
+ "pytest-cov>=4.0.0",
49
+ "black>=23.0.0",
50
+ "ruff>=0.1.0",
51
+ "mypy>=1.0.0",
52
+ ]
53
+
54
+ [project.scripts]
55
+ know = "know.cli:main"
56
+
57
+ [project.urls]
58
+ Homepage = "https://github.com/vic/know-cli"
59
+ Repository = "https://github.com/vic/know-cli"
60
+
61
+ [tool.hatch.build.targets.wheel]
62
+ packages = ["src/know"]
63
+ exclude = [
64
+ "tests/",
65
+ "tests/**/*",
66
+ ]
67
+
68
+ [tool.pytest.ini_options]
69
+ testpaths = ["tests"]
70
+ python_files = ["test_*.py"]
71
+ python_classes = ["Test*"]
72
+ python_functions = ["test_*"]
73
+ addopts = "-v --tb=short"
74
+ markers = [
75
+ "slow: marks tests as slow (deselect with '-m \"not slow\"')",
76
+ "integration: marks tests as integration tests",
77
+ ]
78
+
79
+ [tool.black]
80
+ line-length = 100
81
+ target-version = ['py310']
82
+
83
+ [tool.ruff]
84
+ line-length = 100
85
+ select = ["E", "F", "I", "N", "W", "UP", "B", "C4", "SIM"]
86
+
87
+ [tool.mypy]
88
+ python_version = "3.10"
89
+ strict = true
90
+ warn_return_any = true
91
+ warn_unused_ignores = true
@@ -0,0 +1,8 @@
1
+ """know - Living documentation generator for codebases."""
2
+
3
+ __version__ = "0.1.0"
4
+ __author__ = "Vic"
5
+
6
+ from know.cli import main
7
+
8
+ __all__ = ["main", "__version__"]