know-cli 0.1.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.
@@ -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,187 @@
1
+ Metadata-Version: 2.4
2
+ Name: know-cli
3
+ Version: 0.1.0
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: tree-sitter-languages>=1.10.0
30
+ Requires-Dist: tree-sitter>=0.20.0
31
+ Requires-Dist: watchdog>=3.0.0
32
+ Requires-Dist: xxhash>=3.0.0
33
+ Provides-Extra: dev
34
+ Requires-Dist: black>=23.0.0; extra == 'dev'
35
+ Requires-Dist: mypy>=1.0.0; extra == 'dev'
36
+ Requires-Dist: pytest-cov>=4.0.0; extra == 'dev'
37
+ Requires-Dist: pytest>=7.0.0; extra == 'dev'
38
+ Requires-Dist: ruff>=0.1.0; extra == 'dev'
39
+ Description-Content-Type: text/markdown
40
+
41
+ # know
42
+
43
+ > Living documentation for your codebase. Docs that actually stay current.
44
+
45
+ [![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)
46
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
47
+ [![PyPI version](https://img.shields.io/pypi/v/know-cli.svg)](https://pypi.org/project/know-cli/)
48
+
49
+ **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.
50
+
51
+ ## ✨ Features
52
+
53
+ - **🔄 Continuous Sync** - Documentation updates automatically via git hooks
54
+ - **🧠 AI-Powered** - Uses Claude/GPT for intelligent code understanding
55
+ - **📊 Architecture Diagrams** - Auto-generates C4 and Mermaid diagrams
56
+ - **📚 OpenAPI Specs** - Extracts API routes and generates specs
57
+ - **🎯 Onboarding Guides** - Creates tailored guides for new team members
58
+ - **🤖 LLM-Ready** - Generates AI-optimized codebase digests
59
+ - **⚡ Multi-Language** - Supports Python, JavaScript/TypeScript, Go, Rust
60
+
61
+ ## 🚀 Quick Start
62
+
63
+ ```bash
64
+ # Install
65
+ pip install know-cli
66
+
67
+ # Initialize in your project
68
+ cd your-project
69
+ know init
70
+
71
+ # Generate documentation
72
+ know update
73
+
74
+ # Start watching for changes
75
+ know watch
76
+ ```
77
+
78
+ ## 📖 Commands
79
+
80
+ | Command | Description |
81
+ |---------|-------------|
82
+ | `know init` | Scan codebase, create config, generate initial docs |
83
+ | `know watch` | Background process that updates docs on file changes |
84
+ | `know explain -c <name>` | AI explains a specific component |
85
+ | `know diagram --type architecture` | Generate architecture diagrams |
86
+ | `know api --openapi` | Generate OpenAPI spec from API routes |
87
+ | `know onboard --for "new devs"` | Create onboarding guide |
88
+ | `know digest --for-llm` | Generate AI-optimized codebase summary |
89
+ | `know update` | Manually trigger documentation update |
90
+ | `know hooks install` | Install git hooks for auto-update |
91
+
92
+ ## 🎯 Use Cases
93
+
94
+ ### 1. **Team Onboarding**
95
+ ```bash
96
+ know onboard --for "backend devs"
97
+ # Creates: docs/onboarding-backend-devs.md
98
+ ```
99
+
100
+ ### 2. **AI-Assisted Development**
101
+ ```bash
102
+ know digest --for-llm
103
+ # Creates: docs/digest-llm.md - optimized for Claude/ChatGPT
104
+ ```
105
+
106
+ ### 3. **Architecture Documentation**
107
+ ```bash
108
+ know diagram --type architecture
109
+ # Creates: docs/architecture.md with Mermaid diagrams
110
+ ```
111
+
112
+ ### 4. **API Documentation**
113
+ ```bash
114
+ know api --openapi
115
+ # Creates: docs/openapi.json from your API routes
116
+ ```
117
+
118
+ ## ⚙️ Configuration
119
+
120
+ Create `.know/config.yaml`:
121
+
122
+ ```yaml
123
+ project:
124
+ name: "My Project"
125
+ description: "A brief description"
126
+ version: "1.0.0"
127
+
128
+ languages:
129
+ - python
130
+ - typescript
131
+ - go
132
+
133
+ include:
134
+ - "src/"
135
+ - "packages/"
136
+ - "apps/"
137
+
138
+ exclude:
139
+ - "**/node_modules/**"
140
+ - "**/.git/**"
141
+ - "**/tests/**"
142
+
143
+ ai:
144
+ provider: "anthropic"
145
+ model: "claude-3-sonnet-20240229"
146
+ api_key_env: "ANTHROPIC_API_KEY"
147
+
148
+ output:
149
+ directory: "docs"
150
+ ```
151
+
152
+ ## 🔧 Installation
153
+
154
+ ```bash
155
+ # From PyPI (when published)
156
+ pip install know-cli
157
+
158
+ # From source
159
+ git clone https://github.com/sushilk1991/know-cli.git
160
+ cd know-cli
161
+ pip install -e .
162
+ ```
163
+
164
+ ## 🏗️ Supported Languages
165
+
166
+ | Language | Parser | Status |
167
+ |----------|--------|--------|
168
+ | Python | AST (built-in) | ✅ Full support |
169
+ | JavaScript/TypeScript | Regex-based | ✅ Supported |
170
+ | Go | Regex-based | ✅ Supported |
171
+ | Rust | Planned | 🚧 Coming soon |
172
+
173
+ ## 🔗 Git Hooks
174
+
175
+ Automatically update docs on every commit:
176
+
177
+ ```bash
178
+ know hooks install
179
+ ```
180
+
181
+ ## 📄 License
182
+
183
+ MIT License - see [LICENSE](LICENSE) file.
184
+
185
+ ---
186
+
187
+ <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,89 @@
1
+ [build-system]
2
+ requires = ["hatchling"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "know-cli"
7
+ version = "0.1.0"
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
+ "tree-sitter>=0.20.0",
35
+ "tree-sitter-languages>=1.10.0",
36
+ "anthropic>=0.8.0",
37
+ "gitpython>=3.1.0",
38
+ "pydantic>=2.0.0",
39
+ "pathspec>=0.11.0",
40
+ "xxhash>=3.0.0",
41
+ ]
42
+
43
+ [project.optional-dependencies]
44
+ dev = [
45
+ "pytest>=7.0.0",
46
+ "pytest-cov>=4.0.0",
47
+ "black>=23.0.0",
48
+ "ruff>=0.1.0",
49
+ "mypy>=1.0.0",
50
+ ]
51
+
52
+ [project.scripts]
53
+ know = "know.cli:main"
54
+
55
+ [project.urls]
56
+ Homepage = "https://github.com/vic/know-cli"
57
+ Repository = "https://github.com/vic/know-cli"
58
+
59
+ [tool.hatch.build.targets.wheel]
60
+ packages = ["src/know"]
61
+ exclude = [
62
+ "tests/",
63
+ "tests/**/*",
64
+ ]
65
+
66
+ [tool.pytest.ini_options]
67
+ testpaths = ["tests"]
68
+ python_files = ["test_*.py"]
69
+ python_classes = ["Test*"]
70
+ python_functions = ["test_*"]
71
+ addopts = "-v --tb=short"
72
+ markers = [
73
+ "slow: marks tests as slow (deselect with '-m \"not slow\"')",
74
+ "integration: marks tests as integration tests",
75
+ ]
76
+
77
+ [tool.black]
78
+ line-length = 100
79
+ target-version = ['py310']
80
+
81
+ [tool.ruff]
82
+ line-length = 100
83
+ select = ["E", "F", "I", "N", "W", "UP", "B", "C4", "SIM"]
84
+
85
+ [tool.mypy]
86
+ python_version = "3.10"
87
+ strict = true
88
+ warn_return_any = true
89
+ 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__"]