dotruler 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,9 @@
1
+ __pycache__/
2
+ *.pyc
3
+ *.egg-info/
4
+ dist/
5
+ build/
6
+ .pytest_cache/
7
+ .ruff_cache/
8
+ *.egg
9
+ .dotruler.toml
dotruler-0.1.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Joseph Yaw Agyeman
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,193 @@
1
+ Metadata-Version: 2.4
2
+ Name: dotruler
3
+ Version: 0.1.0
4
+ Summary: One config. Every AI coding tool. Always in sync.
5
+ Project-URL: Homepage, https://github.com/TRINITY-21/dotruler
6
+ Project-URL: Repository, https://github.com/TRINITY-21/dotruler
7
+ Project-URL: Issues, https://github.com/TRINITY-21/dotruler/issues
8
+ Author: Joseph Yaw Agyeman
9
+ License-Expression: MIT
10
+ License-File: LICENSE
11
+ Keywords: ai,claude,codex,config,copilot,cursor,rules,sync,windsurf
12
+ Classifier: Development Status :: 4 - Beta
13
+ Classifier: Environment :: Console
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: License :: OSI Approved :: MIT License
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Programming Language :: Python :: 3.13
19
+ Classifier: Topic :: Software Development :: Code Generators
20
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
21
+ Requires-Python: >=3.11
22
+ Requires-Dist: typer[all]>=0.9.0
23
+ Description-Content-Type: text/markdown
24
+
25
+ <p align="center">
26
+ <h1 align="center">dotruler</h1>
27
+ <p align="center">
28
+ <strong>One config. Every AI coding tool. Always in sync.</strong>
29
+ </p>
30
+ <p align="center">
31
+ <a href="https://pypi.org/project/dotruler/"><img src="https://img.shields.io/pypi/v/dotruler?color=blue" alt="PyPI"></a>
32
+ <a href="https://pypi.org/project/dotruler/"><img src="https://img.shields.io/pypi/pyversions/dotruler" alt="Python"></a>
33
+ <a href="https://github.com/TRINITY-21/dotruler/blob/main/LICENSE"><img src="https://img.shields.io/github/license/TRINITY-21/dotruler" alt="License"></a>
34
+ </p>
35
+ </p>
36
+
37
+ ---
38
+
39
+ Stop maintaining 6 separate config files. Define your project rules once in `.dotruler.toml` and generate configs for **Claude Code**, **Cursor**, **GitHub Copilot**, **Windsurf**, **OpenAI Codex**, and **Aider** — instantly.
40
+
41
+ ```bash
42
+ pip install dotruler
43
+ ```
44
+
45
+ ## Overview
46
+
47
+ Modern development workflows involve multiple AI coding assistants, each requiring its own instruction file:
48
+
49
+ | AI Tool | Config File |
50
+ |---------|------------|
51
+ | Claude Code | `CLAUDE.md` |
52
+ | Cursor | `.cursorrules` |
53
+ | GitHub Copilot | `.github/copilot-instructions.md` |
54
+ | Windsurf | `.windsurfrules` |
55
+ | OpenAI Codex | `AGENTS.md` |
56
+ | Aider | `CONVENTIONS.md` |
57
+
58
+ These files inevitably drift out of sync — you update one, forget the rest, and your AI tools produce inconsistent results. **dotruler** solves this with a single source of truth.
59
+
60
+ ## How It Works
61
+
62
+ ```bash
63
+ dotruler init # Scan your project, scaffold .dotruler.toml
64
+ vim .dotruler.toml # Edit your single config
65
+ dotruler generate # Generate all target configs at once
66
+ ```
67
+
68
+ ## Getting Started
69
+
70
+ ### Installation
71
+
72
+ ```bash
73
+ pip install dotruler
74
+ ```
75
+
76
+ Requires Python 3.11+.
77
+
78
+ ### Initialize
79
+
80
+ ```bash
81
+ cd your-project
82
+ dotruler init
83
+ ```
84
+
85
+ Automatically detects your languages, frameworks, package manager, and existing commands to scaffold a starter `.dotruler.toml`.
86
+
87
+ ### Configure
88
+
89
+ ```toml
90
+ [project]
91
+ name = "myapp"
92
+ description = "Next.js web app with PostgreSQL"
93
+ languages = ["typescript", "python"]
94
+ frameworks = ["nextjs", "fastapi"]
95
+
96
+ [style]
97
+ rules = [
98
+ "Use functional components with hooks",
99
+ "Prefer const over let",
100
+ "Use TypeScript strict mode",
101
+ ]
102
+
103
+ [commands]
104
+ build = "npm run build"
105
+ test = "pytest && npm test"
106
+ lint = "ruff check . && npm run lint"
107
+ dev = "npm run dev"
108
+
109
+ [architecture]
110
+ notes = [
111
+ "API routes in src/app/api/",
112
+ "Database models in src/models/",
113
+ ]
114
+
115
+ [targets]
116
+ enabled = ["claude-md", "cursorrules", "copilot"]
117
+ ```
118
+
119
+ ### Generate
120
+
121
+ ```bash
122
+ dotruler generate
123
+ ```
124
+
125
+ ```
126
+ Generating from .dotruler.toml...
127
+
128
+ ✓ CLAUDE.md
129
+ ✓ .cursorrules
130
+ ✓ .github/copilot-instructions.md
131
+
132
+ Done. 3 configs generated.
133
+ ```
134
+
135
+ ## CLI Reference
136
+
137
+ | Command | Description |
138
+ |---------|-------------|
139
+ | `dotruler init` | Scan project and create starter `.dotruler.toml` |
140
+ | `dotruler generate` | Generate config files for all enabled targets |
141
+ | `dotruler generate --dry-run` | Preview output without writing files |
142
+ | `dotruler validate` | Check config for errors and warnings |
143
+ | `dotruler diff` | Show what would change before writing |
144
+ | `dotruler list` | Display all available output targets |
145
+
146
+ ## Supported Targets
147
+
148
+ | Target | Output File | Char Limit |
149
+ |--------|------------|------------|
150
+ | `claude-md` | `CLAUDE.md` | — |
151
+ | `cursorrules` | `.cursorrules` | — |
152
+ | `copilot` | `.github/copilot-instructions.md` | — |
153
+ | `windsurf` | `.windsurfrules` | 12,000 |
154
+ | `codex` | `AGENTS.md` | 32,768 |
155
+ | `aider` | `CONVENTIONS.md` | — |
156
+
157
+ Character limits for Windsurf and Codex are automatically enforced during generation.
158
+
159
+ ## Per-Target Overrides
160
+
161
+ Append tool-specific rules or customize output paths per target:
162
+
163
+ ```toml
164
+ [targets]
165
+ enabled = ["claude-md", "cursorrules", "copilot"]
166
+
167
+ [targets.claude-md]
168
+ extra_rules = ["Use Read tool before editing files"]
169
+ output_path = "CLAUDE.md"
170
+
171
+ [targets.cursorrules]
172
+ extra_rules = ["Prefer .cursor/rules/*.mdc format"]
173
+ ```
174
+
175
+ ## Plugin Architecture
176
+
177
+ All output targets are implemented as plugins using a registry pattern. The 6 built-in targets cover the major AI coding tools, but the system is designed for extensibility — adding a new target requires a single file with a decorated class.
178
+
179
+ ## Comparison
180
+
181
+ | Approach | Limitation |
182
+ |----------|-----------|
183
+ | Manual copy-paste | Drifts within days |
184
+ | Symlinks | Formats differ across tools |
185
+ | [ruler](https://github.com/intellectronica/ruler) | Limited per-tool customization |
186
+ | [rulesync](https://github.com/dyoshikawa/rulesync) | Requires Node.js |
187
+ | [ai-rulez](https://github.com/Goldziher/ai-rulez) | Requires Go |
188
+
189
+ **dotruler** is Python-native, TOML-configured, plugin-extensible, and validates your config before generating.
190
+
191
+ ## License
192
+
193
+ [MIT](LICENSE)
@@ -0,0 +1,169 @@
1
+ <p align="center">
2
+ <h1 align="center">dotruler</h1>
3
+ <p align="center">
4
+ <strong>One config. Every AI coding tool. Always in sync.</strong>
5
+ </p>
6
+ <p align="center">
7
+ <a href="https://pypi.org/project/dotruler/"><img src="https://img.shields.io/pypi/v/dotruler?color=blue" alt="PyPI"></a>
8
+ <a href="https://pypi.org/project/dotruler/"><img src="https://img.shields.io/pypi/pyversions/dotruler" alt="Python"></a>
9
+ <a href="https://github.com/TRINITY-21/dotruler/blob/main/LICENSE"><img src="https://img.shields.io/github/license/TRINITY-21/dotruler" alt="License"></a>
10
+ </p>
11
+ </p>
12
+
13
+ ---
14
+
15
+ Stop maintaining 6 separate config files. Define your project rules once in `.dotruler.toml` and generate configs for **Claude Code**, **Cursor**, **GitHub Copilot**, **Windsurf**, **OpenAI Codex**, and **Aider** — instantly.
16
+
17
+ ```bash
18
+ pip install dotruler
19
+ ```
20
+
21
+ ## Overview
22
+
23
+ Modern development workflows involve multiple AI coding assistants, each requiring its own instruction file:
24
+
25
+ | AI Tool | Config File |
26
+ |---------|------------|
27
+ | Claude Code | `CLAUDE.md` |
28
+ | Cursor | `.cursorrules` |
29
+ | GitHub Copilot | `.github/copilot-instructions.md` |
30
+ | Windsurf | `.windsurfrules` |
31
+ | OpenAI Codex | `AGENTS.md` |
32
+ | Aider | `CONVENTIONS.md` |
33
+
34
+ These files inevitably drift out of sync — you update one, forget the rest, and your AI tools produce inconsistent results. **dotruler** solves this with a single source of truth.
35
+
36
+ ## How It Works
37
+
38
+ ```bash
39
+ dotruler init # Scan your project, scaffold .dotruler.toml
40
+ vim .dotruler.toml # Edit your single config
41
+ dotruler generate # Generate all target configs at once
42
+ ```
43
+
44
+ ## Getting Started
45
+
46
+ ### Installation
47
+
48
+ ```bash
49
+ pip install dotruler
50
+ ```
51
+
52
+ Requires Python 3.11+.
53
+
54
+ ### Initialize
55
+
56
+ ```bash
57
+ cd your-project
58
+ dotruler init
59
+ ```
60
+
61
+ Automatically detects your languages, frameworks, package manager, and existing commands to scaffold a starter `.dotruler.toml`.
62
+
63
+ ### Configure
64
+
65
+ ```toml
66
+ [project]
67
+ name = "myapp"
68
+ description = "Next.js web app with PostgreSQL"
69
+ languages = ["typescript", "python"]
70
+ frameworks = ["nextjs", "fastapi"]
71
+
72
+ [style]
73
+ rules = [
74
+ "Use functional components with hooks",
75
+ "Prefer const over let",
76
+ "Use TypeScript strict mode",
77
+ ]
78
+
79
+ [commands]
80
+ build = "npm run build"
81
+ test = "pytest && npm test"
82
+ lint = "ruff check . && npm run lint"
83
+ dev = "npm run dev"
84
+
85
+ [architecture]
86
+ notes = [
87
+ "API routes in src/app/api/",
88
+ "Database models in src/models/",
89
+ ]
90
+
91
+ [targets]
92
+ enabled = ["claude-md", "cursorrules", "copilot"]
93
+ ```
94
+
95
+ ### Generate
96
+
97
+ ```bash
98
+ dotruler generate
99
+ ```
100
+
101
+ ```
102
+ Generating from .dotruler.toml...
103
+
104
+ ✓ CLAUDE.md
105
+ ✓ .cursorrules
106
+ ✓ .github/copilot-instructions.md
107
+
108
+ Done. 3 configs generated.
109
+ ```
110
+
111
+ ## CLI Reference
112
+
113
+ | Command | Description |
114
+ |---------|-------------|
115
+ | `dotruler init` | Scan project and create starter `.dotruler.toml` |
116
+ | `dotruler generate` | Generate config files for all enabled targets |
117
+ | `dotruler generate --dry-run` | Preview output without writing files |
118
+ | `dotruler validate` | Check config for errors and warnings |
119
+ | `dotruler diff` | Show what would change before writing |
120
+ | `dotruler list` | Display all available output targets |
121
+
122
+ ## Supported Targets
123
+
124
+ | Target | Output File | Char Limit |
125
+ |--------|------------|------------|
126
+ | `claude-md` | `CLAUDE.md` | — |
127
+ | `cursorrules` | `.cursorrules` | — |
128
+ | `copilot` | `.github/copilot-instructions.md` | — |
129
+ | `windsurf` | `.windsurfrules` | 12,000 |
130
+ | `codex` | `AGENTS.md` | 32,768 |
131
+ | `aider` | `CONVENTIONS.md` | — |
132
+
133
+ Character limits for Windsurf and Codex are automatically enforced during generation.
134
+
135
+ ## Per-Target Overrides
136
+
137
+ Append tool-specific rules or customize output paths per target:
138
+
139
+ ```toml
140
+ [targets]
141
+ enabled = ["claude-md", "cursorrules", "copilot"]
142
+
143
+ [targets.claude-md]
144
+ extra_rules = ["Use Read tool before editing files"]
145
+ output_path = "CLAUDE.md"
146
+
147
+ [targets.cursorrules]
148
+ extra_rules = ["Prefer .cursor/rules/*.mdc format"]
149
+ ```
150
+
151
+ ## Plugin Architecture
152
+
153
+ All output targets are implemented as plugins using a registry pattern. The 6 built-in targets cover the major AI coding tools, but the system is designed for extensibility — adding a new target requires a single file with a decorated class.
154
+
155
+ ## Comparison
156
+
157
+ | Approach | Limitation |
158
+ |----------|-----------|
159
+ | Manual copy-paste | Drifts within days |
160
+ | Symlinks | Formats differ across tools |
161
+ | [ruler](https://github.com/intellectronica/ruler) | Limited per-tool customization |
162
+ | [rulesync](https://github.com/dyoshikawa/rulesync) | Requires Node.js |
163
+ | [ai-rulez](https://github.com/Goldziher/ai-rulez) | Requires Go |
164
+
165
+ **dotruler** is Python-native, TOML-configured, plugin-extensible, and validates your config before generating.
166
+
167
+ ## License
168
+
169
+ [MIT](LICENSE)
@@ -0,0 +1,41 @@
1
+ [build-system]
2
+ requires = ["hatchling"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "dotruler"
7
+ version = "0.1.0"
8
+ description = "One config. Every AI coding tool. Always in sync."
9
+ readme = "README.md"
10
+ license = "MIT"
11
+ requires-python = ">=3.11"
12
+ authors = [{ name = "Joseph Yaw Agyeman" }]
13
+ keywords = ["ai", "rules", "claude", "cursor", "copilot", "windsurf", "codex", "config", "sync"]
14
+ classifiers = [
15
+ "Development Status :: 4 - Beta",
16
+ "Environment :: Console",
17
+ "Intended Audience :: Developers",
18
+ "License :: OSI Approved :: MIT License",
19
+ "Programming Language :: Python :: 3.11",
20
+ "Programming Language :: Python :: 3.12",
21
+ "Programming Language :: Python :: 3.13",
22
+ "Topic :: Software Development :: Code Generators",
23
+ "Topic :: Software Development :: Libraries :: Python Modules",
24
+ ]
25
+ dependencies = [
26
+ "typer[all]>=0.9.0",
27
+ ]
28
+
29
+ [project.scripts]
30
+ dotruler = "dotruler.cli:app"
31
+
32
+ [project.urls]
33
+ Homepage = "https://github.com/TRINITY-21/dotruler"
34
+ Repository = "https://github.com/TRINITY-21/dotruler"
35
+ Issues = "https://github.com/TRINITY-21/dotruler/issues"
36
+
37
+ [tool.hatch.build.targets.wheel]
38
+ packages = ["src/dotruler"]
39
+
40
+ [tool.pytest.ini_options]
41
+ testpaths = ["tests"]
@@ -0,0 +1,3 @@
1
+ """dotruler — One config. Every AI coding tool. Always in sync."""
2
+
3
+ __version__ = "0.1.0"