aidem 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.
- aidem-0.1.0/.gitignore +33 -0
- aidem-0.1.0/LICENSE.md +69 -0
- aidem-0.1.0/PKG-INFO +451 -0
- aidem-0.1.0/README.md +419 -0
- aidem-0.1.0/pyproject.toml +67 -0
- aidem-0.1.0/src/aidem/__init__.py +14 -0
- aidem-0.1.0/src/aidem/cli.py +969 -0
- aidem-0.1.0/src/aidem/config/AGENTS.md +40 -0
- aidem-0.1.0/src/aidem/config/__init__.py +1 -0
- aidem-0.1.0/src/aidem/config/generators/__init__.py +82 -0
- aidem-0.1.0/src/aidem/config/generators/base.py +174 -0
- aidem-0.1.0/src/aidem/config/generators/claude.py +25 -0
- aidem-0.1.0/src/aidem/config/generators/cursor.py +22 -0
- aidem-0.1.0/src/aidem/config/generators/github.py +14 -0
- aidem-0.1.0/src/aidem/config/generators/kilo.py +74 -0
- aidem-0.1.0/src/aidem/config/generators/opencode.py +36 -0
- aidem-0.1.0/src/aidem/config/generators/windsurf.py +57 -0
- aidem-0.1.0/src/aidem/config/overlays/python-cli/AGENTS.md +60 -0
- aidem-0.1.0/src/aidem/config/overlays/web-app/AGENTS.md +61 -0
- aidem-0.1.0/src/aidem/config/runtimes/__init__.py +52 -0
- aidem-0.1.0/src/aidem/config/runtimes/base.py +75 -0
- aidem-0.1.0/src/aidem/config/runtimes/binary.py +251 -0
- aidem-0.1.0/src/aidem/config/runtimes/docker.py +97 -0
- aidem-0.1.0/src/aidem/config/runtimes/uv_venv.py +119 -0
- aidem-0.1.0/src/aidem/config/skills/.gitkeep +0 -0
- aidem-0.1.0/src/aidem/paths.py +144 -0
- aidem-0.1.0/tests/conftest.py +55 -0
- aidem-0.1.0/tests/test_init.py +58 -0
- aidem-0.1.0/tests/test_paths.py +81 -0
- aidem-0.1.0/tests/test_registry.py +134 -0
- aidem-0.1.0/tests/test_rules.py +209 -0
- aidem-0.1.0/tests/test_runtimes.py +417 -0
- aidem-0.1.0/tests/test_skills.py +92 -0
aidem-0.1.0/.gitignore
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# macOS
|
|
2
|
+
.DS_Store
|
|
3
|
+
|
|
4
|
+
# Python
|
|
5
|
+
__pycache__/
|
|
6
|
+
*.py[cod]
|
|
7
|
+
*.egg-info/
|
|
8
|
+
*.egg
|
|
9
|
+
.pytest_cache/
|
|
10
|
+
|
|
11
|
+
# Build artifacts
|
|
12
|
+
build/
|
|
13
|
+
dist/
|
|
14
|
+
|
|
15
|
+
# Virtual environments
|
|
16
|
+
.venv/
|
|
17
|
+
venv/
|
|
18
|
+
|
|
19
|
+
# IDE
|
|
20
|
+
.vscode/
|
|
21
|
+
.idea/
|
|
22
|
+
|
|
23
|
+
# Folders
|
|
24
|
+
tmp/
|
|
25
|
+
|
|
26
|
+
# aidem generated project configs in test environments
|
|
27
|
+
# (Only ignore if you don't want to commit tool configs in your own projects)
|
|
28
|
+
# .cursor/
|
|
29
|
+
# .claude/
|
|
30
|
+
# .kilo/
|
|
31
|
+
# .windsurfrules
|
|
32
|
+
# AGENTS.md
|
|
33
|
+
# CLAUDE.md
|
aidem-0.1.0/LICENSE.md
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
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, and distribution as defined by Sections 1 through 9 of this document.
|
|
10
|
+
|
|
11
|
+
"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
|
|
12
|
+
|
|
13
|
+
"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
|
|
14
|
+
|
|
15
|
+
"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
|
|
16
|
+
|
|
17
|
+
"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
|
|
18
|
+
|
|
19
|
+
"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
|
|
20
|
+
|
|
21
|
+
"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
|
|
22
|
+
|
|
23
|
+
"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
|
|
24
|
+
|
|
25
|
+
"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to the Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
|
|
26
|
+
|
|
27
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
|
|
28
|
+
|
|
29
|
+
2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
|
|
30
|
+
|
|
31
|
+
3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
|
|
32
|
+
|
|
33
|
+
4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
|
|
34
|
+
|
|
35
|
+
(a) You must give any other recipients of the Work or Derivative Works a copy of this License; and
|
|
36
|
+
|
|
37
|
+
(b) You must cause any modified files to carry prominent notices stating that You changed the files; and
|
|
38
|
+
|
|
39
|
+
(c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
|
|
40
|
+
|
|
41
|
+
(d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
|
|
42
|
+
|
|
43
|
+
You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
|
|
44
|
+
|
|
45
|
+
5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
|
|
46
|
+
|
|
47
|
+
6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
|
|
48
|
+
|
|
49
|
+
7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
|
|
50
|
+
|
|
51
|
+
8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
|
|
52
|
+
|
|
53
|
+
9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
|
|
54
|
+
|
|
55
|
+
END OF TERMS AND CONDITIONS
|
|
56
|
+
|
|
57
|
+
Copyright 2026 aidem contributors
|
|
58
|
+
|
|
59
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
60
|
+
you may not use this file except in compliance with the License.
|
|
61
|
+
You may obtain a copy of the License at
|
|
62
|
+
|
|
63
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
64
|
+
|
|
65
|
+
Unless required by applicable law or agreed to in writing, software
|
|
66
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
67
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
68
|
+
See the License for the specific language governing permissions and
|
|
69
|
+
limitations under the License.
|
aidem-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,451 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: aidem
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Universal AI development environment manager
|
|
5
|
+
Project-URL: Homepage, https://github.com/bhave-sh/aidem
|
|
6
|
+
Project-URL: Repository, https://github.com/bhave-sh/aidem
|
|
7
|
+
Project-URL: Issues, https://github.com/bhave-sh/aidem/issues
|
|
8
|
+
Project-URL: Changelog, https://github.com/bhave-sh/aidem/releases
|
|
9
|
+
Author: Bhavesh J
|
|
10
|
+
License-Expression: Apache-2.0
|
|
11
|
+
License-File: LICENSE.md
|
|
12
|
+
Keywords: agent,agents-md,ai,cli,development-environment,mcp,rules,skills
|
|
13
|
+
Classifier: Development Status :: 3 - Alpha
|
|
14
|
+
Classifier: Environment :: Console
|
|
15
|
+
Classifier: Intended Audience :: Developers
|
|
16
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
17
|
+
Classifier: Operating System :: OS Independent
|
|
18
|
+
Classifier: Programming Language :: Python :: 3
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
23
|
+
Classifier: Topic :: Software Development
|
|
24
|
+
Classifier: Topic :: Utilities
|
|
25
|
+
Requires-Python: >=3.11
|
|
26
|
+
Requires-Dist: click>=8.0
|
|
27
|
+
Requires-Dist: jinja2>=3.0
|
|
28
|
+
Provides-Extra: dev
|
|
29
|
+
Requires-Dist: pytest>=8.0; extra == 'dev'
|
|
30
|
+
Requires-Dist: twine>=5.0; extra == 'dev'
|
|
31
|
+
Description-Content-Type: text/markdown
|
|
32
|
+
|
|
33
|
+
<div align="center">
|
|
34
|
+
|
|
35
|
+
# `aidem`
|
|
36
|
+
|
|
37
|
+
**AI development environment manager.**
|
|
38
|
+
|
|
39
|
+
_One content library, one-time tool bridges, one repo standard._
|
|
40
|
+
|
|
41
|
+
[](LICENSE.md)
|
|
42
|
+
[](https://www.python.org/downloads/)
|
|
43
|
+
[](https://github.com/astral-sh/uv)
|
|
44
|
+
|
|
45
|
+
</div>
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
aidem solves two fragmentation problems caused by the wave of AI coding assistants:
|
|
50
|
+
|
|
51
|
+
1. **Content fragmentation** — every AI tool wants skills, rules, and MCP configs in a different directory format. You maintain content in **one** aidem location (`~/.aidem/<kind>/`) organized by kind; `aidem setup` links each tool's global directory to it **once**, so every skill you add afterwards surfaces as a native skill in whatever IDE the developer uses — with no per-skill-per-tool wiring.
|
|
52
|
+
2. **Tool isolation** — experimental AI agents each demand their own Python/Docker setup. You register a repo once, and `aidem run <tool>` executes it from an aidem-owned isolated env at `~/.aidem/envs/<tool>/` — never polluting your global PATH or system Python. Runtime adapters (uv / prebuilt binary / docker) handle each ecosystem.
|
|
53
|
+
|
|
54
|
+
aidem **does not ship skills** — it ships the *tools* to manage them. It also does **not** pollute each repo with per-tool config files: repo-level standards collapse to a single committed `AGENTS.md` (read natively by Cursor, Copilot, and Kilo).
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## The Problem
|
|
59
|
+
|
|
60
|
+
Every major AI coding tool wants its own skills directory:
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
~/.cursor/skills/ # Cursor
|
|
64
|
+
~/.claude/skills/ # Claude Code
|
|
65
|
+
~/.kilo/skills/ # Kilo
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
A developer with 5 skills and 3 tools manually maintains **15 files** across their home directory. Adding/removing a skill means touching 3+ places and cleaning up scattered stale files later.
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## Architecture: Centralized Bridging
|
|
73
|
+
|
|
74
|
+
```
|
|
75
|
+
┌──────────────────────────────────────────────────────────────────┐
|
|
76
|
+
│ aidem CLI │
|
|
77
|
+
│ │
|
|
78
|
+
│ aidem registry add <url> <name> ← clone a skill repo + link it │
|
|
79
|
+
│ aidem create <name> --skill ← author a skill locally │
|
|
80
|
+
│ aidem setup ← one-time dir bridges │
|
|
81
|
+
│ aidem init [path] ← write AGENTS.md into a repo│
|
|
82
|
+
│ aidem run <tool> <args> ← execute a registered tool │
|
|
83
|
+
└──────────────────────────────────────────────────────────────────┘
|
|
84
|
+
│ │ │
|
|
85
|
+
▼ ▼ ▼
|
|
86
|
+
┌─────────────────┐ ┌──────────────────┐ ┌──────────────────┐
|
|
87
|
+
│ Layer 0 │ │ Layer 1 │ │ Layer 2 │
|
|
88
|
+
│ Registry │ │ Central staging│ │ Execution │
|
|
89
|
+
│ │ │ + repo init │ │ │
|
|
90
|
+
│ git clone │ │ │ │ read manifest │
|
|
91
|
+
│ clone + │ │ A: aidem init │ │ find binary │
|
|
92
|
+
│ uv tool install │ │ → repo/AGENTS.md│ │ os.execvp │
|
|
93
|
+
│ │ │ │ │ pass-through │
|
|
94
|
+
│ │ │ B: ~/.aidem/skills│ │ │
|
|
95
|
+
│ │ │ (shared lib) │ │ │
|
|
96
|
+
│ │ │ │ │ │
|
|
97
|
+
│ │ │ aidem setup: │ │ │
|
|
98
|
+
│ │ │ ~/.<tool>/... │ │ │
|
|
99
|
+
│ │ │ →→→ config/... │ │ │
|
|
100
|
+
└─────────────────┘ └──────────────────┘ └──────────────────┘
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
### Layer 0 — Registry
|
|
104
|
+
|
|
105
|
+
Skill/tool repos are `git clone`d into `~/.aidem/registry/<kind>/<name>/`. On add, the repo's `skill.md` (or `skills/**/SKILL.md`) is symlinked into `~/.aidem/skills`, along with any supporting subdirectories (e.g. `rules/`, `references/`). Repos that define a console script (`pyproject.toml [project.scripts]`) are also installed as `uv tool` in editable mode. Rule repos (`--kind rule`) link their `rule.md`/`rules/*.md` into `~/.aidem/rules` as flat files instead.
|
|
106
|
+
|
|
107
|
+
### Layer 1 — Central staging + repo conventions
|
|
108
|
+
|
|
109
|
+
aidem keeps **one** shared skill library — `~/.aidem/skills/`. `aidem setup` links each tool's global skills dir to it **once**:
|
|
110
|
+
|
|
111
|
+
| Tool | IDE dot-folder | Bridged to |
|
|
112
|
+
|---|---|---|
|
|
113
|
+
| Kilo | `~/.kilo/skills` | `~/.aidem/skills` |
|
|
114
|
+
| Claude | `~/.claude/skills` | `~/.aidem/skills` |
|
|
115
|
+
| Cursor | `~/.cursor/skills` | `~/.aidem/skills` |
|
|
116
|
+
| OpenCode | `~/.config/opencode/skills` | `~/.aidem/skills` |
|
|
117
|
+
| Windsurf | `~/.codeium/windsurf/skills` | `~/.aidem/skills` |
|
|
118
|
+
|
|
119
|
+
Add/remove a skill in `~/.aidem/skills` and every bridged tool sees it instantly.
|
|
120
|
+
|
|
121
|
+
The same model now extends to **rules** via `~/.aidem/rules/`. Rules have no cross-tool standard (unlike skills), so each tool is bridged in the shape it supports:
|
|
122
|
+
|
|
123
|
+
| Tool | Global rules target | Bridge |
|
|
124
|
+
|---|---|---|
|
|
125
|
+
| Claude | `~/.claude/rules` | passthrough dir symlink → `~/.aidem/rules` |
|
|
126
|
+
| Kilo | `instructions[]` in `~/.config/kilo/kilo.jsonc` | config-array glob entry |
|
|
127
|
+
| OpenCode | `instructions[]` in `~/.config/opencode/opencode.json` | config-array glob entry |
|
|
128
|
+
| Windsurf | `~/.codeium/windsurf/memories/global_rules.md` | concat mirror (6,000-char Windsurf cap; warns on overflow) |
|
|
129
|
+
| Cursor | — | skipped (User Rules are UI-only; project rules are repo-level `.mdc`) |
|
|
130
|
+
| GitHub Copilot | — | skipped (repo-level only) |
|
|
131
|
+
|
|
132
|
+
Add/remove a rule in `~/.aidem/rules` and every bridged tool sees it on the next `aidem setup`.
|
|
133
|
+
|
|
134
|
+
For repo-level standards, `aidem init <path>` writes a single `AGENTS.md`. Tools that read it natively (Cursor, Copilot, Kilo) consume it directly — no per-tool files, no duplication. Commit it so every contributor gets the standard on clone with **no aidem install required**.
|
|
135
|
+
|
|
136
|
+
User data (`~/.aidem/`) is separated from the shipped package and survives upgrades. Override with `AIDEM_DATA_DIR`.
|
|
137
|
+
|
|
138
|
+
### Layer 2 — Execution
|
|
139
|
+
|
|
140
|
+
`aidem run <tool> <args>` reads `registry/manifest.json`, resolves the tool's binary from its **aidem-owned isolated env** at `~/.aidem/envs/<tool>/bin/<binary>`, and execs it with all args passed through via `os.execvp`. Exit codes and stdio are preserved; `--help` is passed through.
|
|
141
|
+
|
|
142
|
+
aidem never installs tool CLIs onto the global PATH (`~/.local/bin`). Each registered tool lives in its own isolated env, so same-named binaries never collide and the host system stays clean. The runtime kind (uv / binary / docker) is auto-detected from file markers and dispatches to a per-ecosystem adapter:
|
|
143
|
+
|
|
144
|
+
| Runtime | Mechanism | Host deps | Isolation | Example tools |
|
|
145
|
+
|---|---|---|---|---|
|
|
146
|
+
| **uv** (default for Python) | `uv venv` + `uv pip install` into `~/.aidem/envs/<n>/` | Python + uv | full app isolation, no global PATH | headroom, any pyproject tool |
|
|
147
|
+
| **binary** | fetch GitHub release asset → extract → `envs/<n>/bin/` | none | fully sandboxed (single binary) | rtk, any release-asset tool |
|
|
148
|
+
| **docker** | `docker run --rm -v $PWD:/work <image> <args>` | Docker only | OS-level sandbox, reproducible | any Dockerfile/image tool |
|
|
149
|
+
|
|
150
|
+
Auto-heuristics make `aidem registry add <url> <name>` one-command magic for the common cases (no flags required):
|
|
151
|
+
- **uv**: prefers a **published PyPI wheel** over an editable-from-clone build (avoids native-toolchain builds); defaults to the `[all]` extras group if the clone declares it. Override with `--spec "<pkg>[extras]"` / `--extras "..."`.
|
|
152
|
+
- **binary**: queries the repo's GitHub Releases and picks the asset matching `{os}-{arch}` (rtk ships `rtk-<arch>-<os>.tar.gz`). Override with `--asset "<glob>"`.
|
|
153
|
+
- **docker**: pulls a `--image <ref>` if given, else builds the clone's `Dockerfile` as `aidem/<name>`.
|
|
154
|
+
|
|
155
|
+
Detected-but-deferred ecosystems (npm, cargo, go) register as skills-only with a clear note until their runtimes ship.
|
|
156
|
+
|
|
157
|
+
---
|
|
158
|
+
|
|
159
|
+
## Repository Structure
|
|
160
|
+
|
|
161
|
+
Shipped package (read-only, travels with the install):
|
|
162
|
+
|
|
163
|
+
```
|
|
164
|
+
aidem/ # the package
|
|
165
|
+
├── aidem_cli.py # CLI entry point
|
|
166
|
+
├── aidem_paths.py # Centralized path resolution (data dir vs package)
|
|
167
|
+
├── pyproject.toml # Package definition
|
|
168
|
+
├── README.md
|
|
169
|
+
├── LICENSE.md / CLA.md / NOTICE.md / CONTRIBUTING.md
|
|
170
|
+
├── tests/ # pytest suite (fake HOME/data dir via fixtures)
|
|
171
|
+
└── config/ # shipped assets (read-only)
|
|
172
|
+
├── AGENTS.md # Canonical agent context (repo template source)
|
|
173
|
+
├── overlays/ # Per-project-type AGENTS.md templates
|
|
174
|
+
│ ├── web-app/AGENTS.md
|
|
175
|
+
│ └── python-cli/AGENTS.md
|
|
176
|
+
├── generators/ # Per-tool bridge logic (one file per tool)
|
|
177
|
+
│ ├── base.py # Generator interface (skills + rules bridges)
|
|
178
|
+
│ ├── cursor.py # skills passthrough; rules skipped (no global path)
|
|
179
|
+
│ ├── kilo.py # skills passthrough/config fallback; rules → instructions[]
|
|
180
|
+
│ ├── claude.py # skills + rules passthrough → ~/.aidem/{skills,rules}
|
|
181
|
+
│ ├── github.py # no global path (repo-level only, both kinds)
|
|
182
|
+
│ └── windsurf.py # skills passthrough; rules → concat global_rules.md
|
|
183
|
+
└── runtimes/ # Per-ecosystem execution adapters (one file per runtime)
|
|
184
|
+
├── base.py # Runtime interface (install/resolve_binary/run/uninstall)
|
|
185
|
+
├── uv_venv.py # Python: uv venv + pip install into envs/<n>/
|
|
186
|
+
├── binary.py # Prebuilt: fetch release asset → envs/<n>/bin/
|
|
187
|
+
└── docker.py # Container: docker run --rm -v $PWD:/work
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
User data (writable, persistent, `~/.aidem/` — overridable via `AIDEM_DATA_DIR`):
|
|
191
|
+
|
|
192
|
+
```
|
|
193
|
+
~/.aidem/
|
|
194
|
+
├── skills/ # Shared skill library (real files + source symlinks)
|
|
195
|
+
├── rules/ # Shared rules library (flat *.md, one file per rule)
|
|
196
|
+
├── mcp/ # MCP server configs (when registered with --kind mcp)
|
|
197
|
+
├── envs/ # Layer 2: isolated tool envs (one dir per registered tool)
|
|
198
|
+
│ └── <name>/bin/<binary> # aidem resolves+execs from here, never global PATH
|
|
199
|
+
└── registry/ # Layer 0: git clones + manifest
|
|
200
|
+
├── manifest.json
|
|
201
|
+
└── skill/ # repos registered with --kind skill (singular kind label)
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
---
|
|
205
|
+
|
|
206
|
+
## Installation
|
|
207
|
+
|
|
208
|
+
Requires Python 3.11+ and `uv`.
|
|
209
|
+
|
|
210
|
+
```bash
|
|
211
|
+
git clone https://github.com/bhave-sh/aidem.git ~/aidem
|
|
212
|
+
cd ~/aidem
|
|
213
|
+
uv tool install --editable .
|
|
214
|
+
aidem --help
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
Add aidem's bin to PATH if prompted (once, in your shell rc):
|
|
218
|
+
```bash
|
|
219
|
+
export PATH="$HOME/.local/bin:$PATH"
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
aidem stores user data (skills, registry, manifest) in `~/.aidem/` by default.
|
|
223
|
+
Override with the `AIDEM_DATA_DIR` env var (e.g. for testing or a non-default
|
|
224
|
+
profile). Shipped package assets (generators, overlays, canonical `AGENTS.md`)
|
|
225
|
+
travel with the install and are read-only.
|
|
226
|
+
|
|
227
|
+
---
|
|
228
|
+
|
|
229
|
+
## Quick Start
|
|
230
|
+
|
|
231
|
+
### 1. Build the one-time tool bridges (once per machine)
|
|
232
|
+
|
|
233
|
+
```bash
|
|
234
|
+
aidem setup
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
This symlinks each tool's global skills dir into aidem's staging:
|
|
238
|
+
|
|
239
|
+
- `~/.kilo/skills -> ~/.aidem/skills`
|
|
240
|
+
- `~/.claude/skills -> ~/.aidem/skills`
|
|
241
|
+
- `~/.cursor/skills -> ~/.aidem/skills`
|
|
242
|
+
|
|
243
|
+
Safe to re-run (idempotent). If a tool's parent directory isn't found (tool not installed), aidem skips it gracefully. Kilo falls back to a `~/.config/kilo/kilo.jsonc` config entry when the symlink can't be created. `aidem setup` also bridges rules where a tool supports them (Claude dir symlink; Kilo/OpenCode config-array; Windsurf concat mirror; Cursor/GitHub skipped).
|
|
244
|
+
|
|
245
|
+
### 2. Create a skill or rule (author your own)
|
|
246
|
+
|
|
247
|
+
```bash
|
|
248
|
+
aidem create my-review-skill --skill
|
|
249
|
+
# opens $EDITOR with a skill template; save to commit it
|
|
250
|
+
# or non-interactively:
|
|
251
|
+
aidem create my-review-skill --skill --body "$(cat <<'MD'
|
|
252
|
+
# Skill: my-review-skill
|
|
253
|
+
## Purpose
|
|
254
|
+
Review code for correctness and style.
|
|
255
|
+
## When to Apply
|
|
256
|
+
During PR review.
|
|
257
|
+
MD
|
|
258
|
+
)"
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
Writes `~/.aidem/skills/my-review-skill/SKILL.md`. Kilo, Claude, and Cursor see it instantly through their dir bridges.
|
|
262
|
+
|
|
263
|
+
```bash
|
|
264
|
+
aidem create no-emoji --rule --body "# Rule: no-emoji\nDo not use emojis in code or docs."
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
Writes `~/.aidem/rules/no-emoji.md` (flat, one file per rule). Bridged tools see it on the next `aidem setup`. `--skill` is the default if neither flag is given.
|
|
268
|
+
|
|
269
|
+
### 3. Add a skill repo from the registry
|
|
270
|
+
|
|
271
|
+
```bash
|
|
272
|
+
aidem registry add https://github.com/example/my-scanner my-scanner --kind skill
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
Clones the repo into `~/.aidem/registry`, symlinks its `skill.md` into `~/.aidem/skills`. It now appears in Kilo, Claude, and Cursor — no per-tool wiring.
|
|
276
|
+
|
|
277
|
+
### 4. Update the standard in a repo
|
|
278
|
+
|
|
279
|
+
```bash
|
|
280
|
+
cd ~/projects/my-web-app
|
|
281
|
+
aidem init --template web-app
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
Writes a single `AGENTS.md` (no per-tool files). Commit it so teammates inherit the standard on clone.
|
|
285
|
+
|
|
286
|
+
### 5. Run a registered tool
|
|
287
|
+
|
|
288
|
+
```bash
|
|
289
|
+
aidem run my-scanner .
|
|
290
|
+
aidem run my-scanner --format json --output report.json
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
Tools install into an isolated, aidem-owned env — no global PATH pollution, no same-name clashes. The runtime is auto-detected:
|
|
294
|
+
|
|
295
|
+
```bash
|
|
296
|
+
# Python tool with a pyproject.toml -> uv runtime (PyPI wheel preferred, [all] extras if declared)
|
|
297
|
+
aidem registry add https://github.com/headroomlabs-ai/headroom headroom
|
|
298
|
+
aidem run headroom doctor
|
|
299
|
+
|
|
300
|
+
# Rust/Go single-binary tool -> binary runtime (GitHub release asset, platform-matched)
|
|
301
|
+
aidem registry add https://github.com/rtk-ai/rtk rtk
|
|
302
|
+
aidem run rtk git status
|
|
303
|
+
|
|
304
|
+
# Tool shipping a Dockerfile -> docker runtime (ephemeral container, cwd mounted)
|
|
305
|
+
aidem registry add https://github.com/example/container-tool ctool
|
|
306
|
+
aidem run ctool scan .
|
|
307
|
+
```
|
|
308
|
+
|
|
309
|
+
---
|
|
310
|
+
|
|
311
|
+
## Command Reference
|
|
312
|
+
|
|
313
|
+
### Registry commands (`aidem registry ...`)
|
|
314
|
+
|
|
315
|
+
```bash
|
|
316
|
+
aidem registry add <git-url> <name> [--kind skill|rule|mcp|memory|plan]
|
|
317
|
+
[--runtime uv|binary|docker] [--spec "<pkg>[extras]"] [--extras "..."]
|
|
318
|
+
[--asset "<glob>"] [--image "<ref>"] [--no-install]
|
|
319
|
+
# Clone a repo, link its content into ~/.aidem/<kind>, and install its tool
|
|
320
|
+
# binary into an aidem-owned isolated env (~/.aidem/envs/<name>/) — never the
|
|
321
|
+
# global PATH. Runtime is auto-detected from file markers (pyproject->uv,
|
|
322
|
+
# Cargo/go->binary, Dockerfile->docker); flags override the auto-heuristic.
|
|
323
|
+
# Defaults to --kind skill. Deferred ecosystems (npm/cargo/go) register as
|
|
324
|
+
# skills-only with a note until their runtimes ship.
|
|
325
|
+
|
|
326
|
+
aidem registry setup
|
|
327
|
+
# Re-clone missing registered repos and install those that define binaries.
|
|
328
|
+
|
|
329
|
+
aidem registry update
|
|
330
|
+
# Pull updates for all cloned repos (then run `aidem setup` to refresh links).
|
|
331
|
+
|
|
332
|
+
aidem registry install <name>
|
|
333
|
+
# Install or reinstall a single registered tool into its isolated env.
|
|
334
|
+
|
|
335
|
+
aidem registry remove <name>
|
|
336
|
+
# Unregister, remove clone, tear down the isolated env, and unlink content.
|
|
337
|
+
|
|
338
|
+
aidem registry list
|
|
339
|
+
# Show registered skills/tools, runtime kind, and env install state.
|
|
340
|
+
```
|
|
341
|
+
|
|
342
|
+
### Skill & rule authoring & bridging
|
|
343
|
+
|
|
344
|
+
```bash
|
|
345
|
+
aidem create <name> --skill|--rule [--body <text>]
|
|
346
|
+
# Author a skill (~/.aidem/skills/<name>/SKILL.md) or a rule
|
|
347
|
+
# (~/.aidem/rules/<name>.md) in aidem's central library. Opens $EDITOR, or
|
|
348
|
+
# use --body. --skill is the default when neither flag is given.
|
|
349
|
+
|
|
350
|
+
aidem setup
|
|
351
|
+
# Build/regenerate the one-time dir bridges for skills and rules. Idempotent.
|
|
352
|
+
```
|
|
353
|
+
|
|
354
|
+
### Repo standard & execution
|
|
355
|
+
|
|
356
|
+
```bash
|
|
357
|
+
aidem init [project_path] [--template <name>] [--link/--copy] [--force]
|
|
358
|
+
# Write one AGENTS.md into a repo. Prompts if writing to cwd; refuses inside the aidem package dir unless --force.
|
|
359
|
+
|
|
360
|
+
aidem run <tool> [args...]
|
|
361
|
+
# Execute a registered tool from its isolated env (~/.aidem/envs/<tool>/bin),
|
|
362
|
+
# passing all arguments through. Exit codes and stdio preserved; --help works.
|
|
363
|
+
# A legacy global-PATH install still runs but prints a one-time migration nudge.
|
|
364
|
+
```
|
|
365
|
+
|
|
366
|
+
---
|
|
367
|
+
|
|
368
|
+
## How the Centralized Model Works
|
|
369
|
+
|
|
370
|
+
```
|
|
371
|
+
┌──────────────────────────────────────┐
|
|
372
|
+
│ ~/.aidem/skills (single lib) │
|
|
373
|
+
│ ├── my-review-skill/ │
|
|
374
|
+
│ │ └── SKILL.md (created) │
|
|
375
|
+
│ ├── my-scanner/ │
|
|
376
|
+
│ │ └── SKILL.md → symlink │
|
|
377
|
+
│ └── ... │
|
|
378
|
+
└───────────────┬───────────────────────┘
|
|
379
|
+
│
|
|
380
|
+
┌──────────────────────────────┼──────────────────────────────┐
|
|
381
|
+
▼ ▼ ▼
|
|
382
|
+
~/.kilo/skills ~/.claude/skills ~/.cursor/skills
|
|
383
|
+
→→→ ~/.aidem/skills →→→ ~/.aidem/skills →→→ ~/.aidem/skills
|
|
384
|
+
(passthrough dir symlink) (passthrough dir symlink) (passthrough dir symlink)
|
|
385
|
+
```
|
|
386
|
+
|
|
387
|
+
- **One maintenance point**: edit `~/.aidem/skills`; all tools update live (they dereference the dir symlink).
|
|
388
|
+
- **Adding a skill** = one write into `~/.aidem/skills` — not N writes across the home directory.
|
|
389
|
+
- **Removing a skill** = one unlink in `~/.aidem/skills` — not hunting through `~/.cursor`, `~/.claude`, `~/.kilo`.
|
|
390
|
+
- **Cleanup** = `rm -rf ~/.aidem/skills/*` and the few dir symlinks. No scattered stale files.
|
|
391
|
+
|
|
392
|
+
Rules work the same way from `~/.aidem/rules` — Claude gets a passthrough dir symlink, Kilo/OpenCode get an `instructions` config-array entry, Windsurf gets a concat mirror; edit once, re-run `aidem setup`.
|
|
393
|
+
|
|
394
|
+
To add support for a new AI tool, add a generator in `config/generators/<tool>.py` that sets `global_path` and `staging_dir` for skills, and `rules_global_path` (or an `ensure_rules_bridge` / `regenerate_rules` override) for rules. Override `format_skill`/`regenerate` only if its format differs, and is passthrough otherwise. Register it in `config/generators/__init__.py`.
|
|
395
|
+
|
|
396
|
+
---
|
|
397
|
+
|
|
398
|
+
## Why This Architecture?
|
|
399
|
+
|
|
400
|
+
| Concern | Without aidem | With aidem |
|
|
401
|
+
|---|---|---|
|
|
402
|
+
| Skill duplication | Copy each skill into every tool's dir, in each tool's format | One `~/.aidem/skills` library; tools dir-symlink into it once |
|
|
403
|
+
| Scattered home pollution | N×M files across `~/.cursor`, `~/.claude`, `~/.kilo` | A few dir symlinks; skills live under `~/.aidem/` |
|
|
404
|
+
| Adding a skill | Write into 3+ home dirs | One directory in `~/.aidem/skills` |
|
|
405
|
+
| Removing a skill | Hunt across home dirs for stale links/copies | One unlink in `~/.aidem/skills` |
|
|
406
|
+
| Live skill updates | Edit the file in every tool | Edit `~/.aidem/skills`; all tools update instantly |
|
|
407
|
+
| Repo config bloat | 5+ per-tool files per repo | One `AGENTS.md` per repo, no per-tool files |
|
|
408
|
+
| Tool isolation | Install every agent into system/project Python | Each tool has its own aidem-owned env (`~/.aidem/envs/<n>/`); runtime adapters (uv/binary/docker) keep the global PATH clean |
|
|
409
|
+
| New AI tool support | Re-wire every skill into its new format | Add one generator file; one-time bridge |
|
|
410
|
+
| Repo contribution friction | Contributors must install your config tool | They just clone — `AGENTS.md` is a static committed file |
|
|
411
|
+
|
|
412
|
+
---
|
|
413
|
+
|
|
414
|
+
## Future Work
|
|
415
|
+
|
|
416
|
+
aidem centralizes skills and rules. The same architecture extends naturally to other AI development artifacts:
|
|
417
|
+
|
|
418
|
+
### Rules (done)
|
|
419
|
+
A `~/.aidem/rules/` library with per-tool bridges now ships: Claude gets a passthrough dir symlink, Kilo/OpenCode get an `instructions` config-array entry, and Windsurf gets a concat mirror (capped at Windsurf's 6,000-char `global_rules.md` limit). Cursor and GitHub Copilot have no file-based global rules path and are skipped. Author rules with `aidem create <name> --rule`; register rule repos with `aidem registry add <url> <name> --kind rule`. Project-level rule init (writing per-tool `.cursor/rules/*.mdc`, `.devin/rules/*.md`, … into a repo) is deliberately out of scope — it would reintroduce the per-tool file bloat aidem's single `AGENTS.md` model avoids.
|
|
420
|
+
|
|
421
|
+
### MCP server configuration
|
|
422
|
+
Configuring MCP servers once and having them available in every tool is the top pain point for multi-tool users. Each tool uses a different config format, so this needs per-tool *transform generators* (like aidem originally had for Cursor `.mdc` mirrors) — not just passthrough symlinks. Higher complexity, higher user value.
|
|
423
|
+
|
|
424
|
+
### Plans and memory
|
|
425
|
+
These concepts are deeply vendor-specific with no emerging standard. Aidem would need a canonical format plus per-tool transformers. Lower priority until the ecosystem converges.
|
|
426
|
+
|
|
427
|
+
### Runtimes (done + deferred)
|
|
428
|
+
Layer 2 execution uses a runtime-adapter model: aidem owns an isolated env per tool (`~/.aidem/envs/<n>/`) and resolves+execs the binary from it, never the global PATH. **Shipped:** `uv` (Python, PyPI-wheel-preferred + `[all]`-extras heuristic), `binary` (prebuilt release asset, platform-matched), `docker` (ephemeral container, cwd mounted). **Detected but deferred:** `npm`, `cargo`, `go` (register as skills-only until their runtimes ship). To add a new runtime, create `config/runtimes/<name>.py` subclassing `Runtime` (implement `install`/`resolve_binary`/`run`/`uninstall`/`is_installed`), add a marker in `config/runtimes/__init__.py`, and add the kind to `RUNTIME_KINDS`.
|
|
429
|
+
|
|
430
|
+
### Kind-specific content formats
|
|
431
|
+
The `--kind` flag drives which plural container content is linked into (`~/.aidem/skills`, `~/.aidem/rules`, etc.). Content detection is now kind-aware (`_content_source_for` looks for `rule.md`/`rules/*.md` for rules, `SKILL.md`/`skills/**/SKILL.md` for skills). Remaining work: recognize richer per-kind conventions (e.g. `.mdc` frontmatter for project rules, JSON for MCP) when those kinds are built out.
|
|
432
|
+
|
|
433
|
+
To add support for a new artifact type, add a generator in `config/generators/<tool>.py` that implements the kind's bridge method (e.g. `ensure_rules_bridge`), register the kind in `REGISTRY_KINDS`, and extend `_content_source_for` / `_add_shared_content` for the new shape.
|
|
434
|
+
|
|
435
|
+
---
|
|
436
|
+
|
|
437
|
+
## Contributing
|
|
438
|
+
|
|
439
|
+
Contributions are welcome — see [CONTRIBUTING.md](CONTRIBUTING.md) for the
|
|
440
|
+
development setup, how to run the test suite, how to add a generator for a new
|
|
441
|
+
AI tool, and code style.
|
|
442
|
+
|
|
443
|
+
By contributing, you agree to the [Contributor License Agreement](CLA.md).
|
|
444
|
+
|
|
445
|
+
---
|
|
446
|
+
|
|
447
|
+
## License
|
|
448
|
+
|
|
449
|
+
aidem is licensed under the [Apache License 2.0](LICENSE.md).
|
|
450
|
+
|
|
451
|
+
See [NOTICE.md](NOTICE.md) for third-party dependency licenses and registry tool licensing details.
|