# Start

> Run one script. Run elelem-shell.


## Install

```bash
curl -fsSL https://elelem.sh/install | sh
elelem-shell
```

Linux and macOS, x86_64 or arm64. Linux needs glibc 2.35 or newer, or musl.
It needs `curl` and `tar`, and `xz` on Linux. No compiler.

The script:

1. installs [rv](https://rv.dev), which provides Ruby 4.0,
2. installs `elelem-shell` under `~/.local/share/elelem` (or
   `$XDG_DATA_HOME/elelem`),
3. writes the `elelem-shell` command to `~/.local/bin` (or `$XDG_BIN_HOME`),
4. installs `elelem-llama`, and a model in `~/.agents/models/` linked as
   `default.gguf`.

The model is Qwen3.5-4B (`Qwen3.5-4B-Q4_K_M.gguf`, 2.7 GB).
Below 12 GiB of memory, Qwen3.5-2B (`Qwen3.5-2B-Q4_K_M.gguf`, 1.3 GB).
On musl Linux, the local model is x86_64 only.

```bash
curl -fsSL https://elelem.sh/install | ELELEM_NO_MODEL=1 sh
```

`ELELEM_NO_MODEL=1` skips the download. With `ELELEM_LOCAL=1`, the script
stops if `elelem-llama` does not install. Otherwise it warns and goes on.

Run the script again to upgrade.

### Windows

Install Ruby 4.0 from [RubyInstaller](https://rubyinstaller.org/). No
Devkit. Then, in PowerShell:

```powershell
gem install --no-document elelem-shell elelem-llama
mkdir $HOME\.agents\models
curl.exe -fL -o $HOME\.agents\models\Qwen3.5-4B-Q4_K_M.gguf https://huggingface.co/unsloth/Qwen3.5-4B-GGUF/resolve/e87f176479d0855a907a41277aca2f8ee7a09523/Qwen3.5-4B-Q4_K_M.gguf
$env:ELELEM_GGUF_MODEL = "$HOME\.agents\models\Qwen3.5-4B-Q4_K_M.gguf"
elelem-shell
```

- x64 only.
- `execute` runs commands in Git for Windows bash, or in `cmd` without it.
- The variable lasts until you close the window.
- CI runs the first four lines and a one-shot prompt. The interactive
  prompt is untested.

### With RubyGems

```bash
gem install elelem-shell
elelem-shell
```

This needs Ruby 4.0. Without `elelem-llama`, `elelem-shell` runs the
demo.

`elelem-shell` is elelem with [`elelem-tools`](https://elelem.sh/plugins/tools/),
[`elelem-mcp`](https://elelem.sh/plugins/mcp/) and [`elelem-skills`](https://elelem.sh/plugins/skills/)
loaded, and the provider gems installed. `gem install elelem` installs the
core alone; its `elelem` command uses `demo` unless you pass `-p`.

## Pick a provider

`elelem-shell` uses the first match:

| Set | Provider |
|---|---|
| `-p NAME` | `NAME` |
| `ELELEM_PROVIDER` | its value |
| `elelem-llama` installed | [`llama`](https://elelem.sh/plugins/llama/) |
| nothing | `demo` |

`llama` needs a model: `ELELEM_GGUF_MODEL`, `~/.agents/models/default.gguf`, or
the only `.gguf` file in `~/.agents/models/`. See
[Run a model locally](https://elelem.sh/guides/local-models/).

An API key never picks a provider. Name it:

```bash
export ANTHROPIC_API_KEY=sk-ant-...
elelem-shell -p anthropic
```

## Without a model

The `demo` provider has no model. It shows how a provider works: the
first line you type runs as a shell command, and a file name, or a path
that starts with `@`, is read instead.

```text
> ls
> README.md
> @notes.txt
```

## Make it yours

- `AGENTS.md` in your project tells the model how the project works.
- A Ruby file in `.agents/plugins/` adds a tool, a command, or a provider.
  See [Write a tool](https://elelem.sh/guides/write-a-tool/).
- Type `/reload` after an edit. No restart.

The same files in `~/.agents/` apply to every project:

```text
~/.agents/
  AGENTS.md
  models/
    default.gguf
  plugins/
    eval.rb
```

Keep it in your [dotfiles](https://dotfiles.github.io/).

## What you get

| Piece | Name |
|---|---|
| Tools | `read`, `write`, `execute` |
| Commands | `/help`, `/exit`, `/clear`, `/context`, `/tools`, `/provider`, `/reload` |
| One-shot | `elelem-shell "PROMPT"`, reads a pipe, writes stdout |

`elelem-shell` adds the tools and commands of
[`elelem-tools`](https://elelem.sh/plugins/tools/), which asks before `execute` runs a
command. With the core gem alone, `execute` runs any command the model
asks for, without asking.

## Uninstall

The script prints the command when it finishes. With the defaults:

```bash
rm -rf ~/.local/share/elelem ~/.local/bin/elelem-shell ~/.agents/models/default.gguf ~/.agents/models/Qwen3.5-4B-Q4_K_M.gguf
```

If `default.gguf` was yours before the script ran, leave it.

## When it breaks

```bash
ELELEM_LOG_LEVEL=debug ELELEM_LOG=- elelem-shell
```

elelem logs errors to `~/.local/state/elelem/elelem.log`, under
`$XDG_STATE_HOME` when set. `ELELEM_LOG_LEVEL=debug` adds every tool call
and result. `ELELEM_LOG=-` sends the log to stderr.


Canonical: https://elelem.sh/docs/start/

