lazypush-cli 0.1.0 → 0.1.2
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.
- package/README.md +30 -71
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
#
|
|
1
|
+
# lazypush-cli
|
|
2
2
|
|
|
3
3
|
<div align="center">
|
|
4
4
|
|
|
5
|
-
[](https://www.npmjs.com/package/lazypush-cli)
|
|
6
|
+
[](https://www.npmjs.com/package/lazypush-cli)
|
|
7
7
|
[](https://nodejs.org)
|
|
8
8
|
[](../LICENSE)
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
_Schedule Git commits for a future push — no local daemons, no open terminals, no guilt._
|
|
11
|
+
|
|
12
|
+
[Website](https://lazypush.vercel.app/) · [Docs](https://lazypush.vercel.app/docs) · [Support](https://lazypush.vercel.app/support)
|
|
11
13
|
|
|
12
14
|
</div>
|
|
13
15
|
|
|
@@ -17,14 +19,14 @@
|
|
|
17
19
|
|
|
18
20
|
You finished the feature at 2pm. The standup is at 10am tomorrow. Pushing now means everyone knows you had the afternoon free, and guess who gets the next ticket assigned in 4 minutes?
|
|
19
21
|
|
|
20
|
-
|
|
22
|
+
lazypush lets you schedule the push for later. Your git history stays clean. Your commit timestamp is exactly what you want it to be. You get your afternoon back.
|
|
21
23
|
|
|
22
24
|
---
|
|
23
25
|
|
|
24
26
|
## Install
|
|
25
27
|
|
|
26
28
|
```bash
|
|
27
|
-
npm install -g
|
|
29
|
+
npm install -g lazypush-cli
|
|
28
30
|
```
|
|
29
31
|
|
|
30
32
|
---
|
|
@@ -33,10 +35,10 @@ npm install -g lazyload-cli
|
|
|
33
35
|
|
|
34
36
|
```bash
|
|
35
37
|
# Step 1: one-time login
|
|
36
|
-
|
|
38
|
+
lazypush login
|
|
37
39
|
|
|
38
40
|
# Step 2: schedule a push from inside your git repo
|
|
39
|
-
|
|
41
|
+
lazypush schedule
|
|
40
42
|
```
|
|
41
43
|
|
|
42
44
|
You'll see an interactive prompt:
|
|
@@ -73,15 +75,15 @@ Shut your laptop. The push will happen in the cloud at exactly that time.
|
|
|
73
75
|
|
|
74
76
|
## Commands
|
|
75
77
|
|
|
76
|
-
| Command
|
|
77
|
-
|
|
78
|
-
| `
|
|
79
|
-
| `
|
|
80
|
-
| `
|
|
81
|
-
| `
|
|
82
|
-
| `
|
|
83
|
-
| `
|
|
84
|
-
| `
|
|
78
|
+
| Command | Description |
|
|
79
|
+
| ---------------------- | -------------------------------------------------------------------- |
|
|
80
|
+
| `lazypush login` | Authenticate via GitHub OAuth. Opens browser, stores JWT locally. |
|
|
81
|
+
| `lazypush schedule` | Interactive prompt to schedule a push. Auto-detects repo and branch. |
|
|
82
|
+
| `lazypush jobs` | List all currently scheduled (pending) jobs. |
|
|
83
|
+
| `lazypush list` | List all jobs — scheduled and finished — latest first. |
|
|
84
|
+
| `lazypush cancel <id>` | Cancel a scheduled job by its ID. |
|
|
85
|
+
| `lazypush logout` | Clear local session. |
|
|
86
|
+
| `lazypush help` | Show all commands and options. |
|
|
85
87
|
|
|
86
88
|
---
|
|
87
89
|
|
|
@@ -89,13 +91,13 @@ Shut your laptop. The push will happen in the cloud at exactly that time.
|
|
|
89
91
|
|
|
90
92
|
The time prompt accepts natural human input:
|
|
91
93
|
|
|
92
|
-
| Input
|
|
93
|
-
|
|
94
|
-
| `5pm`
|
|
95
|
-
| `17:30`
|
|
96
|
-
| `tomorrow 9am` | Next day at 9:00 AM
|
|
97
|
-
| `in 2 hours`
|
|
98
|
-
| `friday 8pm`
|
|
94
|
+
| Input | Meaning |
|
|
95
|
+
| -------------- | ------------------------ |
|
|
96
|
+
| `5pm` | Today at 5:00 PM |
|
|
97
|
+
| `17:30` | Today at 5:30 PM (24h) |
|
|
98
|
+
| `tomorrow 9am` | Next day at 9:00 AM |
|
|
99
|
+
| `in 2 hours` | 2 hours from now |
|
|
100
|
+
| `friday 8pm` | Coming Friday at 8:00 PM |
|
|
99
101
|
|
|
100
102
|
Timezone examples: `IST`, `EST`, `UTC`, `America/New_York`, `Asia/Kolkata`
|
|
101
103
|
|
|
@@ -108,7 +110,7 @@ If no timezone is provided, your system's local timezone is used.
|
|
|
108
110
|
```
|
|
109
111
|
Inside your repo:
|
|
110
112
|
┌──────────────────────────────────────────────────────────────┐
|
|
111
|
-
│
|
|
113
|
+
│ lazypush schedule │
|
|
112
114
|
│ │
|
|
113
115
|
│ 1. git bundle create repo.bundle HEAD │
|
|
114
116
|
│ 2. gzip repo.bundle │
|
|
@@ -128,10 +130,10 @@ No background process runs on your machine after `schedule` completes. The CLI's
|
|
|
128
130
|
|
|
129
131
|
## Session Storage
|
|
130
132
|
|
|
131
|
-
After `
|
|
133
|
+
After `lazypush login`, credentials are stored at:
|
|
132
134
|
|
|
133
135
|
```
|
|
134
|
-
~/.
|
|
136
|
+
~/.lazypush/session.json
|
|
135
137
|
```
|
|
136
138
|
|
|
137
139
|
```json
|
|
@@ -142,50 +144,7 @@ After `lazyload login`, credentials are stored at:
|
|
|
142
144
|
}
|
|
143
145
|
```
|
|
144
146
|
|
|
145
|
-
Protected by OS file permissions. Run `
|
|
146
|
-
|
|
147
|
-
---
|
|
148
|
-
|
|
149
|
-
## Source Structure
|
|
150
|
-
|
|
151
|
-
```
|
|
152
|
-
src/
|
|
153
|
-
├── cli.ts # Entry point — command registration via Commander.js
|
|
154
|
-
├── config.ts # Session read/write (~/.lazyload/session.json)
|
|
155
|
-
├── logger.ts # Colored terminal output (✓ green, ✗ red, ℹ blue)
|
|
156
|
-
├── api/
|
|
157
|
-
│ └── client.ts # Authenticated HTTP client to backend
|
|
158
|
-
├── commands/
|
|
159
|
-
│ ├── login.ts # OAuth flow + token storage
|
|
160
|
-
│ ├── schedule.ts # Interactive prompt + bundle upload
|
|
161
|
-
│ ├── jobs.ts # Fetch and display active jobs
|
|
162
|
-
│ ├── list.ts # Fetch and display all jobs
|
|
163
|
-
│ ├── cancel.ts # Cancel job by ID
|
|
164
|
-
│ └── logout.ts # Clear session
|
|
165
|
-
└── utils/
|
|
166
|
-
├── git.ts # git bundle, gzip, base64
|
|
167
|
-
└── scheduler.ts # Human-readable time parsing
|
|
168
|
-
```
|
|
169
|
-
|
|
170
|
-
---
|
|
171
|
-
|
|
172
|
-
## Development
|
|
173
|
-
|
|
174
|
-
```bash
|
|
175
|
-
npm install
|
|
176
|
-
npm run dev # ts-node-dev with auto-reload
|
|
177
|
-
|
|
178
|
-
# link locally to test as a global command
|
|
179
|
-
npm link
|
|
180
|
-
lazyload login
|
|
181
|
-
```
|
|
182
|
-
|
|
183
|
-
## Build & Publish
|
|
184
|
-
|
|
185
|
-
```bash
|
|
186
|
-
npm run build # tsc → dist/
|
|
187
|
-
npm publish --access public
|
|
188
|
-
```
|
|
147
|
+
Protected by OS file permissions. Run `lazypush logout` to clear it.
|
|
189
148
|
|
|
190
149
|
---
|
|
191
150
|
|