71d227376f574210ce711b41d944e434da74e374

Author
Ayman Bagabas <ayman.bagabas@gmail.com>
Committer
Ayman Bagabas <ayman.bagabas@gmail.com>
Date

Message

docs: update readme

Diff

 1diff --git a/README.md b/README.md
 2index 85e6ce9589a4de3df6a2862d63d05286e7da736d..bdcb11ded6b6c9de318c9f7162b64eacbb1dbfc4 100644
 3--- a/README.md
 4+++ b/README.md
 5@@ -90,8 +90,8 @@ name: Soft Serve
 6 host: localhost
 7 port: 23231
 8 
 9-# The access level for anonymous users. Options are: read-write, read-only
10-# and no-access.
11+# Access level for anonymous users. Options are: admin-access, read-write,
12+# read-only, and no-access.
13 anon-access: read-write
14 
15 # You can grant read-only access to users without private keys.
16@@ -197,40 +197,68 @@ When a repo is highlighted you can use the following keys for navigation:
17 * `C` – View the commit log for the repo
18 * `B` – View branches and tags for the repo
19 
20-## Printing files over SSH
21+## The Soft Serve SSH CLI
22 
23-<img src="https://stuff.charm.sh/soft-serve/soft-serve-cat-example.png?1" width="750" alt="Example tree and file output on the CLI">
24+```sh
25+$ ssh -p 23231 localhost help
26+Soft Serve is a self-hostable Git server for the command line.
27 
28-Soft Serve also has the ability to print files and directories directly from a
29-remote repo without the need to clone or use the TUI.
30+Usage:
31+  ssh -p 23231 localhost [command]
32 
33-To print a file tree for the project, just use the repo name as the SSH command
34-to your Soft Serve server:
35+Available Commands:
36+  cat         Outputs the contents of the file at path.
37+  git         Perform Git operations on a repository.
38+  help        Help about any command
39+  ls          List file or directory at path.
40+  reload      Reloads the configuration
41 
42-```
43-ssh git.charm.sh soft-serve
44+Flags:
45+  -h, --help   help for ssh
46+
47+Use "ssh -p 23231 localhost [command] --help" for more information about a command.
48 ```
49 
50-From there you can print individual files:
51+Soft Serve SSH CLI has the ability to print files and list directories, perform
52+`git` operations on remote repos, and reload the configuration when necessary.
53 
54+To print a file tree for the project, just use the `list` command along with the
55+repo name as the SSH command to your Soft Serve server:
56+
57+```sh
58+ssh -p 23231 localhost ls soft-serve
59 ```
60-ssh git.charm.sh soft-serve/cmd/soft/main.go
61+
62+From there, you can print individual files using the `cat` command:
63+
64+```sh
65+ssh -p 23231 localhost cat soft-serve/cmd/soft/main.go
66 ```
67 
68 You can add the `-c` flag to enable syntax coloring and `-l` to print line
69 numbers:
70 
71+```sh
72+ssh -p 23231 localhost cat soft-serve/cmd/soft/main.go -c -l
73 ```
74-ssh git.charm.sh soft-serve/cmd/soft/main.go -c -l
75+
76+You can also use the `git` command to perform Git operations on a repo such as changing the default branch name for instance:
77+
78+```sh
79+ssh -p 23231 localhost git soft-serve symbolic-ref HEAD refs/heads/taco
80 ```
81 
82+Both `git` and `reload` commands need admin access to the server to work. So
83+make sure you have added your key as an admin user, or you’re using `anon-access:
84+admin-access` in the configuration.
85+
86 ### A note about RSA keys
87 
88 Unfortunately, due to a shortcoming in Go’s `x/crypto/ssh` package, Soft Serve
89 does not currently support access via new SSH RSA keys: only the old SHA-1
90 ones will work.
91 
92-Until we sort this out you'll either need an SHA-1 RSA key or a key with
93+Until we sort this out you’ll either need an SHA-1 RSA key or a key with
94 another algorithm, e.g. Ed25519. Not sure what type of keys you have?
95 You can check with the following:
96