redo-cli 0.1.0__tar.gz → 0.1.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (26) hide show
  1. redo_cli-0.1.2/PKG-INFO +507 -0
  2. redo_cli-0.1.2/README.md +475 -0
  3. redo_cli-0.1.2/license.txt +11 -0
  4. {redo_cli-0.1.0 → redo_cli-0.1.2}/main.py +299 -299
  5. {redo_cli-0.1.0 → redo_cli-0.1.2}/modules/__init__.py +1 -1
  6. {redo_cli-0.1.0 → redo_cli-0.1.2}/modules/placeholders.py +134 -134
  7. {redo_cli-0.1.0 → redo_cli-0.1.2}/modules/runner.py +235 -196
  8. {redo_cli-0.1.0 → redo_cli-0.1.2}/modules/storage.py +515 -515
  9. {redo_cli-0.1.0 → redo_cli-0.1.2}/modules/ui.py +422 -374
  10. {redo_cli-0.1.0 → redo_cli-0.1.2}/pyproject.toml +49 -48
  11. redo_cli-0.1.2/redo_cli.egg-info/PKG-INFO +507 -0
  12. {redo_cli-0.1.0 → redo_cli-0.1.2}/redo_cli.egg-info/SOURCES.txt +1 -0
  13. {redo_cli-0.1.0 → redo_cli-0.1.2}/tests/test_cli.py +291 -291
  14. {redo_cli-0.1.0 → redo_cli-0.1.2}/tests/test_packaging.py +19 -17
  15. {redo_cli-0.1.0 → redo_cli-0.1.2}/tests/test_placeholders.py +112 -112
  16. {redo_cli-0.1.0 → redo_cli-0.1.2}/tests/test_runner.py +126 -124
  17. {redo_cli-0.1.0 → redo_cli-0.1.2}/tests/test_storage.py +343 -343
  18. {redo_cli-0.1.0 → redo_cli-0.1.2}/tests/test_ui.py +122 -67
  19. redo_cli-0.1.0/PKG-INFO +0 -231
  20. redo_cli-0.1.0/README.md +0 -202
  21. redo_cli-0.1.0/redo_cli.egg-info/PKG-INFO +0 -231
  22. {redo_cli-0.1.0 → redo_cli-0.1.2}/redo_cli.egg-info/dependency_links.txt +0 -0
  23. {redo_cli-0.1.0 → redo_cli-0.1.2}/redo_cli.egg-info/entry_points.txt +0 -0
  24. {redo_cli-0.1.0 → redo_cli-0.1.2}/redo_cli.egg-info/requires.txt +0 -0
  25. {redo_cli-0.1.0 → redo_cli-0.1.2}/redo_cli.egg-info/top_level.txt +0 -0
  26. {redo_cli-0.1.0 → redo_cli-0.1.2}/setup.cfg +0 -0
