elvish/website/home.md

3.7 KiB

Elvish (noun):

  1. A powerful scripting language.

  2. A shell with useful interactive features built-in.

  3. A statically linked binary for Linux, BSDs, macOS or Windows.

Powerful modern shell scripting

Write readable and maintainable scripts - no cryptic operators, no double-quoting every variable.

for x [*.jpg] {
  gm convert $x (str:trim-suffix $x .jpg).png
}

Power up your workflows with data structures and functional programming.

var hosts = [[&name=a &cmd='apt update']
             [&name=b &cmd='pacman -Syu']]
# peach = "parallel each"
peach {|h| ssh root@$h[name] $h[cmd] } $hosts

Catch errors before code executes.

~> var project = ~/project
~> rm -rf $projetc/bin
compilation error: variable $projetc not found

Run it anywhere

Elvish comes in a single statically linked binary for your laptop, your server, your PC, or your Raspberry Pi.

~> wget dl.elv.sh/linux-arm64/elvish-HEAD.tar.gz
~> tar -C /usr/local/bin -xvf elvish-HEAD.tar.gz
elvish
~> elvish

Use Elvish in your CI/CD pipelines. Convenient shell syntax and modern programming language - why not both?

steps:
  - uses: elves/setup-elvish@v1
    with:
      elvish-version: HEAD
  - name: Run something with Elvish
    shell: elvish {0}
    run: |
      echo Running Elvish $version      

Interactive shell with batteries included

Press Ctrl-L for directory history, and let Elvish find java/com/acme/project for you.

home/dir-history

Press Ctrl-R for command history. That beautiful ffmpeg command you crafted two months ago is still there.

home/cmd-history

Press Ctrl-N for the builtin file manager. Explore directories and files without leaving the comfort of your shell.

home/file-manager

Chat with the community

Join any of the following channels -- they are all bridged together thanks to Matrix!

More resources