# enodo

> A library of useful tools to work with Enodo

Latest version **0.0.5** (published 2026-03-04) · MIT license · 0 weekly downloads

## Install

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

Provides the command `enodo`.

## Health

**Score 50/100 (C)** — status: stable.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.0.5 |
| Published | 2026-03-04 |
| First published | 2023-07-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | >=16 |
| Dependencies | 7 |
| Unpacked size | 18.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Jerome Musialak |
| Maintainers | jeromemusialak, floriang7, enda |
| Keywords | cli, package, tools, enodo, iam, fs, butterfly |

## Links

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

## Dependencies (7)

- [axios](https://npm.io/package/axios.md) ^1.4.0
- [dotenv](https://npm.io/package/dotenv.md) ^16.3.1
- [lodash](https://npm.io/package/lodash.md) ^4.17.21
- [inquirer](https://npm.io/package/inquirer.md) ^9.2.8
- [minimist](https://npm.io/package/minimist.md) ^1.2.8
- [form-data](https://npm.io/package/form-data.md) ^4.0.0
- [jsonwebtoken](https://npm.io/package/jsonwebtoken.md) ^9.0.1

## Alternatives

- [unionfs](https://npm.io/package/unionfs.md) — 2.2M weekly downloads
- [path-starts-with](https://npm.io/package/path-starts-with.md) — 35.9K weekly downloads
- [redzip](https://npm.io/package/redzip.md) — 1.2K weekly downloads
- [vscode-anymatch](https://npm.io/package/vscode-anymatch.md) — 848 weekly downloads
- [@ledgerhq/coin-filecoin](https://npm.io/package/@ledgerhq/coin-filecoin.md) — 793 weekly downloads

## Recent versions

- 0.0.5 (latest) — 2026-03-04
- 0.0.4 — 2026-03-04
- 0.0.3 — 2023-07-17
- 0.0.2 — 2023-07-17
- 0.0.1 — 2023-07-17

## README

# Enodo ToolBox

A library of useful tools to work with Enodo


## Command-line interface

### Help

#### Show help

```bash
$ npx enodo --help
```


### Iam

#### Identify on Enodo

```bash
$ npx enodo iam identify
```

| Option    | Type     | Description                       |
| :-------- | :------- | :-------------------------------- |
| `username`| `string` | username used to create session   |
| `password`| `string` | password associated with username |


#### Get access_token and refresh if necessary

```bash
$ npx enodo iam getAccessToken
```

#### Read JSON Content of access_token stored in ~/.enodo

```bash
$ npx enodo iam readAccessToken
```


### FS

#### Upload a new file

```bash
$ npx enodo iam identify
```

| Option    | Type     | Description                       |
| :-------- | :------- | :-------------------------------- |
| `username`| `string` | username used to create session   |
| `password`| `string` | password associated with username |


## NPM Package

### Installation

Install Enodo Toolbox with npm

```bash
$ npm install --save enodo
```


### API Reference

#### uploadFile(token, file, [createdFrom=null])

Upload a new file to Enodo FS


##### Arguments

> ***token (String)***: Token used to authenticate query **(Required)**

> ***file (String)***: file path or buffer to upload **(Required)**

> ***createdFrom (String)***: Name of application used to upload file


##### Return
> ***JsonAPI Object (Object)*** : the resulting document object


##### Usage/Example

```javascript
import uploadFile from 'enodo/uploadFile';

const token = process.env.ACCESS_TOKEN;
const file = './demo-file.jpg';
const createdFrom = 'Demo;

uploadFile(token, file, createdFrom).then((result) => {
  console.log(result.data);
}).catch((error) => {
  console.error(error);
});
```


## To Do

### Iam

- [ ]  Endpoint to test a token: npx enodo iam test [token]


### Fs

- [ ]  Create a folder
- [ ]  Read a document through its id


### Butterfly

- [ ]  Create a new media
- [ ]  Create a new post
- [ ]  Patch post content (and fs document)
- [ ]  Search a post
- [ ]  Read a post throught its tuple (propertyId, postId)
- [ ]  Create a property (interactive)
  - [ ]  Enter name
  - [ ]  Select locale
  - [ ]  Select owner (me / organizations found in token, only if organizations.length)
  - [ ]  Create demo values? Y/n
  - [ ]  Create 'Tags' taxonomy? Y/n (if n to create demo values)


### Dev kit

- [ ] npx enodo create ./my-app
  - [ ] Retrieve properties informations through API
- [ ] npx enodo install
  - [ ] svelte-gtm
  - [ ] svelte-gam

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