@@ -0,0 +1,507 @@
1
+ Metadata-Version: 2.4
2
+ Name: redo-cli
3
+ Version: 0.1.2
4
+ Summary: Bookmarks for terminal workflows.
5
+ Author: Vibeslayer-code
6
+ Project-URL: Homepage, https://github.com/VibeSlayer-code/Redo
7
+ Project-URL: Repository, https://github.com/VibeSlayer-code/Redo
8
+ Project-URL: Issues, https://github.com/VibeSlayer-code/Redo/issues
9
+ Keywords: cli,terminal,workflow,automation,developer-tools
10
+ Classifier: Development Status :: 4 - Beta
11
+ Classifier: Environment :: Console
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: Operating System :: OS Independent
14
+ Classifier: Programming Language :: Python :: 3
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: Topic :: Software Development
20
+ Classifier: Topic :: System :: Shells
21
+ Classifier: Topic :: Utilities
22
+ Requires-Python: >=3.10
23
+ Description-Content-Type: text/markdown
24
+ License-File: license.txt
25
+ Requires-Dist: typer>=0.12
26
+ Requires-Dist: rich>=13
27
+ Provides-Extra: dev
28
+ Requires-Dist: build; extra == "dev"
29
+ Requires-Dist: pytest; extra == "dev"
30
+ Requires-Dist: twine; extra == "dev"
31
+ Dynamic: license-file
32
+
33
+ # Redo
34
+
35
+ A CLI tool for saving repeated terminal workflows and running them again with one command.
36
+
37
+ <p align="center">
38
+ <img src="https://raw.githubusercontent.com/VibeSlayer-code/Redo/main/assets/banner.png" alt="Redo banner" width="100%" />
39
+ </p>
40
+
41
+ <p align="center">
42
+ <b>Stop retyping commands. Save workflows once, run them anytime.</b>
43
+ </p>
44
+
45
+ <p align="center">
46
+ <a href="https://pypi.org/project/redo-cli/">
47
+ <img src="https://img.shields.io/pypi/v/redo-cli?style=for-the-badge&label=PyPI" alt="PyPI version">
48
+ </a>
49
+ <img src="https://img.shields.io/badge/Python-3.11%2B-3776AB?style=for-the-badge&logo=python&logoColor=white" alt="Python 3.11+">
50
+ <img src="https://img.shields.io/badge/CLI-Workflow%20Automation-6D5DFB?style=for-the-badge" alt="CLI Workflow Automation">
51
+ <img src="https://img.shields.io/badge/Status-Active-22C55E?style=for-the-badge" alt="Active">
52
+ </p>
53
+
54
+ <p align="center">
55
+ <a href="#quick-start"><b>Quick Start</b></a>
56
+ ·
57
+ <a href="#demo-flow"><b>Demo</b></a>
58
+ ·
59
+ <a href="#features"><b>Features</b></a>
60
+ ·
61
+ <a href="#commands"><b>Commands</b></a>
62
+ ·
63
+ <a href="#local-development"><b>Local Development</b></a>
64
+ </p>
65
+
66
+ ---
67
+
68
+ ## What is Redo?
69
+
70
+ Redo is a command-line tool that turns repeated terminal command chains into reusable workflows.
71
+
72
+ Instead of typing this every time:
73
+
74
+ ```bash
75
+ git add .
76
+ git commit -m "fixed bug"
77
+ git push
78
+ ```
79
+
80
+ Save it once:
81
+
82
+ ```bash
83
+ redo new ship
84
+ ```
85
+
86
+ Then run it anytime:
87
+
88
+ ```bash
89
+ redo run ship
90
+ ```
91
+
92
+ Think of Redo as **bookmarks for terminal workflows**.
93
+
94
+ ---
95
+
96
+ ## Demo Flow
97
+
98
+ <p align="center">
99
+ <img src="https://raw.githubusercontent.com/VibeSlayer-code/Redo/main/assets/demo-run.png" alt="Redo demo running workflow" width="85%" />
100
+ </p>
101
+
102
+ ```bash
103
+ redo new ship
104
+ redo list
105
+ redo show ship
106
+ redo run ship --dry
107
+ redo run ship
108
+ redo stats
109
+ ```
110
+
111
+ > Add a real screenshot or GIF at `assets/demo-run.png`.
112
+ > Best shot: the live workflow status table while `redo run ship` is running.
113
+
114
+ ---
115
+
116
+ ## Quick Start
117
+
118
+ Install from PyPI:
119
+
120
+ ```bash
121
+ pip install redo-cli
122
+ ```
123
+
124
+ Create a workflow:
125
+
126
+ ```bash
127
+ redo new ship
128
+ ```
129
+
130
+ Enter commands one by one:
131
+
132
+ ```txt
133
+ Description: Commit and push code
134
+ Command: git add .
135
+ Command: git commit -m "{message}"
136
+ Command: git push
137
+ Command: :done
138
+ ```
139
+
140
+ Run it later:
141
+
142
+ ```bash
143
+ redo run ship
144
+ ```
145
+
146
+ Preview before running:
147
+
148
+ ```bash
149
+ redo run ship --dry
150
+ ```
151
+
152
+ ---
153
+
154
+ ## Why It Matters
155
+
156
+ Developers repeat command chains constantly:
157
+
158
+ <table>
159
+ <tr>
160
+ <td><b>Project setup</b></td>
161
+ <td><code>npm install</code>, copy env files, start dev servers</td>
162
+ </tr>
163
+ <tr>
164
+ <td><b>Git workflows</b></td>
165
+ <td><code>git add</code>, <code>git commit</code>, <code>git push</code></td>
166
+ </tr>
167
+ <tr>
168
+ <td><b>Build flows</b></td>
169
+ <td>run tests, build apps, deploy projects</td>
170
+ </tr>
171
+ <tr>
172
+ <td><b>Cleanup flows</b></td>
173
+ <td>remove build folders, reinstall dependencies, reset local state</td>
174
+ </tr>
175
+ </table>
176
+
177
+ Redo removes the small friction that adds up over time.
178
+
179
+ ---
180
+
181
+ ## Features
182
+
183
+ | Feature | What it does |
184
+ | ------------------ | -------------------------------------------------- |
185
+ | Named workflows | Save repeated command chains as reusable workflows |
186
+ | One-command replay | Run saved workflows with `redo run <name>` |
187
+ | Smart placeholders | Use values like `{message}` or `{project_name}` |
188
+ | Dry run mode | Preview commands before executing them |
189
+ | Safety checks | Detect risky commands before they surprise you |
190
+ | Focused errors | Stop on failure and show the command that broke |
191
+ | Usage stats | Track run counts and time-saved estimates |
192
+ | Import/export | Back up and move workflows between machines |
193
+ | Doctor/autofix | Check and repair workflow storage issues |
194
+
195
+ ---
196
+
197
+ ## Commands
198
+
199
+ ### Core
200
+
201
+ ```bash
202
+ redo init
203
+ redo new <name>
204
+ redo list
205
+ redo show <name>
206
+ redo run <name>
207
+ redo run <name> --dry
208
+ redo delete <name>
209
+ redo stats
210
+ ```
211
+
212
+ ### Developer QoL
213
+
214
+ ```bash
215
+ redo search <query>
216
+ redo copy <source> <target>
217
+ redo rename <old-name> <new-name>
218
+ redo path
219
+ redo export workflows-backup.json
220
+ redo import workflows-backup.json
221
+ redo import workflows-backup.json --replace
222
+ redo doctor
223
+ redo autofix
224
+ redo guide
225
+ redo clearhistory
226
+ ```
227
+
228
+ ---
229
+
230
+ ## Example Workflow
231
+
232
+ ```bash
233
+ redo new ship
234
+ ```
235
+
236
+ ```txt
237
+ Description: Commit and push code
238
+ Command: git add .
239
+ Command: git commit -m "{message}"
240
+ Command: git push
241
+ Command: :done
242
+ ```
243
+
244
+ Saved data:
245
+
246
+ ```json
247
+ {
248
+ "ship": {
249
+ "description": "Commit and push code",
250
+ "commands": [
251
+ "git add .",
252
+ "git commit -m \"{message}\"",
253
+ "git push"
254
+ ],
255
+ "runs": 0
256
+ }
257
+ }
258
+ ```
259
+
260
+ Run it:
261
+
262
+ ```bash
263
+ redo run ship
264
+ ```
265
+
266
+ Redo asks for the placeholder value:
267
+
268
+ ```txt
269
+ message: fixed clumsy ui
270
+ ```
271
+
272
+ Then runs:
273
+
274
+ ```bash
275
+ git add .
276
+ git commit -m "fixed clumsy ui"
277
+ git push
278
+ ```
279
+
280
+ ---
281
+
282
+ ## Screenshots
283
+
284
+ <p align="center">
285
+ <img src="https://raw.githubusercontent.com/VibeSlayer-code/Redo/main/assets/list-command.png" alt="Redo list command" width="48%" />
286
+ <img src="https://raw.githubusercontent.com/VibeSlayer-code/Redo/main/assets/dry-run.png" alt="Redo dry run preview" width="48%" />
287
+ </p>
288
+
289
+ <p align="center">
290
+ <img src="https://raw.githubusercontent.com/VibeSlayer-code/Redo/main/assets/error-panel.png" alt="Redo focused error panel" width="85%" />
291
+ </p>
292
+
293
+ Suggested files to add:
294
+
295
+ ```txt
296
+ assets/banner.png
297
+ assets/demo-run.png
298
+ assets/list-command.png
299
+ assets/dry-run.png
300
+ assets/error-panel.png
301
+ ```
302
+
303
+ For a CLI project, a short terminal GIF is the strongest visual. Recommended GIF:
304
+
305
+ ```txt
306
+ assets/demo.gif
307
+ ```
308
+
309
+ Show this sequence:
310
+
311
+ ```bash
312
+ redo new ship
313
+ redo list
314
+ redo run ship --dry
315
+ redo run ship
316
+ ```
317
+
318
+ Then embed it near the top:
319
+
320
+ ```md
321
+ <p align="center">
322
+ <img src="assets/demo.gif" alt="Redo terminal demo" width="85%" />
323
+ </p>
324
+ ```
325
+
326
+ ---
327
+
328
+ ## Placeholders
329
+
330
+ Use placeholders when part of a command changes each run.
331
+
332
+ ```bash
333
+ git commit -m "{message}"
334
+ npm create vite@latest {project_name}
335
+ cd {project_name}
336
+ ```
337
+
338
+ Redo asks once for each unique placeholder and replaces every occurrence across the workflow.
339
+
340
+ Valid placeholder names:
341
+
342
+ ```txt
343
+ {message}
344
+ {project_name}
345
+ {ticket_123}
346
+ ```
347
+
348
+ Invalid placeholder names:
349
+
350
+ ```txt
351
+ {123ticket}
352
+ {project-name}
353
+ {}
354
+ ```
355
+
356
+ Placeholder values are quoted before execution so user input is treated as one literal value instead of shell syntax.
357
+
358
+ ---
359
+
360
+ ## Safety
361
+
362
+ Redo detects risky commands before running them.
363
+
364
+ Examples:
365
+
366
+ ```bash
367
+ rm -rf
368
+ del /s
369
+ format
370
+ sudo
371
+ git reset --hard
372
+ ```
373
+
374
+ If a risky command is found, Redo asks for confirmation before continuing.
375
+
376
+ Use dry-run mode whenever you want to inspect a workflow first:
377
+
378
+ ```bash
379
+ redo run cleanup --dry
380
+ ```
381
+
382
+ ---
383
+
384
+ ## Storage
385
+
386
+ Redo stores workflow data in:
387
+
388
+ ```txt
389
+ %APPDATA%/Redo/workflows.json
390
+ ```
391
+
392
+ If `APPDATA` is unavailable, Redo falls back to:
393
+
394
+ ```txt
395
+ ~/.redo/workflows.json
396
+ ```
397
+
398
+ Override the storage directory:
399
+
400
+ ```bash
401
+ REDO_DATA_DIR=<path>
402
+ ```
403
+
404
+ Print the exact storage path:
405
+
406
+ ```bash
407
+ redo path
408
+ ```
409
+
410
+ Repair common storage issues:
411
+
412
+ ```bash
413
+ redo autofix
414
+ ```
415
+
416
+ `redo autofix` can fix missing files, blank files, malformed JSON, and workflow entries with missing fields. If JSON is malformed, Redo saves a non-overwriting `workflows.broken.json` backup before resetting the main file.
417
+
418
+ ---
419
+
420
+ ## Local Development
421
+
422
+ Requirements:
423
+
424
+ ```txt
425
+ Python 3.11+
426
+ ```
427
+
428
+ Clone the repository:
429
+
430
+ ```bash
431
+ git clone https://github.com/VibeSlayer-code/Redo.git
432
+ cd Redo
433
+ ```
434
+
435
+ Create and activate a virtual environment:
436
+
437
+ ```bash
438
+ python -m venv .venv
439
+ .venv\Scripts\activate
440
+ ```
441
+
442
+ Install dependencies:
443
+
444
+ ```bash
445
+ pip install -r requirements.txt
446
+ pip install -e .
447
+ ```
448
+
449
+ Run locally:
450
+
451
+ ```bash
452
+ python main.py --help
453
+ redo --help
454
+ redo --info
455
+ ```
456
+
457
+ Run tests:
458
+
459
+ ```bash
460
+ pytest
461
+ ```
462
+
463
+ ---
464
+
465
+ ## How It Works
466
+
467
+ Redo is split into small modules instead of one large script.
468
+
469
+ ```txt
470
+ storage.py workflow JSON storage
471
+ placeholders.py placeholder detection and replacement
472
+ runner.py command execution and dry runs
473
+ ui.py terminal output and tables
474
+ main.py CLI commands
475
+ ```
476
+
477
+ The workflow lifecycle:
478
+
479
+ ```txt
480
+ load workflow
481
+ process placeholders
482
+ preview or run commands
483
+ stop on failure
484
+ update run count
485
+ ```
486
+
487
+ This keeps the codebase simple while still supporting useful CLI features like dry runs, safety checks, repair tools, and stats.
488
+
489
+ ---
490
+
491
+ ## Roadmap
492
+
493
+ * Project-local workflow files
494
+ * Shell completion
495
+ * Workflow tags
496
+ * Workflow templates
497
+ * Shared workflows for repositories
498
+ * More detailed time-saved analytics
499
+ * Better safety rules for destructive commands
500
+
501
+ ---
502
+
503
+ ## License
504
+
505
+ Source-available, all rights reserved.
506
+
507
+ You may view the source code, but you may not copy, modify, distribute, or use it without permission.