redo-cli 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,231 @@
1
+ Metadata-Version: 2.4
2
+ Name: redo-cli
3
+ Version: 0.1.0
4
+ Summary: Bookmarks for terminal workflows.
5
+ Project-URL: Homepage, https://github.com/VibeSlayer-code/Redo
6
+ Project-URL: Repository, https://github.com/VibeSlayer-code/Redo
7
+ Project-URL: Issues, https://github.com/VibeSlayer-code/Redo/issues
8
+ Keywords: cli,terminal,workflow,automation,developer-tools
9
+ Classifier: Development Status :: 4 - Beta
10
+ Classifier: Environment :: Console
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: Operating System :: OS Independent
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Programming Language :: Python :: 3.10
15
+ Classifier: Programming Language :: Python :: 3.11
16
+ Classifier: Programming Language :: Python :: 3.12
17
+ Classifier: Programming Language :: Python :: 3.13
18
+ Classifier: Topic :: Software Development
19
+ Classifier: Topic :: System :: Shells
20
+ Classifier: Topic :: Utilities
21
+ Requires-Python: >=3.10
22
+ Description-Content-Type: text/markdown
23
+ Requires-Dist: typer>=0.12
24
+ Requires-Dist: rich>=13
25
+ Provides-Extra: dev
26
+ Requires-Dist: build; extra == "dev"
27
+ Requires-Dist: pytest; extra == "dev"
28
+ Requires-Dist: twine; extra == "dev"
29
+
30
+ # Redo
31
+
32
+ Redo is a CLI tool that saves repeated terminal workflows and runs them again with one command. It is built for developers who are tired of retyping the same setup, build, deploy, and cleanup commands.
33
+
34
+ Think of it as bookmarks for terminal workflows.
35
+
36
+ ## Why Redo Exists
37
+
38
+ Developers repeat the same command chains constantly: starting projects, running test suites, cleaning folders, pushing code, building apps, and following long README setup steps.
39
+
40
+ Redo lets you define those workflows once, then replay them whenever you need them. It supports smart placeholders, previews, safety checks for dangerous commands, and simple usage stats.
41
+
42
+ ## Installation
43
+
44
+ Install from PyPI:
45
+
46
+ ```bash
47
+ pip install redo-cli
48
+ ```
49
+
50
+ For local development, clone the project, create a virtual environment, and install dependencies:
51
+
52
+ ```bash
53
+ python -m venv .venv
54
+ .venv\Scripts\activate
55
+ pip install -r requirements.txt
56
+ pip install -e .
57
+ ```
58
+
59
+ You can run Redo locally with either form:
60
+
61
+ ```bash
62
+ python main.py --help
63
+ redo --help
64
+ redo --info
65
+ ```
66
+
67
+ Running `redo` with no command shows the Redo ASCII banner. Running `redo --info` shows the banner, version, storage path, and credit.
68
+
69
+ Redo stores its workflow data in:
70
+
71
+ ```txt
72
+ %APPDATA%/Redo/workflows.json on Windows, or ~/.redo/workflows.json when APPDATA is unavailable
73
+ ```
74
+
75
+ Set `REDO_DATA_DIR` to override the storage directory. Run `redo path` to print the exact file Redo is using.
76
+
77
+ Run `redo init` to create the folder and file explicitly, or let Redo create them the first time it needs storage.
78
+
79
+ The first time you run `redo new`, Redo offers to show a quick guide. You can open that guide anytime with:
80
+
81
+ ```bash
82
+ redo guide
83
+ ```
84
+
85
+ ## Usage
86
+
87
+ Create a workflow:
88
+
89
+ ```bash
90
+ redo new ship
91
+ ```
92
+
93
+ Enter commands one by one:
94
+
95
+ ```txt
96
+ Description: Commit and push code
97
+ Command: git add .
98
+ Command: git commit -m "{message}"
99
+ Command: git push
100
+ Command: :done
101
+ ```
102
+
103
+ Run it later:
104
+
105
+ ```bash
106
+ redo run ship
107
+ ```
108
+
109
+ Redo shows a live status table while commands run. Successful command output stays quiet by default; if a command fails, Redo stops the workflow and shows a focused error panel with the captured output.
110
+
111
+ Preview it without executing commands:
112
+
113
+ ```bash
114
+ redo run ship --dry
115
+ ```
116
+
117
+ ## Commands
118
+
119
+ ```bash
120
+ redo init
121
+ redo new <name>
122
+ redo list
123
+ redo show <name>
124
+ redo run <name>
125
+ redo run <name> --dry
126
+ redo delete <name>
127
+ redo clearhistory
128
+ redo stats
129
+ ```
130
+
131
+ Developer QoL commands:
132
+
133
+ ```bash
134
+ redo search <query>
135
+ redo copy <source> <target>
136
+ redo rename <old-name> <new-name>
137
+ redo path
138
+ redo export workflows-backup.json
139
+ redo import workflows-backup.json
140
+ redo import workflows-backup.json --replace
141
+ redo doctor
142
+ redo autofix
143
+ redo guide
144
+ ```
145
+
146
+ `redo doctor` checks the workflow file, counts saved commands/placeholders, and flags risky commands before they surprise you later.
147
+
148
+ `redo autofix` repairs common storage problems: 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 next to the main file before resetting it.
149
+
150
+ `redo clearhistory` clears every saved workflow from the file shown by `redo path`. Use `redo clearhistory --yes` to skip the confirmation prompt.
151
+
152
+ ## Placeholders
153
+
154
+ Use placeholders when part of a command changes each run:
155
+
156
+ ```bash
157
+ git commit -m "{message}"
158
+ npm create vite@latest {project_name}
159
+ cd {project_name}
160
+ ```
161
+
162
+ Redo asks once for each unique placeholder, then replaces every occurrence across the workflow.
163
+
164
+ Valid placeholder names use letters, numbers, and underscores, and cannot start with a number:
165
+
166
+ ```txt
167
+ {message}
168
+ {project_name}
169
+ {ticket_123}
170
+ ```
171
+
172
+ Placeholder values are quoted before execution so prompt input is treated as one literal value instead of shell syntax. This prevents command separators, variable expansion, and globs from silently changing the command shape.
173
+
174
+ Workflow names cannot be blank or reuse Redo command names such as `run`, `new`, `delete`, or `stats`.
175
+
176
+ ## Demo Workflow
177
+
178
+ ```bash
179
+ redo new ship
180
+ redo list
181
+ redo show ship
182
+ redo run ship --dry
183
+ redo run ship
184
+ redo stats
185
+ ```
186
+
187
+ Example workflow data:
188
+
189
+ ```json
190
+ {
191
+ "ship": {
192
+ "description": "Commit and push code",
193
+ "commands": [
194
+ "git add .",
195
+ "git commit -m \"{message}\"",
196
+ "git push"
197
+ ],
198
+ "runs": 0
199
+ }
200
+ }
201
+ ```
202
+
203
+ ## Safety
204
+
205
+ Redo detects risky commands before running them and asks for confirmation. Examples include:
206
+
207
+ ```bash
208
+ rm -rf
209
+ del /s
210
+ format
211
+ sudo
212
+ git reset --hard
213
+ ```
214
+
215
+ ## Git Push Tip
216
+
217
+ If Git says the current branch has no upstream branch, run the command Git suggests once:
218
+
219
+ ```bash
220
+ git push --set-upstream origin master
221
+ ```
222
+
223
+ After that, a workflow containing `git push` can push normally.
224
+
225
+ ## Roadmap
226
+
227
+ - Project-local and global workflow stores
228
+ - Tags and search
229
+ - Shell completion
230
+ - Workflow sharing through repository templates
231
+ - More detailed time-saved analytics
@@ -0,0 +1,202 @@
1
+ # Redo
2
+
3
+ Redo is a CLI tool that saves repeated terminal workflows and runs them again with one command. It is built for developers who are tired of retyping the same setup, build, deploy, and cleanup commands.
4
+
5
+ Think of it as bookmarks for terminal workflows.
6
+
7
+ ## Why Redo Exists
8
+
9
+ Developers repeat the same command chains constantly: starting projects, running test suites, cleaning folders, pushing code, building apps, and following long README setup steps.
10
+
11
+ Redo lets you define those workflows once, then replay them whenever you need them. It supports smart placeholders, previews, safety checks for dangerous commands, and simple usage stats.
12
+
13
+ ## Installation
14
+
15
+ Install from PyPI:
16
+
17
+ ```bash
18
+ pip install redo-cli
19
+ ```
20
+
21
+ For local development, clone the project, create a virtual environment, and install dependencies:
22
+
23
+ ```bash
24
+ python -m venv .venv
25
+ .venv\Scripts\activate
26
+ pip install -r requirements.txt
27
+ pip install -e .
28
+ ```
29
+
30
+ You can run Redo locally with either form:
31
+
32
+ ```bash
33
+ python main.py --help
34
+ redo --help
35
+ redo --info
36
+ ```
37
+
38
+ Running `redo` with no command shows the Redo ASCII banner. Running `redo --info` shows the banner, version, storage path, and credit.
39
+
40
+ Redo stores its workflow data in:
41
+
42
+ ```txt
43
+ %APPDATA%/Redo/workflows.json on Windows, or ~/.redo/workflows.json when APPDATA is unavailable
44
+ ```
45
+
46
+ Set `REDO_DATA_DIR` to override the storage directory. Run `redo path` to print the exact file Redo is using.
47
+
48
+ Run `redo init` to create the folder and file explicitly, or let Redo create them the first time it needs storage.
49
+
50
+ The first time you run `redo new`, Redo offers to show a quick guide. You can open that guide anytime with:
51
+
52
+ ```bash
53
+ redo guide
54
+ ```
55
+
56
+ ## Usage
57
+
58
+ Create a workflow:
59
+
60
+ ```bash
61
+ redo new ship
62
+ ```
63
+
64
+ Enter commands one by one:
65
+
66
+ ```txt
67
+ Description: Commit and push code
68
+ Command: git add .
69
+ Command: git commit -m "{message}"
70
+ Command: git push
71
+ Command: :done
72
+ ```
73
+
74
+ Run it later:
75
+
76
+ ```bash
77
+ redo run ship
78
+ ```
79
+
80
+ Redo shows a live status table while commands run. Successful command output stays quiet by default; if a command fails, Redo stops the workflow and shows a focused error panel with the captured output.
81
+
82
+ Preview it without executing commands:
83
+
84
+ ```bash
85
+ redo run ship --dry
86
+ ```
87
+
88
+ ## Commands
89
+
90
+ ```bash
91
+ redo init
92
+ redo new <name>
93
+ redo list
94
+ redo show <name>
95
+ redo run <name>
96
+ redo run <name> --dry
97
+ redo delete <name>
98
+ redo clearhistory
99
+ redo stats
100
+ ```
101
+
102
+ Developer QoL commands:
103
+
104
+ ```bash
105
+ redo search <query>
106
+ redo copy <source> <target>
107
+ redo rename <old-name> <new-name>
108
+ redo path
109
+ redo export workflows-backup.json
110
+ redo import workflows-backup.json
111
+ redo import workflows-backup.json --replace
112
+ redo doctor
113
+ redo autofix
114
+ redo guide
115
+ ```
116
+
117
+ `redo doctor` checks the workflow file, counts saved commands/placeholders, and flags risky commands before they surprise you later.
118
+
119
+ `redo autofix` repairs common storage problems: 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 next to the main file before resetting it.
120
+
121
+ `redo clearhistory` clears every saved workflow from the file shown by `redo path`. Use `redo clearhistory --yes` to skip the confirmation prompt.
122
+
123
+ ## Placeholders
124
+
125
+ Use placeholders when part of a command changes each run:
126
+
127
+ ```bash
128
+ git commit -m "{message}"
129
+ npm create vite@latest {project_name}
130
+ cd {project_name}
131
+ ```
132
+
133
+ Redo asks once for each unique placeholder, then replaces every occurrence across the workflow.
134
+
135
+ Valid placeholder names use letters, numbers, and underscores, and cannot start with a number:
136
+
137
+ ```txt
138
+ {message}
139
+ {project_name}
140
+ {ticket_123}
141
+ ```
142
+
143
+ Placeholder values are quoted before execution so prompt input is treated as one literal value instead of shell syntax. This prevents command separators, variable expansion, and globs from silently changing the command shape.
144
+
145
+ Workflow names cannot be blank or reuse Redo command names such as `run`, `new`, `delete`, or `stats`.
146
+
147
+ ## Demo Workflow
148
+
149
+ ```bash
150
+ redo new ship
151
+ redo list
152
+ redo show ship
153
+ redo run ship --dry
154
+ redo run ship
155
+ redo stats
156
+ ```
157
+
158
+ Example workflow data:
159
+
160
+ ```json
161
+ {
162
+ "ship": {
163
+ "description": "Commit and push code",
164
+ "commands": [
165
+ "git add .",
166
+ "git commit -m \"{message}\"",
167
+ "git push"
168
+ ],
169
+ "runs": 0
170
+ }
171
+ }
172
+ ```
173
+
174
+ ## Safety
175
+
176
+ Redo detects risky commands before running them and asks for confirmation. Examples include:
177
+
178
+ ```bash
179
+ rm -rf
180
+ del /s
181
+ format
182
+ sudo
183
+ git reset --hard
184
+ ```
185
+
186
+ ## Git Push Tip
187
+
188
+ If Git says the current branch has no upstream branch, run the command Git suggests once:
189
+
190
+ ```bash
191
+ git push --set-upstream origin master
192
+ ```
193
+
194
+ After that, a workflow containing `git push` can push normally.
195
+
196
+ ## Roadmap
197
+
198
+ - Project-local and global workflow stores
199
+ - Tags and search
200
+ - Shell completion
201
+ - Workflow sharing through repository templates
202
+ - More detailed time-saved analytics