universal-ai-config 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Universal AI Config
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,4 @@
1
+ include README.md
2
+ include LICENSE
3
+ include pyproject.toml
4
+ recursive-include universal_ai_config *.md
@@ -0,0 +1,343 @@
1
+ Metadata-Version: 2.4
2
+ Name: universal-ai-config
3
+ Version: 0.1.0
4
+ Summary: Unified configuration management for AI agents across multiple providers
5
+ Author: DevArts Lab
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/DevArtsLab/tool-universal-ai-config
8
+ Project-URL: Repository, https://github.com/DevArtsLab/tool-universal-ai-config
9
+ Project-URL: Issues, https://github.com/DevArtsLab/tool-universal-ai-config/issues
10
+ Keywords: ai,configuration,devin,windsurf,claude,mcp
11
+ Classifier: Development Status :: 3 - Alpha
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Programming Language :: Python :: 3.9
15
+ Classifier: Programming Language :: Python :: 3.10
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Programming Language :: Python :: 3.13
19
+ Classifier: Programming Language :: Python :: 3.14
20
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
21
+ Requires-Python: >=3.9
22
+ Description-Content-Type: text/markdown
23
+ License-File: LICENSE
24
+ Provides-Extra: dev
25
+ Requires-Dist: pytest>=7.0; extra == "dev"
26
+ Requires-Dist: pytest-cov>=4.0; extra == "dev"
27
+ Requires-Dist: black>=23.0; extra == "dev"
28
+ Requires-Dist: mypy>=1.0; extra == "dev"
29
+ Dynamic: license-file
30
+
31
+ # Universal AI Configuration
32
+
33
+ A unified configuration system for AI agents across multiple providers (Devin, Windsurf, Claude, etc.). This tool provides a single source of truth for AI agent settings, skills, MCP servers, and rules.
34
+
35
+ ## Features
36
+
37
+ - **Unified Configuration**: Single config file for all AI providers
38
+ - **XDG-Compliant**: Follows Linux/macOS/Windows directory standards
39
+ - **Migration Support**: Automatically migrates existing provider configs
40
+ - **Project-Local**: Per-project configuration with `.ai/` directory
41
+ - **Shared Resources**: MCP servers and skills shared across providers
42
+ - **Provider Overrides**: Provider-specific settings when needed
43
+
44
+ ## Installation
45
+
46
+ ### Package Manager (Recommended)
47
+
48
+ ```bash
49
+ # uv (or run without installing: uvx ai-config --help)
50
+ uv tool install universal-ai-config
51
+
52
+ # pipx
53
+ pipx install universal-ai-config
54
+
55
+ # pip
56
+ pip install universal-ai-config
57
+ ```
58
+
59
+ ### One-Line Install
60
+
61
+ ```bash
62
+ curl -fsSL https://raw.githubusercontent.com/DevArtsLab/tool-universal-ai-config/main/install.sh | bash
63
+ ```
64
+
65
+ The installer prefers uv or pipx when available, and falls back to a managed
66
+ virtual environment. It will:
67
+
68
+ - Install the package and set up the `ai-config` command
69
+ - Detect and migrate existing configurations
70
+ - Initialize the unified config structure
71
+
72
+ ### Standalone Binaries
73
+
74
+ Prebuilt binaries for Linux, macOS (Intel and Apple Silicon), and Windows are
75
+ attached to each [GitHub release](https://github.com/DevArtsLab/tool-universal-ai-config/releases)
76
+ — no Python required.
77
+
78
+ ### Manual Install
79
+
80
+ ```bash
81
+ # Clone the repository
82
+ git clone https://github.com/DevArtsLab/tool-universal-ai-config.git
83
+ cd tool-universal-ai-config
84
+
85
+ # Install via pip
86
+ pip install -e .
87
+ ```
88
+
89
+ ## Quick Start
90
+
91
+ ### New Users
92
+
93
+ Initialize a fresh configuration:
94
+
95
+ ```bash
96
+ ai-config init
97
+ ```
98
+
99
+ Initialize for a project:
100
+
101
+ ```bash
102
+ cd your-project
103
+ ai-config init-project
104
+ ```
105
+
106
+ ### Existing Users
107
+
108
+ Migrate from existing provider configurations:
109
+
110
+ ```bash
111
+ ai-config migrate
112
+ ```
113
+
114
+ Migrate project-specific configs:
115
+
116
+ ```bash
117
+ cd your-project
118
+ ai-config migrate --project
119
+ ```
120
+
121
+ ## Directory Structure
122
+
123
+ ### User-Global Configuration
124
+
125
+ ```
126
+ ~/.agents/ # All agent data in one place
127
+ ├── config/
128
+ │ ├── config.json # Unified config (all providers read this)
129
+ │ ├── mcp-config.json # MCP servers
130
+ │ └── AGENTS.md # Shared rules
131
+ ├── skills/ # Shared skills
132
+ │ └── example-skill/
133
+ ├── data/ # Long-term memory, datasets, plugins
134
+ │ ├── memory/
135
+ │ └── plugins/
136
+ ├── state/ # Logs, history, active sessions
137
+ │ ├── logs/
138
+ │ └── history/
139
+ └── cache/ # Model caches, isolated environments
140
+ ├── models/
141
+ └── venv/
142
+ ```
143
+
144
+ ### Project-Local Configuration
145
+
146
+ ```
147
+ .ai/ # In repository root
148
+ ├── config.json # Shared team settings
149
+ ├── config.local.json # Personal overrides (gitignored)
150
+ ├── skills/ # Project-specific skills
151
+ ├── mcp-config.json # Project MCP servers
152
+ ├── mcp-config.local.json # Project MCP overrides (gitignored)
153
+ └── AGENTS.md # Project rules
154
+ ```
155
+
156
+ ## Configuration Format
157
+
158
+ ### Unified Config (`~/.agents/config/config.json`)
159
+
160
+ ```json
161
+ {
162
+ "shared": {
163
+ "permissions": {
164
+ "allow": ["Read(**)", "Exec(git)"],
165
+ "deny": ["Exec(sudo)"],
166
+ "ask": ["Write(**/.env*)"]
167
+ }
168
+ },
169
+ "providers": {
170
+ "devin": {
171
+ "permissions": {
172
+ "allow": ["Read(**)", "Exec(git)", "Exec(npm)"]
173
+ }
174
+ }
175
+ },
176
+ "skills": {
177
+ "enabled": [],
178
+ "paths": ["~/.agents/skills/", ".ai/skills/"]
179
+ }
180
+ }
181
+ ```
182
+
183
+ ### MCP Config (`~/.agents/config/mcp-config.json`)
184
+
185
+ MCP servers are kept in a separate file:
186
+
187
+ ```json
188
+ {
189
+ "mcpServers": {
190
+ "github": {
191
+ "command": "npx",
192
+ "args": ["-y", "@modelcontextprotocol/server-github"]
193
+ }
194
+ }
195
+ }
196
+ ```
197
+
198
+ ## Commands
199
+
200
+ ### `ai-config init [--fresh]`
201
+
202
+ Initialize new configuration structure.
203
+
204
+ ```bash
205
+ ai-config init # Initialize new config
206
+ ai-config init --fresh # Remove existing and start fresh
207
+ ```
208
+
209
+ ### `ai-config migrate [provider] [--project]`
210
+
211
+ Migrate existing provider configurations.
212
+
213
+ ```bash
214
+ ai-config migrate # Migrate all detected providers
215
+ ai-config migrate devin # Migrate specific provider
216
+ ai-config migrate --project # Migrate project configs
217
+ ```
218
+
219
+ ### `ai-config validate`
220
+
221
+ Validate configuration setup.
222
+
223
+ ```bash
224
+ ai-config validate
225
+ ```
226
+
227
+ ### `ai-config status`
228
+
229
+ Show current configuration status.
230
+
231
+ ```bash
232
+ ai-config status
233
+ ```
234
+
235
+ ### `ai-config init-project`
236
+
237
+ Initialize `.ai/` directory in current project.
238
+
239
+ ```bash
240
+ ai-config init-project
241
+ ```
242
+
243
+ ### `ai-config get-config <provider>`
244
+
245
+ Get configuration for a specific provider.
246
+
247
+ ```bash
248
+ ai-config get-config devin
249
+ ```
250
+
251
+ ### `ai-config set-config <provider> <key> <value>`
252
+
253
+ Set configuration value for a provider.
254
+
255
+ ```bash
256
+ ai-config set-config devin model your-model-name
257
+ ai-config set-config devin theme_mode dark
258
+ ```
259
+
260
+ ## Provider Integration
261
+
262
+ Each AI provider should read from the unified configuration:
263
+
264
+ ```python
265
+ from universal_ai_config import UnifiedConfig, AgentEnv
266
+
267
+ # Initialize
268
+ env = AgentEnv()
269
+ config = UnifiedConfig(env)
270
+
271
+ # Get provider-specific config
272
+ devin_config = config.get_provider_config("devin")
273
+
274
+ # Get merged config (user + project)
275
+ merged_config = config.get_merged_config(cwd=Path.cwd())
276
+ ```
277
+
278
+ ## Migration Details
279
+
280
+ The tool automatically detects and migrates from:
281
+
282
+ - **Devin CLI**: `~/.config/devin/config.json`, `.devin/config.json`
283
+ - **Windsurf**: `~/.windsurf/config.json`, `.windsurf/config.json`
284
+ - **Claude**: `~/.config/claude/config.json`, `.claude/config.json`
285
+
286
+ Legacy configs are backed up with `.backup` extension.
287
+
288
+ ## Platform Support
289
+
290
+ - **Linux**: XDG Base Directory Specification
291
+ - **macOS**: XDG paths with `~/.config` fallback
292
+ - **Windows**: `%APPDATA%` and `%LOCALAPPDATA%` paths
293
+
294
+ ## Best Practices
295
+
296
+ 1. **Secrets Management**: Never store API keys in config files. Use system keyrings or environment variables.
297
+
298
+ 2. **Project Config**: Use `.ai/config.json` for team settings and `.ai/config.local.json` for personal overrides.
299
+
300
+ 3. **Shared Resources**: Put common MCP servers and skills in user config; project-specific ones in `.ai/`.
301
+
302
+ 4. **Validation**: Always run `ai-config validate` after making changes.
303
+
304
+ ## Development
305
+
306
+ ### Setup Development Environment
307
+
308
+ ```bash
309
+ git clone https://github.com/DevArtsLab/tool-universal-ai-config.git
310
+ cd tool-universal-ai-config
311
+ pip install -e ".[dev]"
312
+ ```
313
+
314
+ ### Run Tests
315
+
316
+ ```bash
317
+ pytest
318
+ ```
319
+
320
+ ### Format Code
321
+
322
+ ```bash
323
+ black universal_ai_config/
324
+ ```
325
+
326
+ ### Type Check
327
+
328
+ ```bash
329
+ mypy universal_ai_config/
330
+ ```
331
+
332
+ ## License
333
+
334
+ MIT License - see LICENSE file for details.
335
+
336
+ ## Contributing
337
+
338
+ Contributions welcome! Please read our contributing guidelines before submitting PRs.
339
+
340
+ ## Support
341
+
342
+ - GitHub Issues: https://github.com/DevArtsLab/tool-universal-ai-config/issues
343
+ - Documentation: https://github.com/DevArtsLab/tool-universal-ai-config/wiki
@@ -0,0 +1,313 @@
1
+ # Universal AI Configuration
2
+
3
+ A unified configuration system for AI agents across multiple providers (Devin, Windsurf, Claude, etc.). This tool provides a single source of truth for AI agent settings, skills, MCP servers, and rules.
4
+
5
+ ## Features
6
+
7
+ - **Unified Configuration**: Single config file for all AI providers
8
+ - **XDG-Compliant**: Follows Linux/macOS/Windows directory standards
9
+ - **Migration Support**: Automatically migrates existing provider configs
10
+ - **Project-Local**: Per-project configuration with `.ai/` directory
11
+ - **Shared Resources**: MCP servers and skills shared across providers
12
+ - **Provider Overrides**: Provider-specific settings when needed
13
+
14
+ ## Installation
15
+
16
+ ### Package Manager (Recommended)
17
+
18
+ ```bash
19
+ # uv (or run without installing: uvx ai-config --help)
20
+ uv tool install universal-ai-config
21
+
22
+ # pipx
23
+ pipx install universal-ai-config
24
+
25
+ # pip
26
+ pip install universal-ai-config
27
+ ```
28
+
29
+ ### One-Line Install
30
+
31
+ ```bash
32
+ curl -fsSL https://raw.githubusercontent.com/DevArtsLab/tool-universal-ai-config/main/install.sh | bash
33
+ ```
34
+
35
+ The installer prefers uv or pipx when available, and falls back to a managed
36
+ virtual environment. It will:
37
+
38
+ - Install the package and set up the `ai-config` command
39
+ - Detect and migrate existing configurations
40
+ - Initialize the unified config structure
41
+
42
+ ### Standalone Binaries
43
+
44
+ Prebuilt binaries for Linux, macOS (Intel and Apple Silicon), and Windows are
45
+ attached to each [GitHub release](https://github.com/DevArtsLab/tool-universal-ai-config/releases)
46
+ — no Python required.
47
+
48
+ ### Manual Install
49
+
50
+ ```bash
51
+ # Clone the repository
52
+ git clone https://github.com/DevArtsLab/tool-universal-ai-config.git
53
+ cd tool-universal-ai-config
54
+
55
+ # Install via pip
56
+ pip install -e .
57
+ ```
58
+
59
+ ## Quick Start
60
+
61
+ ### New Users
62
+
63
+ Initialize a fresh configuration:
64
+
65
+ ```bash
66
+ ai-config init
67
+ ```
68
+
69
+ Initialize for a project:
70
+
71
+ ```bash
72
+ cd your-project
73
+ ai-config init-project
74
+ ```
75
+
76
+ ### Existing Users
77
+
78
+ Migrate from existing provider configurations:
79
+
80
+ ```bash
81
+ ai-config migrate
82
+ ```
83
+
84
+ Migrate project-specific configs:
85
+
86
+ ```bash
87
+ cd your-project
88
+ ai-config migrate --project
89
+ ```
90
+
91
+ ## Directory Structure
92
+
93
+ ### User-Global Configuration
94
+
95
+ ```
96
+ ~/.agents/ # All agent data in one place
97
+ ├── config/
98
+ │ ├── config.json # Unified config (all providers read this)
99
+ │ ├── mcp-config.json # MCP servers
100
+ │ └── AGENTS.md # Shared rules
101
+ ├── skills/ # Shared skills
102
+ │ └── example-skill/
103
+ ├── data/ # Long-term memory, datasets, plugins
104
+ │ ├── memory/
105
+ │ └── plugins/
106
+ ├── state/ # Logs, history, active sessions
107
+ │ ├── logs/
108
+ │ └── history/
109
+ └── cache/ # Model caches, isolated environments
110
+ ├── models/
111
+ └── venv/
112
+ ```
113
+
114
+ ### Project-Local Configuration
115
+
116
+ ```
117
+ .ai/ # In repository root
118
+ ├── config.json # Shared team settings
119
+ ├── config.local.json # Personal overrides (gitignored)
120
+ ├── skills/ # Project-specific skills
121
+ ├── mcp-config.json # Project MCP servers
122
+ ├── mcp-config.local.json # Project MCP overrides (gitignored)
123
+ └── AGENTS.md # Project rules
124
+ ```
125
+
126
+ ## Configuration Format
127
+
128
+ ### Unified Config (`~/.agents/config/config.json`)
129
+
130
+ ```json
131
+ {
132
+ "shared": {
133
+ "permissions": {
134
+ "allow": ["Read(**)", "Exec(git)"],
135
+ "deny": ["Exec(sudo)"],
136
+ "ask": ["Write(**/.env*)"]
137
+ }
138
+ },
139
+ "providers": {
140
+ "devin": {
141
+ "permissions": {
142
+ "allow": ["Read(**)", "Exec(git)", "Exec(npm)"]
143
+ }
144
+ }
145
+ },
146
+ "skills": {
147
+ "enabled": [],
148
+ "paths": ["~/.agents/skills/", ".ai/skills/"]
149
+ }
150
+ }
151
+ ```
152
+
153
+ ### MCP Config (`~/.agents/config/mcp-config.json`)
154
+
155
+ MCP servers are kept in a separate file:
156
+
157
+ ```json
158
+ {
159
+ "mcpServers": {
160
+ "github": {
161
+ "command": "npx",
162
+ "args": ["-y", "@modelcontextprotocol/server-github"]
163
+ }
164
+ }
165
+ }
166
+ ```
167
+
168
+ ## Commands
169
+
170
+ ### `ai-config init [--fresh]`
171
+
172
+ Initialize new configuration structure.
173
+
174
+ ```bash
175
+ ai-config init # Initialize new config
176
+ ai-config init --fresh # Remove existing and start fresh
177
+ ```
178
+
179
+ ### `ai-config migrate [provider] [--project]`
180
+
181
+ Migrate existing provider configurations.
182
+
183
+ ```bash
184
+ ai-config migrate # Migrate all detected providers
185
+ ai-config migrate devin # Migrate specific provider
186
+ ai-config migrate --project # Migrate project configs
187
+ ```
188
+
189
+ ### `ai-config validate`
190
+
191
+ Validate configuration setup.
192
+
193
+ ```bash
194
+ ai-config validate
195
+ ```
196
+
197
+ ### `ai-config status`
198
+
199
+ Show current configuration status.
200
+
201
+ ```bash
202
+ ai-config status
203
+ ```
204
+
205
+ ### `ai-config init-project`
206
+
207
+ Initialize `.ai/` directory in current project.
208
+
209
+ ```bash
210
+ ai-config init-project
211
+ ```
212
+
213
+ ### `ai-config get-config <provider>`
214
+
215
+ Get configuration for a specific provider.
216
+
217
+ ```bash
218
+ ai-config get-config devin
219
+ ```
220
+
221
+ ### `ai-config set-config <provider> <key> <value>`
222
+
223
+ Set configuration value for a provider.
224
+
225
+ ```bash
226
+ ai-config set-config devin model your-model-name
227
+ ai-config set-config devin theme_mode dark
228
+ ```
229
+
230
+ ## Provider Integration
231
+
232
+ Each AI provider should read from the unified configuration:
233
+
234
+ ```python
235
+ from universal_ai_config import UnifiedConfig, AgentEnv
236
+
237
+ # Initialize
238
+ env = AgentEnv()
239
+ config = UnifiedConfig(env)
240
+
241
+ # Get provider-specific config
242
+ devin_config = config.get_provider_config("devin")
243
+
244
+ # Get merged config (user + project)
245
+ merged_config = config.get_merged_config(cwd=Path.cwd())
246
+ ```
247
+
248
+ ## Migration Details
249
+
250
+ The tool automatically detects and migrates from:
251
+
252
+ - **Devin CLI**: `~/.config/devin/config.json`, `.devin/config.json`
253
+ - **Windsurf**: `~/.windsurf/config.json`, `.windsurf/config.json`
254
+ - **Claude**: `~/.config/claude/config.json`, `.claude/config.json`
255
+
256
+ Legacy configs are backed up with `.backup` extension.
257
+
258
+ ## Platform Support
259
+
260
+ - **Linux**: XDG Base Directory Specification
261
+ - **macOS**: XDG paths with `~/.config` fallback
262
+ - **Windows**: `%APPDATA%` and `%LOCALAPPDATA%` paths
263
+
264
+ ## Best Practices
265
+
266
+ 1. **Secrets Management**: Never store API keys in config files. Use system keyrings or environment variables.
267
+
268
+ 2. **Project Config**: Use `.ai/config.json` for team settings and `.ai/config.local.json` for personal overrides.
269
+
270
+ 3. **Shared Resources**: Put common MCP servers and skills in user config; project-specific ones in `.ai/`.
271
+
272
+ 4. **Validation**: Always run `ai-config validate` after making changes.
273
+
274
+ ## Development
275
+
276
+ ### Setup Development Environment
277
+
278
+ ```bash
279
+ git clone https://github.com/DevArtsLab/tool-universal-ai-config.git
280
+ cd tool-universal-ai-config
281
+ pip install -e ".[dev]"
282
+ ```
283
+
284
+ ### Run Tests
285
+
286
+ ```bash
287
+ pytest
288
+ ```
289
+
290
+ ### Format Code
291
+
292
+ ```bash
293
+ black universal_ai_config/
294
+ ```
295
+
296
+ ### Type Check
297
+
298
+ ```bash
299
+ mypy universal_ai_config/
300
+ ```
301
+
302
+ ## License
303
+
304
+ MIT License - see LICENSE file for details.
305
+
306
+ ## Contributing
307
+
308
+ Contributions welcome! Please read our contributing guidelines before submitting PRs.
309
+
310
+ ## Support
311
+
312
+ - GitHub Issues: https://github.com/DevArtsLab/tool-universal-ai-config/issues
313
+ - Documentation: https://github.com/DevArtsLab/tool-universal-ai-config/wiki