# Command line tool for simple fixture loading

**URL:** <https://discuss.elastic.co/t/command-line-tool-for-simple-fixture-loading/102215>\
**Category:** Elastic Community and Ecosystem\
**Created:** [September 29, 2017, 6:49am UTC](https://discuss.elastic.co/t/command-line-tool-for-simple-fixture-loading/102215 "2017-09-29T06:49:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![toka](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/toka/32/15773_2.png) [@toka](https://discuss.elastic.co/u/toka)\
**Post date:** [September 29, 2017, 6:49am UTC](https://discuss.elastic.co/t/command-line-tool-for-simple-fixture-loading/102215/1 "2017-09-29T06:49:17Z")

</div>

Hi,

I want to share this tool that allows to clear and load fixtures easily in Elasticsearch, besides other index management.

Also can be used as a required module in your code (Node.js).

For example, with this `.json` file:

```auto
[{
  "name": "Dio",
  "standName": "The World",
  "age": 122
},{
  "name": "Jotaro",
  "standName": "Star Platinum",
  "age": 17
}]

```

The above documents can be indexed out-of-the-box with this command:

```auto
$ esfix load my_index my_type fixtures.json

```

Deleting the data is as simple as this:

```auto
$ esfix clear my_index my_type

```

For more details:

> **[toniov/es-fixtures](https://github.com/toniov/es-fixtures)**
>
> es-fixtures - esfix - Simple fixture loading for Elasticsearch on Node.js

Any feedback or use cases are appreciated!

---

<div class="post-metadata">

**Author:** ![dakrone](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dakrone/32/23351_2.png) [@dakrone](https://discuss.elastic.co/u/dakrone)\
**Post date:** [September 29, 2017, 3:28pm UTC](https://discuss.elastic.co/t/command-line-tool-for-simple-fixture-loading/102215/2 "2017-09-29T15:28:20Z")

</div>

❤ the Jojo's reference 😃

---

<div class="post-metadata">

**Author:** ![toka](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/toka/32/15773_2.png) [@toka](https://discuss.elastic.co/u/toka)\
**Post date:** [October 2, 2017, 2:41am UTC](https://discuss.elastic.co/t/command-line-tool-for-simple-fixture-loading/102215/3 "2017-10-02T02:41:05Z")

</div>

I'm glad someone realized 😛

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [October 30, 2017, 2:41am UTC](https://discuss.elastic.co/t/command-line-tool-for-simple-fixture-loading/102215/4 "2017-10-30T02:41:12Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
