fixdoc 0.0.1__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.
@@ -0,0 +1,261 @@
1
+ Metadata-Version: 2.4
2
+ Name: fixdoc
3
+ Version: 0.0.1
4
+ Summary: Capture and search infrastructure fixes for cloud/SRE engineers
5
+ Author-email: Fiyi <fiyignk@gmail.com>
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/fiyiogunkoya/FixDoc
8
+ Keywords: devops,terraform,infrastructure,documentation,cli
9
+ Classifier: Development Status :: 4 - Beta
10
+ Classifier: Environment :: Console
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: Intended Audience :: System Administrators
13
+ Classifier: License :: OSI Approved :: MIT License
14
+ Classifier: Operating System :: OS Independent
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.9
17
+ Classifier: Programming Language :: Python :: 3.10
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Topic :: System :: Systems Administration
21
+ Classifier: Topic :: Utilities
22
+ Requires-Python: >=3.9
23
+ Description-Content-Type: text/markdown
24
+ Requires-Dist: click>=8.0.0
25
+ Requires-Dist: pyyaml>=6.0.0
26
+ Provides-Extra: dev
27
+ Requires-Dist: pytest>=7.0.0; extra == "dev"
28
+ Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
29
+ Requires-Dist: black>=23.0.0; extra == "dev"
30
+ Requires-Dist: ruff>=0.1.0; extra == "dev"
31
+
32
+ # FixDoc
33
+
34
+ A CLI tool for cloud engineers to capture and search infrastructure fixes. Stop losing tribal knowledge in Slack threads and personal notes.
35
+
36
+ ## The Problem
37
+
38
+ Infrastructure errors repeat. The same RBAC misconfiguration, the same Terraform state lock—solved six months ago, but the fix is buried in Slack or locked in someone's head. When engineers leave, the knowledge leaves with them. Teams waste hours debugging problems they've already solved.
39
+
40
+ ## The Solution
41
+
42
+ FixDoc captures cloud fixes in seconds and makes them searchable. Pipe your Terraform or kubectl error output directly to FixDoc, document what fixed it, and move on. Next time you or a teammate hit a similar issue, search your fix history instead of debugging from scratch.
43
+
44
+ **Core features:**
45
+
46
+ - **Capture fixes fast** - Quick mode for one-liner captures, pipe errors directly from Terraform or kubectl
47
+ - **Search your history** - Find past fixes by keyword, tag, or error message
48
+ - **Analyze terraform plans** - Get warnings about resources that have caused problems before
49
+ - **Multi-cloud error parsing** - Auto-detect and parse errors from Terraform (AWS, Azure, GCP) and Kubernetes
50
+ - **Team sync via Git** - Share fixes across your team through a shared Git repo
51
+ - **Markdown export** - Every fix generates shareable documentation
52
+
53
+ ## Installation
54
+
55
+ ```bash
56
+ # Clone the repo
57
+ git clone https://github.com/fiyiogunkoya/fixdoc.git
58
+ cd fixdoc
59
+
60
+ # Recommended: set up a virtual environment
61
+ python -m venv venv
62
+ source venv/bin/activate
63
+
64
+ # Install
65
+ pip install -e .
66
+ ```
67
+
68
+ Requires Python 3.9+.
69
+
70
+ ## Quick Start
71
+
72
+ ### Capture a Fix
73
+
74
+ **Pipe terraform errors directly:**
75
+ ```bash
76
+ terraform apply 2>&1 | fixdoc capture
77
+ ```
78
+
79
+ FixDoc parses the error, extracts the resource and error code, and prompts you only for the fix:
80
+
81
+ ```
82
+ ──────────────────────────────────────────────────
83
+ Captured from terraform:
84
+
85
+ Resource: azurerm_databricks_workspace.main
86
+ File: modules/databricks/main.tf:15
87
+ Error: KeyVaultAccessDenied: The operation does not have permission...
88
+ ──────────────────────────────────────────────────
89
+
90
+ What fixed it? > Added managed identity to Key Vault access policy
91
+
92
+ Fix captured: a1b2c3d4(unique fix id)
93
+ ```
94
+
95
+ **Pipe kubectl errors:**
96
+ ```bash
97
+ kubectl apply -f deployment.yaml 2>&1 | fixdoc capture
98
+ ```
99
+
100
+ **Interactive mode:**
101
+ ```bash
102
+ fixdoc capture
103
+ ```
104
+
105
+ **Quick mode:**
106
+ ```bash
107
+ fixdoc capture -q "User couldn't access storage | Added blob contributor role" -t storage,rbac
108
+ ```
109
+
110
+ ### Search Your Fixes
111
+
112
+ ```bash
113
+ fixdoc search "storage account"
114
+ fixdoc search rbac
115
+ fixdoc search "access denied"
116
+ ```
117
+
118
+ ### Edit a Fix
119
+
120
+ ```bash
121
+ # Update specific fields
122
+ fixdoc edit a1b2c3d4 --resolution "Updated fix details"
123
+ fixdoc edit a1b2c3d4 --tags "storage,rbac,new_tag"
124
+
125
+ # Interactive edit
126
+ fixdoc edit a1b2c3d4 -I
127
+ ```
128
+
129
+ ### Analyze Terraform Plans
130
+
131
+ Before running `terraform apply`, check for known issues:
132
+
133
+ ```bash
134
+ terraform plan -out=plan.tfplan
135
+ terraform show -json plan.tfplan > plan.json
136
+ fixdoc analyze plan.json
137
+ ```
138
+
139
+ Output:
140
+ ```
141
+ Found 2 potential issue(s) based on your fix history:
142
+
143
+ X azurerm_storage_account.main may relate to FIX-a1b2c3d4
144
+ Previous issue: Users couldn't access blob storage
145
+ Resolution: Added storage blob data contributor role
146
+ Tags: azurerm_storage_account,rbac
147
+
148
+ X azurerm_key_vault.main may relate to FIX-b5c6d7e8
149
+ Previous issue: Key Vault access denied for Databricks
150
+ Resolution: Added access policy with wrapKey permission
151
+ Tags: azurerm_key_vault,rbac
152
+
153
+ Run `fixdoc show <fix-id>` for full details on any fix.
154
+ ```
155
+
156
+ ### Sync Fixes with Your Team
157
+
158
+ Share fixes across your organization using a shared Git repository:
159
+
160
+ ```bash
161
+ # Initialize sync with a remote repo
162
+ fixdoc sync init git@github.com:your-org/team-fixes.git
163
+
164
+ # Push your local fixes to the shared repo
165
+ fixdoc sync push -m "Added storage account fixes"
166
+
167
+ # Pull fixes from your team
168
+ fixdoc sync pull
169
+
170
+ # Check sync status
171
+ fixdoc sync status
172
+ ```
173
+
174
+ Fixes marked as private (`is_private`) are excluded from sync.
175
+
176
+ ### Other Commands
177
+
178
+ ```bash
179
+ fixdoc list # List all fixes
180
+ fixdoc show a1b2c3d4 # Show full details
181
+ fixdoc delete a1b2c3d4 # Delete a fix
182
+ fixdoc delete --purge # Delete all fixes
183
+ fixdoc stats # View statistics
184
+ ```
185
+
186
+ ## Fix Fields
187
+
188
+ | Field | Required | Description |
189
+ |-------|----------|-------------|
190
+ | Issue | Yes | What was the problem? |
191
+ | Resolution | Yes | How did you fix it? |
192
+ | Error excerpt | No | Relevant error message or logs |
193
+ | Tags | No | Comma-separated keywords (resource types, categories) |
194
+ | Notes | No | Gotchas, misleading directions, additional context |
195
+
196
+ **Tip**: Use resource types as tags (e.g., `azurerm_storage_account`, `azurerm_key_vault`) to enable terraform plan analysis.
197
+
198
+ ## Storage
199
+
200
+ FixDoc stores everything locally(cloud storage feature WIP):
201
+
202
+ ```
203
+ ~/.fixdoc/
204
+ ├── fixes.json # JSON database of all fixes
205
+ ├── config.yaml # Sync and user configuration
206
+ └── docs/ # Generated markdown files
207
+ ├── <uuid>.md
208
+ └── ...
209
+ ```
210
+
211
+ Markdown files are generated alongside the JSON database, so you can:
212
+ - Push them to a wiki/confluence
213
+ - Commit them to a repo
214
+ - Share them with your team via `fixdoc sync`
215
+
216
+ ## Philosophy
217
+
218
+ **Speed is everything.** Engineers won't document fixes if it takes too long. FixDoc is designed to capture information in seconds:
219
+
220
+ - Pipe errors directly from terraform or kubectl
221
+ - Quick mode for one-liner captures
222
+ - Auto-extract resource, file, and error code
223
+ - Optional fields you can skip
224
+
225
+ The goal is to build a searchable knowledge base over time, not to write perfect documentation for each fix.
226
+
227
+ ---
228
+
229
+ ## Roadmap
230
+
231
+ | Feature | Description |
232
+ |---------|-------------|
233
+ | Similar fix suggestions | Show matching fixes before creating duplicates |
234
+ | Import/Export | `fixdoc export` and `fixdoc import --merge` |
235
+ | Search filters | Filter by tags, date range |
236
+ | Additional CLI parsers | AWS CLI, Azure CLI error parsers |
237
+ | AI-suggested fixes | Suggest resolutions from error context + fix history |
238
+ | SDK refactor | Use as library: `from fixdoc import FixDoc` |
239
+
240
+ ---
241
+
242
+ ## Current Status
243
+
244
+ **v0.0.1 (Alpha)**
245
+
246
+ What works today:
247
+ - Capture fixes (interactive, quick mode, piped input)
248
+ - Auto-parse Terraform apply output (resource, file, line, error code) for AWS, Azure, and GCP
249
+ - Auto-parse Kubernetes/kubectl errors
250
+ - Search fixes by keyword
251
+ - Edit existing fixes
252
+ - Analyze terraform plans against fix history
253
+ - Delete individual fixes or purge all
254
+ - Git-based team sync (init, push, pull, status)
255
+ - Store as JSON + markdown
256
+
257
+ ---
258
+
259
+ ## Contributing
260
+
261
+ Contributions are welcome and encouraged! Please open an issue or PR.
@@ -0,0 +1,30 @@
1
+ fixdoc/__init__.py,sha256=avdbeaHwQTMX_K6CnFeDgQyK2TCkdBWsVUCRZi4_6UQ,200
2
+ fixdoc/cli.py,sha256=JuLQEb-MzFjaE5zvDkk9eVyvKAfJvWBCdN8A54p1K90,573
3
+ fixdoc/config.py,sha256=Wg1NHFFt9ER22D9luuWdv-GWDlVxyVsXiRavJHuGq6g,3503
4
+ fixdoc/fix.py,sha256=i5IxBS85c77JV6VAiNdRLhBLRL3QUlXcfiglRcCiE7I,294
5
+ fixdoc/formatter.py,sha256=R57kTq1CYtrC-H-HlcMekM7ALyN_ovIf3VFLtF2-Iek,1358
6
+ fixdoc/git.py,sha256=-hDpRgZXSdLv2DlgFo2azm5MO8BTJiVzRFKSZ5nRm2c,8819
7
+ fixdoc/markdown_parser.py,sha256=0n71dqTUYBiKlmsbj12_Wyww_K4Pq69DnE0Qg_WLi-M,3204
8
+ fixdoc/models.py,sha256=ZF_t3ZgNHfTPpgzzGL-VUJStxdEpArvpokAPWPMBXM8,2776
9
+ fixdoc/storage.py,sha256=b6LxCiKu-idyvP7ry7XBQXQBdBiZLJPLsg1B2IVL3L0,4737
10
+ fixdoc/sync_engine.py,sha256=JyOdXTS7aaC6X0wZxvFksbpj4UufPWZUqxu-qGWGuVA,11284
11
+ fixdoc/terraform_parser.py,sha256=jOXrbRxoJDG1VIN1B0IcZLdAoS0DWG59ntueonxHkqU,3942
12
+ fixdoc/commands/__init__.py,sha256=FYYpL3xet79yD21bcWsls6Zk5HzU3w1o3J2zxRAbV5w,335
13
+ fixdoc/commands/analyze.py,sha256=oTq2-1f4l6JyceZvu82gnw5qtbD62-LbmCIZHRLlygw,11322
14
+ fixdoc/commands/capture.py,sha256=uW1zKRZXiV9VPiw-2K4G9_Xh4K9sYdLGx9XUAZRAu08,2844
15
+ fixdoc/commands/capture_handlers.py,sha256=hJemBFgOQwuPGe-_mdgmivCczdrSoLObNeZocF3gnxw,9012
16
+ fixdoc/commands/delete.py,sha256=2Kr_LrqqFEsS6KTTAVbkRM06gbeoJRhmKIMSJgZFZl0,1780
17
+ fixdoc/commands/edit.py,sha256=iyz6zJKuzW9IXPz2iHUQTKzEDaLPVlp4Gtja324lWEA,3136
18
+ fixdoc/commands/manage.py,sha256=Ef6CfaOm07XvzL7tbubejpmYPEoU1Hj82Jx9v_T9dWg,1820
19
+ fixdoc/commands/search.py,sha256=nnomeyIh7GUlj8n2wlxVjT7VWXdvlSohf6-UkUErpZE,1475
20
+ fixdoc/commands/sync.py,sha256=tij-1-TqT8SRGlSpOUy6iHWoewM69zTPmUFxe436sI0,9354
21
+ fixdoc/parsers/__init__.py,sha256=0a3L2HY-t1upqmluC8RhkmfuwHLVcBtD0HcZzCemkNE,620
22
+ fixdoc/parsers/base.py,sha256=RAoB1WOsQ8SgeX-PY2E_UXUO5sQkx8cL_fCCAY7S_9Y,3788
23
+ fixdoc/parsers/kubernetes.py,sha256=Hft-ZvWlsYx2Tn0n4s3FeeGIFxsxpogLrtyha4wI3JU,21039
24
+ fixdoc/parsers/router.py,sha256=fuPF1RoY5pce2pmytW3am81487EBi2_aMIDF26UgNbg,4205
25
+ fixdoc/parsers/terraform.py,sha256=Yv9o6EshjDWSRfC34456oSrPEh69tpheDDGWtEsTfXk,15315
26
+ fixdoc-0.0.1.dist-info/METADATA,sha256=zSmcrH3Gsw8dC6DNbIEu_jWCCwbPAIjp9So5s6NQ3dg,8084
27
+ fixdoc-0.0.1.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
28
+ fixdoc-0.0.1.dist-info/entry_points.txt,sha256=09b2ftWNlwMRqeRb8DpJVXGoKs0OjZXlAiWdeb_JjaA,43
29
+ fixdoc-0.0.1.dist-info/top_level.txt,sha256=T3g3H14x76LVyBRYA-qRfGTB3a6YlLkjSz_XV8GP5sE,7
30
+ fixdoc-0.0.1.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (80.10.2)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ fixdoc = fixdoc.fix:main
@@ -0,0 +1 @@
1
+ fixdoc