# sol-repl

> Solidity REPL

Latest version **0.0.15** (published 2022-05-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install sol-repl
pnpm add sol-repl
yarn add sol-repl
bun add sol-repl
```

Provides the command `sol`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.15 |
| Published | 2022-05-07 |
| First published | 2022-04-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=12 |
| Dependencies | 5 |
| Unpacked size | 20.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Julian Eager |
| Maintainers | eagr |
| Keywords | solidity, repl, shell, ethereum |

## Links

- npm: https://www.npmjs.com/package/sol-repl
- Repository: https://github.com/eagr/sol-repl
- Homepage: https://github.com/eagr/sol-repl#readme
- Issues: https://github.com/eagr/sol-repl/issues
- npm.io page: https://npm.io/package/sol-repl

## Dependencies (5)

- [solc](https://npm.io/package/solc.md) 0.8.13
- [ethers](https://npm.io/package/ethers.md) ^5.6.2
- [ganache](https://npm.io/package/ganache.md) ^7.0.4
- [prettier](https://npm.io/package/prettier.md) 2.6.2
- [prettier-plugin-solidity](https://npm.io/package/prettier-plugin-solidity.md) ^1.0.0-beta.19

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 0.0.15 (latest) — 2022-05-07
- 0.0.14 — 2022-05-05
- 0.0.13 — 2022-04-27
- 0.0.12 — 2022-04-26
- 0.0.11 — 2022-04-26
- 0.0.10 — 2022-04-25
- 0.0.9 — 2022-04-23
- 0.0.8 — 2022-04-20
- 0.0.7 — 2022-04-20
- 0.0.6 — 2022-04-19
- 0.0.5 — 2022-04-15
- 0.0.4 — 2022-04-14
- 0.0.3 — 2022-04-13
- 0.0.2 — 2022-04-13
- 0.0.1 — 2022-04-12

## README

# sol-repl

a REPL to provide instant feedback for Solidity snippets

[Any bug reports or feature requests](https://github.com/eagr/sol-repl/issues/new) are appreciated.

## Features

* language
  * [x] constant
  * [x] contract
  * [x] enum
  * [x] function
  * [x] import
  * [x] interface
  * [x] library
  * [x] struct
  * [x] type
* REPL
  * [x] Node-like REPL interactions
  * [x] cursor/delete shortcuts
  * [x] history traversing
  * [x] history filtering
  * [x] `.session` print formatted Solidity source
  * [ ] `.editor` editor mode

## Install

```sh
npm i -g sol-repl
```

## Usage

```sh
$ sol
Welcome to Solidity v0.8.13!
Type ".help" for more information.
> .help
.exit       Exit the REPL
.help       Print this message
.session    Print current session
> enum Abc { a, b, c }
> type(Abc).max
2
> Abc c = Abc.c
2
> contract C {}
> msg.sender
0x4B6F0b9546487B1a184ADc43e0b17299cCdf8648
```

## Shortcuts

**cursor**

* <kbd>Alt+Left</kbd>   Cursor to previous word start
* <kbd>Alt+Right</kbd>  Cursor to next word end
* <kbd>Fn+Left</kbd>    Cursor to line start
* <kbd>Fn+Right</kbd>   Cursor to line end

**delete**

* <kbd>Alt+Del</kbd>    Delete to previous word bound from cursor
* <kbd>Ctrl+W</kbd>     Alias of Alt+Del
* <kbd>Ctrl+U</kbd>     Delete to line start from cursor

**interrupt**

* <kbd>Ctrl+C</kbd>     Clear line; signal an exit
* <kbd>Ctrl+D</kbd>     Immediately terminate REPL

## License

[MIT](./LICENSE)

---
_Source: https://npm.io/package/sol-repl · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
