From 8a2fa44b01b5a8a472dd592905ca0330f91b3199 Mon Sep 17 00:00:00 2001 From: Ellie Huxtable Date: Sun, 26 Feb 2023 00:15:14 +0000 Subject: Docs index page --- docs/docs/index.md | 215 +++++++++++++++++++++++++++++++++++++++++++ docs/docs/setup/setup.md | 215 ------------------------------------------- docs/docs/tailwind.config.js | 14 --- docs/docusaurus.config.js | 4 +- docs/src/pages/index.js | 2 +- 5 files changed, 218 insertions(+), 232 deletions(-) create mode 100644 docs/docs/index.md delete mode 100644 docs/docs/setup/setup.md delete mode 100644 docs/docs/tailwind.config.js diff --git a/docs/docs/index.md b/docs/docs/index.md new file mode 100644 index 00000000..3ebeabe8 --- /dev/null +++ b/docs/docs/index.md @@ -0,0 +1,215 @@ +--- +title: Getting Started +sidebar_position: 1 +--- + +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. + +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. + +## Supported Shells + +- zsh +- bash +- fish + +## Community + +Atuin has a community Discord, available [here](https://discord.gg/Fq8bJSKPHh)! Please do come and say hi 😊 + +# Quickstart + +This will sign you up for the default sync server, hosted by me. Everything is end-to-end encrypted, so your secrets are safe! + +Read more below for offline-only usage, or for hosting your own server. + +``` +bash <(curl https://raw.githubusercontent.com/ellie/atuin/main/install.sh) + +atuin register -u -e -p +atuin import auto +atuin sync +``` + +Then restart your shell! + +### Opt-in to activity graph +Alongside the hosted Atuin server, there is also a service which generates activity graphs for your shell history! These are inspired by the GitHub graph. + +For example, here is mine: + +![Activity Graph Example](/img/activity-graph-example.png) + +If you wish to get your own, after signing up for the sync server, run this + +``` +curl https://api.atuin.sh/enable -d $(cat ~/.local/share/atuin/session) +``` + +The response includes the URL to your graph. Feel free to share and/or embed this URL, the token is _not_ a secret, and simply prevents user enumeration. + +## Offline only (no sync) + +``` +bash <(curl https://raw.githubusercontent.com/ellie/atuin/main/install.sh) + +atuin import auto +``` + +Then restart your shell! + +## Install + +### Script (recommended) + +The install script will help you through the setup, ensuring your shell is +properly configured. It will also use one of the below methods, preferring the +system package manager where possible (pacman, homebrew, etc etc). + +``` +# do not run this as root, root will be asked for if required +bash <(curl https://raw.githubusercontent.com/ellie/atuin/main/install.sh) +``` + +And then follow [the shell setup](#shell-plugin) + +### With cargo + +It's best to use [rustup](https://rustup.rs/) to get setup with a Rust +toolchain, then you can run: + +``` +cargo install atuin +``` + +And then follow [the shell setup](#shell-plugin) + +### Homebrew + +``` +brew install atuin +``` + +And then follow [the shell setup](#shell-plugin) + +### MacPorts + +Atuin is also available in [MacPorts](https://ports.macports.org/port/atuin/) + +``` +sudo port install atuin +``` + +And then follow [the shell setup](#shell-plugin) + +### Nix + +This repository is a flake, and can be installed using `nix profile`: + +``` +nix profile install "github:ellie/atuin" +``` + +Atuin is also available in [nixpkgs](https://github.com/NixOS/nixpkgs): + +``` +nix-env -f '' -iA atuin +``` + +And then follow [the shell setup](#shell-plugin) +### Pacman + +Atuin is available in the Arch Linux [community repository](https://archlinux.org/packages/community/x86_64/atuin/): + +``` +pacman -S atuin +``` + +And then follow [the shell setup](#shell-plugin) + +### Termux + +Atuin is available in the Termux package repository: + +``` +pkg install atuin +``` + +And then follow [the shell setup](#shell-plugin) + +### From source + +``` +git clone https://github.com/ellie/atuin.git +cd atuin +cargo install --path . +``` + +And then follow [the shell setup](#shell-plugin) + +## Shell plugin + +Once the binary is installed, the shell plugin requires installing. If you use +the install script, this should all be done for you! After installing, remember to restart your shell. + +### zsh + +``` +echo 'eval "$(atuin init zsh)"' >> ~/.zshrc +``` + +#### Zinit + +```sh +zinit load ellie/atuin +``` + +#### Antigen + +```sh +antigen bundle ellie/atuin@main +``` + +### bash + +We need to setup some hooks, so first install bash-preexec: + +``` +curl https://raw.githubusercontent.com/rcaloras/bash-preexec/master/bash-preexec.sh -o ~/.bash-preexec.sh +echo '[[ -f ~/.bash-preexec.sh ]] && source ~/.bash-preexec.sh' >> ~/.bashrc +``` + +Then setup Atuin + +``` +echo 'eval "$(atuin init bash)"' >> ~/.bashrc +``` + +### fish + +Add + +``` +atuin init fish | source +``` + +to your `is-interactive` block in your `~/.config/fish/config.fish` file + +### Fig + +Install `atuin` shell plugin in zsh, bash, or fish with [Fig](https://fig.io) in one click. + + + +## ...what's with the name? + +Atuin is named after "The Great A'Tuin", a giant turtle from Terry Pratchett's +Discworld series of books. + +[English]: ./README.md +[简体中文]: ./docs/zh-CN/README.md diff --git a/docs/docs/setup/setup.md b/docs/docs/setup/setup.md deleted file mode 100644 index 3ebeabe8..00000000 --- a/docs/docs/setup/setup.md +++ /dev/null @@ -1,215 +0,0 @@ ---- -title: Getting Started -sidebar_position: 1 ---- - -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. - -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. - -## Supported Shells - -- zsh -- bash -- fish - -## Community - -Atuin has a community Discord, available [here](https://discord.gg/Fq8bJSKPHh)! Please do come and say hi 😊 - -# Quickstart - -This will sign you up for the default sync server, hosted by me. Everything is end-to-end encrypted, so your secrets are safe! - -Read more below for offline-only usage, or for hosting your own server. - -``` -bash <(curl https://raw.githubusercontent.com/ellie/atuin/main/install.sh) - -atuin register -u -e -p -atuin import auto -atuin sync -``` - -Then restart your shell! - -### Opt-in to activity graph -Alongside the hosted Atuin server, there is also a service which generates activity graphs for your shell history! These are inspired by the GitHub graph. - -For example, here is mine: - -![Activity Graph Example](/img/activity-graph-example.png) - -If you wish to get your own, after signing up for the sync server, run this - -``` -curl https://api.atuin.sh/enable -d $(cat ~/.local/share/atuin/session) -``` - -The response includes the URL to your graph. Feel free to share and/or embed this URL, the token is _not_ a secret, and simply prevents user enumeration. - -## Offline only (no sync) - -``` -bash <(curl https://raw.githubusercontent.com/ellie/atuin/main/install.sh) - -atuin import auto -``` - -Then restart your shell! - -## Install - -### Script (recommended) - -The install script will help you through the setup, ensuring your shell is -properly configured. It will also use one of the below methods, preferring the -system package manager where possible (pacman, homebrew, etc etc). - -``` -# do not run this as root, root will be asked for if required -bash <(curl https://raw.githubusercontent.com/ellie/atuin/main/install.sh) -``` - -And then follow [the shell setup](#shell-plugin) - -### With cargo - -It's best to use [rustup](https://rustup.rs/) to get setup with a Rust -toolchain, then you can run: - -``` -cargo install atuin -``` - -And then follow [the shell setup](#shell-plugin) - -### Homebrew - -``` -brew install atuin -``` - -And then follow [the shell setup](#shell-plugin) - -### MacPorts - -Atuin is also available in [MacPorts](https://ports.macports.org/port/atuin/) - -``` -sudo port install atuin -``` - -And then follow [the shell setup](#shell-plugin) - -### Nix - -This repository is a flake, and can be installed using `nix profile`: - -``` -nix profile install "github:ellie/atuin" -``` - -Atuin is also available in [nixpkgs](https://github.com/NixOS/nixpkgs): - -``` -nix-env -f '' -iA atuin -``` - -And then follow [the shell setup](#shell-plugin) -### Pacman - -Atuin is available in the Arch Linux [community repository](https://archlinux.org/packages/community/x86_64/atuin/): - -``` -pacman -S atuin -``` - -And then follow [the shell setup](#shell-plugin) - -### Termux - -Atuin is available in the Termux package repository: - -``` -pkg install atuin -``` - -And then follow [the shell setup](#shell-plugin) - -### From source - -``` -git clone https://github.com/ellie/atuin.git -cd atuin -cargo install --path . -``` - -And then follow [the shell setup](#shell-plugin) - -## Shell plugin - -Once the binary is installed, the shell plugin requires installing. If you use -the install script, this should all be done for you! After installing, remember to restart your shell. - -### zsh - -``` -echo 'eval "$(atuin init zsh)"' >> ~/.zshrc -``` - -#### Zinit - -```sh -zinit load ellie/atuin -``` - -#### Antigen - -```sh -antigen bundle ellie/atuin@main -``` - -### bash - -We need to setup some hooks, so first install bash-preexec: - -``` -curl https://raw.githubusercontent.com/rcaloras/bash-preexec/master/bash-preexec.sh -o ~/.bash-preexec.sh -echo '[[ -f ~/.bash-preexec.sh ]] && source ~/.bash-preexec.sh' >> ~/.bashrc -``` - -Then setup Atuin - -``` -echo 'eval "$(atuin init bash)"' >> ~/.bashrc -``` - -### fish - -Add - -``` -atuin init fish | source -``` - -to your `is-interactive` block in your `~/.config/fish/config.fish` file - -### Fig - -Install `atuin` shell plugin in zsh, bash, or fish with [Fig](https://fig.io) in one click. - - - -## ...what's with the name? - -Atuin is named after "The Great A'Tuin", a giant turtle from Terry Pratchett's -Discworld series of books. - -[English]: ./README.md -[简体中文]: ./docs/zh-CN/README.md diff --git a/docs/docs/tailwind.config.js b/docs/docs/tailwind.config.js deleted file mode 100644 index 94754f54..00000000 --- a/docs/docs/tailwind.config.js +++ /dev/null @@ -1,14 +0,0 @@ -// tailwind.config.js -/** @type {import('tailwindcss').Config} */ -module.exports = { - corePlugins: { - preflight: false, // disable Tailwind's reset - }, - content: ["./src/**/*.{js,jsx,ts,tsx}", "../docs/**/*.mdx"], // my markdown stuff is in ../docs, not /src - darkMode: ['class', '[data-theme="dark"]'], // hooks into docusaurus' dark mode settigns - - theme: { - extend: {}, - }, - plugins: [], -} diff --git a/docs/docusaurus.config.js b/docs/docusaurus.config.js index 1eb08e73..ffd46af9 100644 --- a/docs/docusaurus.config.js +++ b/docs/docusaurus.config.js @@ -70,7 +70,7 @@ const config = { items: [ { type: 'doc', - docId: 'setup/setup', + docId: 'index', position: 'left', label: 'Docs', }, @@ -90,7 +90,7 @@ const config = { items: [ { label: 'Setup', - to: '/docs/setup', + to: '/docs', }, ], }, diff --git a/docs/src/pages/index.js b/docs/src/pages/index.js index 08500787..e81ebba5 100644 --- a/docs/src/pages/index.js +++ b/docs/src/pages/index.js @@ -19,7 +19,7 @@ function HomepageHeader() {
+ to="/docs"> Get Started
-- cgit v1.3.1