repos / pico

pico services mono repo
git clone https://github.com/picosh/pico.git

commit
fb101af
parent
4552aa5
author
Eric Bower
date
2026-03-01 20:48:19 -0500 EST
docs(pgs): more usage for help page
1 files changed,  +38, -15
M pkg/apps/pgs/cli.go
+38, -15
  1@@ -127,64 +127,87 @@ func (c *Cmd) RmProjectAssets(projectName string) error {
  2 }
  3 
  4 func (c *Cmd) help() {
  5-	helpStr := "Commands: [help, stats, ls, fzf, rm, link, unlink, prune, retain, depends, acl, cache]\r\n"
  6-	helpStr += "NOTICE:" + " *must* append with `--write` for the changes to persist.\r\n"
  7+	helpStr := `pgs.sh
  8+======
  9+
 10+Deploy static sites with a single command. No passwords. No config files. No CI setup. Just your SSH key and rsync.
 11+
 12+	rsync --delete -rv ./public/ pgs.sh:/mysite
 13+	# => https://erock-mysite.pgs.sh
 14+
 15+That's the entire workflow. Your SSH key is your identity and every deploy is instant.
 16+
 17+You can fetch project assets with the same command in reverse:
 18+
 19+	rsync -rv pgs.sh:/mysite/ ./public/
 20+
 21+You can also use unix pipes to directly upload files by providing the project name as part of the path:
 22+
 23+	echo "<body>hello world!</body>" | ssh pgs.sh /mysite/index.html
 24+	# => https://erock-mysite.pgs.sh/index.html
 25+
 26+The leading "/" is important.
 27+`
 28+	helpStr += "\r\nCommands: [help, stats, ls, fzf, rm, link, unlink, prune, retain, depends, acl, cache]\r\n"
 29+	helpStr += "For most of these commands you can provide a `-h` to learn about its usage.\r\n"
 30+	helpStr += "\r\n> NOTICE:" + " *must* append with `--write` for the changes to persist.\r\n"
 31 	c.output(helpStr)
 32-	projectName := "projA"
 33+	projectName := "{project}"
 34 
 35 	data := [][]string{
 36 		{
 37 			"help",
 38-			"prints this screen",
 39+			"Prints this screen",
 40 		},
 41 		{
 42 			"stats",
 43-			"usage statistics",
 44+			"Usage statistics (quota, % quota used, number of projects)",
 45 		},
 46 		{
 47 			"ls",
 48-			"lists projects",
 49+			"Lists all projects and meta data",
 50 		},
 51 		{
 52 			fmt.Sprintf("fzf %s", projectName),
 53-			fmt.Sprintf("lists urls of all assets in %s", projectName),
 54+			"Lists urls of all assets in project",
 55 		},
 56 		{
 57 			fmt.Sprintf("rm %s", projectName),
 58-			fmt.Sprintf("delete %s", projectName),
 59+			"Removes all files in project and then deletes the project",
 60 		},
 61 		{
 62 			fmt.Sprintf("link %s --to projB", projectName),
 63-			fmt.Sprintf("symbolic link `%s` to `projB`", projectName),
 64+			fmt.Sprintf("Instant promotion and rollback mechanism that symbolic links %s to `projB`", projectName),
 65 		},
 66 		{
 67 			fmt.Sprintf("unlink %s", projectName),
 68-			fmt.Sprintf("removes symbolic link for `%s`", projectName),
 69+			"Removes symbolic link",
 70 		},
 71 		{
 72 			fmt.Sprintf("prune %s", projectName),
 73-			fmt.Sprintf("removes projects that match prefix `%s`", projectName),
 74+			"Delete all projects matching a prefix (except projects with linked projects)",
 75 		},
 76 		{
 77 			fmt.Sprintf("retain %s", projectName),
 78-			"alias to `prune` but keeps last N projects",
 79+			"Delete all projects matching a prefix except the last N recently updated projects.",
 80 		},
 81 		{
 82 			fmt.Sprintf("depends %s", projectName),
 83-			fmt.Sprintf("lists all projects linked to `%s`", projectName),
 84+			"Lists all projects linked to project",
 85 		},
 86 		{
 87 			fmt.Sprintf("acl %s", projectName),
 88-			fmt.Sprintf("access control for `%s`", projectName),
 89+			"Access control for project",
 90 		},
 91 		{
 92 			fmt.Sprintf("cache %s", projectName),
 93-			fmt.Sprintf("clear http cache for `%s`", projectName),
 94+			"Clear http cache",
 95 		},
 96 	}
 97 
 98 	writer := NewTabWriter(c.Session)
 99 	_, _ = fmt.Fprintln(writer, "Cmd\tDescription")
100+	_, _ = fmt.Fprintf(writer, "===\t===========\r\n")
101 	for _, dat := range data {
102 		_, _ = fmt.Fprintf(writer, "%s\t%s\r\n", dat[0], dat[1])
103 	}