From cbb472bba66f4f8664dd1ab0be039910d1980c02 Mon Sep 17 00:00:00 2001
From: Ellie Huxtable
Date: Fri, 7 May 2021 16:58:57 +0100
Subject: [PATCH] Update README and docs
---
README.md | 25 ++++++++++++++++++++++---
docs/server.md | 37 +++++++++++++++++++++++++++++++++++++
2 files changed, 59 insertions(+), 3 deletions(-)
create mode 100644 docs/server.md
diff --git a/README.md b/README.md
index 187f7b9..a1a4f3d 100644
--- a/README.md
+++ b/README.md
@@ -21,11 +21,29 @@
exit code, duration, time and command shown
+Atuin replaces your existing shell history with a SQLite database, and records
+additional context for your commands. Additionally, it provides optional and
+_fully encrypted_ synchronisation of your history between machines, via an Atuin
+server.
+
+As well as the search UI, it can do things like this:
+
+```
+# search for all successful `make` commands, recorded after 3pm yesterday
+atuin search --exit 0 --after "yesterday 3pm" make
+```
+
+You may use either the server I host, or host your own! Or just don't use sync
+at all. As all history sync is encrypted, I couldn't access your data even if
+I wanted to. And I **really** don't want to.
+
+## Features
+
+- rebind `up` and `ctrl-r` with a full screen history search UI
- store shell history in a sqlite database
-- backup encrypted shell history to the cloud
-- the same history across terminals, across session, and across machines
+- backup and sync **encrypted** shell history
+- the same history across terminals, across sessions, and across machines
- log exit code, cwd, hostname, session, command duration, etc
-- smart interactive history search to replace ctrl-r
- calculate statistics such as "most used command"
- old history file is not replaced
@@ -38,6 +56,7 @@
- [Searching history](docs/search.md)
- [Cloud history sync](docs/sync.md)
- [History stats](docs/stats.md)
+- [Running your own server](docs/server.md)
## Supported Shells
diff --git a/docs/server.md b/docs/server.md
new file mode 100644
index 0000000..445aacd
--- /dev/null
+++ b/docs/server.md
@@ -0,0 +1,37 @@
+# `atuin server`
+
+Atuin allows you to run your own sync server, in case you don't want to use the
+one I host :)
+
+There's currently only one subcommand, `atuin server start` which will start the
+Atuin http sync server
+
+```
+USAGE:
+ atuin server start [OPTIONS]
+
+FLAGS:
+ --help Prints help information
+ -V, --version Prints version information
+
+OPTIONS:
+ -h, --host
+ -p, --port
+```
+
+The config for the server is kept separate from the config for the client, even
+though they are the same binary. Server config can be found at
+`~/.config/atuin/server.toml`.
+
+It looks something like this:
+
+```
+host = "0.0.0.0"
+port = 8888
+open_registration = true
+db_uri="postgres://user:password@hostname/database"
+```
+
+`open_registration` sets whether the server allows new user registrations. Set
+this to false after making your own account if you don't want others to be able
+to use your server.