ruru 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.
ruru-0.1.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Ekky Armandi
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.
ruru-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,292 @@
1
+ Metadata-Version: 2.4
2
+ Name: ruru
3
+ Version: 0.1.0
4
+ Summary: A powerful CLI tool for managing and versioning prompts across projects
5
+ Author-email: Ekky Armandi <me@ekkyarmandi.com>
6
+ Maintainer-email: Ekky Armandi <me@ekkyarmandi.com>
7
+ License: MIT License
8
+
9
+ Copyright (c) 2025 Ekky Armandi
10
+
11
+ Permission is hereby granted, free of charge, to any person obtaining a copy
12
+ of this software and associated documentation files (the "Software"), to deal
13
+ in the Software without restriction, including without limitation the rights
14
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15
+ copies of the Software, and to permit persons to whom the Software is
16
+ furnished to do so, subject to the following conditions:
17
+
18
+ The above copyright notice and this permission notice shall be included in all
19
+ copies or substantial portions of the Software.
20
+
21
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
27
+ SOFTWARE.
28
+
29
+ Keywords: prompts,rules,ai,llm,context,version-control,prompt-management
30
+ Classifier: Development Status :: 4 - Beta
31
+ Classifier: Environment :: Console
32
+ Classifier: Intended Audience :: Developers
33
+ Classifier: License :: OSI Approved :: MIT License
34
+ Classifier: Operating System :: OS Independent
35
+ Classifier: Programming Language :: Python :: 3
36
+ Classifier: Programming Language :: Python :: 3.8
37
+ Classifier: Programming Language :: Python :: 3.9
38
+ Classifier: Programming Language :: Python :: 3.10
39
+ Classifier: Programming Language :: Python :: 3.11
40
+ Classifier: Programming Language :: Python :: 3.12
41
+ Classifier: Topic :: Software Development
42
+ Classifier: Topic :: Text Processing
43
+ Classifier: Topic :: Utilities
44
+ Requires-Python: >=3.8.1
45
+ Description-Content-Type: text/markdown
46
+ License-File: LICENSE
47
+ Requires-Dist: click>=8.0.0
48
+ Requires-Dist: httpx>=0.24.0
49
+ Requires-Dist: rich>=13.0.0
50
+ Requires-Dist: pyyaml>=6.0
51
+ Requires-Dist: python-decouple>=3.6
52
+ Requires-Dist: keyring>=24.0.0
53
+ Requires-Dist: tqdm>=4.64.0
54
+ Requires-Dist: pydantic>=2.0.0
55
+ Provides-Extra: dev
56
+ Requires-Dist: pytest>=7.0.0; extra == "dev"
57
+ Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
58
+ Requires-Dist: pytest-mock>=3.10.0; extra == "dev"
59
+ Requires-Dist: pytest-click>=1.1.0; extra == "dev"
60
+ Requires-Dist: black>=23.0.0; extra == "dev"
61
+ Requires-Dist: isort>=5.12.0; extra == "dev"
62
+ Requires-Dist: flake8>=6.0.0; extra == "dev"
63
+ Requires-Dist: mypy>=1.0.0; extra == "dev"
64
+ Requires-Dist: responses>=0.23.0; extra == "dev"
65
+ Dynamic: license-file
66
+
67
+ # Ruru CLI
68
+
69
+ A powerful CLI tool for managing and versioning prompts across projects.
70
+
71
+ Ruru helps developers manage, version, and sync prompt files (like `.cursorrules`) across multiple projects with a simple command-line interface.
72
+
73
+ ## Features
74
+
75
+ - 🔐 **Secure Authentication** - API key management with keyring support
76
+ - 📁 **Prompt Management** - Create, update, delete, and version prompts
77
+ - 🔍 **Search & Discovery** - Find prompts by name, tags, or content
78
+ - 📥 **Sync & Download** - Get prompts from the cloud to your local projects
79
+ - 🏷️ **Tagging System** - Organize prompts with custom tags
80
+ - 📊 **Version Control** - Track changes and manage prompt versions
81
+ - ⚙️ **Flexible Configuration** - Environment variables and config file support
82
+
83
+ ## Installation
84
+
85
+ ### From PyPI (Recommended)
86
+
87
+ ```bash
88
+ pip install ruru
89
+ ```
90
+
91
+ ### From Source
92
+
93
+ ```bash
94
+ git clone https://github.com/ekkyarmandi/ruru-cli.git
95
+ cd ruru/cli
96
+ pip install -e .
97
+ ```
98
+
99
+ ## Quick Start
100
+
101
+ ### 1. Authentication
102
+
103
+ First, set up your API credentials:
104
+
105
+ ```bash
106
+ # Set API key (will be stored securely in keyring)
107
+ ruru auth login
108
+
109
+ # Check authentication status
110
+ ruru auth status
111
+ ```
112
+
113
+ ### 2. Configuration
114
+
115
+ Configure the CLI for your environment:
116
+
117
+ ```bash
118
+ # Create .env file with your settings
119
+ cat > .env << EOF
120
+ RURU_API_URL=https://ruru.ekkyarmandi.com
121
+ RURU_API_KEY=your_api_key_here
122
+ RURU_OUTPUT_FORMAT=table
123
+ EOF
124
+ ```
125
+
126
+ ### 3. Basic Usage
127
+
128
+ ```bash
129
+ # List all prompts
130
+ ruru prompts list
131
+
132
+ # Search for prompts
133
+ ruru prompts search "cursor rules"
134
+
135
+ # Get a specific prompt
136
+ ruru prompts get my-prompt
137
+
138
+ # Create a new prompt
139
+ ruru prompts create --name "my-new-prompt" --file .cursorrules
140
+
141
+ # Update an existing prompt
142
+ ruru prompts update my-prompt --file .cursorrules
143
+ ```
144
+
145
+ ## Configuration
146
+
147
+ Ruru CLI supports multiple configuration methods:
148
+
149
+ ### Environment Variables
150
+
151
+ ```bash
152
+ export RURU_API_URL="https://ruru.ekkyarmandi.com"
153
+ export RURU_API_KEY="your_api_key"
154
+ export RURU_OUTPUT_FORMAT="table" # table, json, yaml
155
+ export RURU_NO_COLOR="false"
156
+ export RURU_VERBOSE="false"
157
+ ```
158
+
159
+ ### Configuration File
160
+
161
+ Create `~/.ruru/config.yaml`:
162
+
163
+ ```yaml
164
+ api:
165
+ url: "https://ruru.ekkyarmandi.com"
166
+ timeout: 30
167
+
168
+ defaults:
169
+ location: "./"
170
+ auto_create_dirs: true
171
+
172
+ output:
173
+ format: "table"
174
+ color: true
175
+
176
+ cache:
177
+ enabled: true
178
+ ttl: 300
179
+ ```
180
+
181
+ ### .env File
182
+
183
+ Create a `.env` file in your project directory:
184
+
185
+ ```env
186
+ RURU_API_URL=http://localhost:8000
187
+ RURU_API_KEY=your_local_api_key
188
+ RURU_OUTPUT_FORMAT=json
189
+ ```
190
+
191
+ ## Commands
192
+
193
+ ### Authentication
194
+
195
+ ```bash
196
+ ruru auth login # Set up API credentials
197
+ ruru auth logout # Remove stored credentials
198
+ ruru auth status # Check authentication status
199
+ ```
200
+
201
+ ### Prompt Management
202
+
203
+ ```bash
204
+ # List and search
205
+ ruru prompts list # List all prompts
206
+ ruru prompts list --tags python,ai # Filter by tags
207
+ ruru prompts search "query" # Search prompts
208
+
209
+ # Get prompts
210
+ ruru prompts get <name> # Download prompt to file
211
+ ruru prompts get <name> --output - # Print to stdout
212
+
213
+ # Create and update
214
+ ruru prompts create --name <name> --file <file>
215
+ ruru prompts update <name> --file <file>
216
+ ruru prompts delete <name>
217
+
218
+ # Version management
219
+ ruru prompts versions <name> # List versions
220
+ ruru prompts rollback <name> <version>
221
+ ```
222
+
223
+ ## Development
224
+
225
+ ### Setup Development Environment
226
+
227
+ ```bash
228
+ git clone https://github.com/ekkyarmandi/ruru-cli.git
229
+ cd ruru-cli
230
+
231
+ # Install with development dependencies
232
+ pip install -e ".[dev]"
233
+
234
+ # Run tests
235
+ pytest
236
+
237
+ # Run linting
238
+ black .
239
+ isort .
240
+ flake8
241
+ mypy .
242
+ ```
243
+
244
+ ### Running Tests
245
+
246
+ ```bash
247
+ # Run all tests
248
+ pytest
249
+
250
+ # Run with coverage
251
+ pytest --cov=ruru --cov-report=html
252
+
253
+ # Run specific test file
254
+ pytest tests/test_client.py
255
+ ```
256
+
257
+ ## API Integration
258
+
259
+ The CLI integrates with the Ruru API. For local development:
260
+
261
+ 1. Start the API server:
262
+
263
+ ```bash
264
+ cd ../api
265
+ uvicorn app.main:app --reload --port 8000
266
+ ```
267
+
268
+ 2. Configure CLI for local API:
269
+ ```bash
270
+ export RURU_API_URL=http://localhost:8000
271
+ ```
272
+
273
+ ## Contributing
274
+
275
+ 1. Fork the repository
276
+ 2. Create a feature branch (`git checkout -b feature/amazing-feature`)
277
+ 3. Make your changes
278
+ 4. Add tests for your changes
279
+ 5. Run the test suite (`pytest`)
280
+ 6. Commit your changes (`git commit -m 'feat: add amazing feature'`)
281
+ 7. Push to the branch (`git push origin feature/amazing-feature`)
282
+ 8. Open a Pull Request
283
+
284
+ ## License
285
+
286
+ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
287
+
288
+ ## Support
289
+
290
+ - 📧 Email: me@ekkyarmandi.com
291
+ - 🐛 Issues: [GitHub Issues](https://github.com/ekkyarmandi/ruru-cli/issues)
292
+ - 📖 Documentation: [GitHub Wiki](https://github.com/ekkyarmandi/ruru-cli/wiki)
ruru-0.1.0/README.md ADDED
@@ -0,0 +1,226 @@
1
+ # Ruru CLI
2
+
3
+ A powerful CLI tool for managing and versioning prompts across projects.
4
+
5
+ Ruru helps developers manage, version, and sync prompt files (like `.cursorrules`) across multiple projects with a simple command-line interface.
6
+
7
+ ## Features
8
+
9
+ - 🔐 **Secure Authentication** - API key management with keyring support
10
+ - 📁 **Prompt Management** - Create, update, delete, and version prompts
11
+ - 🔍 **Search & Discovery** - Find prompts by name, tags, or content
12
+ - 📥 **Sync & Download** - Get prompts from the cloud to your local projects
13
+ - 🏷️ **Tagging System** - Organize prompts with custom tags
14
+ - 📊 **Version Control** - Track changes and manage prompt versions
15
+ - ⚙️ **Flexible Configuration** - Environment variables and config file support
16
+
17
+ ## Installation
18
+
19
+ ### From PyPI (Recommended)
20
+
21
+ ```bash
22
+ pip install ruru
23
+ ```
24
+
25
+ ### From Source
26
+
27
+ ```bash
28
+ git clone https://github.com/ekkyarmandi/ruru-cli.git
29
+ cd ruru/cli
30
+ pip install -e .
31
+ ```
32
+
33
+ ## Quick Start
34
+
35
+ ### 1. Authentication
36
+
37
+ First, set up your API credentials:
38
+
39
+ ```bash
40
+ # Set API key (will be stored securely in keyring)
41
+ ruru auth login
42
+
43
+ # Check authentication status
44
+ ruru auth status
45
+ ```
46
+
47
+ ### 2. Configuration
48
+
49
+ Configure the CLI for your environment:
50
+
51
+ ```bash
52
+ # Create .env file with your settings
53
+ cat > .env << EOF
54
+ RURU_API_URL=https://ruru.ekkyarmandi.com
55
+ RURU_API_KEY=your_api_key_here
56
+ RURU_OUTPUT_FORMAT=table
57
+ EOF
58
+ ```
59
+
60
+ ### 3. Basic Usage
61
+
62
+ ```bash
63
+ # List all prompts
64
+ ruru prompts list
65
+
66
+ # Search for prompts
67
+ ruru prompts search "cursor rules"
68
+
69
+ # Get a specific prompt
70
+ ruru prompts get my-prompt
71
+
72
+ # Create a new prompt
73
+ ruru prompts create --name "my-new-prompt" --file .cursorrules
74
+
75
+ # Update an existing prompt
76
+ ruru prompts update my-prompt --file .cursorrules
77
+ ```
78
+
79
+ ## Configuration
80
+
81
+ Ruru CLI supports multiple configuration methods:
82
+
83
+ ### Environment Variables
84
+
85
+ ```bash
86
+ export RURU_API_URL="https://ruru.ekkyarmandi.com"
87
+ export RURU_API_KEY="your_api_key"
88
+ export RURU_OUTPUT_FORMAT="table" # table, json, yaml
89
+ export RURU_NO_COLOR="false"
90
+ export RURU_VERBOSE="false"
91
+ ```
92
+
93
+ ### Configuration File
94
+
95
+ Create `~/.ruru/config.yaml`:
96
+
97
+ ```yaml
98
+ api:
99
+ url: "https://ruru.ekkyarmandi.com"
100
+ timeout: 30
101
+
102
+ defaults:
103
+ location: "./"
104
+ auto_create_dirs: true
105
+
106
+ output:
107
+ format: "table"
108
+ color: true
109
+
110
+ cache:
111
+ enabled: true
112
+ ttl: 300
113
+ ```
114
+
115
+ ### .env File
116
+
117
+ Create a `.env` file in your project directory:
118
+
119
+ ```env
120
+ RURU_API_URL=http://localhost:8000
121
+ RURU_API_KEY=your_local_api_key
122
+ RURU_OUTPUT_FORMAT=json
123
+ ```
124
+
125
+ ## Commands
126
+
127
+ ### Authentication
128
+
129
+ ```bash
130
+ ruru auth login # Set up API credentials
131
+ ruru auth logout # Remove stored credentials
132
+ ruru auth status # Check authentication status
133
+ ```
134
+
135
+ ### Prompt Management
136
+
137
+ ```bash
138
+ # List and search
139
+ ruru prompts list # List all prompts
140
+ ruru prompts list --tags python,ai # Filter by tags
141
+ ruru prompts search "query" # Search prompts
142
+
143
+ # Get prompts
144
+ ruru prompts get <name> # Download prompt to file
145
+ ruru prompts get <name> --output - # Print to stdout
146
+
147
+ # Create and update
148
+ ruru prompts create --name <name> --file <file>
149
+ ruru prompts update <name> --file <file>
150
+ ruru prompts delete <name>
151
+
152
+ # Version management
153
+ ruru prompts versions <name> # List versions
154
+ ruru prompts rollback <name> <version>
155
+ ```
156
+
157
+ ## Development
158
+
159
+ ### Setup Development Environment
160
+
161
+ ```bash
162
+ git clone https://github.com/ekkyarmandi/ruru-cli.git
163
+ cd ruru-cli
164
+
165
+ # Install with development dependencies
166
+ pip install -e ".[dev]"
167
+
168
+ # Run tests
169
+ pytest
170
+
171
+ # Run linting
172
+ black .
173
+ isort .
174
+ flake8
175
+ mypy .
176
+ ```
177
+
178
+ ### Running Tests
179
+
180
+ ```bash
181
+ # Run all tests
182
+ pytest
183
+
184
+ # Run with coverage
185
+ pytest --cov=ruru --cov-report=html
186
+
187
+ # Run specific test file
188
+ pytest tests/test_client.py
189
+ ```
190
+
191
+ ## API Integration
192
+
193
+ The CLI integrates with the Ruru API. For local development:
194
+
195
+ 1. Start the API server:
196
+
197
+ ```bash
198
+ cd ../api
199
+ uvicorn app.main:app --reload --port 8000
200
+ ```
201
+
202
+ 2. Configure CLI for local API:
203
+ ```bash
204
+ export RURU_API_URL=http://localhost:8000
205
+ ```
206
+
207
+ ## Contributing
208
+
209
+ 1. Fork the repository
210
+ 2. Create a feature branch (`git checkout -b feature/amazing-feature`)
211
+ 3. Make your changes
212
+ 4. Add tests for your changes
213
+ 5. Run the test suite (`pytest`)
214
+ 6. Commit your changes (`git commit -m 'feat: add amazing feature'`)
215
+ 7. Push to the branch (`git push origin feature/amazing-feature`)
216
+ 8. Open a Pull Request
217
+
218
+ ## License
219
+
220
+ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
221
+
222
+ ## Support
223
+
224
+ - 📧 Email: me@ekkyarmandi.com
225
+ - 🐛 Issues: [GitHub Issues](https://github.com/ekkyarmandi/ruru-cli/issues)
226
+ - 📖 Documentation: [GitHub Wiki](https://github.com/ekkyarmandi/ruru-cli/wiki)
@@ -0,0 +1,88 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61.0", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "ruru"
7
+ version = "0.1.0"
8
+ description = "A powerful CLI tool for managing and versioning prompts across projects"
9
+ readme = "README.md"
10
+ license = {file = "LICENSE"}
11
+ authors = [
12
+ {name = "Ekky Armandi", email = "me@ekkyarmandi.com"}
13
+ ]
14
+ maintainers = [
15
+ {name = "Ekky Armandi", email = "me@ekkyarmandi.com"}
16
+ ]
17
+ keywords = ["prompts", "rules", "ai", "llm", "context", "version-control", "prompt-management"]
18
+ classifiers = [
19
+ "Development Status :: 4 - Beta",
20
+ "Environment :: Console",
21
+ "Intended Audience :: Developers",
22
+ "License :: OSI Approved :: MIT License",
23
+ "Operating System :: OS Independent",
24
+ "Programming Language :: Python :: 3",
25
+ "Programming Language :: Python :: 3.8",
26
+ "Programming Language :: Python :: 3.9",
27
+ "Programming Language :: Python :: 3.10",
28
+ "Programming Language :: Python :: 3.11",
29
+ "Programming Language :: Python :: 3.12",
30
+ "Topic :: Software Development",
31
+ "Topic :: Text Processing",
32
+ "Topic :: Utilities",
33
+ ]
34
+ requires-python = ">=3.8.1"
35
+ dependencies = [
36
+ "click>=8.0.0",
37
+ "httpx>=0.24.0",
38
+ "rich>=13.0.0",
39
+ "pyyaml>=6.0",
40
+ "python-decouple>=3.6",
41
+ "keyring>=24.0.0",
42
+ "tqdm>=4.64.0",
43
+ "pydantic>=2.0.0",
44
+ ]
45
+
46
+ [project.optional-dependencies]
47
+ dev = [
48
+ "pytest>=7.0.0",
49
+ "pytest-cov>=4.0.0",
50
+ "pytest-mock>=3.10.0",
51
+ "pytest-click>=1.1.0",
52
+ "black>=23.0.0",
53
+ "isort>=5.12.0",
54
+ "flake8>=6.0.0",
55
+ "mypy>=1.0.0",
56
+ "responses>=0.23.0",
57
+ ]
58
+
59
+ [project.scripts]
60
+ ruru = "ruru.main:cli"
61
+
62
+ [tool.setuptools]
63
+ packages = ["ruru"]
64
+
65
+ [tool.setuptools.package-data]
66
+ ruru = ["py.typed"]
67
+
68
+ [tool.pytest.ini_options]
69
+ testpaths = ["tests"]
70
+ python_files = ["test_*.py"]
71
+ python_classes = ["Test*"]
72
+ python_functions = ["test_*"]
73
+ addopts = "--cov=ruru --cov-report=term-missing --cov-report=html"
74
+
75
+ [tool.black]
76
+ line-length = 88
77
+ target-version = ['py38']
78
+ include = '\.pyi?$'
79
+
80
+ [tool.isort]
81
+ profile = "black"
82
+ multi_line_output = 3
83
+
84
+ [tool.mypy]
85
+ python_version = "3.8"
86
+ warn_return_any = true
87
+ warn_unused_configs = true
88
+ disallow_untyped_defs = true
@@ -0,0 +1,15 @@
1
+ """
2
+ Ruru - A powerful CLI tool for managing and versioning prompts across projects.
3
+
4
+ Ruru helps developers manage, version, and sync prompt files (like .cursorrules)
5
+ across multiple projects with a simple command-line interface.
6
+ """
7
+
8
+ __version__ = "0.1.0"
9
+ __author__ = "Ruru Team"
10
+ __email__ = "me@ekkyarmandi.com"
11
+ __license__ = "MIT"
12
+
13
+ from .main import cli
14
+
15
+ __all__ = ["cli"]