folio-cli 0.3.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 (33) hide show
  1. folio_cli-0.3.0/LICENSE +176 -0
  2. folio_cli-0.3.0/PKG-INFO +180 -0
  3. folio_cli-0.3.0/README.md +145 -0
  4. folio_cli-0.3.0/pyproject.toml +59 -0
  5. folio_cli-0.3.0/setup.cfg +4 -0
  6. folio_cli-0.3.0/src/folio/__init__.py +3 -0
  7. folio_cli-0.3.0/src/folio/__main__.py +4 -0
  8. folio_cli-0.3.0/src/folio/assets/SKILL.md +75 -0
  9. folio_cli-0.3.0/src/folio/assets/__init__.py +1 -0
  10. folio_cli-0.3.0/src/folio/assets/config.yaml +77 -0
  11. folio_cli-0.3.0/src/folio/chunk.py +164 -0
  12. folio_cli-0.3.0/src/folio/cli.py +308 -0
  13. folio_cli-0.3.0/src/folio/config.py +97 -0
  14. folio_cli-0.3.0/src/folio/distribute.py +177 -0
  15. folio_cli-0.3.0/src/folio/ingest.py +76 -0
  16. folio_cli-0.3.0/src/folio/install.py +279 -0
  17. folio_cli-0.3.0/src/folio/retrieve.py +185 -0
  18. folio_cli-0.3.0/src/folio/store.py +120 -0
  19. folio_cli-0.3.0/src/folio/sync.py +110 -0
  20. folio_cli-0.3.0/src/folio_cli.egg-info/PKG-INFO +180 -0
  21. folio_cli-0.3.0/src/folio_cli.egg-info/SOURCES.txt +31 -0
  22. folio_cli-0.3.0/src/folio_cli.egg-info/dependency_links.txt +1 -0
  23. folio_cli-0.3.0/src/folio_cli.egg-info/entry_points.txt +2 -0
  24. folio_cli-0.3.0/src/folio_cli.egg-info/requires.txt +14 -0
  25. folio_cli-0.3.0/src/folio_cli.egg-info/top_level.txt +1 -0
  26. folio_cli-0.3.0/tests/test_chunk.py +80 -0
  27. folio_cli-0.3.0/tests/test_cli.py +65 -0
  28. folio_cli-0.3.0/tests/test_config.py +33 -0
  29. folio_cli-0.3.0/tests/test_distribute.py +54 -0
  30. folio_cli-0.3.0/tests/test_ingest_retrieve.py +57 -0
  31. folio_cli-0.3.0/tests/test_install.py +31 -0
  32. folio_cli-0.3.0/tests/test_rrf_and_format.py +51 -0
  33. folio_cli-0.3.0/tests/test_sync.py +50 -0
