toolbase 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.
Files changed (110) hide show
  1. toolbase-0.1.0/LICENSE +21 -0
  2. toolbase-0.1.0/PKG-INFO +247 -0
  3. toolbase-0.1.0/README.md +209 -0
  4. toolbase-0.1.0/pyproject.toml +78 -0
  5. toolbase-0.1.0/setup.cfg +4 -0
  6. toolbase-0.1.0/tests/test_auth.py +491 -0
  7. toolbase-0.1.0/tests/test_categories_api.py +143 -0
  8. toolbase-0.1.0/tests/test_config_command.py +293 -0
  9. toolbase-0.1.0/tests/test_create_command.py +358 -0
  10. toolbase-0.1.0/tests/test_envs_cache.py +285 -0
  11. toolbase-0.1.0/tests/test_envs_config.py +157 -0
  12. toolbase-0.1.0/tests/test_envs_discovery.py +129 -0
  13. toolbase-0.1.0/tests/test_envs_manifest.py +172 -0
  14. toolbase-0.1.0/tests/test_envs_paths.py +107 -0
  15. toolbase-0.1.0/tests/test_envs_phase3_wiring.py +248 -0
  16. toolbase-0.1.0/tests/test_envs_phase4_config.py +547 -0
  17. toolbase-0.1.0/tests/test_envs_phase5_list.py +408 -0
  18. toolbase-0.1.0/tests/test_envs_phase6_reset.py +380 -0
  19. toolbase-0.1.0/tests/test_envs_schema.py +277 -0
  20. toolbase-0.1.0/tests/test_expected_toolkits.py +207 -0
  21. toolbase-0.1.0/tests/test_host_stderr_capture.py +85 -0
  22. toolbase-0.1.0/tests/test_ingest_ast.py +557 -0
  23. toolbase-0.1.0/tests/test_ingest_command.py +302 -0
  24. toolbase-0.1.0/tests/test_ingest_merge.py +356 -0
  25. toolbase-0.1.0/tests/test_ingest_walker.py +173 -0
  26. toolbase-0.1.0/tests/test_ingest_yaml_emit.py +216 -0
  27. toolbase-0.1.0/tests/test_init_template.py +269 -0
  28. toolbase-0.1.0/tests/test_install_flags.py +319 -0
  29. toolbase-0.1.0/tests/test_interactive_flags.py +209 -0
  30. toolbase-0.1.0/tests/test_logger_serve_log_wiring.py +107 -0
  31. toolbase-0.1.0/tests/test_login_command.py +532 -0
  32. toolbase-0.1.0/tests/test_orchestrator_restart.py +733 -0
  33. toolbase-0.1.0/tests/test_orchestrator_tool_groups.py +219 -0
  34. toolbase-0.1.0/tests/test_per_toolkit_log_rotation.py +71 -0
  35. toolbase-0.1.0/tests/test_publish_auto_create.py +322 -0
  36. toolbase-0.1.0/tests/test_publish_version_check.py +180 -0
  37. toolbase-0.1.0/tests/test_serve_config.py +439 -0
  38. toolbase-0.1.0/tests/test_serve_state_config.py +139 -0
  39. toolbase-0.1.0/tests/test_setup_command.py +280 -0
  40. toolbase-0.1.0/tests/test_setup_context.py +322 -0
  41. toolbase-0.1.0/tests/test_setup_declarative.py +291 -0
  42. toolbase-0.1.0/tests/test_setup_downloads.py +462 -0
  43. toolbase-0.1.0/tests/test_setup_handlers.py +313 -0
  44. toolbase-0.1.0/tests/test_setup_host.py +624 -0
  45. toolbase-0.1.0/tests/test_setup_prompts.py +238 -0
  46. toolbase-0.1.0/tests/test_setup_rpc.py +225 -0
  47. toolbase-0.1.0/tests/test_setup_runner.py +460 -0
  48. toolbase-0.1.0/tests/test_setup_schema.py +300 -0
  49. toolbase-0.1.0/tests/test_setup_storage.py +214 -0
  50. toolbase-0.1.0/tests/test_setup_validate_cache.py +174 -0
  51. toolbase-0.1.0/tests/test_skills.py +286 -0
  52. toolbase-0.1.0/tests/test_tool_groups.py +499 -0
  53. toolbase-0.1.0/tests/test_toolkit_host_explicit_tools.py +219 -0
  54. toolbase-0.1.0/tests/test_validation_explicit_tools.py +340 -0
  55. toolbase-0.1.0/tests/test_versioning.py +86 -0
  56. toolbase-0.1.0/toolbase/__init__.py +22 -0
  57. toolbase-0.1.0/toolbase/_setup_host.py +243 -0
  58. toolbase-0.1.0/toolbase/_toolkit_host.py +585 -0
  59. toolbase-0.1.0/toolbase/astro.py +9 -0
  60. toolbase-0.1.0/toolbase/auth.py +631 -0
  61. toolbase-0.1.0/toolbase/cli.py +5510 -0
  62. toolbase-0.1.0/toolbase/config.py +41 -0
  63. toolbase-0.1.0/toolbase/envs/__init__.py +147 -0
  64. toolbase-0.1.0/toolbase/envs/cache.py +326 -0
  65. toolbase-0.1.0/toolbase/envs/config.py +122 -0
  66. toolbase-0.1.0/toolbase/envs/discovery.py +115 -0
  67. toolbase-0.1.0/toolbase/envs/manifest.py +209 -0
  68. toolbase-0.1.0/toolbase/envs/paths.py +163 -0
  69. toolbase-0.1.0/toolbase/envs/schema.py +348 -0
  70. toolbase-0.1.0/toolbase/hep.py +8 -0
  71. toolbase-0.1.0/toolbase/ingest.py +913 -0
  72. toolbase-0.1.0/toolbase/logging/__init__.py +5 -0
  73. toolbase-0.1.0/toolbase/logging/logger.py +558 -0
  74. toolbase-0.1.0/toolbase/neutrino.py +7 -0
  75. toolbase-0.1.0/toolbase/quantum.py +7 -0
  76. toolbase-0.1.0/toolbase/serve/__init__.py +7 -0
  77. toolbase-0.1.0/toolbase/serve/config.py +436 -0
  78. toolbase-0.1.0/toolbase/serve/orchestrator.py +1526 -0
  79. toolbase-0.1.0/toolbase/serve/proxy_tool.py +134 -0
  80. toolbase-0.1.0/toolbase/serve/tool_groups.py +189 -0
  81. toolbase-0.1.0/toolbase/setup/__init__.py +91 -0
  82. toolbase-0.1.0/toolbase/setup/_rpc.py +326 -0
  83. toolbase-0.1.0/toolbase/setup/context.py +379 -0
  84. toolbase-0.1.0/toolbase/setup/declarative.py +363 -0
  85. toolbase-0.1.0/toolbase/setup/downloads.py +416 -0
  86. toolbase-0.1.0/toolbase/setup/prompts.py +271 -0
  87. toolbase-0.1.0/toolbase/setup/runner.py +1179 -0
  88. toolbase-0.1.0/toolbase/setup/schema.py +465 -0
  89. toolbase-0.1.0/toolbase/setup/storage.py +364 -0
  90. toolbase-0.1.0/toolbase/setup/validate_cache.py +152 -0
  91. toolbase-0.1.0/toolbase/skills.py +256 -0
  92. toolbase-0.1.0/toolbase/templates/Dockerfile.template +25 -0
  93. toolbase-0.1.0/toolbase/templates/README.md.template +50 -0
  94. toolbase-0.1.0/toolbase/templates/__init__.py.template +10 -0
  95. toolbase-0.1.0/toolbase/templates/mcp/__init__.py.template +4 -0
  96. toolbase-0.1.0/toolbase/templates/mcp/server_stdio.py.template +46 -0
  97. toolbase-0.1.0/toolbase/templates/requirements.txt.template +11 -0
  98. toolbase-0.1.0/toolbase/templates/setup.py.template +94 -0
  99. toolbase-0.1.0/toolbase/templates/skills/example_skill.md +44 -0
  100. toolbase-0.1.0/toolbase/templates/tool_example.py +100 -0
  101. toolbase-0.1.0/toolbase/templates/toolkit.yaml.template +68 -0
  102. toolbase-0.1.0/toolbase/toolkit.py +387 -0
  103. toolbase-0.1.0/toolbase/validation.py +801 -0
  104. toolbase-0.1.0/toolbase/versioning.py +100 -0
  105. toolbase-0.1.0/toolbase.egg-info/PKG-INFO +247 -0
  106. toolbase-0.1.0/toolbase.egg-info/SOURCES.txt +108 -0
  107. toolbase-0.1.0/toolbase.egg-info/dependency_links.txt +1 -0
  108. toolbase-0.1.0/toolbase.egg-info/entry_points.txt +3 -0
  109. toolbase-0.1.0/toolbase.egg-info/requires.txt +15 -0
  110. toolbase-0.1.0/toolbase.egg-info/top_level.txt +1 -0
