Commit fb101af

Eric Bower  ·  2026-03-01 20:48:19 -0500 EST
parent 4552aa5
docs(pgs): more usage for help page
1 files changed,  +38, -15
+38, -15
......@@ -127,64 +127,87 @@ func (c *Cmd) RmProjectAssets(projectName string) error {
127127 }
128128
129129 func (c *Cmd) help() {
130- helpStr := "Commands: [help, stats, ls, fzf, rm, link, unlink, prune, retain, depends, acl, cache]\r\n"
131- helpStr += "NOTICE:" + " *must* append with `--write` for the changes to persist.\r\n"
130+ helpStr := `pgs.sh
131+======
132+
133+Deploy static sites with a single command. No passwords. No config files. No CI setup. Just your SSH key and rsync.
134+
135+ rsync --delete -rv ./public/ pgs.sh:/mysite
136+ # => https://erock-mysite.pgs.sh
137+
138+That's the entire workflow. Your SSH key is your identity and every deploy is instant.
139+
140+You can fetch project assets with the same command in reverse:
141+
142+ rsync -rv pgs.sh:/mysite/ ./public/
143+
144+You can also use unix pipes to directly upload files by providing the project name as part of the path:
145+
146+ echo "<body>hello world!</body>" | ssh pgs.sh /mysite/index.html
147+ # => https://erock-mysite.pgs.sh/index.html
148+
149+The leading "/" is important.
150+`
151+ helpStr += "\r\nCommands: [help, stats, ls, fzf, rm, link, unlink, prune, retain, depends, acl, cache]\r\n"
152+ helpStr += "For most of these commands you can provide a `-h` to learn about its usage.\r\n"
153+ helpStr += "\r\n> NOTICE:" + " *must* append with `--write` for the changes to persist.\r\n"
132154 c.output(helpStr)
133- projectName := "projA"
155+ projectName := "{project}"
134156
135157 data := [][]string{
136158 {
137159 "help",
138- "prints this screen",
160+ "Prints this screen",
139161 },
140162 {
141163 "stats",
142- "usage statistics",
164+ "Usage statistics (quota, % quota used, number of projects)",
143165 },
144166 {
145167 "ls",
146- "lists projects",
168+ "Lists all projects and meta data",
147169 },
148170 {
149171 fmt.Sprintf("fzf %s", projectName),
150- fmt.Sprintf("lists urls of all assets in %s", projectName),
172+ "Lists urls of all assets in project",
151173 },
152174 {
153175 fmt.Sprintf("rm %s", projectName),
154- fmt.Sprintf("delete %s", projectName),
176+ "Removes all files in project and then deletes the project",
155177 },
156178 {
157179 fmt.Sprintf("link %s --to projB", projectName),
158- fmt.Sprintf("symbolic link `%s` to `projB`", projectName),
180+ fmt.Sprintf("Instant promotion and rollback mechanism that symbolic links %s to `projB`", projectName),
159181 },
160182 {
161183 fmt.Sprintf("unlink %s", projectName),
162- fmt.Sprintf("removes symbolic link for `%s`", projectName),
184+ "Removes symbolic link",
163185 },
164186 {
165187 fmt.Sprintf("prune %s", projectName),
166- fmt.Sprintf("removes projects that match prefix `%s`", projectName),
188+ "Delete all projects matching a prefix (except projects with linked projects)",
167189 },
168190 {
169191 fmt.Sprintf("retain %s", projectName),
170- "alias to `prune` but keeps last N projects",
192+ "Delete all projects matching a prefix except the last N recently updated projects.",
171193 },
172194 {
173195 fmt.Sprintf("depends %s", projectName),
174- fmt.Sprintf("lists all projects linked to `%s`", projectName),
196+ "Lists all projects linked to project",
175197 },
176198 {
177199 fmt.Sprintf("acl %s", projectName),
178- fmt.Sprintf("access control for `%s`", projectName),
200+ "Access control for project",
179201 },
180202 {
181203 fmt.Sprintf("cache %s", projectName),
182- fmt.Sprintf("clear http cache for `%s`", projectName),
204+ "Clear http cache",
183205 },
184206 }
185207
186208 writer := NewTabWriter(c.Session)
187209 _, _ = fmt.Fprintln(writer, "Cmd\tDescription")
210+ _, _ = fmt.Fprintf(writer, "===\t===========\r\n")
188211 for _, dat := range data {
189212 _, _ = fmt.Fprintf(writer, "%s\t%s\r\n", dat[0], dat[1])
190213 }