1Soft Serve
 2==========
 3
 4A tasty Git server that runs its own SSH service. 🍦
 5
 6* Configure with `git`
 7* Create repos on demand with `git push`
 8* Browse repos with an SSH-accessible TUI
 9* Easy access control
10  - Allow/disallow anonymous access
11  - Add collaborators with SSH public keys
12  - Repos can be public or private
13
14## What does it look like?
15
16Just run `ssh beta.charm.sh` for an example.
17
18## Building/installing
19
20The Soft Serve command is called `soft`. You can build and install it with
21`go`:
22
23```bash
24git clone ssh://beta.charm.sh/soft-serve
25cd soft-serve/cmd/soft
26go install
27```
28
29## Setting up a server
30
31Make sure `git` is installed, then run `soft`. That’s it.
32
33## Configuration
34
35When `soft` is run for the first time, it creates a configuration repo
36containing the main README displayed in the TUI as well as a config file for
37user access control.
38
39```
40git clone ssh://localhost:23231/config
41```
42
43The `config` repo is publicly writable by default, so be sure to setup your
44access as desired. You can also set the `SOFT_SERVE_INITIAL_ADMIN_KEY`
45environment variable before first run and it will restrict access to that
46initial public key until you configure things otherwise.
47
48## Pushing (and creating!) repos
49
50You can add your Soft Serve server as a remote to any existing repo:
51
52```
53git remote add soft ssh://localhost:23231/REPO
54```
55
56After you’ve added the remote just go ahead and push. If the repo doesn’t exist
57on the server it’ll be created.
58
59```
60git push soft main
61```
62
63## The Soft Serve TUI
64
65Soft Serve serves a TUI over SSH for browsing repos, viewing READMEs, and
66grabbing clone commands:
67
68```
69ssh localhost -p 23231
70```
71
72It's also possible to “link” to a specific repo:
73
74```
75ssh localhost -t -p 23231 REPO
76```
77
78### Server Settings
79
80In addition to the Git-based configuration above, there are a few
81environment-level settings:
82
83* `SOFT_SERVE_PORT`: SSH listen port (_default 23231_)
84* `SOFT_SERVE_HOST`: SSH listen host (_default 0.0.0.0_)
85* `SOFT_SERVE_KEY_PATH`: SSH host key-pair path (_default .ssh/soft_serve_server_ed25519_)
86* `SOFT_SERVE_REPO_PATH`: Path where repos are stored (_default .repos_)
87* `SOFT_SERVE_INITIAL_ADMIN_KEY`: The public key that will initially have admin access to repos (_default ""_). This must be set before `soft` runs for the first time and creates the `config` repo. If set after the `config` repo has been created, this setting has no effect.