2021-01-29 10:42:07 +08:00
# Elvish: Expressive Programming Language + Versatile Interactive Shell
2013-06-16 16:45:22 +08:00
2021-02-11 07:52:44 +08:00
[![CI status ](https://github.com/elves/elvish/workflows/CI/badge.svg )](https://github.com/elves/elvish/actions?query=workflow%3ACI)
2021-02-11 07:50:21 +08:00
[![FreeBSD test status ](https://img.shields.io/cirrus/github/elves/elvish?logo=Cirrus%20CI&label=freebsd&task=Test%20on%20FreeBSD )](https://cirrus-ci.com/github/elves/elvish/master)
[![gccgo test status ](https://img.shields.io/cirrus/github/elves/elvish?logo=Cirrus%20CI&label=gccgo&task=Test%20on%20gccgo )](https://cirrus-ci.com/github/elves/elvish/master)
2021-02-13 09:43:01 +08:00
[![Test Coverage ](https://img.shields.io/codecov/c/github/elves/elvish/master.svg?logo=Codecov&label=coverage )](https://app.codecov.io/gh/elves/elvish/branch/master)
2021-06-21 05:07:51 +08:00
[![Go Reference ](https://pkg.go.dev/badge/src.elv.sh@master.svg )](https://pkg.go.dev/src.elv.sh@master)
2021-06-09 06:01:28 +08:00
[![Go Report Card ](https://goreportcard.com/badge/src.elv.sh )](https://goreportcard.com/report/src.elv.sh)
2021-01-28 07:54:14 +08:00
[![Twitter ](https://img.shields.io/twitter/url/http/shields.io.svg?style=social )](https://twitter.com/ElvishShell)
2017-07-07 08:08:41 +08:00
2021-01-29 10:42:07 +08:00
Elvish is an expressive programming language and a versatile interactive shell,
combined into one seamless package. It runs on Linux, BSDs, macOS and Windows.
Despite its pre-1.0 status, it is already suitable for most daily interactive
use.
2018-10-10 17:45:06 +08:00
2020-04-03 08:30:21 +08:00
**Visit the official website https://elv.sh for prebuilt binaries, blog posts,
documentation and other resources.**
2018-10-10 17:45:06 +08:00
2021-02-18 18:57:54 +08:00
User groups (all connected thanks to [Matrix ](https://matrix.org )):
2018-10-10 17:45:06 +08:00
[![Gitter ](https://img.shields.io/badge/gitter-elves/elvish-blue.svg?logo=gitter-white )](https://gitter.im/elves/elvish)
[![Telegram Group ](https://img.shields.io/badge/telegram-@elvish-blue.svg )](https://telegram.me/elvish)
2021-05-30 21:14:10 +08:00
[![#elvish on libera.chat ](https://img.shields.io/badge/libera.chat-%23elvish-blue.svg )](https://web.libera.chat/#elvish)
2021-02-18 18:57:54 +08:00
[![#users:elves.sh ](https://img.shields.io/badge/matrix-%23users:elv.sh-blue.svg )](https://matrix.to/#/#users:elves.sh)
2018-10-10 00:45:37 +08:00
2018-10-22 03:44:01 +08:00
## Building Elvish
2021-02-11 22:58:44 +08:00
Most users do not need to build Elvish from source. Prebuilt binaries for the
latest commit are provided for
[Linux amd64 ](https://dl.elv.sh/linux-amd64/elvish-HEAD.tar.gz ),
[macOS amd64 ](https://dl.elv.sh/darwin-amd64/elvish-HEAD.tar.gz ),
2021-06-10 14:59:53 +08:00
[Windows amd64 ](https://dl.elv.sh/windows-amd64/elvish-HEAD.zip ) and
2021-02-11 22:58:44 +08:00
[many other platforms ](https://elv.sh/get ).
2020-03-26 09:29:19 +08:00
2020-01-14 22:49:32 +08:00
To build Elvish from source, you need
2018-10-22 03:44:01 +08:00
2021-06-10 14:59:53 +08:00
- A supported OS: Linux, {Free,Net,Open}BSD, macOS, or Windows 10.
2018-10-22 03:44:01 +08:00
2021-06-10 14:59:53 +08:00
**NOTE** : Windows 10 support is experimental.
2018-10-22 03:44:01 +08:00
2021-08-23 06:40:48 +08:00
- Go >= 1.15.
2018-10-22 03:44:01 +08:00
2020-01-14 22:49:32 +08:00
To build Elvish from source, follow these steps:
2018-10-22 03:44:01 +08:00
```sh
2020-01-14 22:49:32 +08:00
# 1. Start from any directory you want to store Elvish's source code
# 2. Clone the Git repository
git clone https://github.com/elves/elvish
# 3. Change into the repository
cd elvish
# 4. Build and install Elvish
make get
2018-10-22 03:44:01 +08:00
```
2021-06-10 14:59:53 +08:00
This will install Elvish to `~/go/bin` (or `$GOPATH/bin` if you have set
`$GOPATH` ). You might want to add the directory to your `PATH` .
2020-01-14 22:49:32 +08:00
2021-06-10 14:59:53 +08:00
To install it elsewhere, override `ELVISH_MAKE_BIN` in the `make` command:
2018-10-22 03:44:01 +08:00
```sh
2021-06-10 14:59:53 +08:00
make get ELVISH_MAKE_BIN=./elvish # Install to the repo root
make get ELVISH_MAKE_BIN=/usr/local/bin/elvish # Install to /usr/local/bin
2018-10-22 03:44:01 +08:00
```
2021-06-21 05:01:16 +08:00
### Experimental plugin support
Elvish has experimental support for building and importing plugins, modules
written in Go.
However, since plugin support relies on dynamic linking, it is not enabled in
the official prebuilt binaries. You need to build Elvish from source, with
`ELVISH_PLUGIN_SUPPORT=1` :
2021-06-16 06:57:38 +08:00
```sh
2021-06-21 05:01:16 +08:00
make get ELVISH_PLUGIN_SUPPORT=1
2021-06-16 06:57:38 +08:00
```
2021-06-21 05:01:16 +08:00
To build a plugin, see this [example ](https://github.com/elves/sample-plugin ).
2021-02-11 22:58:44 +08:00
## Packaging Elvish
2020-01-14 22:49:32 +08:00
2021-02-11 22:58:44 +08:00
See [PACKAGING.md ](PACKAGING.md ) for notes for packagers.
2020-01-14 22:49:32 +08:00
## Contributing to Elvish
2018-10-22 03:44:01 +08:00
2021-02-11 22:58:44 +08:00
See [CONTRIBUTING.md ](CONTRIBUTING.md ) for notes for contributors.