Pronounced "bəvɛl".
bevel
harness and saved in a local SQLite database.bevel
CLI.bevel sync
.You can use the database however you like, but bevel
includes some nice general tools:
Using the cd
command, you can switch to a previously visited directory quickly:
cd $(bevel cd) # Or use the C-p binding
Bevel offers a replacement for the C-r
functionality of your shell.
$(bevel repeat) # Or use the C-r binding
Get yourself a copy of the Sqlite source code: sqlite3.c
.
Compile the bevel-gather
utility and put it on your path.
cd bevel-gather
musl-gcc \
-Wall -Wextra -pedantic -O2 -s -static -Wl,--gc-sections -Wl,--strip-all \
bevel-gather.c \
sqlite3.c \
-o $out/bin/bevel-gather
Install the harness.
For bash
, add this line to the end of your ~/.bashrc
:
source /path/to/bevel/bevel-harness/harness.bash
For zsh
, add this line to the end of your ~/.zshrc
:
source /path/to/bevel/bevel-harness/harness.zsh
Make sure you have Haskell's stack.
Install the bevel
CLI.
stack install bevel-cli
Install the bindings.
These bind C-p
to cd $(bevel cd)
and C-r
to $(bevel repeat)
.
For bash
, add this line to the end of your ~/.bashrc
:
source /path/to/bevel/bevel-harness/bindings.bash
For zsh
, add this line to the end of your ~/.zshrc
:
source /path/to/bevel/bevel-harness/bindings.zsh
Optional: Install the server: stack install bevel-api-server
.
stack install bevel-api-server
{ pkgs, lib, ... }:
with lib;
let
bevelModule =
builtins.fetchGit {
url = "https://github.com/NorfairKing/bevel";
rev = "0000000000000000000000000000000000000000"; # Put a recent commit hash here.
ref = "master";
} + "/nix/home-manager-module.nix";
in
{
imports = [
bevelModule
# [...]
];
programs.bevel = {
enable = true; # Make the CLI available
harness = {
bash = {
enable = true; # Gather history from bash
bindings = true; # Bind C-p and C-r
};
zsh = {
enable = true; # Gather history from zsh
bindings = true; # Bind C-p and C-r
};
};
sync = {
enable = true;
server-url = "YOURSERVERHERE";
username = "YOURUSERNAMEHERE";
password = "YOURPASSWORDHERE";
};
};
}
See nix/home-manager-module.nix
.
{ lib, pkgs, config, ... }:
let
bevel-production = (
import (
builtins.fetchGit {
url = "https://github.com/NorfairKing/bevel";
rev = "0000000000000000000000000000000000000000"; # Put a recent commit hash here.
ref = "master";
} + "/nix/nixos-module.nix"
) { envname = "production"; }
);
in
{
imports = [
bevel-production
];
config = {
services.bevel.production.api-server = {
enable = true;
api-server = {
enable = true;
log-level = "Warn";
hosts = [ "api.bevel.mydomain.com" ];
port = 8402;
local-backup = {
enable = true;
};
};
};
};
}
See nix/nixos-module.nix
.