# im-cli

> A command line tool to manage Import Maps

Latest version **1.0.2** (published 2023-04-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install im-cli
pnpm add im-cli
yarn add im-cli
bun add im-cli
```

Provides the command `im`.

## Health

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

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2023-04-01 |
| First published | 2023-04-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 12 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Beto Muniz |
| Maintainers | obetomuniz |

## Links

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

## Dependencies (2)

- [ora](https://npm.io/package/ora.md) ^6.3.0
- [axios](https://npm.io/package/axios.md) ^1.3.4

## Recent versions

- 1.0.2 (latest) — 2023-04-01
- 1.0.1 — 2023-04-01
- 1.0.0 — 2023-04-01

## README

# Import Maps Command Line Interface

A command-line utility for managing [JavaScript import maps](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script/type/importmap) dependencies.

<img width="80%" alt="Screenshot 2023-04-01 at 00 54 27" src="https://user-images.githubusercontent.com/1680157/229265234-f5120ec8-28cb-4cce-9303-444b076ec032.png">

This utility uses the [esm.sh](https://esm.sh) CDN to fetch package information and versions.

## Installation

To install `im-cli` globally, run the following command:

```bash
npm install -g im-cli
```

## Usage

```bash
im <command> [package-name] [@version]
```

## Commands

### Adding a package

To add a package called `lodash` to your import map JSON file, run:

```bash
im add lodash
```

To add a specific version of the `lodash` package, include the version with the package name:

```bash
im add lodash@4.17.21
```

### Updating a package

To update the `lodash` package to the latest version, run:

```bash
im update lodash
```

### Removing a package

To remove the `lodash` package from your import map JSON file, run:

```bash
im remove lodash
```

### Displaying help

To display a help message with command usage, run:

```bash
im help
```

## Import map usage in HTML

To use the generated import map in your HTML file, include the following script tag:

```html
<script type="importmap" src="path/to/your/im.json"></script>
```

Now you can use the ES module imports in your JavaScript files:

```javascript
import _ from "lodash"
```

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