diff options
author | Ellie Huxtable <e@elm.sh> | 2021-04-25 18:21:52 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-25 17:21:52 +0000 |
commit | 156893d774b4da5b541fdbb08428f9ec392949a0 (patch) | |
tree | 9185d94384aa62eb6eb099ddc4ca9408df6f90d1 /README.md | |
parent | 4210e8de5a29eb389b753adf8df47d2c449a2eeb (diff) |
Update docs, unify on SQLx, bugfixes (#40)
* Begin moving to sqlx for local too
* Stupid scanners should just have a nice cup of tea
Random internet shit searching for /.env or whatever
* Remove diesel and rusqlite fully
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 155 |
1 files changed, 33 insertions, 122 deletions
@@ -1,9 +1,7 @@ <h1 align="center"> - A'Tuin + Atuin </h1> -<blockquote align="center"> - Through the fathomless deeps of space swims the star turtle Great AโTuin, bearing on its back the four giant elephants who carry on their shoulders the mass of the Discworld. - </blockquote> +<em align="center">Magical shell history</em> <p align="center"> <a href="https://github.com/ellie/atuin/actions?query=workflow%3ARust"><img src="https://img.shields.io/github/workflow/status/ellie/atuin/Rust?style=flat-square" /></a> @@ -12,28 +10,42 @@ <a href="https://github.com/ellie/atuin/blob/main/LICENSE"><img src="https://img.shields.io/crates/l/atuin.svg?style=flat-square" /></a> </p> -A'Tuin manages and synchronizes your shell history! Instead of storing -everything in a text file (such as ~/.history), A'Tuin uses a sqlite database. -While being a little more complex, this allows for more functionality. - -As well as the expected command, A'Tuin stores - -- duration -- exit code -- working directory -- hostname -- time -- a unique session ID +- store shell history in a sqlite database +- back up e2e encrypted history to the cloud, and synchronize between 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 + +## Documentation + +- [Quickstart](#quickstart) +- [Install](#install) +- [Import](docs/import.md) +- [Configuration](docs/config.md) +- [Searching history](docs/search.md) +- [Cloud history sync](docs/sync.md) +- [History stats](docs/stats.md) ## Supported Shells - zsh +# Quickstart + +``` +curl https://github.com/ellie/atuin/blob/main/install.sh | bash + +atuin register -u <USERNAME> -e <EMAIL> -p <PASSWORD> +atuin import auto +atuin sync +``` + ## Install ### AUR -A'Tuin is available on the [AUR](https://aur.archlinux.org/packages/atuin/) +Atuin is available on the [AUR](https://aur.archlinux.org/packages/atuin/) ``` yay -S atuin # or your AUR helper of choice @@ -41,19 +53,16 @@ yay -S atuin # or your AUR helper of choice ### With cargo -`atuin` needs a nightly version of Rust + Cargo! It's best to use -[rustup](https://rustup.rs/) for getting set up there. +It's best to use [rustup](https://rustup.rs/) to get setup with a Rust +toolchain, then you can run: ``` -rustup default nightly - cargo install atuin ``` ### From source ``` -rustup default nightly git clone https://github.com/ellie/atuin.git cd atuin cargo install --path . @@ -67,107 +76,9 @@ Once the binary is installed, the shell plugin requires installing. Add eval "$(atuin init)" ``` -to your `.zshrc`/`.bashrc`/whatever your shell uses. - -## Usage - -### History search - -By default A'Tuin will rebind ctrl-r and the up arrow to search your history. - -You can prevent this by putting - -``` -export ATUIN_BINDKEYS="false" -``` - -into your shell config. - -### Import history - -``` -atuin import auto # detect shell, then import - -or - -atuin import zsh # specify shell -``` - -### List history - -List all history - -``` -atuin history list -``` - -List history for the current directory - -``` -atuin history list --cwd - -atuin h l -c # alternative, shorter version -``` - -List history for the current session - -``` -atuin history list --session - -atuin h l -s # similarly short -``` - -### Stats - -A'Tuin can calculate statistics for a single day, and accepts "natural language" style date input, as well as absolute dates: - -``` -$ atuin stats day last friday - -+---------------------+------------+ -| Statistic | Value | -+---------------------+------------+ -| Most used command | git status | -+---------------------+------------+ -| Commands ran | 450 | -+---------------------+------------+ -| Unique commands ran | 213 | -+---------------------+------------+ - -$ atuin stats day 01/01/21 # also accepts absolute dates -``` - -It can also calculate statistics for all of known history: - -``` -$ atuin stats all - -+---------------------+-------+ -| Statistic | Value | -+---------------------+-------+ -| Most used command | ls | -+---------------------+-------+ -| Commands ran | 8190 | -+---------------------+-------+ -| Unique commands ran | 2996 | -+---------------------+-------+ -``` - -## Config - -A'Tuin is configurable via TOML. The file lives at ` ~/.config/atuin/config.toml`, -and looks like this: - -``` -[local] -dialect = "uk" # or us. sets the date format used by stats -server_address = "https://atuin.elliehuxtable.com/" # the server to sync with - -[local.db] -path = "~/.local/share/atuin/history.db" # the local database for history -``` +to your `.zshrc` ## ...what's with the name? -A'Tuin is named after "The Great A'Tuin", a giant turtle from Terry Pratchett's +Atuin is named after "The Great A'Tuin", a giant turtle from Terry Pratchett's Discworld series of books. |