@@ -0,0 +1,176 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
@@ -0,0 +1,180 @@
1
+ Metadata-Version: 2.4
2
+ Name: folio-cli
3
+ Version: 0.3.0
4
+ Summary: Local hybrid RAG over curated AI / MLOps / infra curricula — graphify-style CLI for any assistant
5
+ Author: Iman Sharei
6
+ License-Expression: Apache-2.0
7
+ Project-URL: Homepage, https://github.com/Iman-Sharei/folio
8
+ Project-URL: Repository, https://github.com/Iman-Sharei/folio
9
+ Project-URL: Issues, https://github.com/Iman-Sharei/folio/issues
10
+ Project-URL: Changelog, https://github.com/Iman-Sharei/folio/releases
11
+ Keywords: rag,mlops,ai-engineering,chromadb,cli,uv
12
+ Classifier: Development Status :: 4 - Beta
13
+ Classifier: Environment :: Console
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
19
+ Requires-Python: >=3.11
20
+ Description-Content-Type: text/markdown
21
+ License-File: LICENSE
22
+ Requires-Dist: chromadb<1.1,>=0.5.23
23
+ Requires-Dist: rank-bm25>=0.2.2
24
+ Requires-Dist: PyYAML>=6.0.2
25
+ Requires-Dist: tqdm>=4.66.0
26
+ Requires-Dist: numpy<3,>=1.26.0
27
+ Provides-Extra: rerank
28
+ Requires-Dist: sentence-transformers<6,>=3.3.0; extra == "rerank"
29
+ Provides-Extra: dev
30
+ Requires-Dist: pytest>=8.0; extra == "dev"
31
+ Requires-Dist: pytest-cov>=5.0; extra == "dev"
32
+ Requires-Dist: build>=1.2; extra == "dev"
33
+ Requires-Dist: twine>=5.0; extra == "dev"
34
+ Dynamic: license-file
35
+
36
+ # folio
37
+
38
+ Local hybrid RAG over curated **AI engineering / MLOps / AI infra** markdown curricula
39
+ (graphify-style CLI). Assistants query a **shared machine index** instead of stuffing
40
+ GitHub repos into chat — lower token use, grounded citations.
41
+
42
+ | Source | Path |
43
+ |--------|------|
44
+ | [02-senior-ai-engineer-study-path](https://github.com/RavSinghChandan/02-senior-ai-engineer-study-path) | `revision-1/` |
45
+ | [ai-infra-senior-engineer-learning](https://github.com/ai-infra-curriculum/ai-infra-senior-engineer-learning) | `lessons/` |
46
+ | [agentic-ai-developer-learning](https://github.com/ai-engineering-curriculum/agentic-ai-developer-learning) | `lessons/` |
47
+ | [agentic-ai-engineer-learning](https://github.com/ai-engineering-curriculum/agentic-ai-engineer-learning) | `lessons/` |
48
+ | [senior-agentic-ai-engineer-learning](https://github.com/ai-engineering-curriculum/senior-agentic-ai-engineer-learning) | `lessons/` |
49
+ | [applied-ai-engineer-learning](https://github.com/ai-engineering-curriculum/applied-ai-engineer-learning) | `lessons/` |
50
+ | [ai-eval-engineer-learning](https://github.com/ai-engineering-curriculum/ai-eval-engineer-learning) | `lessons/` |
51
+ | [agentic-systems-architect-learning](https://github.com/ai-engineering-curriculum/agentic-systems-architect-learning) | `lessons/` |
52
+ | [mlops-zoomcamp](https://github.com/DataTalksClub/mlops-zoomcamp) | repo MD modules |
53
+
54
+ ## Install (once on this machine)
55
+
56
+ PyPI distribution name is **`folio-cli`** (plain `folio` is taken). The CLI command is still **`folio`**.
57
+
58
+ ```bash
59
+ uv tool install folio-cli
60
+ folio --help
61
+ ```
62
+
63
+ From a checkout (editable / unreleased):
64
+
65
+ ```bash
66
+ cd ~/Desktop/folio
67
+ uv tool install --editable .
68
+ # or: uv sync && uv run folio status
69
+ ```
70
+
71
+ Git install without waiting for PyPI:
72
+
73
+ ```bash
74
+ uv tool install git+https://github.com/Iman-Sharei/folio
75
+ ```
76
+
77
+ ## Get the knowledge index
78
+
79
+ Index lives in **`~/.folio/`** (override with `FOLIO_HOME`). Not inside product repos.
80
+
81
+ ```bash
82
+ folio bootstrap # preferred: prebuilt pack from Release
83
+ # or:
84
+ folio build # sync curated sources + embed (slower)
85
+ folio status
86
+ ```
87
+
88
+ Refresh when the maintainer publishes new curricula:
89
+
90
+ ```bash
91
+ folio update # download new Release pack (falls back to build)
92
+ folio update --from-source # force rebuild from git sources
93
+ ```
94
+
95
+ Maintainer release flow:
96
+
97
+ ```bash
98
+ folio build
99
+ folio pack # → dist/folio-index-YYYY.MM.DD.tar.gz
100
+ # upload tarball to GitHub Release; set release.index_url in config
101
+ ```
102
+
103
+ ## Use from any project (like graphify)
104
+
105
+ ```bash
106
+ cd /path/to/your-project
107
+ folio install --project --platform cursor
108
+ folio query "hybrid RAG vs RAGless" --json
109
+ ```
110
+
111
+ **Token rule:** assistants must **not** WebFetch/clone curriculum repos into chat.
112
+ Only `folio query`.
113
+
114
+ ## Architecture
115
+
116
+ ```
117
+ curated MD → chunk → ONNX MiniLM
118
+ ↓
119
+ ChromaDB + BM25 → ~/.folio/
120
+ ↓
121
+ query → dense + BM25 → RRF → CRAG → citations (~1–2k tokens, not the whole corpus)
122
+ ```
123
+
124
+ ## Commands
125
+
126
+ ```bash
127
+ folio bootstrap [--url URL] [--archive FILE] [--force]
128
+ folio build
129
+ folio update [--from-source]
130
+ folio pack [--dest PATH]
131
+ folio sync
132
+ folio query "<q>" [--json] [-k N] [--rerank]
133
+ folio status
134
+ folio install --project --platform cursor|claude|codex|agents
135
+ folio uninstall --project [--purge]
136
+ ```
137
+
138
+ ## Tests
139
+
140
+ ```bash
141
+ uv sync --extra dev
142
+ uv run pytest -q # all
143
+ uv run pytest -q -m "not integration" # fast (no Chroma embed)
144
+ uv run pytest -q -m integration # sync + ingest + retrieve + pack
145
+ ```
146
+
147
+ CI runs both layers on Python 3.11/3.12. Tag `vX.Y.Z` to:
148
+ - upload the curricula index pack (`folio-index.tar.gz`) to the GitHub Release
149
+ - publish the `folio-cli` wheel/sdist to PyPI (Trusted Publishing; see below)
150
+
151
+ ## Maintainer: publish `folio-cli` to PyPI
152
+
153
+ One-time setup (API token **or** Trusted Publishing):
154
+
155
+ ```bash
156
+ ./scripts/publish-pypi-wizard.sh
157
+ ```
158
+
159
+ After Trusted Publishing is configured, a version tag is enough:
160
+
161
+ ```bash
162
+ git tag -a v0.3.0 -m v0.3.0
163
+ git push origin v0.3.0
164
+ ```
165
+
166
+ Manual local publish (token in env):
167
+
168
+ ```bash
169
+ uv build
170
+ UV_PUBLISH_TOKEN=pypi-... uv publish
171
+ ```
172
+
173
+ ## Maintainer: publish index for `folio bootstrap`
174
+
175
+ ```bash
176
+ folio build
177
+ folio pack # → dist/folio-index-YYYY.MM.DD.tar.gz
178
+ # upload as GitHub Release asset, then set in config:
179
+ # release.index_url: https://github.com/<you>/folio/releases/latest/download/folio-index.tar.gz
180
+ ```
@@ -0,0 +1,145 @@
1
+ # folio
2
+
3
+ Local hybrid RAG over curated **AI engineering / MLOps / AI infra** markdown curricula
4
+ (graphify-style CLI). Assistants query a **shared machine index** instead of stuffing
5
+ GitHub repos into chat — lower token use, grounded citations.
6
+
7
+ | Source | Path |
8
+ |--------|------|
9
+ | [02-senior-ai-engineer-study-path](https://github.com/RavSinghChandan/02-senior-ai-engineer-study-path) | `revision-1/` |
10
+ | [ai-infra-senior-engineer-learning](https://github.com/ai-infra-curriculum/ai-infra-senior-engineer-learning) | `lessons/` |
11
+ | [agentic-ai-developer-learning](https://github.com/ai-engineering-curriculum/agentic-ai-developer-learning) | `lessons/` |
12
+ | [agentic-ai-engineer-learning](https://github.com/ai-engineering-curriculum/agentic-ai-engineer-learning) | `lessons/` |
13
+ | [senior-agentic-ai-engineer-learning](https://github.com/ai-engineering-curriculum/senior-agentic-ai-engineer-learning) | `lessons/` |
14
+ | [applied-ai-engineer-learning](https://github.com/ai-engineering-curriculum/applied-ai-engineer-learning) | `lessons/` |
15
+ | [ai-eval-engineer-learning](https://github.com/ai-engineering-curriculum/ai-eval-engineer-learning) | `lessons/` |
16
+ | [agentic-systems-architect-learning](https://github.com/ai-engineering-curriculum/agentic-systems-architect-learning) | `lessons/` |
17
+ | [mlops-zoomcamp](https://github.com/DataTalksClub/mlops-zoomcamp) | repo MD modules |
18
+
19
+ ## Install (once on this machine)
20
+
21
+ PyPI distribution name is **`folio-cli`** (plain `folio` is taken). The CLI command is still **`folio`**.
22
+
23
+ ```bash
24
+ uv tool install folio-cli
25
+ folio --help
26
+ ```
27
+
28
+ From a checkout (editable / unreleased):
29
+
30
+ ```bash
31
+ cd ~/Desktop/folio
32
+ uv tool install --editable .
33
+ # or: uv sync && uv run folio status
34
+ ```
35
+
36
+ Git install without waiting for PyPI:
37
+
38
+ ```bash
39
+ uv tool install git+https://github.com/Iman-Sharei/folio
40
+ ```
41
+
42
+ ## Get the knowledge index
43
+
44
+ Index lives in **`~/.folio/`** (override with `FOLIO_HOME`). Not inside product repos.
45
+
46
+ ```bash
47
+ folio bootstrap # preferred: prebuilt pack from Release
48
+ # or:
49
+ folio build # sync curated sources + embed (slower)
50
+ folio status
51
+ ```
52
+
53
+ Refresh when the maintainer publishes new curricula:
54
+
55
+ ```bash
56
+ folio update # download new Release pack (falls back to build)
57
+ folio update --from-source # force rebuild from git sources
58
+ ```
59
+
60
+ Maintainer release flow:
61
+
62
+ ```bash
63
+ folio build
64
+ folio pack # → dist/folio-index-YYYY.MM.DD.tar.gz
65
+ # upload tarball to GitHub Release; set release.index_url in config
66
+ ```
67
+
68
+ ## Use from any project (like graphify)
69
+
70
+ ```bash
71
+ cd /path/to/your-project
72
+ folio install --project --platform cursor
73
+ folio query "hybrid RAG vs RAGless" --json
74
+ ```
75
+
76
+ **Token rule:** assistants must **not** WebFetch/clone curriculum repos into chat.
77
+ Only `folio query`.
78
+
79
+ ## Architecture
80
+
81
+ ```
82
+ curated MD → chunk → ONNX MiniLM
83
+ ↓
84
+ ChromaDB + BM25 → ~/.folio/
85
+ ↓
86
+ query → dense + BM25 → RRF → CRAG → citations (~1–2k tokens, not the whole corpus)
87
+ ```
88
+
89
+ ## Commands
90
+
91
+ ```bash
92
+ folio bootstrap [--url URL] [--archive FILE] [--force]
93
+ folio build
94
+ folio update [--from-source]
95
+ folio pack [--dest PATH]
96
+ folio sync
97
+ folio query "<q>" [--json] [-k N] [--rerank]
98
+ folio status
99
+ folio install --project --platform cursor|claude|codex|agents
100
+ folio uninstall --project [--purge]
101
+ ```
102
+
103
+ ## Tests
104
+
105
+ ```bash
106
+ uv sync --extra dev
107
+ uv run pytest -q # all
108
+ uv run pytest -q -m "not integration" # fast (no Chroma embed)
109
+ uv run pytest -q -m integration # sync + ingest + retrieve + pack
110
+ ```
111
+
112
+ CI runs both layers on Python 3.11/3.12. Tag `vX.Y.Z` to:
113
+ - upload the curricula index pack (`folio-index.tar.gz`) to the GitHub Release
114
+ - publish the `folio-cli` wheel/sdist to PyPI (Trusted Publishing; see below)
115
+
116
+ ## Maintainer: publish `folio-cli` to PyPI
117
+
118
+ One-time setup (API token **or** Trusted Publishing):
119
+
120
+ ```bash
121
+ ./scripts/publish-pypi-wizard.sh
122
+ ```
123
+
124
+ After Trusted Publishing is configured, a version tag is enough:
125
+
126
+ ```bash
127
+ git tag -a v0.3.0 -m v0.3.0
128
+ git push origin v0.3.0
129
+ ```
130
+
131
+ Manual local publish (token in env):
132
+
133
+ ```bash
134
+ uv build
135
+ UV_PUBLISH_TOKEN=pypi-... uv publish
136
+ ```
137
+
138
+ ## Maintainer: publish index for `folio bootstrap`
139
+
140
+ ```bash
141
+ folio build
142
+ folio pack # → dist/folio-index-YYYY.MM.DD.tar.gz
143
+ # upload as GitHub Release asset, then set in config:
144
+ # release.index_url: https://github.com/<you>/folio/releases/latest/download/folio-index.tar.gz
145
+ ```
@@ -0,0 +1,59 @@
1
+ [build-system]
2
+ requires = ["setuptools>=68"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ # PyPI distribution name (plain "folio" is taken by an unrelated static-site tool).
7
+ # Import package + CLI command remain `folio`.
8
+ name = "folio-cli"
9
+ version = "0.3.0"
10
+ description = "Local hybrid RAG over curated AI / MLOps / infra curricula — graphify-style CLI for any assistant"
11
+ readme = "README.md"
12
+ license = "Apache-2.0"
13
+ requires-python = ">=3.11"
14
+ authors = [{ name = "Iman Sharei" }]
15
+ keywords = ["rag", "mlops", "ai-engineering", "chromadb", "cli", "uv"]
16
+ classifiers = [
17
+ "Development Status :: 4 - Beta",
18
+ "Environment :: Console",
19
+ "Intended Audience :: Developers",
20
+ "Programming Language :: Python :: 3",
21
+ "Programming Language :: Python :: 3.11",
22
+ "Programming Language :: Python :: 3.12",
23
+ "Topic :: Scientific/Engineering :: Artificial Intelligence",
24
+ ]
25
+ dependencies = [
26
+ "chromadb>=0.5.23,<1.1",
27
+ "rank-bm25>=0.2.2",
28
+ "PyYAML>=6.0.2",
29
+ "tqdm>=4.66.0",
30
+ "numpy>=1.26.0,<3",
31
+ ]
32
+
33
+ [project.optional-dependencies]
34
+ rerank = ["sentence-transformers>=3.3.0,<6"]
35
+ dev = ["pytest>=8.0", "pytest-cov>=5.0", "build>=1.2", "twine>=5.0"]
36
+
37
+ [project.urls]
38
+ Homepage = "https://github.com/Iman-Sharei/folio"
39
+ Repository = "https://github.com/Iman-Sharei/folio"
40
+ Issues = "https://github.com/Iman-Sharei/folio/issues"
41
+ Changelog = "https://github.com/Iman-Sharei/folio/releases"
42
+
43
+ [project.scripts]
44
+ folio = "folio.cli:main"
45
+
46
+ [tool.setuptools.packages.find]
47
+ where = ["src"]
48
+
49
+ [tool.setuptools.package-data]
50
+ folio = ["assets/*"]
51
+
52
+ [tool.pytest.ini_options]
53
+ testpaths = ["tests"]
54
+ markers = [
55
+ "integration: end-to-end tests that embed with Chroma ONNX (slower)",
56
+ ]
57
+ filterwarnings = [
58
+ "ignore::DeprecationWarning",
59
+ ]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,3 @@
1
+ """folio — local hybrid RAG over curated AI / MLOps / data curricula (graphify-style)."""
2
+
3
+ __version__ = "0.3.0"
@@ -0,0 +1,4 @@
1
+ from .cli import main
2
+
3
+ if __name__ == "__main__":
4
+ raise SystemExit(main())
@@ -0,0 +1,75 @@
1
+ ---
2
+ name: folio
3
+ description: "Use for any AI engineering / MLOps / RAG / agent / GPU / AI infra / related AI architecture decision. Queries the local hybrid RAG over curated curricula (~/.folio). Treat those design questions as a folio query first."
4
+ ---
5
+
6
+ # /folio
7
+
8
+ Local hybrid RAG over curated AI-engineer / MLOps / infra markdown curricula.
9
+ Persistent vector + BM25 index in `~/.folio/` (or `$FOLIO_HOME`). No API key required.
10
+
11
+ ## Usage
12
+
13
+ ```
14
+ /folio # orient + ensure index
15
+ /folio bootstrap # download prebuilt index (preferred)
16
+ /folio build # sync curated sources + ingest
17
+ /folio update # refresh from maintainer Release
18
+ /folio update --from-source # rebuild from curated git sources
19
+ /folio query "<question>" # hybrid retrieve (BM25 + dense + RRF + CRAG)
20
+ /folio query "<question>" --json # machine-readable hits for agents
21
+ /folio query "<question>" -k 10 # more chunks
22
+ /folio query "<question>" --rerank # optional cross-encoder
23
+ /folio status # CLI + index health
24
+ /folio install --project --platform cursor # wire this repo's assistant
25
+ ```
26
+
27
+ ## What folio is for
28
+
29
+ Ground AI / MLOps / AI-infra decisions in retrieved citations from curated curricula
30
+ (currently senior AI revision guide + AI infra lessons; more domains later).
31
+
32
+ **When to query:** RAG, embeddings, vector DBs, agents, training/GPU, model optimization,
33
+ feature stores, GitOps, SRE/SLO for ML, AI infra, or related senior AI trade-offs.
34
+
35
+ **When not to:** ordinary product code exploration — use graphify / Read / Grep for that.
36
+
37
+ ## Token rule (strict)
38
+
39
+ Do **not** WebFetch, clone, or paste the curriculum GitHub repos into chat.
40
+ They are already indexed. Only `folio query`. If the index is missing, tell the user
41
+ to run `folio bootstrap` or `folio build` — never dump raw curriculum markdown into context.
42
+
43
+ ## What You Must Do When Invoked
44
+
45
+ ### Fast path — index exists
46
+
47
+ If `~/.folio/manifest.json` exists (or `$FOLIO_HOME/manifest.json`):
48
+
49
+ ```bash
50
+ folio query "<question>" --json
51
+ ```
52
+
53
+ Ground your answer **only** in returned citations (`source_id`, `rel_path`, `heading_path`, `text`).
54
+ If scores are weak / empty, broaden terms and re-query once before inventing architecture.
55
+
56
+ ### No index yet
57
+
58
+ ```bash
59
+ folio bootstrap # or: folio build
60
+ folio query "<question>" --json
61
+ ```
62
+
63
+ ### Install into a project
64
+
65
+ ```bash
66
+ folio install --project --platform cursor
67
+ folio bootstrap # once per machine
68
+ ```
69
+
70
+ ## Rules for answers
71
+
72
+ 1. Prefer patterns that appear in retrieved chunks; cite `source_id` + file + heading.
73
+ 2. When sources conflict (e.g. hybrid RAG vs RAGless), state the trade-off and pick for *this* constraint.
74
+ 3. Do not dump entire markdown files when retrieval exists.
75
+ 4. Never skip retrieval for “quick” AI architecture guesses when the index is present.
@@ -0,0 +1 @@
1
+ """Packaged static assets (config, skill templates)."""