promptqueue 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 Atharva Maik
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,332 @@
1
+ Metadata-Version: 2.4
2
+ Name: promptqueue
3
+ Version: 0.1.0
4
+ Summary: Dependency-free prompt scheduler for AI rate-limit resets.
5
+ Author: Atharva Maik
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/AtharvaMaik/PromptQueue
8
+ Project-URL: Repository, https://github.com/AtharvaMaik/PromptQueue
9
+ Project-URL: Issues, https://github.com/AtharvaMaik/PromptQueue/issues
10
+ Keywords: ai,automation,scheduler,claude,codex,chatgpt,cursor,gemini
11
+ Classifier: Development Status :: 3 - Alpha
12
+ Classifier: Environment :: Console
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Operating System :: Microsoft :: Windows
15
+ Classifier: Operating System :: MacOS
16
+ Classifier: Operating System :: POSIX :: Linux
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Programming Language :: Python :: 3.10
19
+ Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Programming Language :: Python :: 3.13
22
+ Classifier: Topic :: Utilities
23
+ Requires-Python: >=3.10
24
+ Description-Content-Type: text/markdown
25
+ License-File: LICENSE
26
+ Dynamic: license-file
27
+
28
+ # PromptQueue
29
+
30
+ [![CI](https://github.com/AtharvaMaik/PromptQueue/actions/workflows/ci.yml/badge.svg)](https://github.com/AtharvaMaik/PromptQueue/actions/workflows/ci.yml)
31
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
32
+ [![Python 3.10+](https://img.shields.io/badge/python-3.10%2B-blue.svg)](https://www.python.org/)
33
+ [![PyPI](https://img.shields.io/pypi/v/promptqueue.svg)](https://pypi.org/project/promptqueue/)
34
+
35
+ Schedule AI prompts for the moment your limits reset.
36
+
37
+ PromptQueue is a tiny, dependency-free prompt scheduler for Claude, Codex, ChatGPT, Gemini, Copilot, Cursor, Antigravity, and anything else you can launch from your machine.
38
+
39
+ When an AI tool says "try again at 7:30 PM", do not keep the tab open, set a reminder, or paste the same prompt later. Queue it now. PromptQueue waits, opens or focuses the target app, pastes the prompt, and submits it when the time arrives.
40
+
41
+ ```powershell
42
+ promptqueue add 19:30 claude finish the migration plan
43
+ promptqueue run
44
+ ```
45
+
46
+ One Python file. Standard library only. No accounts, no server, no private APIs.
47
+
48
+ ![PromptQueue terminal demo](https://raw.githubusercontent.com/AtharvaMaik/PromptQueue/main/docs/demo.svg)
49
+
50
+ ## Why This Exists
51
+
52
+ AI rate limits waste the worst kind of time: attention.
53
+
54
+ You already know what you want to ask next. The only problem is the clock. PromptQueue turns "come back later" into a queued job you can trust.
55
+
56
+ Use it when:
57
+
58
+ - Claude, Codex, ChatGPT, Gemini, or Copilot tells you to wait for a reset
59
+ - you want a long prompt to run after you sleep
60
+ - you want a coding agent to resume work when capacity returns
61
+ - you want a dead-simple local queue instead of another SaaS dashboard
62
+
63
+ If this saves you one context switch, it has already done its job.
64
+
65
+ ## 30 Second Demo
66
+
67
+ Queue a Claude prompt for 11:30 PM:
68
+
69
+ ```powershell
70
+ promptqueue add 23:30 claude write a first draft of the launch email
71
+ promptqueue run
72
+ ```
73
+
74
+ Queue a Codex CLI prompt:
75
+
76
+ ```powershell
77
+ promptqueue add 23:30 codex-exec add tests for the queue runner
78
+ promptqueue run
79
+ ```
80
+
81
+ Queue a multiline prompt safely:
82
+
83
+ ```powershell
84
+ @'
85
+ Review this repo.
86
+ Find the smallest useful next improvement.
87
+ Then implement it.
88
+ '@ | promptqueue add --stdin 23:30 claude
89
+ promptqueue run
90
+ ```
91
+
92
+ View what is waiting:
93
+
94
+ ```powershell
95
+ promptqueue list --full
96
+ promptqueue show JOB_ID
97
+ ```
98
+
99
+ ## Supported Targets
100
+
101
+ ```text
102
+ antigravity Google Antigravity UI
103
+ chatgpt ChatGPT web UI
104
+ claude Claude web UI
105
+ claude-code Claude CLI
106
+ codex Codex desktop UI
107
+ codex-exec Codex CLI
108
+ copilot Copilot web UI
109
+ copy clipboard only
110
+ cursor Cursor UI
111
+ gemini Gemini web UI
112
+ ```
113
+
114
+ Run this to see the built-in aliases on your machine:
115
+
116
+ ```powershell
117
+ promptqueue targets
118
+ ```
119
+
120
+ UI targets open or focus the app, click near the composer, paste, then press Enter by default.
121
+
122
+ CLI targets run the command directly with the prompt as one argument.
123
+
124
+ ## Agent Ready
125
+
126
+ This repo includes instruction files for common AI coding tools:
127
+
128
+ ```text
129
+ AGENTS.md Codex and general agents
130
+ CLAUDE.md Claude Code
131
+ GEMINI.md Gemini CLI
132
+ .cursor/rules/promptqueue.mdc Cursor
133
+ .agents/skills/promptqueue/ Antigravity-style skill
134
+ ```
135
+
136
+ That means you can tell an agent:
137
+
138
+ ```text
139
+ My limits reset at 7:30 pm. Schedule this prompt for Claude:
140
+ "Continue the refactor and run the tests."
141
+ ```
142
+
143
+ The agent should queue it with PromptQueue instead of making you remember.
144
+
145
+ ## Requirements
146
+
147
+ - Python 3.10+
148
+ - Windows for GUI paste/submit automation
149
+ - macOS/Linux work for queue management, URLs, clipboard fallback, and CLI targets, but GUI paste currently uses Windows APIs
150
+
151
+ ## Install
152
+
153
+ Install from PyPI:
154
+
155
+ ```powershell
156
+ pip install promptqueue
157
+ promptqueue selftest
158
+ ```
159
+
160
+ Or clone the repo and run the single Python file:
161
+
162
+ ```powershell
163
+ git clone https://github.com/AtharvaMaik/PromptQueue.git
164
+ cd PromptQueue
165
+ python promptqueue.py selftest
166
+ ```
167
+
168
+ After `pip install`, use `promptqueue`. When running from a clone without installing, use `python promptqueue.py`.
169
+
170
+ PromptQueue stores jobs in:
171
+
172
+ ```text
173
+ %USERPROFILE%\.promptqueue.json
174
+ ```
175
+
176
+ Override the queue path when you want an isolated queue:
177
+
178
+ ```powershell
179
+ $env:PROMPTQUEUE_FILE="C:\path\queue.json"
180
+ ```
181
+
182
+ ## How It Works
183
+
184
+ 1. `add` writes a job to the local queue file.
185
+ 2. `run` checks for due jobs.
186
+ 3. When a job is due, PromptQueue copies the prompt to the clipboard.
187
+ 4. For UI targets, it opens or focuses the app, clicks the composer, pastes, and optionally submits.
188
+ 5. For CLI targets, it launches the command directly.
189
+ 6. Attempts, failures, retries, and history stay visible in the queue file.
190
+
191
+ If the machine wakes up after the scheduled time, `run` catches overdue jobs.
192
+
193
+ ## Commands
194
+
195
+ ### `add`
196
+
197
+ Queue a prompt.
198
+
199
+ ```powershell
200
+ promptqueue add [options] WHEN TARGET PROMPT...
201
+ ```
202
+
203
+ `WHEN` can be a local time like `23:30` or an ISO-ish datetime like `2026-06-24 01:15`.
204
+
205
+ Options:
206
+
207
+ ```text
208
+ --click bottom Click near the bottom of the focused window before paste.
209
+ --click x,y Click x/y pixels from the target window top-left.
210
+ --command-template TEMPLATE Run a custom command; use {prompt}.
211
+ --delay SECONDS Wait before paste/submit. Default: 5.
212
+ --file FILE Read prompt text from a UTF-8 file.
213
+ --max-attempts N Attempts before marking failed. Default: 5.
214
+ --no-submit Paste only; do not press Enter.
215
+ --pre-keys KEYS Windows SendKeys before paste, e.g. "{ESC}".
216
+ --retry-base SECONDS Initial retry delay. Default: 30.
217
+ --stdin Read prompt text from stdin.
218
+ --window TITLE Focus a window whose title contains TITLE.
219
+ ```
220
+
221
+ Examples:
222
+
223
+ ```powershell
224
+ promptqueue add 23:30 claude summarize this paper
225
+ promptqueue add --window Codex 23:30 copy this lands in Codex
226
+ promptqueue add --no-submit 23:30 claude paste this but do not send it
227
+ promptqueue add --file prompt.txt 23:30 claude
228
+ "prompt from stdin" | promptqueue add --stdin 23:30 copy
229
+ promptqueue add --command-template "claude -p {prompt}" 23:30 command review this repo
230
+ ```
231
+
232
+ ### `run`
233
+
234
+ Start the queue worker:
235
+
236
+ ```powershell
237
+ promptqueue run
238
+ ```
239
+
240
+ Check once and exit:
241
+
242
+ ```powershell
243
+ promptqueue run --once
244
+ ```
245
+
246
+ Poll faster or slower:
247
+
248
+ ```powershell
249
+ promptqueue run --poll 5
250
+ ```
251
+
252
+ The runner must be alive when jobs are due.
253
+
254
+ ### `list`
255
+
256
+ Show queued jobs:
257
+
258
+ ```powershell
259
+ promptqueue list
260
+ promptqueue list --all
261
+ promptqueue list --full
262
+ ```
263
+
264
+ ### `show`
265
+
266
+ Show one job as JSON:
267
+
268
+ ```powershell
269
+ promptqueue show JOB_ID
270
+ ```
271
+
272
+ ### `remove`
273
+
274
+ Delete one job:
275
+
276
+ ```powershell
277
+ promptqueue remove JOB_ID
278
+ ```
279
+
280
+ ### `windows`
281
+
282
+ List visible Windows window titles. Use this to find the right `--window` value.
283
+
284
+ ```powershell
285
+ promptqueue windows
286
+ ```
287
+
288
+ ### `targets`
289
+
290
+ List built-in target aliases:
291
+
292
+ ```powershell
293
+ promptqueue targets
294
+ ```
295
+
296
+ ### `selftest`
297
+
298
+ Run the built-in smoke test:
299
+
300
+ ```powershell
301
+ promptqueue selftest
302
+ ```
303
+
304
+ ## Retries And History
305
+
306
+ Every job stores attempts and history. Failures stay visible in `list` and `show`.
307
+
308
+ ```powershell
309
+ promptqueue add --max-attempts 8 --retry-base 60 23:30 claude retry this more patiently
310
+ promptqueue list --all
311
+ promptqueue show JOB_ID
312
+ ```
313
+
314
+ Backoff is exponential and capped at one hour.
315
+
316
+ ## Notes
317
+
318
+ PromptQueue intentionally does the boring thing: it uses local files, the clipboard, app launching, and keyboard paste. That keeps it portable and inspectable.
319
+
320
+ For GUI apps, it does not use private app APIs. If one app misses the composer, adjust `--window`, `--click`, `--delay`, or `--pre-keys`.
321
+
322
+ ## Contributing
323
+
324
+ Issues and PRs are welcome. Start with [CONTRIBUTING.md](CONTRIBUTING.md) and [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md).
325
+
326
+ The best contributions are small and practical: a better target alias, a failing selftest for a real bug, clearer setup docs, or a platform-specific paste improvement.
327
+
328
+ ## License
329
+
330
+ MIT. See [LICENSE](LICENSE).
331
+
332
+ Star the repo if it saves you from waiting around for an AI limit reset. That is the whole point.
@@ -0,0 +1,305 @@
1
+ # PromptQueue
2
+
3
+ [![CI](https://github.com/AtharvaMaik/PromptQueue/actions/workflows/ci.yml/badge.svg)](https://github.com/AtharvaMaik/PromptQueue/actions/workflows/ci.yml)
4
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
5
+ [![Python 3.10+](https://img.shields.io/badge/python-3.10%2B-blue.svg)](https://www.python.org/)
6
+ [![PyPI](https://img.shields.io/pypi/v/promptqueue.svg)](https://pypi.org/project/promptqueue/)
7
+
8
+ Schedule AI prompts for the moment your limits reset.
9
+
10
+ PromptQueue is a tiny, dependency-free prompt scheduler for Claude, Codex, ChatGPT, Gemini, Copilot, Cursor, Antigravity, and anything else you can launch from your machine.
11
+
12
+ When an AI tool says "try again at 7:30 PM", do not keep the tab open, set a reminder, or paste the same prompt later. Queue it now. PromptQueue waits, opens or focuses the target app, pastes the prompt, and submits it when the time arrives.
13
+
14
+ ```powershell
15
+ promptqueue add 19:30 claude finish the migration plan
16
+ promptqueue run
17
+ ```
18
+
19
+ One Python file. Standard library only. No accounts, no server, no private APIs.
20
+
21
+ ![PromptQueue terminal demo](https://raw.githubusercontent.com/AtharvaMaik/PromptQueue/main/docs/demo.svg)
22
+
23
+ ## Why This Exists
24
+
25
+ AI rate limits waste the worst kind of time: attention.
26
+
27
+ You already know what you want to ask next. The only problem is the clock. PromptQueue turns "come back later" into a queued job you can trust.
28
+
29
+ Use it when:
30
+
31
+ - Claude, Codex, ChatGPT, Gemini, or Copilot tells you to wait for a reset
32
+ - you want a long prompt to run after you sleep
33
+ - you want a coding agent to resume work when capacity returns
34
+ - you want a dead-simple local queue instead of another SaaS dashboard
35
+
36
+ If this saves you one context switch, it has already done its job.
37
+
38
+ ## 30 Second Demo
39
+
40
+ Queue a Claude prompt for 11:30 PM:
41
+
42
+ ```powershell
43
+ promptqueue add 23:30 claude write a first draft of the launch email
44
+ promptqueue run
45
+ ```
46
+
47
+ Queue a Codex CLI prompt:
48
+
49
+ ```powershell
50
+ promptqueue add 23:30 codex-exec add tests for the queue runner
51
+ promptqueue run
52
+ ```
53
+
54
+ Queue a multiline prompt safely:
55
+
56
+ ```powershell
57
+ @'
58
+ Review this repo.
59
+ Find the smallest useful next improvement.
60
+ Then implement it.
61
+ '@ | promptqueue add --stdin 23:30 claude
62
+ promptqueue run
63
+ ```
64
+
65
+ View what is waiting:
66
+
67
+ ```powershell
68
+ promptqueue list --full
69
+ promptqueue show JOB_ID
70
+ ```
71
+
72
+ ## Supported Targets
73
+
74
+ ```text
75
+ antigravity Google Antigravity UI
76
+ chatgpt ChatGPT web UI
77
+ claude Claude web UI
78
+ claude-code Claude CLI
79
+ codex Codex desktop UI
80
+ codex-exec Codex CLI
81
+ copilot Copilot web UI
82
+ copy clipboard only
83
+ cursor Cursor UI
84
+ gemini Gemini web UI
85
+ ```
86
+
87
+ Run this to see the built-in aliases on your machine:
88
+
89
+ ```powershell
90
+ promptqueue targets
91
+ ```
92
+
93
+ UI targets open or focus the app, click near the composer, paste, then press Enter by default.
94
+
95
+ CLI targets run the command directly with the prompt as one argument.
96
+
97
+ ## Agent Ready
98
+
99
+ This repo includes instruction files for common AI coding tools:
100
+
101
+ ```text
102
+ AGENTS.md Codex and general agents
103
+ CLAUDE.md Claude Code
104
+ GEMINI.md Gemini CLI
105
+ .cursor/rules/promptqueue.mdc Cursor
106
+ .agents/skills/promptqueue/ Antigravity-style skill
107
+ ```
108
+
109
+ That means you can tell an agent:
110
+
111
+ ```text
112
+ My limits reset at 7:30 pm. Schedule this prompt for Claude:
113
+ "Continue the refactor and run the tests."
114
+ ```
115
+
116
+ The agent should queue it with PromptQueue instead of making you remember.
117
+
118
+ ## Requirements
119
+
120
+ - Python 3.10+
121
+ - Windows for GUI paste/submit automation
122
+ - macOS/Linux work for queue management, URLs, clipboard fallback, and CLI targets, but GUI paste currently uses Windows APIs
123
+
124
+ ## Install
125
+
126
+ Install from PyPI:
127
+
128
+ ```powershell
129
+ pip install promptqueue
130
+ promptqueue selftest
131
+ ```
132
+
133
+ Or clone the repo and run the single Python file:
134
+
135
+ ```powershell
136
+ git clone https://github.com/AtharvaMaik/PromptQueue.git
137
+ cd PromptQueue
138
+ python promptqueue.py selftest
139
+ ```
140
+
141
+ After `pip install`, use `promptqueue`. When running from a clone without installing, use `python promptqueue.py`.
142
+
143
+ PromptQueue stores jobs in:
144
+
145
+ ```text
146
+ %USERPROFILE%\.promptqueue.json
147
+ ```
148
+
149
+ Override the queue path when you want an isolated queue:
150
+
151
+ ```powershell
152
+ $env:PROMPTQUEUE_FILE="C:\path\queue.json"
153
+ ```
154
+
155
+ ## How It Works
156
+
157
+ 1. `add` writes a job to the local queue file.
158
+ 2. `run` checks for due jobs.
159
+ 3. When a job is due, PromptQueue copies the prompt to the clipboard.
160
+ 4. For UI targets, it opens or focuses the app, clicks the composer, pastes, and optionally submits.
161
+ 5. For CLI targets, it launches the command directly.
162
+ 6. Attempts, failures, retries, and history stay visible in the queue file.
163
+
164
+ If the machine wakes up after the scheduled time, `run` catches overdue jobs.
165
+
166
+ ## Commands
167
+
168
+ ### `add`
169
+
170
+ Queue a prompt.
171
+
172
+ ```powershell
173
+ promptqueue add [options] WHEN TARGET PROMPT...
174
+ ```
175
+
176
+ `WHEN` can be a local time like `23:30` or an ISO-ish datetime like `2026-06-24 01:15`.
177
+
178
+ Options:
179
+
180
+ ```text
181
+ --click bottom Click near the bottom of the focused window before paste.
182
+ --click x,y Click x/y pixels from the target window top-left.
183
+ --command-template TEMPLATE Run a custom command; use {prompt}.
184
+ --delay SECONDS Wait before paste/submit. Default: 5.
185
+ --file FILE Read prompt text from a UTF-8 file.
186
+ --max-attempts N Attempts before marking failed. Default: 5.
187
+ --no-submit Paste only; do not press Enter.
188
+ --pre-keys KEYS Windows SendKeys before paste, e.g. "{ESC}".
189
+ --retry-base SECONDS Initial retry delay. Default: 30.
190
+ --stdin Read prompt text from stdin.
191
+ --window TITLE Focus a window whose title contains TITLE.
192
+ ```
193
+
194
+ Examples:
195
+
196
+ ```powershell
197
+ promptqueue add 23:30 claude summarize this paper
198
+ promptqueue add --window Codex 23:30 copy this lands in Codex
199
+ promptqueue add --no-submit 23:30 claude paste this but do not send it
200
+ promptqueue add --file prompt.txt 23:30 claude
201
+ "prompt from stdin" | promptqueue add --stdin 23:30 copy
202
+ promptqueue add --command-template "claude -p {prompt}" 23:30 command review this repo
203
+ ```
204
+
205
+ ### `run`
206
+
207
+ Start the queue worker:
208
+
209
+ ```powershell
210
+ promptqueue run
211
+ ```
212
+
213
+ Check once and exit:
214
+
215
+ ```powershell
216
+ promptqueue run --once
217
+ ```
218
+
219
+ Poll faster or slower:
220
+
221
+ ```powershell
222
+ promptqueue run --poll 5
223
+ ```
224
+
225
+ The runner must be alive when jobs are due.
226
+
227
+ ### `list`
228
+
229
+ Show queued jobs:
230
+
231
+ ```powershell
232
+ promptqueue list
233
+ promptqueue list --all
234
+ promptqueue list --full
235
+ ```
236
+
237
+ ### `show`
238
+
239
+ Show one job as JSON:
240
+
241
+ ```powershell
242
+ promptqueue show JOB_ID
243
+ ```
244
+
245
+ ### `remove`
246
+
247
+ Delete one job:
248
+
249
+ ```powershell
250
+ promptqueue remove JOB_ID
251
+ ```
252
+
253
+ ### `windows`
254
+
255
+ List visible Windows window titles. Use this to find the right `--window` value.
256
+
257
+ ```powershell
258
+ promptqueue windows
259
+ ```
260
+
261
+ ### `targets`
262
+
263
+ List built-in target aliases:
264
+
265
+ ```powershell
266
+ promptqueue targets
267
+ ```
268
+
269
+ ### `selftest`
270
+
271
+ Run the built-in smoke test:
272
+
273
+ ```powershell
274
+ promptqueue selftest
275
+ ```
276
+
277
+ ## Retries And History
278
+
279
+ Every job stores attempts and history. Failures stay visible in `list` and `show`.
280
+
281
+ ```powershell
282
+ promptqueue add --max-attempts 8 --retry-base 60 23:30 claude retry this more patiently
283
+ promptqueue list --all
284
+ promptqueue show JOB_ID
285
+ ```
286
+
287
+ Backoff is exponential and capped at one hour.
288
+
289
+ ## Notes
290
+
291
+ PromptQueue intentionally does the boring thing: it uses local files, the clipboard, app launching, and keyboard paste. That keeps it portable and inspectable.
292
+
293
+ For GUI apps, it does not use private app APIs. If one app misses the composer, adjust `--window`, `--click`, `--delay`, or `--pre-keys`.
294
+
295
+ ## Contributing
296
+
297
+ Issues and PRs are welcome. Start with [CONTRIBUTING.md](CONTRIBUTING.md) and [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md).
298
+
299
+ The best contributions are small and practical: a better target alias, a failing selftest for a real bug, clearer setup docs, or a platform-specific paste improvement.
300
+
301
+ ## License
302
+
303
+ MIT. See [LICENSE](LICENSE).
304
+
305
+ Star the repo if it saves you from waiting around for an AI limit reset. That is the whole point.