# nodei

> Run script, then REPL it with automatically exported globals

Latest version **0.2.4** (published 2015-03-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install nodei
pnpm add nodei
yarn add nodei
bun add nodei
```

Provides the command `nodei`.

## 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.2.4 |
| Published | 2015-03-29 |
| First published | 2015-01-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Eugene Sharygin |
| Maintainers | eush77 |
| Keywords | repl, console, script, javascript, interactive, node, vm, export, global, object, scope |

## Links

- npm: https://www.npmjs.com/package/nodei
- Repository: https://github.com/eush77/nodei
- Issues: https://github.com/eush77/nodei/issues
- npm.io page: https://npm.io/package/nodei

## Dependencies (4)

- [object-diff](https://npm.io/package/object-diff.md) 0.0.1
- [require-for](https://npm.io/package/require-for.md) ^0.1.0
- [object-pairs](https://npm.io/package/object-pairs.md) ^0.1.0
- [object.assign](https://npm.io/package/object.assign.md) ^1.1.1

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 0.2.4 (latest) — 2015-03-29
- 0.2.2 — 2015-03-09
- 0.2.1 — 2015-03-09
- 0.2.0 — 2015-03-08
- 0.1.0 — 2015-01-24
- 0.0.2 — 2015-01-24

## README

[![npm](https://nodei.co/npm/nodei.png)](https://nodei.co/npm/nodei/)

# nodei

[![Build Status][travis-badge]][travis] [![Dependency Status][david-badge]][david]

`nodei` executes script files and exports global declarations into the REPL.

Supports modules and REPL commands.

[travis]: https://travis-ci.org/eush77/nodei
[travis-badge]: https://travis-ci.org/eush77/nodei.svg
[david]: https://david-dm.org/eush77/nodei
[david-badge]: https://david-dm.org/eush77/nodei.png

## Example

foo.js:

```js
var foo = 4;

var printFoo = function () {
  return foo;
};
```

nodei repl session:

```js
$ nodei foo.js
> foo
4
> printFoo()
4

/* Change foo.js. */

> .reload
> foo
6
```

## Commands

| Command        | Description
| :------------: | :----------
| `.reload`      | Reload the active JS file
| `.load %file%` | Load `%file%` into REPL, set it as a target for future .reloads

Yes, built-in `.load` is gone.

## CLI

```
nodei [<filename>]
```

## API

### `nodei([filename], [options])`

Start the REPL session, populate it with commands and load `filename`.

`options` are passed to [`repl.start`](https://iojs.org/api/repl.html#repl_repl_start_options) and can override defaults.

Return the REPL instance.

### Event: 'load(filename)'

Emitted when file is loaded via `.load` or `.reload`, or at startup.

## Install

```shell
npm install nodei -g
```

## License

MIT

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