toolbase-0.1.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Alex Roman
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,247 @@
1
+ Metadata-Version: 2.4
2
+ Name: toolbase
3
+ Version: 0.1.0
4
+ Summary: The community registry and CLI for AI agent toolkits - discover, share, and serve tools to AI agents over MCP
5
+ Author-email: Alex Roman <toolbase.dev@gmail.com>
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/alexr314/toolbase
8
+ Project-URL: Documentation, https://github.com/alexr314/toolbase#readme
9
+ Project-URL: Repository, https://github.com/alexr314/toolbase
10
+ Project-URL: Issues, https://github.com/alexr314/toolbase/issues
11
+ Keywords: ai,agents,tools,toolkit,mcp,orchestral,registry,package-manager
12
+ Classifier: Development Status :: 3 - Alpha
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Intended Audience :: Science/Research
15
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
16
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
17
+ Classifier: License :: OSI Approved :: MIT License
18
+ Classifier: Programming Language :: Python :: 3
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Requires-Python: >=3.12
21
+ Description-Content-Type: text/markdown
22
+ License-File: LICENSE
23
+ Requires-Dist: click>=8.0
24
+ Requires-Dist: requests>=2.31
25
+ Requires-Dist: pyyaml>=6.0
26
+ Requires-Dist: ruamel.yaml>=0.18
27
+ Requires-Dist: rich>=13.0
28
+ Requires-Dist: pydantic>=2.0
29
+ Requires-Dist: email-validator>=2.0
30
+ Requires-Dist: orchestral-ai>=1.4
31
+ Requires-Dist: mcp>=1.0
32
+ Provides-Extra: dev
33
+ Requires-Dist: pytest>=7.0; extra == "dev"
34
+ Requires-Dist: pytest-cov>=4.0; extra == "dev"
35
+ Requires-Dist: black>=23.0; extra == "dev"
36
+ Requires-Dist: ruff>=0.1.0; extra == "dev"
37
+ Dynamic: license-file
38
+
39
+ # toolbase
40
+
41
+ The package manager and runtime for AI agent tools. Publish toolkits to
42
+ the [Toolbase registry](https://toolbase-ai.com) and use them in coding
43
+ agents (Claude Code, Codex) or any client that speaks the
44
+ [Model Context Protocol](https://modelcontextprotocol.io). Toolkits span
45
+ any domain, from web and data utilities to scientific categories like
46
+ astro, hep, and quantum.
47
+
48
+ A **toolkit** is the publishable unit; it bundles one or more **tools**
49
+ an agent can call. Each toolkit installs into its own isolated Python
50
+ environment, so dependency conflicts between toolkits are never a
51
+ problem.
52
+
53
+ ---
54
+
55
+ ## Quickstart
56
+
57
+ ```bash
58
+ pip install toolbase
59
+
60
+ # Install a toolkit from the registry (global by default)
61
+ tb install arxiv-search
62
+
63
+ # Or scope an install to the current project's manifest
64
+ tb install -l arxiv-search
65
+
66
+ # See what you have
67
+ tb list
68
+
69
+ # Serve installed toolkits over MCP stdio
70
+ tb serve
71
+ ```
72
+
73
+ `tb` is a shorter alias for `toolbase`; both ship with the package
74
+ and behave identically.
75
+
76
+ Installs are global by default (`-g`). Use `-l` to pin a toolkit into
77
+ the current project's `.toolbase/manifest.yaml` instead — the binary
78
+ still lives in the shared global cache, only the pin is project-scoped,
79
+ so a collaborator who clones the project and runs `tb install` (no
80
+ args) gets the same toolkits at the same versions.
81
+
82
+ To use the served toolkits in [Claude Code](https://claude.ai/code), add
83
+ this to its MCP config:
84
+
85
+ ```json
86
+ {
87
+ "mcpServers": {
88
+ "toolbase": {
89
+ "command": "toolbase",
90
+ "args": ["serve"]
91
+ }
92
+ }
93
+ }
94
+ ```
95
+
96
+ Claude Code will spawn its own `toolbase serve` subprocess and
97
+ discover all installed toolkits' tools. To watch tool calls fire in
98
+ real time, run `tb logs` in another terminal.
99
+
100
+ ---
101
+
102
+ ## Authoring a toolkit
103
+
104
+ ```bash
105
+ tb init my-toolkit # scaffold from template
106
+ # tb init my-toolkit --with-setup # if your toolkit needs a setup.py
107
+ cd my-toolkit
108
+ # write your tools in tools/ ; write skills in skills/
109
+ tb validate # check structure
110
+ tb login # one-time, browser-flow auth (per-user)
111
+ tb publish # ship it (auto-registers on first run)
112
+ ```
113
+
114
+ `tb publish` registers the toolkit on the registry on its first run —
115
+ no separate step. If the name isn't registered yet, it prompts you
116
+ (using the metadata in `toolkit.yaml`) and registers it before
117
+ uploading. `tb create` is still available if you want to reserve a
118
+ name without uploading code yet, but it's no longer required.
119
+
120
+ `tb login` (no toolkit name) does a browser-flow that gives you a
121
+ per-user token good for any toolkit you own or collaborate on. Legacy
122
+ per-toolkit tokens are still accepted (`tb login my-toolkit`) but
123
+ deprecated.
124
+
125
+ **Iterating locally.** To develop a toolkit's code without a
126
+ publish→install round-trip on every change, install it editable:
127
+
128
+ ```bash
129
+ cd my-toolkit
130
+ tb install -e . # live symlink to this source dir
131
+ tb serve my-toolkit # serve it; edit tools/, restart, edits are live
132
+ ```
133
+
134
+ An editable install symlinks your source into the cache and builds the
135
+ environment there (your source tree stays clean — no `.venv` written
136
+ into it). Edits to your tool source appear on the next `tb serve`. If
137
+ you change dependencies, re-run `tb install -e .` to rebuild the env.
138
+
139
+ For the agent-assisted authoring flow (recommended for first toolkits),
140
+ see <https://toolbase-ai.com/docs/scaffold-with-an-agent>.
141
+
142
+ For the full author guide — toolkit layout, tool conventions, skills,
143
+ groups, expected_toolkits, configuration — see
144
+ <https://toolbase-ai.com/docs/authoring> and
145
+ <https://toolbase-ai.com/docs/configuration>.
146
+
147
+ ---
148
+
149
+ ## What's in toolbase
150
+
151
+ **Commands:**
152
+
153
+ - `init`, `create`, `ingest`, `validate`, `login`, `whoami`, `logout`,
154
+ `publish` — author and ship toolkits.
155
+ - `search`, `install`, `uninstall`, `list` — manage installed toolkits.
156
+ `install` takes `-g` (global, the default), `-l` (pin into this
157
+ project), or `-e <path>` (editable, live symlink to a local source).
158
+ - `serve` — run installed toolkits as an MCP stdio server. Supports
159
+ positional toolkit names, `--group`, `--enable-tool`,
160
+ `--disable-tool`, `--dry-run`, `--call-timeout`.
161
+ - `setup <toolkit>` — run a toolkit's `setup.py` (`--reset`, `--check`).
162
+ - `config <show|edit|path|set|unset|validate>` — manage per-toolkit
163
+ config files at `~/.toolbase/config/<toolkit>.yaml`.
164
+ - `logs` — tail the serve log with Rich coloring.
165
+ - `groups` — manage named tool subsets that span toolkits.
166
+
167
+ **Features:**
168
+
169
+ - **Editable installs.** `tb install -e <path>` symlinks a local
170
+ toolkit source into the cache so `serve` loads tools live — the
171
+ `pip install -e .` parallel for the toolkit dev loop. The env is
172
+ built and cached; only the source is symlinked, so your source tree
173
+ stays clean.
174
+ - **Multi-version installs + per-project pinning.** Different versions
175
+ of a toolkit coexist in the global cache; each project pins which
176
+ version it uses in a git-committed `.toolbase/manifest.yaml`. The
177
+ binary lives once in the shared cache (`-g`/`-l` choose the manifest
178
+ scope, not the file location).
179
+ - **Configuration system.** Toolkits declare a `config:` block in
180
+ `toolkit.yaml` (seven types: `string`, `secret`, `path`, `integer`,
181
+ `float`, `boolean`, `choice`); users fill it at install time or by
182
+ editing `~/.toolbase/config/<toolkit>.yaml`. Toolkits with more
183
+ involved setup ship a `setup.py` with full prompts, downloads
184
+ (resumable, SHA256-verified, auto-extracting tar/zip with zip-slip
185
+ defense), and derived-state writes via `ctx.set_config(...)`.
186
+ - **Per-user auth.** `toolbase login` does a browser-flow that
187
+ stores a per-user token good for any toolkit you own or
188
+ collaborate on. Legacy per-toolkit tokens still work but are
189
+ deprecated.
190
+ - **Multi-tier execution:** same-Python toolkits run in venv,
191
+ different-Python toolkits run under conda (auto-detected). Docker
192
+ mode coming in 3B.
193
+ - **Per-tool selection:** enable or disable individual tools per
194
+ serve session or persistently in `~/.toolbase/serve.yaml`.
195
+ - **Skills surfacing:** a toolkit's `skills/*.md` files are
196
+ auto-mirrored to `~/.claude/skills/` so Claude Code discovers
197
+ them. Symlinked on POSIX for live edits, copied on Windows.
198
+ - **Agent-friendly flags:** every state-modifying command supports
199
+ `--yes`, `--no`, `--no-input`. Non-TTY stdin auto-applies
200
+ non-interactive behavior.
201
+ - **Versioning safeguards:** `publish` blocks "version already
202
+ exists" and "version decrease" with helpful suggestions before
203
+ upload.
204
+ - **Crash resilience:** per-toolkit subprocess auto-restart with
205
+ exponential backoff. A crashed toolkit doesn't take the
206
+ orchestrator down.
207
+ - Python 3.12+ required.
208
+
209
+ See [CHANGELOG.md](CHANGELOG.md) for the full release history.
210
+
211
+ ---
212
+
213
+ ## Architecture
214
+
215
+ The package has three pieces:
216
+
217
+ - **CLI** (this package) — installed locally, manages toolkit
218
+ environments and serves tools.
219
+ - **Backend** ([api.scitoolkit.org](https://api.scitoolkit.org)) —
220
+ registry, auth, tarball storage.
221
+ - **Website** ([toolbase-ai.com](https://toolbase-ai.com)) — discover and
222
+ manage published toolkits.
223
+
224
+ Each installed toolkit runs in its own subprocess in its own Python
225
+ environment. The `toolbase serve` orchestrator aggregates them and
226
+ exposes the union as a single MCP server upstream. Failures in one
227
+ toolkit don't affect others.
228
+
229
+ ---
230
+
231
+ ## Contributing
232
+
233
+ Issues and PRs are welcome at
234
+ <https://github.com/alexr314/toolbase>.
235
+
236
+ ---
237
+
238
+ ## License
239
+
240
+ MIT. See [LICENSE](LICENSE).
241
+
242
+ ## Links
243
+
244
+ - Website: <https://toolbase-ai.com>
245
+ - Backend API: <https://api.scitoolkit.org>
246
+ - GitHub: <https://github.com/alexr314/toolbase>
247
+ - Issues: <https://github.com/alexr314/toolbase/issues>
@@ -0,0 +1,209 @@
1
+ # toolbase
2
+
3
+ The package manager and runtime for AI agent tools. Publish toolkits to
4
+ the [Toolbase registry](https://toolbase-ai.com) and use them in coding
5
+ agents (Claude Code, Codex) or any client that speaks the
6
+ [Model Context Protocol](https://modelcontextprotocol.io). Toolkits span
7
+ any domain, from web and data utilities to scientific categories like
8
+ astro, hep, and quantum.
9
+
10
+ A **toolkit** is the publishable unit; it bundles one or more **tools**
11
+ an agent can call. Each toolkit installs into its own isolated Python
12
+ environment, so dependency conflicts between toolkits are never a
13
+ problem.
14
+
15
+ ---
16
+
17
+ ## Quickstart
18
+
19
+ ```bash
20
+ pip install toolbase
21
+
22
+ # Install a toolkit from the registry (global by default)
23
+ tb install arxiv-search
24
+
25
+ # Or scope an install to the current project's manifest
26
+ tb install -l arxiv-search
27
+
28
+ # See what you have
29
+ tb list
30
+
31
+ # Serve installed toolkits over MCP stdio
32
+ tb serve
33
+ ```
34
+
35
+ `tb` is a shorter alias for `toolbase`; both ship with the package
36
+ and behave identically.
37
+
38
+ Installs are global by default (`-g`). Use `-l` to pin a toolkit into
39
+ the current project's `.toolbase/manifest.yaml` instead — the binary
40
+ still lives in the shared global cache, only the pin is project-scoped,
41
+ so a collaborator who clones the project and runs `tb install` (no
42
+ args) gets the same toolkits at the same versions.
43
+
44
+ To use the served toolkits in [Claude Code](https://claude.ai/code), add
45
+ this to its MCP config:
46
+
47
+ ```json
48
+ {
49
+ "mcpServers": {
50
+ "toolbase": {
51
+ "command": "toolbase",
52
+ "args": ["serve"]
53
+ }
54
+ }
55
+ }
56
+ ```
57
+
58
+ Claude Code will spawn its own `toolbase serve` subprocess and
59
+ discover all installed toolkits' tools. To watch tool calls fire in
60
+ real time, run `tb logs` in another terminal.
61
+
62
+ ---
63
+
64
+ ## Authoring a toolkit
65
+
66
+ ```bash
67
+ tb init my-toolkit # scaffold from template
68
+ # tb init my-toolkit --with-setup # if your toolkit needs a setup.py
69
+ cd my-toolkit
70
+ # write your tools in tools/ ; write skills in skills/
71
+ tb validate # check structure
72
+ tb login # one-time, browser-flow auth (per-user)
73
+ tb publish # ship it (auto-registers on first run)
74
+ ```
75
+
76
+ `tb publish` registers the toolkit on the registry on its first run —
77
+ no separate step. If the name isn't registered yet, it prompts you
78
+ (using the metadata in `toolkit.yaml`) and registers it before
79
+ uploading. `tb create` is still available if you want to reserve a
80
+ name without uploading code yet, but it's no longer required.
81
+
82
+ `tb login` (no toolkit name) does a browser-flow that gives you a
83
+ per-user token good for any toolkit you own or collaborate on. Legacy
84
+ per-toolkit tokens are still accepted (`tb login my-toolkit`) but
85
+ deprecated.
86
+
87
+ **Iterating locally.** To develop a toolkit's code without a
88
+ publish→install round-trip on every change, install it editable:
89
+
90
+ ```bash
91
+ cd my-toolkit
92
+ tb install -e . # live symlink to this source dir
93
+ tb serve my-toolkit # serve it; edit tools/, restart, edits are live
94
+ ```
95
+
96
+ An editable install symlinks your source into the cache and builds the
97
+ environment there (your source tree stays clean — no `.venv` written
98
+ into it). Edits to your tool source appear on the next `tb serve`. If
99
+ you change dependencies, re-run `tb install -e .` to rebuild the env.
100
+
101
+ For the agent-assisted authoring flow (recommended for first toolkits),
102
+ see <https://toolbase-ai.com/docs/scaffold-with-an-agent>.
103
+
104
+ For the full author guide — toolkit layout, tool conventions, skills,
105
+ groups, expected_toolkits, configuration — see
106
+ <https://toolbase-ai.com/docs/authoring> and
107
+ <https://toolbase-ai.com/docs/configuration>.
108
+
109
+ ---
110
+
111
+ ## What's in toolbase
112
+
113
+ **Commands:**
114
+
115
+ - `init`, `create`, `ingest`, `validate`, `login`, `whoami`, `logout`,
116
+ `publish` — author and ship toolkits.
117
+ - `search`, `install`, `uninstall`, `list` — manage installed toolkits.
118
+ `install` takes `-g` (global, the default), `-l` (pin into this
119
+ project), or `-e <path>` (editable, live symlink to a local source).
120
+ - `serve` — run installed toolkits as an MCP stdio server. Supports
121
+ positional toolkit names, `--group`, `--enable-tool`,
122
+ `--disable-tool`, `--dry-run`, `--call-timeout`.
123
+ - `setup <toolkit>` — run a toolkit's `setup.py` (`--reset`, `--check`).
124
+ - `config <show|edit|path|set|unset|validate>` — manage per-toolkit
125
+ config files at `~/.toolbase/config/<toolkit>.yaml`.
126
+ - `logs` — tail the serve log with Rich coloring.
127
+ - `groups` — manage named tool subsets that span toolkits.
128
+
129
+ **Features:**
130
+
131
+ - **Editable installs.** `tb install -e <path>` symlinks a local
132
+ toolkit source into the cache so `serve` loads tools live — the
133
+ `pip install -e .` parallel for the toolkit dev loop. The env is
134
+ built and cached; only the source is symlinked, so your source tree
135
+ stays clean.
136
+ - **Multi-version installs + per-project pinning.** Different versions
137
+ of a toolkit coexist in the global cache; each project pins which
138
+ version it uses in a git-committed `.toolbase/manifest.yaml`. The
139
+ binary lives once in the shared cache (`-g`/`-l` choose the manifest
140
+ scope, not the file location).
141
+ - **Configuration system.** Toolkits declare a `config:` block in
142
+ `toolkit.yaml` (seven types: `string`, `secret`, `path`, `integer`,
143
+ `float`, `boolean`, `choice`); users fill it at install time or by
144
+ editing `~/.toolbase/config/<toolkit>.yaml`. Toolkits with more
145
+ involved setup ship a `setup.py` with full prompts, downloads
146
+ (resumable, SHA256-verified, auto-extracting tar/zip with zip-slip
147
+ defense), and derived-state writes via `ctx.set_config(...)`.
148
+ - **Per-user auth.** `toolbase login` does a browser-flow that
149
+ stores a per-user token good for any toolkit you own or
150
+ collaborate on. Legacy per-toolkit tokens still work but are
151
+ deprecated.
152
+ - **Multi-tier execution:** same-Python toolkits run in venv,
153
+ different-Python toolkits run under conda (auto-detected). Docker
154
+ mode coming in 3B.
155
+ - **Per-tool selection:** enable or disable individual tools per
156
+ serve session or persistently in `~/.toolbase/serve.yaml`.
157
+ - **Skills surfacing:** a toolkit's `skills/*.md` files are
158
+ auto-mirrored to `~/.claude/skills/` so Claude Code discovers
159
+ them. Symlinked on POSIX for live edits, copied on Windows.
160
+ - **Agent-friendly flags:** every state-modifying command supports
161
+ `--yes`, `--no`, `--no-input`. Non-TTY stdin auto-applies
162
+ non-interactive behavior.
163
+ - **Versioning safeguards:** `publish` blocks "version already
164
+ exists" and "version decrease" with helpful suggestions before
165
+ upload.
166
+ - **Crash resilience:** per-toolkit subprocess auto-restart with
167
+ exponential backoff. A crashed toolkit doesn't take the
168
+ orchestrator down.
169
+ - Python 3.12+ required.
170
+
171
+ See [CHANGELOG.md](CHANGELOG.md) for the full release history.
172
+
173
+ ---
174
+
175
+ ## Architecture
176
+
177
+ The package has three pieces:
178
+
179
+ - **CLI** (this package) — installed locally, manages toolkit
180
+ environments and serves tools.
181
+ - **Backend** ([api.scitoolkit.org](https://api.scitoolkit.org)) —
182
+ registry, auth, tarball storage.
183
+ - **Website** ([toolbase-ai.com](https://toolbase-ai.com)) — discover and
184
+ manage published toolkits.
185
+
186
+ Each installed toolkit runs in its own subprocess in its own Python
187
+ environment. The `toolbase serve` orchestrator aggregates them and
188
+ exposes the union as a single MCP server upstream. Failures in one
189
+ toolkit don't affect others.
190
+
191
+ ---
192
+
193
+ ## Contributing
194
+
195
+ Issues and PRs are welcome at
196
+ <https://github.com/alexr314/toolbase>.
197
+
198
+ ---
199
+
200
+ ## License
201
+
202
+ MIT. See [LICENSE](LICENSE).
203
+
204
+ ## Links
205
+
206
+ - Website: <https://toolbase-ai.com>
207
+ - Backend API: <https://api.scitoolkit.org>
208
+ - GitHub: <https://github.com/alexr314/toolbase>
209
+ - Issues: <https://github.com/alexr314/toolbase/issues>
@@ -0,0 +1,78 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61.0", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "toolbase"
7
+ version = "0.1.0"
8
+ description = "The community registry and CLI for AI agent toolkits - discover, share, and serve tools to AI agents over MCP"
9
+ readme = "README.md"
10
+ requires-python = ">=3.12"
11
+ license = {text = "MIT"}
12
+ authors = [
13
+ {name = "Alex Roman", email = "toolbase.dev@gmail.com"}
14
+ ]
15
+ keywords = ["ai", "agents", "tools", "toolkit", "mcp", "orchestral", "registry", "package-manager"]
16
+ classifiers = [
17
+ "Development Status :: 3 - Alpha",
18
+ "Intended Audience :: Developers",
19
+ "Intended Audience :: Science/Research",
20
+ "Topic :: Software Development :: Libraries :: Python Modules",
21
+ "Topic :: Scientific/Engineering :: Artificial Intelligence",
22
+ "License :: OSI Approved :: MIT License",
23
+ "Programming Language :: Python :: 3",
24
+ "Programming Language :: Python :: 3.12",
25
+ ]
26
+
27
+ dependencies = [
28
+ "click>=8.0",
29
+ "requests>=2.31",
30
+ "pyyaml>=6.0",
31
+ # Used by toolbase/setup/storage.py to read/write
32
+ # ~/.toolbase/config/<toolkit>.yaml while preserving user comments
33
+ # across edits. pyyaml strips comments on dump; ruamel round-trips them.
34
+ "ruamel.yaml>=0.18",
35
+ "rich>=13.0",
36
+ "pydantic>=2.0",
37
+ # Required by Pydantic's EmailStr at runtime; not imported directly.
38
+ "email-validator>=2.0",
39
+ # 1.4 introduced the `state=[...]` decorator argument that the
40
+ # Phase 3C-1 setup system relies on for state-field declaration.
41
+ "orchestral-ai>=1.4",
42
+ "mcp>=1.0",
43
+ ]
44
+
45
+ [project.urls]
46
+ Homepage = "https://github.com/alexr314/toolbase"
47
+ Documentation = "https://github.com/alexr314/toolbase#readme"
48
+ Repository = "https://github.com/alexr314/toolbase"
49
+ Issues = "https://github.com/alexr314/toolbase/issues"
50
+
51
+ [project.scripts]
52
+ toolbase = "toolbase.cli:main"
53
+ # `tb` is an alias for `toolbase` — same entrypoint, both ship every
54
+ # pip install. Use whichever you prefer; `tb list` is identical to
55
+ # `toolbase list`.
56
+ tb = "toolbase.cli:main"
57
+
58
+ [project.optional-dependencies]
59
+ dev = [
60
+ "pytest>=7.0",
61
+ "pytest-cov>=4.0",
62
+ "black>=23.0",
63
+ "ruff>=0.1.0",
64
+ ]
65
+
66
+ [tool.setuptools.packages.find]
67
+ where = ["."]
68
+ include = ["toolbase*"]
69
+
70
+ [tool.setuptools.package-data]
71
+ # Ship template files (non-.py) so `toolbase init` works on PyPI installs.
72
+ # Without this, only .py files in toolbase/templates/ would land in the
73
+ # wheel — the .md, .yaml, .txt, and Dockerfile templates would silently
74
+ # disappear and `init` would fail with a confusing missing-file error.
75
+ "toolbase" = [
76
+ "templates/*",
77
+ "templates/**/*",
78
+ ]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+