docs: remove old docusaurus (#1581)
@ -1,41 +0,0 @@
|
|||||||
# Website
|
|
||||||
|
|
||||||
This website is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator.
|
|
||||||
|
|
||||||
### Installation
|
|
||||||
|
|
||||||
```
|
|
||||||
$ yarn
|
|
||||||
```
|
|
||||||
|
|
||||||
### Local Development
|
|
||||||
|
|
||||||
```
|
|
||||||
$ yarn start
|
|
||||||
```
|
|
||||||
|
|
||||||
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
|
|
||||||
|
|
||||||
### Build
|
|
||||||
|
|
||||||
```
|
|
||||||
$ yarn build
|
|
||||||
```
|
|
||||||
|
|
||||||
This command generates static content into the `build` directory and can be served using any static contents hosting service.
|
|
||||||
|
|
||||||
### Deployment
|
|
||||||
|
|
||||||
Using SSH:
|
|
||||||
|
|
||||||
```
|
|
||||||
$ USE_SSH=true yarn deploy
|
|
||||||
```
|
|
||||||
|
|
||||||
Not using SSH:
|
|
||||||
|
|
||||||
```
|
|
||||||
$ GIT_USER=<Your GitHub username> yarn deploy
|
|
||||||
```
|
|
||||||
|
|
||||||
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
|
|
@ -1,3 +0,0 @@
|
|||||||
module.exports = {
|
|
||||||
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
|
|
||||||
};
|
|
@ -1,185 +0,0 @@
|
|||||||
---
|
|
||||||
title: Advanced Install
|
|
||||||
---
|
|
||||||
Generally, we recommend using our install script. It ensures you use the most
|
|
||||||
up-to-date Atuin, and that your shell plugin is correctly setup. It will prefer
|
|
||||||
the system package manager wherever necessary!
|
|
||||||
|
|
||||||
However, I totally understand if you'd rather do things yourself and not run a
|
|
||||||
script from the internet. If so, follow on!
|
|
||||||
|
|
||||||
## Install Atuin
|
|
||||||
|
|
||||||
Atuin is in a number of package repositories! Please choose whichever works best for you.
|
|
||||||
|
|
||||||
### 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:atuinsh/atuin"
|
|
||||||
```
|
|
||||||
|
|
||||||
Atuin is also available in [nixpkgs](https://github.com/NixOS/nixpkgs):
|
|
||||||
|
|
||||||
```
|
|
||||||
nix-env -f '<nixpkgs>' -iA atuin
|
|
||||||
```
|
|
||||||
|
|
||||||
And then follow [the shell setup](#shell-plugin)
|
|
||||||
### Pacman
|
|
||||||
|
|
||||||
Atuin is available in the Arch Linux [extra repository](https://archlinux.org/packages/extra/x86_64/atuin/):
|
|
||||||
|
|
||||||
```
|
|
||||||
pacman -S atuin
|
|
||||||
```
|
|
||||||
|
|
||||||
And then follow [the shell setup](#shell-plugin)
|
|
||||||
|
|
||||||
### Xbps
|
|
||||||
|
|
||||||
Atuin is available in the Void Linux [repository](https://github.com/void-linux/void-packages/tree/master/srcpkgs/atuin):
|
|
||||||
|
|
||||||
```
|
|
||||||
sudo xbps-install 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
|
|
||||||
|
|
||||||
Note: Atuin builds on the latest stable version of Rust, and we make no
|
|
||||||
promises regarding older versions. We recommend using rustup.
|
|
||||||
|
|
||||||
```
|
|
||||||
git clone https://github.com/atuinsh/atuin.git
|
|
||||||
cd atuin/atuin
|
|
||||||
cargo install --path .
|
|
||||||
```
|
|
||||||
|
|
||||||
## 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 atuinsh/atuin
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Antigen
|
|
||||||
|
|
||||||
```sh
|
|
||||||
antigen bundle atuinsh/atuin@main
|
|
||||||
```
|
|
||||||
|
|
||||||
### bash
|
|
||||||
|
|
||||||
#### [ble.sh](https://github.com/akinomyoga/ble.sh)
|
|
||||||
|
|
||||||
Atuin works best in bash when using [ble.sh](https://github.com/akinomyoga/ble.sh).
|
|
||||||
|
|
||||||
With ble.sh installed, just add atuin to your .bashrc
|
|
||||||
|
|
||||||
```bash
|
|
||||||
echo 'eval "$(atuin init bash)"' >> ~/.bashrc
|
|
||||||
```
|
|
||||||
|
|
||||||
#### [bash-preexec](https://github.com/rcaloras/bash-preexec)
|
|
||||||
|
|
||||||
[Bash-preexec](https://github.com/rcaloras/bash-preexec) can also be used, but you may experience some minor problems with the recorded duration and exit status of some commands.
|
|
||||||
|
|
||||||
To use bash-preexec, download and initialize it
|
|
||||||
|
|
||||||
```bash
|
|
||||||
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
|
|
||||||
|
|
||||||
```bash
|
|
||||||
echo 'eval "$(atuin init bash)"' >> ~/.bashrc
|
|
||||||
```
|
|
||||||
|
|
||||||
**PLEASE NOTE**
|
|
||||||
|
|
||||||
bash-preexec currently has an issue where it will stop honoring `ignorespace`. While Atuin will ignore commands prefixed with whitespace, they may still end up in your bash history. Please check your configuration! All other shells do not have this issue.
|
|
||||||
|
|
||||||
### 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.
|
|
||||||
|
|
||||||
<a href="https://fig.io/plugins/other/atuin" target="_blank"><img src="https://fig.io/badges/install-with-fig.svg" /></a>
|
|
||||||
|
|
||||||
### Nushell
|
|
||||||
|
|
||||||
Run in *Nushell*:
|
|
||||||
|
|
||||||
```
|
|
||||||
mkdir ~/.local/share/atuin/
|
|
||||||
atuin init nu | save ~/.local/share/atuin/init.nu
|
|
||||||
```
|
|
||||||
|
|
||||||
Add to `config.nu`:
|
|
||||||
|
|
||||||
```
|
|
||||||
source ~/.local/share/atuin/init.nu
|
|
||||||
```
|
|
@ -1,12 +0,0 @@
|
|||||||
---
|
|
||||||
title: Commands
|
|
||||||
---
|
|
||||||
|
|
||||||
- [`atuin import`](../../docs/commands/import): Import shell history from file
|
|
||||||
- [`atuin history list`](../../docs/commands/list): List all items in history
|
|
||||||
- [`atuin search`](../../docs/commands/search): Interactive history search
|
|
||||||
- [`atuin server`](../../docs/commands/server): Start an atuin server
|
|
||||||
- [`atuin gen-completions`](../../docs/commands/shell-completions): Generate shell completions
|
|
||||||
- [`atuin stats`](../../docs/commands/stats): Calculate statistics for your history
|
|
||||||
- [`atuin sync`](../../docs/commands/sync): Sync with the configured server
|
|
||||||
|
|
@ -1,34 +0,0 @@
|
|||||||
---
|
|
||||||
title: Import History
|
|
||||||
sidebar_position: 2
|
|
||||||
---
|
|
||||||
|
|
||||||
# `atuin import`
|
|
||||||
|
|
||||||
Atuin can import your history from your "old" history file
|
|
||||||
|
|
||||||
`atuin import auto` will attempt to figure out your shell (via \$SHELL) and run
|
|
||||||
the correct importer
|
|
||||||
|
|
||||||
Unfortunately these older files do not store as much information as Atuin does,
|
|
||||||
so not all features are available with imported data.
|
|
||||||
|
|
||||||
# zsh
|
|
||||||
|
|
||||||
```
|
|
||||||
atuin import zsh
|
|
||||||
```
|
|
||||||
|
|
||||||
If you've set HISTFILE, this should be picked up! If not, try
|
|
||||||
|
|
||||||
```
|
|
||||||
HISTFILE=/path/to/history/file atuin import zsh
|
|
||||||
```
|
|
||||||
|
|
||||||
This supports both the simple and extended format
|
|
||||||
|
|
||||||
# bash
|
|
||||||
|
|
||||||
```
|
|
||||||
atuin import bash
|
|
||||||
```
|
|
@ -1,33 +0,0 @@
|
|||||||
---
|
|
||||||
title: Listing History
|
|
||||||
---
|
|
||||||
|
|
||||||
# `atuin history list`
|
|
||||||
|
|
||||||
|
|
||||||
| Arg | Description |
|
|
||||||
|------------------|-------------------------------------------------------------------------------|
|
|
||||||
| `--cwd`/`-c` | The directory to list history for (default: all dirs) |
|
|
||||||
| `--session`/`-s` | Enable listing history for the current session only (default: false) |
|
|
||||||
| `--human` | Use human-readable formatting for the timestamp and duration (default: false) |
|
|
||||||
| `--cmd-only` | Show only the text of the command (default: false) |
|
|
||||||
| `--reverse` | Reverse the order of the output (default: false) |
|
|
||||||
| `--format` | Specify the formatting of a command (see below) |
|
|
||||||
| `--print0` | Terminate the output with a null, for better multiline support |
|
|
||||||
|
|
||||||
|
|
||||||
## Format
|
|
||||||
|
|
||||||
Customize the output of `history list`
|
|
||||||
|
|
||||||
Example
|
|
||||||
|
|
||||||
```
|
|
||||||
atuin history list --format "{time} - {duration} - {command}"
|
|
||||||
```
|
|
||||||
|
|
||||||
Supported variables
|
|
||||||
|
|
||||||
```
|
|
||||||
{command}, {directory}, {duration}, {user}, {host} and {time}
|
|
||||||
```
|
|
@ -1,70 +0,0 @@
|
|||||||
---
|
|
||||||
title: Searching History
|
|
||||||
---
|
|
||||||
|
|
||||||
# `atuin search`
|
|
||||||
|
|
||||||
|
|
||||||
Atuin search supports wildcards, with either the `*` or `%` character. By
|
|
||||||
default, a prefix search is performed (ie, all queries are automatically
|
|
||||||
appended with a wildcard).
|
|
||||||
|
|
||||||
| Arg | Description |
|
|
||||||
| -------------------- | ----------------------------------------------------------------------------- |
|
|
||||||
| `--cwd`/`-c` | The directory to list history for (default: all dirs) |
|
|
||||||
| `--exclude-cwd` | Do not include commands that ran in this directory (default: none) |
|
|
||||||
| `--exit`/`-e` | Filter by exit code (default: none) |
|
|
||||||
| `--exclude-exit` | Do not include commands that exited with this value (default: none) |
|
|
||||||
| `--before` | Only include commands ran before this time(default: none) |
|
|
||||||
| `--after` | Only include commands ran after this time(default: none) |
|
|
||||||
| `--interactive`/`-i` | Open the interactive search UI (default: false) |
|
|
||||||
| `--human` | Use human-readable formatting for the timestamp and duration (default: false) |
|
|
||||||
| `--limit` | Limit the number of results (default: none) |
|
|
||||||
| `--offset` | Offset from the start of the results (default: none) |
|
|
||||||
| `--delete` | Delete history matching this query |
|
|
||||||
| `--delete-it-all` | Delete all shell history |
|
|
||||||
| `--reverse` | Reverse order of search results, oldest first |
|
|
||||||
| `--format`/`-f` | Available variables: {command}, {directory}, {duration}, {user}, {host}, {time}, {exit} and {relativetime}. Example: --format "{time} - [{duration}] - {directory}$\t{command}" |
|
|
||||||
| `--inline-height` | Set the maximum number of lines Atuin's interface should take up |
|
|
||||||
| `--help`/`-h` | Print help |
|
|
||||||
|
|
||||||
## `atuin search -i`
|
|
||||||
|
|
||||||
Atuin's interactive search TUI allows you to fuzzy search through your history.
|
|
||||||
|
|
||||||
![compact](https://user-images.githubusercontent.com/1710904/161623659-4fec047f-ea4b-471c-9581-861d2eb701a9.png)
|
|
||||||
|
|
||||||
You can replay the `nth` command with `alt + #` where `#` is the line number of the command you would like to replay.
|
|
||||||
|
|
||||||
Note: This is not yet supported on macOS.
|
|
||||||
|
|
||||||
## Examples
|
|
||||||
|
|
||||||
```
|
|
||||||
# Open the interactive search TUI
|
|
||||||
atuin search -i
|
|
||||||
|
|
||||||
# Open the interactive search TUI preloaded with a query
|
|
||||||
atuin search -i atuin
|
|
||||||
|
|
||||||
# Search for all commands, beginning with cargo, that exited successfully
|
|
||||||
atuin search --exit 0 cargo
|
|
||||||
|
|
||||||
# Search for all commands, that failed, from the current dir, and were ran before April 1st 2021
|
|
||||||
atuin search --exclude-exit 0 --before 01/04/2021 --cwd .
|
|
||||||
|
|
||||||
# Search for all commands, beginning with cargo, that exited successfully, and were ran after yesterday at 3pm
|
|
||||||
atuin search --exit 0 --after "yesterday 3pm" cargo
|
|
||||||
|
|
||||||
# Delete all commands, beginning with cargo, that exited successfully, and were ran after yesterday at 3pm
|
|
||||||
atuin search --delete --exit 0 --after "yesterday 3pm" cargo
|
|
||||||
|
|
||||||
# Search for a command beginning with cargo, return exactly one result.
|
|
||||||
atuin search --limit 1 cargo
|
|
||||||
|
|
||||||
# Search for a single result for a command beginning with cargo, skipping (offsetting) one result
|
|
||||||
atuin search --offset 1 --limit 1 cargo
|
|
||||||
|
|
||||||
# Find the oldest cargo command
|
|
||||||
atuin search --limit 1 --reverse cargo
|
|
||||||
```
|
|
@ -1,14 +0,0 @@
|
|||||||
---
|
|
||||||
title: Server
|
|
||||||
---
|
|
||||||
|
|
||||||
# `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
|
|
||||||
|
|
||||||
See the [self hosting docs](/docs/self-hosting) for more
|
|
||||||
|
|
@ -1,19 +0,0 @@
|
|||||||
# `atuin gen-completions`
|
|
||||||
|
|
||||||
[Shell completions](https://en.wikipedia.org/wiki/Command-line_completion) for Atuin can be generated by specifying the output directory and desired shell via `gen-completions` subcommand.
|
|
||||||
|
|
||||||
```
|
|
||||||
$ atuin gen-completions --shell bash --out-dir $HOME
|
|
||||||
|
|
||||||
Shell completion for BASH is generated in "/home/user"
|
|
||||||
```
|
|
||||||
|
|
||||||
Possible values for the `--shell` argument are the following:
|
|
||||||
|
|
||||||
- `bash`
|
|
||||||
- `fish`
|
|
||||||
- `zsh`
|
|
||||||
- `powershell`
|
|
||||||
- `elvish`
|
|
||||||
|
|
||||||
Also, see the [supported shells](https://atuin.sh/docs/#supported-shells).
|
|
@ -1,50 +0,0 @@
|
|||||||
# `atuin stats`
|
|
||||||
|
|
||||||
Atuin can also calculate stats based on your history - this is currently a
|
|
||||||
little basic, but more features to come.
|
|
||||||
|
|
||||||
## 1-day stats
|
|
||||||
|
|
||||||
You provide the starting point, and Atuin computes the stats for 24h from that point.
|
|
||||||
Date parsing is provided by `interim`, which supports different formats
|
|
||||||
for full or relative dates. Certain formats rely on the dialect option in your
|
|
||||||
[configuration](../../docs/config/config.md#dialect) to differentiate day from month.
|
|
||||||
Refer to [the module's documentation](https://docs.rs/interim/0.1.0/interim/#supported-formats) for more details on the supported date formats.
|
|
||||||
|
|
||||||
```
|
|
||||||
$ atuin stats last friday
|
|
||||||
|
|
||||||
+---------------------+------------+
|
|
||||||
| Statistic | Value |
|
|
||||||
+---------------------+------------+
|
|
||||||
| Most used command | git status |
|
|
||||||
+---------------------+------------+
|
|
||||||
| Commands ran | 450 |
|
|
||||||
+---------------------+------------+
|
|
||||||
| Unique commands ran | 213 |
|
|
||||||
+---------------------+------------+
|
|
||||||
|
|
||||||
# A few more examples:
|
|
||||||
$ atuin stats 2018-04-01
|
|
||||||
$ atuin stats April 1
|
|
||||||
$ atuin stats 01/04/22
|
|
||||||
$ atuin stats last thursday 3pm # between last thursday 3:00pm and the following friday 3:00pm
|
|
||||||
```
|
|
||||||
|
|
||||||
## Full history stats
|
|
||||||
|
|
||||||
```
|
|
||||||
$ atuin stats
|
|
||||||
# or
|
|
||||||
$ atuin stats all
|
|
||||||
|
|
||||||
+---------------------+-------+
|
|
||||||
| Statistic | Value |
|
|
||||||
+---------------------+-------+
|
|
||||||
| Most used command | ls |
|
|
||||||
+---------------------+-------+
|
|
||||||
| Commands ran | 8190 |
|
|
||||||
+---------------------+-------+
|
|
||||||
| Unique commands ran | 2996 |
|
|
||||||
+---------------------+-------+
|
|
||||||
```
|
|
@ -1,77 +0,0 @@
|
|||||||
# `atuin sync`
|
|
||||||
|
|
||||||
Atuin can back up your history to a server, and use this to ensure multiple
|
|
||||||
machines have the same shell history. This is all encrypted end-to-end, so the
|
|
||||||
server operator can _never_ see your data!
|
|
||||||
|
|
||||||
Anyone can host a server (try `atuin server start`, more docs to follow), but I
|
|
||||||
host one at https://api.atuin.sh. This is the default server address, which can
|
|
||||||
be changed in the [config](/docs/config/config.md#sync_address). Again, I _cannot_ see your data, and
|
|
||||||
do not want to.
|
|
||||||
|
|
||||||
## Sync frequency
|
|
||||||
|
|
||||||
Syncing will happen automatically, unless configured otherwise. The sync
|
|
||||||
frequency is configurable in [config](/docs/config/config.md#sync_frequency)
|
|
||||||
|
|
||||||
## Sync
|
|
||||||
|
|
||||||
You can manually trigger a sync with `atuin sync`
|
|
||||||
|
|
||||||
## Register
|
|
||||||
|
|
||||||
Register for a sync account with
|
|
||||||
|
|
||||||
```
|
|
||||||
atuin register -u <USERNAME> -e <EMAIL> -p <PASSWORD>
|
|
||||||
```
|
|
||||||
|
|
||||||
If you don't want to have your password be included in shell history, you can omit
|
|
||||||
the password flag and you will be prompted to provide it through stdin.
|
|
||||||
|
|
||||||
Usernames must be unique and only contain alphanumerics or hyphens,
|
|
||||||
and emails shall only be used for important notifications (security breaches, changes to service, etc).
|
|
||||||
|
|
||||||
Upon success, you are also logged in :) Syncing should happen automatically from
|
|
||||||
here!
|
|
||||||
|
|
||||||
## Delete
|
|
||||||
|
|
||||||
You can delete your sync account with
|
|
||||||
|
|
||||||
```
|
|
||||||
atuin account delete
|
|
||||||
```
|
|
||||||
|
|
||||||
This will remove your account and all synchronized history from the server. Local data will not be touched!
|
|
||||||
|
|
||||||
## Key
|
|
||||||
|
|
||||||
As all your data is encrypted, Atuin generates a key for you. It's stored in the
|
|
||||||
Atuin data directory (`~/.local/share/atuin` on Linux).
|
|
||||||
|
|
||||||
You can also get this with
|
|
||||||
|
|
||||||
```
|
|
||||||
atuin key
|
|
||||||
```
|
|
||||||
|
|
||||||
Never share this with anyone!
|
|
||||||
|
|
||||||
## Login
|
|
||||||
|
|
||||||
If you want to log in to a new machine, you will require your encryption key
|
|
||||||
(`atuin key`).
|
|
||||||
|
|
||||||
```
|
|
||||||
atuin login -u <USERNAME> -p <PASSWORD> -k <KEY>
|
|
||||||
```
|
|
||||||
|
|
||||||
If you don't want to have your password be included in shell history, you can omit
|
|
||||||
the password flag and you will be prompted to provide it through stdin.
|
|
||||||
|
|
||||||
## Logout
|
|
||||||
|
|
||||||
```
|
|
||||||
atuin logout
|
|
||||||
```
|
|
@ -1,354 +0,0 @@
|
|||||||
# Config
|
|
||||||
|
|
||||||
Atuin maintains two configuration files, stored in `~/.config/atuin/`. We store
|
|
||||||
data in `~/.local/share/atuin` (unless overridden by XDG\_\*).
|
|
||||||
|
|
||||||
You can also change the path to the configuration directory by setting
|
|
||||||
`ATUIN_CONFIG_DIR`. For example
|
|
||||||
|
|
||||||
```
|
|
||||||
export ATUIN_CONFIG_DIR = /home/ellie/.atuin
|
|
||||||
```
|
|
||||||
|
|
||||||
## Client config
|
|
||||||
|
|
||||||
```
|
|
||||||
~/.config/atuin/config.toml
|
|
||||||
```
|
|
||||||
|
|
||||||
The client runs on a user's machine, and unless you're running a server, this
|
|
||||||
is what you care about.
|
|
||||||
|
|
||||||
See [config.toml](../../../atuin-client/config.toml) for an example
|
|
||||||
|
|
||||||
### `db_path`
|
|
||||||
|
|
||||||
The path to the Atuin SQlite database. Defaults to
|
|
||||||
`~/.local/share/atuin/history.db`.
|
|
||||||
|
|
||||||
```
|
|
||||||
db_path = "~/.history.db"
|
|
||||||
```
|
|
||||||
|
|
||||||
### `key_path`
|
|
||||||
|
|
||||||
The path to the Atuin encryption key. Defaults to
|
|
||||||
`~/.local/share/atuin/key`.
|
|
||||||
|
|
||||||
```
|
|
||||||
key = "~/.atuin-key"
|
|
||||||
```
|
|
||||||
|
|
||||||
### `session_path`
|
|
||||||
|
|
||||||
The path to the Atuin server session file. Defaults to
|
|
||||||
`~/.local/share/atuin/session`. This is essentially just an API token
|
|
||||||
|
|
||||||
```
|
|
||||||
key = "~/.atuin-session"
|
|
||||||
```
|
|
||||||
|
|
||||||
### `dialect`
|
|
||||||
|
|
||||||
This configures how the [stats](../commands/stats.md) command parses dates. It has two
|
|
||||||
possible values
|
|
||||||
|
|
||||||
```
|
|
||||||
dialect = "uk"
|
|
||||||
```
|
|
||||||
|
|
||||||
or
|
|
||||||
|
|
||||||
```
|
|
||||||
dialect = "us"
|
|
||||||
```
|
|
||||||
|
|
||||||
and defaults to "us".
|
|
||||||
|
|
||||||
### `auto_sync`
|
|
||||||
|
|
||||||
Configures whether or not to automatically sync, when logged in. Defaults to
|
|
||||||
true
|
|
||||||
|
|
||||||
```
|
|
||||||
auto_sync = true/false
|
|
||||||
```
|
|
||||||
|
|
||||||
### `update_check`
|
|
||||||
|
|
||||||
Configures whether or not to automatically check for updates. Defaults to
|
|
||||||
true.
|
|
||||||
|
|
||||||
```
|
|
||||||
update_check = true/false
|
|
||||||
```
|
|
||||||
|
|
||||||
### `sync_address`
|
|
||||||
|
|
||||||
The address of the server to sync with! Defaults to `https://api.atuin.sh`.
|
|
||||||
|
|
||||||
```
|
|
||||||
sync_address = "https://api.atuin.sh"
|
|
||||||
```
|
|
||||||
|
|
||||||
### `sync_frequency`
|
|
||||||
|
|
||||||
How often to automatically sync with the server. This can be given in a
|
|
||||||
"human-readable" format. For example, `10s`, `20m`, `1h`, etc. Defaults to `1h`.
|
|
||||||
|
|
||||||
If set to `0`, Atuin will sync after every command. Some servers may potentially
|
|
||||||
rate limit, which won't cause any issues.
|
|
||||||
|
|
||||||
```
|
|
||||||
sync_frequency = "1h"
|
|
||||||
```
|
|
||||||
|
|
||||||
### `search_mode`
|
|
||||||
|
|
||||||
Which search mode to use. Atuin supports "prefix", "fulltext", "fuzzy", and
|
|
||||||
"skim" search modes.
|
|
||||||
|
|
||||||
Prefix mode searches for "query\*"; fulltext mode searches for "\*query\*";
|
|
||||||
"fuzzy" applies the [fuzzy search syntax](#fuzzy-search-syntax);
|
|
||||||
"skim" applies the [skim search syntax](https://github.com/lotabout/skim#search-syntax).
|
|
||||||
|
|
||||||
Defaults to "fuzzy".
|
|
||||||
|
|
||||||
#### `fuzzy` search syntax
|
|
||||||
|
|
||||||
The "fuzzy" search syntax is based on the
|
|
||||||
[fzf search syntax](https://github.com/junegunn/fzf#search-syntax).
|
|
||||||
|
|
||||||
| Token | Match type | Description |
|
|
||||||
|-----------|----------------------------|--------------------------------------|
|
|
||||||
| `sbtrkt` | fuzzy-match | Items that match `sbtrkt` |
|
|
||||||
| `'wild` | exact-match (quoted) | Items that include `wild` |
|
|
||||||
| `^music` | prefix-exact-match | Items that start with `music` |
|
|
||||||
| `.mp3$` | suffix-exact-match | Items that end with `.mp3` |
|
|
||||||
| `!fire` | inverse-exact-match | Items that do not include `fire` |
|
|
||||||
| `!^music` | inverse-prefix-exact-match | Items that do not start with `music` |
|
|
||||||
| `!.mp3$` | inverse-suffix-exact-match | Items that do not end with `.mp3` |
|
|
||||||
|
|
||||||
A single bar character term acts as an OR operator. For example, the following
|
|
||||||
query matches entries that start with `core` and end with either `go`, `rb`,
|
|
||||||
or `py`.
|
|
||||||
|
|
||||||
```
|
|
||||||
^core go$ | rb$ | py$
|
|
||||||
```
|
|
||||||
|
|
||||||
### `filter_mode`
|
|
||||||
|
|
||||||
The default filter to use when searching
|
|
||||||
|
|
||||||
| Column1 | Column2 |
|
|
||||||
|------------------|--------------------------------------------------------------|
|
|
||||||
| global (default) | Search history from all hosts, all sessions, all directories |
|
|
||||||
| host | Search history just from this host |
|
|
||||||
| session | Search history just from the current session |
|
|
||||||
| directory | Search history just from the current directory |
|
|
||||||
|
|
||||||
Filter modes can still be toggled via ctrl-r
|
|
||||||
|
|
||||||
```
|
|
||||||
filter_mode = "host"
|
|
||||||
```
|
|
||||||
|
|
||||||
### `search_mode_shell_up_key_binding`
|
|
||||||
|
|
||||||
The default searchmode to use when searching and being invoked from a shell up-key binding.
|
|
||||||
|
|
||||||
Accepts exactly the same options as `search_mode` above
|
|
||||||
|
|
||||||
```
|
|
||||||
search_mode_shell_up_key_binding = "fuzzy"
|
|
||||||
```
|
|
||||||
|
|
||||||
Defaults to the value specified for search_mode.
|
|
||||||
|
|
||||||
### `filter_mode_shell_up_key_binding`
|
|
||||||
|
|
||||||
The default filter to use when searching and being invoked from a shell up-key binding.
|
|
||||||
|
|
||||||
Accepts exactly the same options as `filter_mode` above
|
|
||||||
|
|
||||||
```
|
|
||||||
filter_mode_shell_up_key_binding = "session"
|
|
||||||
```
|
|
||||||
|
|
||||||
Defaults to the value specified for filter_mode.
|
|
||||||
|
|
||||||
### `workspaces`
|
|
||||||
|
|
||||||
This flag enables a pseudo filter-mode named "workspace": the filter is automatically
|
|
||||||
activated when you are in a git repository. Defaults to false.
|
|
||||||
|
|
||||||
With workspace filtering enabled, Atuin will filter for commands executed in any directory
|
|
||||||
within a git repository tree.
|
|
||||||
|
|
||||||
Filter modes can still be toggled via ctrl-r.
|
|
||||||
|
|
||||||
### `style`
|
|
||||||
|
|
||||||
Which style to use. Possible values: `auto`, `full` and `compact`.
|
|
||||||
|
|
||||||
- `compact`:
|
|
||||||
|
|
||||||
![compact](https://user-images.githubusercontent.com/1710904/161623659-4fec047f-ea4b-471c-9581-861d2eb701a9.png)
|
|
||||||
|
|
||||||
- `full`:
|
|
||||||
|
|
||||||
![full](https://user-images.githubusercontent.com/1710904/161623547-42afbfa7-a3ef-4820-bacd-fcaf1e324969.png)
|
|
||||||
|
|
||||||
Defaults to `auto`.
|
|
||||||
|
|
||||||
### `invert`
|
|
||||||
|
|
||||||
Invert the UI - put the search bar at the top , Default to `false`
|
|
||||||
|
|
||||||
```
|
|
||||||
invert = true/false
|
|
||||||
```
|
|
||||||
|
|
||||||
### `inline_height`
|
|
||||||
|
|
||||||
Set the maximum number of lines Atuin's interface should take up.
|
|
||||||
|
|
||||||
![inline_height](/img/inline.png)
|
|
||||||
|
|
||||||
If set to `0` (default), Atuin will always take up as many lines as available (full screen).
|
|
||||||
|
|
||||||
### `show_preview`
|
|
||||||
|
|
||||||
Configure whether or not to show a preview of the selected command.
|
|
||||||
|
|
||||||
![show_preview](/img/preview.png)
|
|
||||||
|
|
||||||
Useful when the command is longer than the terminal width and is cut off.
|
|
||||||
|
|
||||||
### `max_preview_height`
|
|
||||||
|
|
||||||
Configure the maximum height of the preview to show.
|
|
||||||
|
|
||||||
Useful when you have long scripts in your history that you want to distinguish by more than the first few lines.
|
|
||||||
|
|
||||||
Defaults to `4`.
|
|
||||||
|
|
||||||
### `show_help`
|
|
||||||
|
|
||||||
Configure whether or not to show the help row, which includes the current Atuin version (and whether an update is available), a keymap hint, and the total amount of commands in your history.
|
|
||||||
|
|
||||||
Defaults to `true`.
|
|
||||||
|
|
||||||
### `exit_mode`
|
|
||||||
|
|
||||||
What to do when the escape key is pressed when searching
|
|
||||||
|
|
||||||
| Value | Behaviour |
|
|
||||||
|---------------------------|------------------------------------------------------------------|
|
|
||||||
| return-original (default) | Set the command-line to the value it had before starting search |
|
|
||||||
| return-query | Set the command-line to the search query you have entered so far |
|
|
||||||
|
|
||||||
Pressing ctrl+c or ctrl+d will always return the original command-line value.
|
|
||||||
|
|
||||||
```
|
|
||||||
exit_mode = "return-query"
|
|
||||||
```
|
|
||||||
|
|
||||||
### history_filter
|
|
||||||
|
|
||||||
The history filter allows you to exclude commands from history tracking - maybe you want to keep ALL of your `curl` commands totally out of your shell history, or maybe just some matching a pattern.
|
|
||||||
|
|
||||||
This supports regular expressions, so you can hide pretty much whatever you want!
|
|
||||||
|
|
||||||
```
|
|
||||||
## Note that these regular expressions are unanchored, i.e. if they don't start
|
|
||||||
## with ^ or end with $, they'll match anywhere in the command.
|
|
||||||
history_filter = [
|
|
||||||
"^secret-cmd",
|
|
||||||
"^innocuous-cmd .*--secret=.+"
|
|
||||||
]
|
|
||||||
```
|
|
||||||
|
|
||||||
### secrets_filter
|
|
||||||
|
|
||||||
```
|
|
||||||
secrets_filter = true
|
|
||||||
```
|
|
||||||
|
|
||||||
Defaults to true. This matches history against a set of default regex, and will not save it if we get a match. Defaults include
|
|
||||||
|
|
||||||
1. AWS key id
|
|
||||||
2. Github pat (old and new)
|
|
||||||
3. Slack oauth tokens (bot, user)
|
|
||||||
4. Slack webhooks
|
|
||||||
5. Stripe live/test keys
|
|
||||||
6. Atuin login command
|
|
||||||
|
|
||||||
## macOS <kbd>Ctrl-n</kbd> key shortcuts
|
|
||||||
|
|
||||||
macOS does not have an <kbd>Alt</kbd> key, although terminal emulators can often be configured to map the <kbd>Option</kbd> key to be used as <kbd>Alt</kbd>. *However*, remapping <kbd>Option</kbd> this way may prevent typing some characters, such as using <kbd>Option-3</kbd> to type `#` on the British English layout. For such a scenario, set the `ctrl_n_shortcuts` option to `true` in your config file to replace <kbd>Alt-0</kbd> to <kbd>Alt-9</kbd> shortcuts with <kbd>Ctrl-0</kbd> to <kbd>Ctrl-9</kbd> instead:
|
|
||||||
|
|
||||||
```
|
|
||||||
# Use Ctrl-0 .. Ctrl-9 instead of Alt-0 .. Alt-9 UI shortcuts
|
|
||||||
ctrl_n_shortcuts = true
|
|
||||||
```
|
|
||||||
|
|
||||||
## network_timeout
|
|
||||||
Default: 30
|
|
||||||
|
|
||||||
The max amount of time (in seconds) to wait for a network request. If any
|
|
||||||
operations with a sync server take longer than this, the code will fail -
|
|
||||||
rather than wait indefinitely.
|
|
||||||
|
|
||||||
## network_connect_timeout
|
|
||||||
Default: 5
|
|
||||||
|
|
||||||
The max time (in seconds) we wait for a connection to become established with a
|
|
||||||
remote sync server. Any longer than this and the request will fail.
|
|
||||||
|
|
||||||
## enter_accept
|
|
||||||
Default: false
|
|
||||||
|
|
||||||
Not supported by NuShell presently
|
|
||||||
|
|
||||||
When set to true, Atuin will default to immediately executing a command rather
|
|
||||||
than the user having to press enter twice. Pressing tab will return to the
|
|
||||||
shell and give the user a chance to edit.
|
|
||||||
|
|
||||||
This technically defaults to true for new users, but false for existing. We
|
|
||||||
have set `enter_accept = true` in the default config file. This is likely to
|
|
||||||
change to be the default for everyone in a later release.
|
|
||||||
|
|
||||||
## Stats
|
|
||||||
This section of client config is specifically for configuring Atuin stats calculations
|
|
||||||
|
|
||||||
### common_subcommands
|
|
||||||
|
|
||||||
Default
|
|
||||||
|
|
||||||
```
|
|
||||||
common_subcommands = [
|
|
||||||
"cargo",
|
|
||||||
"go",
|
|
||||||
"git",
|
|
||||||
"npm",
|
|
||||||
"yarn",
|
|
||||||
"pnpm",
|
|
||||||
"kubectl",
|
|
||||||
]
|
|
||||||
```
|
|
||||||
|
|
||||||
Configures commands where we should consider the subcommand as part of the statistics. For example, consider `kubectl get` rather than just `kubectl`.
|
|
||||||
|
|
||||||
### common_prefix
|
|
||||||
|
|
||||||
Default
|
|
||||||
|
|
||||||
```
|
|
||||||
common_prefix = [
|
|
||||||
"sudo",
|
|
||||||
]
|
|
||||||
```
|
|
||||||
|
|
||||||
Configures commands that should be totally stripped from stats calculations. For example, 'sudo' should be ignored.
|
|
@ -1,180 +0,0 @@
|
|||||||
---
|
|
||||||
title: Getting Started
|
|
||||||
id: index
|
|
||||||
slug: /
|
|
||||||
sidebar_position: 1
|
|
||||||
---
|
|
||||||
|
|
||||||
Atuin replaces your existing shell history with a SQLite database, and records
|
|
||||||
additional context for your commands. With this context, Atuin gives you faster
|
|
||||||
and better search of your shell history!
|
|
||||||
|
|
||||||
Additionally, Atuin (optionally) syncs your shell history between all of your
|
|
||||||
machines! Fully end-to-end encrypted, of course.
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
If you have any problems, please open an [issue](https://github.com/ellie/atuin/issues) or get in touch on our [Discord](https://discord.gg/Fq8bJSKPHh)!
|
|
||||||
|
|
||||||
## Supported Shells
|
|
||||||
|
|
||||||
- zsh
|
|
||||||
- bash
|
|
||||||
- fish
|
|
||||||
- nushell
|
|
||||||
|
|
||||||
# Quickstart
|
|
||||||
|
|
||||||
Please do try and read this guide, but if you're in a hurry and want to get
|
|
||||||
started quickly:
|
|
||||||
|
|
||||||
```
|
|
||||||
bash <(curl --proto '=https' --tlsv1.2 -sSf https://setup.atuin.sh)
|
|
||||||
|
|
||||||
atuin register -u <USERNAME> -e <EMAIL>
|
|
||||||
atuin import auto
|
|
||||||
atuin sync
|
|
||||||
```
|
|
||||||
|
|
||||||
Now restart your shell!
|
|
||||||
|
|
||||||
Anytime you press ctrl-r or up, you will see the Atuin search UI. Type your
|
|
||||||
query, enter to execute. If you'd like to select a command without executing
|
|
||||||
it, press tab.
|
|
||||||
|
|
||||||
You might like to configure an [inline
|
|
||||||
window](https://atuin.sh/docs/config/#inline_height), or [disable up arrow
|
|
||||||
bindings](https://atuin.sh/docs/key-binding#disable-up-arrow)
|
|
||||||
|
|
||||||
# Full Guide
|
|
||||||
|
|
||||||
Let's get started! First up, you will want to install Atuin. We have an install
|
|
||||||
script which handles most of the commonly used platforms and package managers:
|
|
||||||
|
|
||||||
## bash/zsh
|
|
||||||
|
|
||||||
```
|
|
||||||
bash <(curl --proto '=https' --tlsv1.2 -sSf https://setup.atuin.sh)
|
|
||||||
```
|
|
||||||
|
|
||||||
## fish
|
|
||||||
|
|
||||||
```
|
|
||||||
bash (curl --proto '=https' --tlsv1.2 -sSf https://setup.atuin.sh | psub)
|
|
||||||
```
|
|
||||||
|
|
||||||
## Importing
|
|
||||||
|
|
||||||
The script will install the binary and attempt to configure your shell. Atuin
|
|
||||||
uses a shell plugin to ensure that we capture new shell history. But for older
|
|
||||||
history, you will need to import it
|
|
||||||
|
|
||||||
This will import the history for your current shell:
|
|
||||||
```
|
|
||||||
atuin import auto
|
|
||||||
```
|
|
||||||
|
|
||||||
Alternatively, you can specify the shell like so:
|
|
||||||
|
|
||||||
```
|
|
||||||
atuin import bash
|
|
||||||
atuin import zsh # etc
|
|
||||||
```
|
|
||||||
|
|
||||||
## Register
|
|
||||||
|
|
||||||
At this point, you have Atuin storing and searching your shell history! But it
|
|
||||||
isn't syncing it just yet. To do so, you'll need to register with the sync
|
|
||||||
server. All of your history is fully end-to-end encrypted, so there are no
|
|
||||||
risks of the server snooping on you.
|
|
||||||
|
|
||||||
Note: if you already have an account and wish to sync with an additional
|
|
||||||
machine, follow the [below guide](#syncing-additional-machines) instead.
|
|
||||||
|
|
||||||
```
|
|
||||||
atuin register -u <YOUR_USERNAME> -e <YOUR EMAIL>
|
|
||||||
```
|
|
||||||
|
|
||||||
After registration, Atuin will generate an encryption key for you and store it
|
|
||||||
locally. This is needed for logging in to other machines, and can be seen with
|
|
||||||
|
|
||||||
```
|
|
||||||
atuin key
|
|
||||||
```
|
|
||||||
|
|
||||||
Please **never** share this key with anyone! The Atuin developers will never
|
|
||||||
ask you for your key, your password, or the contents of your Atuin directory.
|
|
||||||
|
|
||||||
If you lose your key, we can do nothing to help you. We recommend you store
|
|
||||||
this somewhere safe, such as in a password manager.
|
|
||||||
|
|
||||||
## First sync
|
|
||||||
By default, Atuin will sync your history once per hour. This can be
|
|
||||||
[configured](/docs/config#sync_frequency).
|
|
||||||
|
|
||||||
To run a sync manually, please run
|
|
||||||
|
|
||||||
```
|
|
||||||
atuin sync
|
|
||||||
```
|
|
||||||
|
|
||||||
Atuin tries to be smart with a sync, and not waste data transfer. However, if
|
|
||||||
you are seeing some missing data, please try running
|
|
||||||
|
|
||||||
```
|
|
||||||
atuin sync -f
|
|
||||||
```
|
|
||||||
|
|
||||||
This triggers a full sync, which may take longer as it works through historical data.
|
|
||||||
|
|
||||||
## Syncing additional machines
|
|
||||||
|
|
||||||
When only signed in on one machine, Atuin sync operates as a backup. This is
|
|
||||||
pretty useful by itself, but syncing multiple machines is where the magic
|
|
||||||
happens.
|
|
||||||
|
|
||||||
First, ensure you are [registered with the sync server](#register) and make a
|
|
||||||
note of your key. You can see this with `atuin key`.
|
|
||||||
|
|
||||||
Then, install Atuin on a new machine. Once installed, login with
|
|
||||||
|
|
||||||
```
|
|
||||||
atuin login -u <USERNAME>
|
|
||||||
```
|
|
||||||
|
|
||||||
You will be prompted for your password, and for your key.
|
|
||||||
|
|
||||||
Syncing will happen automatically in the background, but you may wish to run it manually with
|
|
||||||
|
|
||||||
```
|
|
||||||
atuin sync
|
|
||||||
```
|
|
||||||
|
|
||||||
Or, if you see missing data, force a full sync with:
|
|
||||||
|
|
||||||
```
|
|
||||||
atuin sync -f
|
|
||||||
```
|
|
||||||
|
|
||||||
## 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](https://api.atuin.sh/img/ellie.png?token=0722830c382b42777bdb652da5b71efb61d8d387)
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
## Known issues
|
|
||||||
- SQLite has some issues with ZFS in certain configurations. As Atuin uses SQLite, this may cause your shell to become slow! We have an [issue](https://github.com/atuinsh/atuin/issues/952) to track, with some workarounds
|
|
||||||
- SQLite also does not tend to like network filesystems (eg, NFS)
|
|
@ -1,22 +0,0 @@
|
|||||||
# Integrations
|
|
||||||
|
|
||||||
## zsh-autosuggestions
|
|
||||||
|
|
||||||
Atuin automatically adds itself as an [autosuggest strategy](https://github.com/zsh-users/zsh-autosuggestions#suggestion-strategy).
|
|
||||||
|
|
||||||
If you'd like to override this, add your own config after "$(atuin init zsh)" in your zshrc.
|
|
||||||
|
|
||||||
## ble.sh auto-complete (Bash)
|
|
||||||
|
|
||||||
If ble.sh is available when Atuin's integration is loaded in Bash, Atuin automatically defines and registers an auto-complete source for the autosuggestion feature of ble.sh.
|
|
||||||
|
|
||||||
If you'd like to change the behavior, please overwrite the shell function `ble/complete/auto-complete/source:atuin-history` after `eval "$(atuin init bash)"` in your `.bashrc`.
|
|
||||||
|
|
||||||
If you would not like Atuin's auto-complete source, please add the following setting after `eval "$(atuin init bash)"` in your `.bashrc`:
|
|
||||||
|
|
||||||
```shell
|
|
||||||
# bashrc (after eval "$(atuin init bash)")
|
|
||||||
|
|
||||||
ble/util/import/eval-after-load core-complete '
|
|
||||||
ble/array#remove _ble_complete_auto_source atuin-history'
|
|
||||||
```
|
|
@ -1,161 +0,0 @@
|
|||||||
---
|
|
||||||
sidebar_position: 2
|
|
||||||
---
|
|
||||||
|
|
||||||
# Key binding
|
|
||||||
|
|
||||||
Atuin does not yet have full key binding customization, though we do allow some changes.
|
|
||||||
|
|
||||||
## Custom up arrow filter mode
|
|
||||||
|
|
||||||
It can be useful to use a different filter or search mode on the up arrow. For example, you could use ctrl-r for searching globally, but the up arrow for searching history from the current directory only.
|
|
||||||
|
|
||||||
Set your config like this:
|
|
||||||
|
|
||||||
```
|
|
||||||
filter_mode_shell_up_key_binding = "directory" # or global, host, directory, etc
|
|
||||||
```
|
|
||||||
|
|
||||||
## Disable up arrow
|
|
||||||
|
|
||||||
Our default up-arrow binding can be a bit contentious. Some people love it, some people hate it. Many people who found it a bit jarring at first have since come to love it, so give it a try!
|
|
||||||
|
|
||||||
It becomes much more powerful if you consider binding a different filter mode to the up arrow. For example, on "up" Atuin can default to searching all history for the current directory only, while ctrl-r searches history globally. See the [config](https://atuin.sh/docs/config/#filter_mode_shell_up_key_binding) for more.
|
|
||||||
|
|
||||||
Otherwise, if you don't like it, it's easy to disable.
|
|
||||||
|
|
||||||
You can also disable either the up-arrow or <kbd>Ctrl-r</kbd> bindings individually, by passing
|
|
||||||
`--disable-up-arrow` or `--disable-ctrl-r` to the call to `atuin init`:
|
|
||||||
|
|
||||||
```
|
|
||||||
# Bind ctrl-r but not up arrow
|
|
||||||
eval "$(atuin init zsh --disable-up-arrow)"
|
|
||||||
|
|
||||||
# Bind up-arrow but not ctrl-r
|
|
||||||
eval "$(atuin init zsh --disable-ctrl-r)"
|
|
||||||
```
|
|
||||||
|
|
||||||
If you do not want either key to be bound, either pass both `--disable` arguments, or set the
|
|
||||||
environment variable `ATUIN_NOBIND` to any value before the call to `atuin init`:
|
|
||||||
|
|
||||||
```
|
|
||||||
## Do not bind any keys
|
|
||||||
# Either:
|
|
||||||
eval "$(atuin init zsh --disable-up-arrow --disable-ctrl-r)"
|
|
||||||
|
|
||||||
# Or:
|
|
||||||
export ATUIN_NOBIND="true"
|
|
||||||
eval "$(atuin init zsh)"
|
|
||||||
```
|
|
||||||
|
|
||||||
You can then choose to bind Atuin if needed, do this after the call to init.
|
|
||||||
|
|
||||||
**Nushell Only**: The up-arrow keybinding is disabled by default for Nushell until [#1025](https://github.com/atuinsh/atuin/issues/1025) is resolved.
|
|
||||||
|
|
||||||
## <kbd>Ctrl-n</kbd> key shortcuts
|
|
||||||
|
|
||||||
macOS does not have an <kbd>Alt</kbd> key, although terminal emulators can often be configured to map the <kbd>Option</kbd> key to be used as <kbd>Alt</kbd>. *However*, remapping <kbd>Option</kbd> this way may prevent typing some characters, such as using <kbd>Option-3</kbd> to type `#` on the British English layout. For such a scenario, set the `ctrl_n_shortcuts` option to `true` in your config file to replace <kbd>Alt-0</kbd> to <kbd>Alt-9</kbd> shortcuts with <kbd>Ctrl-0</kbd> to <kbd>Ctrl-9</kbd> instead:
|
|
||||||
|
|
||||||
```
|
|
||||||
# Use Ctrl-0 .. Ctrl-9 instead of Alt-0 .. Alt-9 UI shortcuts
|
|
||||||
ctrl_n_shortcuts = true
|
|
||||||
```
|
|
||||||
|
|
||||||
## zsh
|
|
||||||
|
|
||||||
If you'd like to customize your bindings further, it's possible to do so with custom shell config:
|
|
||||||
|
|
||||||
Atuin defines the ZLE widget "\_atuin_search_widget"
|
|
||||||
|
|
||||||
```
|
|
||||||
export ATUIN_NOBIND="true"
|
|
||||||
eval "$(atuin init zsh)"
|
|
||||||
|
|
||||||
bindkey '^r' _atuin_search_widget
|
|
||||||
|
|
||||||
# depends on terminal mode
|
|
||||||
bindkey '^[[A' _atuin_search_widget
|
|
||||||
bindkey '^[OA' _atuin_search_widget
|
|
||||||
```
|
|
||||||
|
|
||||||
## bash
|
|
||||||
|
|
||||||
```
|
|
||||||
export ATUIN_NOBIND="true"
|
|
||||||
eval "$(atuin init bash)"
|
|
||||||
|
|
||||||
# bind to ctrl-r, add any other bindings you want here too
|
|
||||||
bind -x '"\C-r": __atuin_history'
|
|
||||||
```
|
|
||||||
|
|
||||||
## fish
|
|
||||||
Edit key bindings in FISH shell by adding the following to ~/.config/fish/config.fish
|
|
||||||
|
|
||||||
```
|
|
||||||
set -gx ATUIN_NOBIND "true"
|
|
||||||
atuin init fish | source
|
|
||||||
|
|
||||||
# bind to ctrl-r in normal and insert mode, add any other bindings you want here too
|
|
||||||
bind \cr _atuin_search
|
|
||||||
bind -M insert \cr _atuin_search
|
|
||||||
```
|
|
||||||
|
|
||||||
Adding the useful alternative key binding of <kbd>CTRL-up</kbd> is tricky and determined by the terminals adherence to terminfo(5).
|
|
||||||
|
|
||||||
Conveniently FISH uses a command to capture keystrokes and advises you of the exact command to add for your specific terminal.
|
|
||||||
In your terminal, run `fish_key_reader` then punch the desired keystroke/s.
|
|
||||||
|
|
||||||
For example, in Gnome Terminal the output to <kbd>CTRL-upkey</kbd> is `bind \e\[1\;5A 'do something'`
|
|
||||||
|
|
||||||
So, adding this to the above sample, `bind \e\[1\;5A _atuin_search` will provide the additional search keybinding.
|
|
||||||
|
|
||||||
## nu
|
|
||||||
|
|
||||||
```
|
|
||||||
$env.ATUIN_NOBIND = true
|
|
||||||
atuin init nu | save -f ~/.local/share/atuin/init.nu #make sure you created the directory beforehand with `mkdir ~/.local/share/atuin/init.nu`
|
|
||||||
source ~/.local/share/atuin/init.nu
|
|
||||||
|
|
||||||
#bind to ctrl-r in emacs, vi_normal and vi_insert modes, add any other bindings you want here too
|
|
||||||
$env.config = (
|
|
||||||
$env.config | upsert keybindings (
|
|
||||||
$env.config.keybindings
|
|
||||||
| append {
|
|
||||||
name: atuin
|
|
||||||
modifier: control
|
|
||||||
keycode: char_r
|
|
||||||
mode: [emacs, vi_normal, vi_insert]
|
|
||||||
event: { send: executehostcommand cmd: (_atuin_search_cmd) }
|
|
||||||
}
|
|
||||||
)
|
|
||||||
)
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
## Atuin UI shortcuts
|
|
||||||
|
|
||||||
| Shortcut | Action |
|
|
||||||
| ----------------------------------------- | ----------------------------------------------------------------------------- |
|
|
||||||
| enter | Execute selected item |
|
|
||||||
| tab | Select item and edit |
|
|
||||||
| ctrl + r | Cycle through filter modes |
|
|
||||||
| ctrl + s | Cycle through search modes |
|
|
||||||
| alt + 1 to alt + 9 | Select item by the number located near it |
|
|
||||||
| ctrl + c / ctrl + d / ctrl + g / esc | Return original |
|
|
||||||
| ctrl + y | Copy selected item to clipboard |
|
|
||||||
| ctrl + ⬅︎ / alt + b | Move the cursor to the previous word |
|
|
||||||
| ctrl + ➡️ / alt + f | Move the cursor to the next word |
|
|
||||||
| ctrl + h / ctrl + b / ⬅︎ | Move the cursor to the left |
|
|
||||||
| ctrl + l / ctrl + f / ➡️ | Move the cursor to the right |
|
|
||||||
| ctrl + a / home | Move the cursor to the start of the line |
|
|
||||||
| ctrl + e / end | Move the cursor to the end of the line |
|
|
||||||
| ctrl + backspace / ctrl + alt + backspace | Remove the previous word / remove the word just before the cursor |
|
|
||||||
| ctrl + delete / ctrl + alt + delete | Remove the next word or the word just after the cursor |
|
|
||||||
| ctrl + w | Remove the word before the cursor even if it spans across the word boundaries |
|
|
||||||
| ctrl + u | Clear the current line |
|
|
||||||
| ctrl + n / ctrl + j / ⬆ | Select the next item on the list |
|
|
||||||
| ctrl + p / ctrl + k / ⬇ | Select the previous item on the list |
|
|
||||||
| page down | Scroll search results one page down |
|
|
||||||
| page up | Scroll search results one page up |
|
|
||||||
| ⬇ (with no entry selected) | Return original or return query depending on settings |
|
|
||||||
| ⬇ | Select the next item on the list |
|
|
@ -1,90 +0,0 @@
|
|||||||
# Docker
|
|
||||||
|
|
||||||
There is a supplied docker image to make deploying a server as a container easier.
|
|
||||||
|
|
||||||
```sh
|
|
||||||
docker run -d -v "$HOME/.config/atuin:/config" ghcr.io/atuinsh/atuin:latest server start
|
|
||||||
```
|
|
||||||
|
|
||||||
# Docker Compose
|
|
||||||
|
|
||||||
Using the already build docker image hosting your own Atuin can be done using the supplied docker-compose file.
|
|
||||||
|
|
||||||
Create a `.env` file next to `docker-compose.yml` with contents like this:
|
|
||||||
|
|
||||||
```
|
|
||||||
ATUIN_DB_USERNAME=atuin
|
|
||||||
# Choose your own secure password
|
|
||||||
ATUIN_DB_PASSWORD=really-insecure
|
|
||||||
```
|
|
||||||
|
|
||||||
Create a `docker-compose.yml`:
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
version: '3.5'
|
|
||||||
services:
|
|
||||||
atuin:
|
|
||||||
restart: always
|
|
||||||
image: ghcr.io/atuinsh/atuin:latest
|
|
||||||
command: server start
|
|
||||||
volumes:
|
|
||||||
- "./config:/config"
|
|
||||||
links:
|
|
||||||
- postgresql:db
|
|
||||||
ports:
|
|
||||||
- 8888:8888
|
|
||||||
environment:
|
|
||||||
ATUIN_HOST: "0.0.0.0"
|
|
||||||
ATUIN_OPEN_REGISTRATION: "true"
|
|
||||||
ATUIN_DB_URI: postgres://$ATUIN_DB_USERNAME:$ATUIN_DB_PASSWORD@db/atuin
|
|
||||||
postgresql:
|
|
||||||
image: postgres:14
|
|
||||||
restart: unless-stopped
|
|
||||||
volumes: # Don't remove permanent storage for index database files!
|
|
||||||
- "./database:/var/lib/postgresql/data/"
|
|
||||||
environment:
|
|
||||||
POSTGRES_USER: $ATUIN_DB_USERNAME
|
|
||||||
POSTGRES_PASSWORD: $ATUIN_DB_PASSWORD
|
|
||||||
POSTGRES_DB: atuin
|
|
||||||
```
|
|
||||||
|
|
||||||
Start the services using `docker-compose`:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
docker-compose up -d
|
|
||||||
```
|
|
||||||
|
|
||||||
## Using systemd to manage your atuin server
|
|
||||||
|
|
||||||
The following `systemd` unit file to manage your `docker-compose` managed service:
|
|
||||||
|
|
||||||
```
|
|
||||||
[Unit]
|
|
||||||
Description=Docker Compose Atuin Service
|
|
||||||
Requires=docker.service
|
|
||||||
After=docker.service
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
# Where the docker-compose file is located
|
|
||||||
WorkingDirectory=/srv/atuin-server
|
|
||||||
ExecStart=/usr/bin/docker-compose up
|
|
||||||
ExecStop=/usr/bin/docker-compose down
|
|
||||||
TimeoutStartSec=0
|
|
||||||
Restart=on-failure
|
|
||||||
StartLimitBurst=3
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=multi-user.target
|
|
||||||
```
|
|
||||||
|
|
||||||
Start and enable the service with:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
systemctl enable --now atuin
|
|
||||||
```
|
|
||||||
|
|
||||||
Check if its running with:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
systemctl status atuin
|
|
||||||
```
|
|
@ -1,194 +0,0 @@
|
|||||||
# Kubernetes
|
|
||||||
|
|
||||||
You could host your own Atuin server using the Kubernetes platform.
|
|
||||||
|
|
||||||
Create a [`secrets.yaml`](../../../k8s/secrets.yaml) file for the database credentials:
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
apiVersion: v1
|
|
||||||
kind: Secret
|
|
||||||
metadata:
|
|
||||||
name: atuin-secrets
|
|
||||||
type: Opaque
|
|
||||||
stringData:
|
|
||||||
ATUIN_DB_USERNAME: atuin
|
|
||||||
ATUIN_DB_PASSWORD: seriously-insecure
|
|
||||||
ATUIN_HOST: "127.0.0.1"
|
|
||||||
ATUIN_PORT: "8888"
|
|
||||||
ATUIN_OPEN_REGISTRATION: "true"
|
|
||||||
ATUIN_DB_URI: "postgres://atuin:seriously-insecure@localhost/atuin"
|
|
||||||
immutable: true
|
|
||||||
```
|
|
||||||
|
|
||||||
Create a [`atuin.yaml`](../../../k8s/atuin.yaml) file for the Atuin server:
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
---
|
|
||||||
apiVersion: apps/v1
|
|
||||||
kind: Deployment
|
|
||||||
metadata:
|
|
||||||
name: atuin
|
|
||||||
spec:
|
|
||||||
replicas: 1
|
|
||||||
selector:
|
|
||||||
matchLabels:
|
|
||||||
io.kompose.service: atuin
|
|
||||||
template:
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
io.kompose.service: atuin
|
|
||||||
spec:
|
|
||||||
containers:
|
|
||||||
- args:
|
|
||||||
- server
|
|
||||||
- start
|
|
||||||
env:
|
|
||||||
- name: ATUIN_DB_URI
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: atuin-secrets
|
|
||||||
key: ATUIN_DB_URI
|
|
||||||
optional: false
|
|
||||||
- name: ATUIN_HOST
|
|
||||||
value: 0.0.0.0
|
|
||||||
- name: ATUIN_PORT
|
|
||||||
value: "8888"
|
|
||||||
- name: ATUIN_OPEN_REGISTRATION
|
|
||||||
value: "true"
|
|
||||||
image: ghcr.io/atuinsh/atuin:latest
|
|
||||||
name: atuin
|
|
||||||
ports:
|
|
||||||
- containerPort: 8888
|
|
||||||
resources:
|
|
||||||
limits:
|
|
||||||
cpu: 250m
|
|
||||||
memory: 1Gi
|
|
||||||
requests:
|
|
||||||
cpu: 250m
|
|
||||||
memory: 1Gi
|
|
||||||
volumeMounts:
|
|
||||||
- mountPath: /config
|
|
||||||
name: atuin-claim0
|
|
||||||
- name: postgresql
|
|
||||||
image: postgres:14
|
|
||||||
ports:
|
|
||||||
- containerPort: 5432
|
|
||||||
env:
|
|
||||||
- name: POSTGRES_DB
|
|
||||||
value: atuin
|
|
||||||
- name: POSTGRES_PASSWORD
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: atuin-secrets
|
|
||||||
key: ATUIN_DB_PASSWORD
|
|
||||||
optional: false
|
|
||||||
- name: POSTGRES_USER
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: atuin-secrets
|
|
||||||
key: ATUIN_DB_USERNAME
|
|
||||||
optional: false
|
|
||||||
resources:
|
|
||||||
limits:
|
|
||||||
cpu: 250m
|
|
||||||
memory: 1Gi
|
|
||||||
requests:
|
|
||||||
cpu: 250m
|
|
||||||
memory: 1Gi
|
|
||||||
volumeMounts:
|
|
||||||
- mountPath: /var/lib/postgresql/data/
|
|
||||||
name: database
|
|
||||||
volumes:
|
|
||||||
- name: database
|
|
||||||
persistentVolumeClaim:
|
|
||||||
claimName: database
|
|
||||||
- name: atuin-claim0
|
|
||||||
persistentVolumeClaim:
|
|
||||||
claimName: atuin-claim0
|
|
||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: Service
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
io.kompose.service: atuin
|
|
||||||
name: atuin
|
|
||||||
spec:
|
|
||||||
type: NodePort
|
|
||||||
ports:
|
|
||||||
- name: "8888"
|
|
||||||
port: 8888
|
|
||||||
nodePort: 30530
|
|
||||||
selector:
|
|
||||||
io.kompose.service: atuin
|
|
||||||
---
|
|
||||||
kind: PersistentVolume
|
|
||||||
apiVersion: v1
|
|
||||||
metadata:
|
|
||||||
name: database-pv
|
|
||||||
labels:
|
|
||||||
app: database
|
|
||||||
type: local
|
|
||||||
spec:
|
|
||||||
storageClassName: manual
|
|
||||||
capacity:
|
|
||||||
storage: 300Mi
|
|
||||||
accessModes:
|
|
||||||
- ReadWriteOnce
|
|
||||||
hostPath:
|
|
||||||
path: "/Users/firstname.lastname/.kube/database"
|
|
||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: PersistentVolumeClaim
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
io.kompose.service: database
|
|
||||||
name: database
|
|
||||||
spec:
|
|
||||||
storageClassName: manual
|
|
||||||
accessModes:
|
|
||||||
- ReadWriteOnce
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
storage: 300Mi
|
|
||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: PersistentVolumeClaim
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
io.kompose.service: atuin-claim0
|
|
||||||
name: atuin-claim0
|
|
||||||
spec:
|
|
||||||
accessModes:
|
|
||||||
- ReadWriteOnce
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
storage: 10Mi
|
|
||||||
```
|
|
||||||
|
|
||||||
Finally, you may want to use a separate namespace for atuin, by creating a [`namespaces.yaml`](../../../k8s/namespaces.yaml) file:
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
apiVersion: v1
|
|
||||||
kind: Namespace
|
|
||||||
metadata:
|
|
||||||
name: atuin-namespace
|
|
||||||
labels:
|
|
||||||
name: atuin
|
|
||||||
```
|
|
||||||
|
|
||||||
Note that this configuration will store the database folder _outside_ the kubernetes cluster, in the folder `/Users/firstname.lastname/.kube/database` of the host system by configuring the `storageClassName` to be `manual`. In a real enterprise setup, you would probably want to store the database content permanently in the cluster, and not in the host system.
|
|
||||||
|
|
||||||
You should also change the password string in `ATUIN_DB_PASSWORD` and `ATUIN_DB_URI` in the`secrets.yaml` file to a more secure one.
|
|
||||||
|
|
||||||
The atuin service on the port `30530` of the host system. That is configured by the `nodePort` property. Kubernetes has a strict rule that you are not allowed to expose a port numbered lower than 30000. To make the clients work, you can simply set the port in in your `config.toml` file, e.g. `sync_address = "http://192.168.1.10:30530"`.
|
|
||||||
|
|
||||||
Deploy the Atuin server using `kubectl`:
|
|
||||||
|
|
||||||
```shell
|
|
||||||
kubectl apply -f ./namespaces.yaml
|
|
||||||
kubectl apply -n atuin-namespace \
|
|
||||||
-f ./secrets.yaml \
|
|
||||||
-f ./atuin.yaml
|
|
||||||
```
|
|
||||||
|
|
||||||
The sample files above are also in the [k8s](../../../k8s/) folder of the atuin repository.
|
|
@ -1,52 +0,0 @@
|
|||||||
---
|
|
||||||
title: Self Hosting
|
|
||||||
---
|
|
||||||
|
|
||||||
While we offer a public sync server, and cannot view your data (as it is encrypted), you may still wish to self host your own Atuin sync server.
|
|
||||||
|
|
||||||
The requirements to do so are pretty minimal! You need to be able to run a binary or docker container, and have a PostgreSQL database setup. Atuin requires PostgreSQL 14 or above.
|
|
||||||
|
|
||||||
## Configuration
|
|
||||||
|
|
||||||
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:
|
|
||||||
|
|
||||||
```toml
|
|
||||||
host = "0.0.0.0"
|
|
||||||
port = 8888
|
|
||||||
open_registration = true
|
|
||||||
db_uri="postgres://user:password@hostname/database"
|
|
||||||
```
|
|
||||||
|
|
||||||
Alternatively, configuration can also be provided with environment variables.
|
|
||||||
|
|
||||||
```sh
|
|
||||||
ATUIN_HOST="0.0.0.0"
|
|
||||||
ATUIN_PORT=8888
|
|
||||||
ATUIN_OPEN_REGISTRATION=true
|
|
||||||
ATUIN_DB_URI="postgres://user:password@hostname/database"
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
| Parameter | Description |
|
|
||||||
| ------------------- | ----------------------------------------------------------------------------- |
|
|
||||||
| `host` | The host to listen on (default: 127.0.0.1) |
|
|
||||||
| `port` | The TCP port to listen on (default: 8888) |
|
|
||||||
| `open_registration` | If `true`, accept new user registrations (default: false) |
|
|
||||||
| `db_uri` | A valid PostgreSQL URI, for saving history (default: false) |
|
|
||||||
| `path` | A path to prepend to all routes of the server (default: false) |
|
|
||||||
|
|
||||||
### TLS
|
|
||||||
|
|
||||||
The server supports TLS through the `[tls]` section:
|
|
||||||
|
|
||||||
```toml
|
|
||||||
[tls]
|
|
||||||
enabled = true
|
|
||||||
cert_path = "/path/to/letsencrypt/live/fully.qualified.domain/fullchain.pem"
|
|
||||||
pkey_path = "/path/to/letsencrypt/live/fully.qualified.domain/privkey.pem"
|
|
||||||
```
|
|
||||||
|
|
@ -1,123 +0,0 @@
|
|||||||
// @ts-check
|
|
||||||
// Note: type annotations allow type checking and IDEs autocompletion
|
|
||||||
|
|
||||||
const lightCodeTheme = require('prism-react-renderer/themes/github');
|
|
||||||
const darkCodeTheme = require('prism-react-renderer/themes/dracula');
|
|
||||||
|
|
||||||
/** @type {import('@docusaurus/types').Config} */
|
|
||||||
const config = {
|
|
||||||
title: 'Atuin',
|
|
||||||
tagline: 'Magical shell history 🐢✨',
|
|
||||||
favicon: 'img/favicon.ico',
|
|
||||||
|
|
||||||
// Set the production url of your site here
|
|
||||||
url: 'https://atuin.sh',
|
|
||||||
// Set the /<baseUrl>/ pathname under which your site is served
|
|
||||||
// For GitHub pages deployment, it is often '/<projectName>/'
|
|
||||||
baseUrl: '/docs/',
|
|
||||||
|
|
||||||
// GitHub pages deployment config.
|
|
||||||
// If you aren't using GitHub pages, you don't need these.
|
|
||||||
organizationName: 'atuinsh', // Usually your GitHub org/user name.
|
|
||||||
projectName: 'atuin', // Usually your repo name.
|
|
||||||
|
|
||||||
onBrokenLinks: 'warn',
|
|
||||||
onBrokenMarkdownLinks: 'warn',
|
|
||||||
|
|
||||||
// Even if you don't use internalization, you can use this field to set useful
|
|
||||||
// metadata like html lang. For example, if your site is Chinese, you may want
|
|
||||||
// to replace "en" with "zh-Hans".
|
|
||||||
i18n: {
|
|
||||||
defaultLocale: 'en',
|
|
||||||
locales: ['en'],
|
|
||||||
},
|
|
||||||
|
|
||||||
plugins: [],
|
|
||||||
|
|
||||||
presets: [
|
|
||||||
[
|
|
||||||
'classic',
|
|
||||||
/** @type {import('@docusaurus/preset-classic').Options} */
|
|
||||||
({
|
|
||||||
docs: {
|
|
||||||
routeBasePath: '/',
|
|
||||||
sidebarPath: require.resolve('./sidebars.js'),
|
|
||||||
// Please change this to your repo.
|
|
||||||
// Remove this to remove the "edit this page" links.
|
|
||||||
editUrl:
|
|
||||||
'https://github.com/atuinsh/atuin/tree/main/docs/',
|
|
||||||
},
|
|
||||||
blog: {
|
|
||||||
showReadingTime: true,
|
|
||||||
// Please change this to your repo.
|
|
||||||
// Remove this to remove the "edit this page" links.
|
|
||||||
editUrl:
|
|
||||||
'https://github.com/atuinsh/atuin/tree/main/docs/',
|
|
||||||
},
|
|
||||||
theme: {
|
|
||||||
customCss: require.resolve('./src/css/custom.css'),
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
],
|
|
||||||
],
|
|
||||||
|
|
||||||
themeConfig:
|
|
||||||
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
|
|
||||||
({
|
|
||||||
// Replace with your project's social card
|
|
||||||
navbar: {
|
|
||||||
logo: {
|
|
||||||
href: "https://atuin.sh",
|
|
||||||
src: "/img/atuin.png"
|
|
||||||
}
|
|
||||||
|
|
||||||
},
|
|
||||||
footer: {
|
|
||||||
style: 'dark',
|
|
||||||
links: [
|
|
||||||
{
|
|
||||||
title: 'Docs',
|
|
||||||
items: [
|
|
||||||
{
|
|
||||||
label: 'Setup',
|
|
||||||
to: '/docs/guide/',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: 'Community',
|
|
||||||
items: [
|
|
||||||
{
|
|
||||||
label: 'Discord',
|
|
||||||
href: 'https://discord.gg/Fq8bJSKPHh'
|
|
||||||
}
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: 'More',
|
|
||||||
items: [
|
|
||||||
{
|
|
||||||
label: 'Blog',
|
|
||||||
to: '/blog',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: 'GitHub',
|
|
||||||
href: 'https://github.com/atuinsh/atuin',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: 'Twitter',
|
|
||||||
href: 'https://twitter.com/atuinsh'
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
copyright: `Copyright © ${new Date().getFullYear()} Atuin.`,
|
|
||||||
},
|
|
||||||
prism: {
|
|
||||||
theme: lightCodeTheme,
|
|
||||||
darkTheme: darkCodeTheme,
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
};
|
|
||||||
|
|
||||||
module.exports = config;
|
|
12844
docs/package-lock.json
generated
@ -1,46 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "docs",
|
|
||||||
"version": "0.0.0",
|
|
||||||
"private": true,
|
|
||||||
"scripts": {
|
|
||||||
"docusaurus": "docusaurus",
|
|
||||||
"start": "docusaurus start",
|
|
||||||
"build": "docusaurus build",
|
|
||||||
"swizzle": "docusaurus swizzle",
|
|
||||||
"deploy": "docusaurus deploy",
|
|
||||||
"clear": "docusaurus clear",
|
|
||||||
"serve": "docusaurus serve",
|
|
||||||
"write-translations": "docusaurus write-translations",
|
|
||||||
"write-heading-ids": "docusaurus write-heading-ids"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"@docusaurus/core": "2.3.1",
|
|
||||||
"@docusaurus/preset-classic": "2.3.1",
|
|
||||||
"@mdx-js/react": "^1.6.22",
|
|
||||||
"autoprefixer": "^10.4.13",
|
|
||||||
"clsx": "^1.2.1",
|
|
||||||
"postcss": "^8.4.21",
|
|
||||||
"prism-react-renderer": "^1.3.5",
|
|
||||||
"react": "^17.0.2",
|
|
||||||
"react-dom": "^17.0.2",
|
|
||||||
"tailwindcss": "^3.2.7"
|
|
||||||
},
|
|
||||||
"devDependencies": {
|
|
||||||
"@docusaurus/module-type-aliases": "2.3.1"
|
|
||||||
},
|
|
||||||
"browserslist": {
|
|
||||||
"production": [
|
|
||||||
">0.5%",
|
|
||||||
"not dead",
|
|
||||||
"not op_mini all"
|
|
||||||
],
|
|
||||||
"development": [
|
|
||||||
"last 1 chrome version",
|
|
||||||
"last 1 firefox version",
|
|
||||||
"last 1 safari version"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=16.14"
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,33 +0,0 @@
|
|||||||
/**
|
|
||||||
* Creating a sidebar enables you to:
|
|
||||||
- create an ordered group of docs
|
|
||||||
- render a sidebar for each doc of that group
|
|
||||||
- provide next/previous navigation
|
|
||||||
|
|
||||||
The sidebars can be generated from the filesystem, or explicitly defined here.
|
|
||||||
|
|
||||||
Create as many sidebars as you want.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// @ts-check
|
|
||||||
|
|
||||||
/** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */
|
|
||||||
const sidebars = {
|
|
||||||
// By default, Docusaurus generates a sidebar from the docs folder structure
|
|
||||||
tutorialSidebar: [{ type: 'autogenerated', dirName: '.' }],
|
|
||||||
|
|
||||||
// But you can create a sidebar manually
|
|
||||||
/*
|
|
||||||
tutorialSidebar: [
|
|
||||||
'intro',
|
|
||||||
'hello',
|
|
||||||
{
|
|
||||||
type: 'category',
|
|
||||||
label: 'Tutorial',
|
|
||||||
items: ['tutorial-basics/create-a-document'],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
*/
|
|
||||||
};
|
|
||||||
|
|
||||||
module.exports = sidebars;
|
|
@ -1,70 +0,0 @@
|
|||||||
import React from 'react';
|
|
||||||
import clsx from 'clsx';
|
|
||||||
import styles from './styles.module.css';
|
|
||||||
|
|
||||||
const FeatureList = [
|
|
||||||
{
|
|
||||||
title: 'History sync',
|
|
||||||
description: (
|
|
||||||
<>
|
|
||||||
<ul>
|
|
||||||
<li>Sync your shell history to all of your machines, wherever they are</li>
|
|
||||||
<li>End-to-end encrypted - nobody can see your data but you</li>
|
|
||||||
<li>Securely backed up - never lose your history</li>
|
|
||||||
<li>Easily handles decades of history</li>
|
|
||||||
</ul>
|
|
||||||
</>
|
|
||||||
),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: 'Speedy search',
|
|
||||||
description: (
|
|
||||||
<>
|
|
||||||
<ul>
|
|
||||||
<li>Full text or fuzzy search over your shell history</li>
|
|
||||||
<li>Configurable search method - fuzzy, prefix, etc</li>
|
|
||||||
<li>Easily search and filter by session, directory, or machine</li>
|
|
||||||
<li>Powerful command line search for integration with other tools</li>
|
|
||||||
<li>Written in Rust, so it's fast <em>and</em> safe 🦀</li>
|
|
||||||
</ul>
|
|
||||||
</>
|
|
||||||
),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: 'Extra context',
|
|
||||||
description: (
|
|
||||||
<>
|
|
||||||
<ul>
|
|
||||||
<li>History stored in a SQLite DB, making stats and analysis easy</li>
|
|
||||||
<li>Log exit code, directory, hostname, session, command duration, etc</li>
|
|
||||||
<li>Import existing history from a number of shells or history tools</li>
|
|
||||||
</ul>
|
|
||||||
</>
|
|
||||||
),
|
|
||||||
},
|
|
||||||
];
|
|
||||||
|
|
||||||
function Feature({ Svg, title, description }) {
|
|
||||||
return (
|
|
||||||
<div className={clsx('col col--4', styles.whatisfeatureblock)}>
|
|
||||||
<div className={"padding-horiz--md", styles.whatisfeature}>
|
|
||||||
<h3>{title}</h3>
|
|
||||||
<p>{description}</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
export default function HomepageFeatures() {
|
|
||||||
return (
|
|
||||||
<section className={styles.features}>
|
|
||||||
<div className={"container"}>
|
|
||||||
<div className="row">
|
|
||||||
{FeatureList.map((props, idx) => (
|
|
||||||
<Feature key={idx} {...props} />
|
|
||||||
))}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
);
|
|
||||||
}
|
|
@ -1,27 +0,0 @@
|
|||||||
.features {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
padding: 2rem 0;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.featureSvg {
|
|
||||||
height: 200px;
|
|
||||||
width: 200px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.whatisfeature {
|
|
||||||
background-color: var(--ifm-hero-background-color);
|
|
||||||
padding: 2rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@media screen and (max-width: 996px) {
|
|
||||||
.whatisfeatureblock {
|
|
||||||
margin-top: 2rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.features {
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,40 +0,0 @@
|
|||||||
/**
|
|
||||||
* Any CSS included here will be global. The classic template
|
|
||||||
* bundles Infima by default. Infima is a CSS framework designed to
|
|
||||||
* work well for content-centric websites.
|
|
||||||
*/
|
|
||||||
|
|
||||||
@tailwind base;
|
|
||||||
@tailwind components;
|
|
||||||
@tailwind utilities;
|
|
||||||
|
|
||||||
/* You can override the default Infima variables here. */
|
|
||||||
:root {
|
|
||||||
--ifm-color-primary: #2e8555;
|
|
||||||
--ifm-color-primary-dark: #29784c;
|
|
||||||
--ifm-color-primary-darker: #277148;
|
|
||||||
--ifm-color-primary-darkest: #205d3b;
|
|
||||||
--ifm-color-primary-light: #33925d;
|
|
||||||
--ifm-color-primary-lighter: #359962;
|
|
||||||
--ifm-color-primary-lightest: #3cad6e;
|
|
||||||
--ifm-code-font-size: 95%;
|
|
||||||
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.1);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* For readability concerns, you should choose a lighter palette in dark mode. */
|
|
||||||
[data-theme='dark'] {
|
|
||||||
--ifm-color-primary: #25c2a0;
|
|
||||||
--ifm-color-primary-dark: #21af90;
|
|
||||||
--ifm-color-primary-darker: #1fa588;
|
|
||||||
--ifm-color-primary-darkest: #1a8870;
|
|
||||||
--ifm-color-primary-light: #29d5b0;
|
|
||||||
--ifm-color-primary-lighter: #32d8b4;
|
|
||||||
--ifm-color-primary-lightest: #4fddbf;
|
|
||||||
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.3);
|
|
||||||
}
|
|
||||||
|
|
||||||
.navbar__logo {
|
|
||||||
height: 50px;
|
|
||||||
position: absolute;
|
|
||||||
top: 4px;
|
|
||||||
}
|
|
@ -1,59 +0,0 @@
|
|||||||
/**
|
|
||||||
* CSS files with the .module.css suffix will be treated as CSS modules
|
|
||||||
* and scoped locally.
|
|
||||||
*/
|
|
||||||
|
|
||||||
.heroBanner {
|
|
||||||
padding: 4rem 0;
|
|
||||||
text-align: center;
|
|
||||||
position: relative;
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
.heroBanner h1 {
|
|
||||||
font-size: 3rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media screen and (max-width: 996px) {
|
|
||||||
.heroBanner {
|
|
||||||
padding: 2rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.whatis {
|
|
||||||
padding-top: 2rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.whatisfeatureblock {
|
|
||||||
margin-top: 2rem;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@media screen and (min-width: 996px) {
|
|
||||||
.whatis {
|
|
||||||
padding: 4rem;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.buttons {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.magical{
|
|
||||||
background-image: linear-gradient(90deg, rgb(79, 30, 218) 0%,rgb(104, 100, 218) 33%,rgb(35, 219, 162) 100%);
|
|
||||||
background-clip: text;
|
|
||||||
|
|
||||||
-webkit-background-clip: text;
|
|
||||||
-moz-background-clip: text;
|
|
||||||
-webkit-text-fill-color: transparent;
|
|
||||||
-moz-text-fill-color: transparent;
|
|
||||||
}
|
|
||||||
|
|
||||||
.whatis h1 {
|
|
||||||
font-size: 2em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.whatisfeature {
|
|
||||||
background-color: var(--ifm-hero-background-color);
|
|
||||||
}
|
|
@ -1,7 +0,0 @@
|
|||||||
---
|
|
||||||
title: Markdown page example
|
|
||||||
---
|
|
||||||
|
|
||||||
# Markdown page example
|
|
||||||
|
|
||||||
You don't need React to write simple standalone pages.
|
|
@ -1,11 +0,0 @@
|
|||||||
import React from 'react';
|
|
||||||
import Footer from '@theme-original/Footer';
|
|
||||||
|
|
||||||
export default function FooterWrapper(props) {
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<Footer {...props} />
|
|
||||||
<script defer data-domain="atuin.sh" src="https://plausible.io/js/script.js"></script>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
0
docs/static/.nojekyll
vendored
BIN
docs/static/img/activity-graph-example.png
vendored
Before Width: | Height: | Size: 58 KiB |
BIN
docs/static/img/atuin.png
vendored
Before Width: | Height: | Size: 42 KiB |
BIN
docs/static/img/encryption-og.jpg
vendored
Before Width: | Height: | Size: 114 KiB |
BIN
docs/static/img/favicon.ico
vendored
Before Width: | Height: | Size: 3.5 KiB |
BIN
docs/static/img/inline.png
vendored
Before Width: | Height: | Size: 84 KiB |
BIN
docs/static/img/preview.png
vendored
Before Width: | Height: | Size: 204 KiB |
BIN
docs/static/img/screenshot.png
vendored
Before Width: | Height: | Size: 197 KiB |
BIN
docs/static/img/stats.png
vendored
Before Width: | Height: | Size: 43 KiB |