# @svgr/cli

> SVGR command line.

Latest version **8.1.0** (published 2023-08-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install @svgr/cli
pnpm add @svgr/cli
yarn add @svgr/cli
bun add @svgr/cli
```

Provides the command `svgr`.

## Health

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

Positive: no vulnerabilities; popular repo.

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

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 8.1.0 |
| Published | 2023-08-15 |
| First published | 2018-06-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=14 |
| Dependencies | 10 |
| Unpacked size | 20 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 11059 |
| Author | Greg Bergé |
| Maintainers | neoziro |
| Keywords | svgr, svg, react, cli |

## Links

- npm: https://www.npmjs.com/package/@svgr/cli
- Repository: https://github.com/gregberge/svgr.git#main
- Homepage: https://react-svgr.com
- Issues: https://github.com/gregberge/svgr/issues
- Funding: https://github.com/sponsors/gregberge
- npm.io page: https://npm.io/package/@svgr/cli

## Dependencies (10)

- [glob](https://npm.io/package/glob.md) ^8.0.3
- [chalk](https://npm.io/package/chalk.md) ^4.1.2
- [dashify](https://npm.io/package/dashify.md) ^2.0.0
- [camelcase](https://npm.io/package/camelcase.md) ^6.2.0
- [commander](https://npm.io/package/commander.md) ^9.4.1
- [@svgr/core](https://npm.io/package/@svgr/core.md) 8.1.0
- [snake-case](https://npm.io/package/snake-case.md) ^3.0.4
- [@svgr/plugin-jsx](https://npm.io/package/@svgr/plugin-jsx.md) 8.1.0
- [@svgr/plugin-svgo](https://npm.io/package/@svgr/plugin-svgo.md) 8.1.0
- [@svgr/plugin-prettier](https://npm.io/package/@svgr/plugin-prettier.md) 8.1.0

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 8.1.0 (latest) — 2023-08-15
- 6.0.0-alpha.4 (next) — 2021-11-13
- 2.0.0-alpha.26fa501a (canary) — 2018-06-12
- 8.0.1 — 2023-05-09
- 8.0.0 — 2023-05-09
- 7.0.0 — 2023-03-24
- 6.5.1 — 2022-10-27
- 6.5.0 — 2022-10-14
- 6.4.0 — 2022-10-01
- 6.3.1 — 2022-07-22
- 6.3.0 — 2022-07-18
- 6.2.1 — 2022-01-30
- 6.2.0 — 2022-01-10
- 6.1.2 — 2021-12-12
- 6.1.1 — 2021-12-04
- … 33 more at https://npm.io/package/@svgr/cli/versions

## README

# @svgr/cli

[![Build Status][build-badge]][build]
[![version][version-badge]][package]
[![MIT License][license-badge]][license]

Command Line Interface for SVGR.

```
npm install @svgr/cli --save-dev
```

## Usage

```
Usage: svgr [options] <file|directory>

Options:
  -V, --version                    output the version number
  --config-file <file>             specify the path of the svgr config
  --no-runtime-config              disable runtime config (".svgrrc", ".svgo.yml", ".prettierrc")
  -d, --out-dir <dirname>          output files into a directory
  --ignore-existing                ignore existing files when used with --out-dir
  --ext <ext>                      specify a custom file extension (default: "js")
  --filename-case <case>           specify filename case ("pascal", "kebab", "camel", "snake") (default: "pascal")
  --icon                           use "1em" as width and height
  --native                         add react-native support with react-native-svg
  --memo                           add React.memo into the result component
  --ref                            forward ref to SVG root element
  --no-dimensions                  remove width and height from root SVG tag
  --expand-props [position]        disable props expanding ("start", "end", "none") (default: "end")
  --svg-props <property=value>     add props to the svg element
  --replace-attr-values <old=new>  replace an attribute value
  --template <file>                specify a custom template to use
  --index-template <file>          specify a custom index.js template to use
  --no-index                       disable index file generation
  --title-prop                     create a title element linked with props
  --desc-prop                      create a desc element linked with props
  --prettier-config <fileOrJson>   Prettier config
  --no-prettier                    disable Prettier
  --svgo-config <fileOrJson>       SVGO config
  --no-svgo                        disable SVGO
  --silent                         suppress output
  --stdin                          force reading input from stdin
  --stdin-filepath                 path to the file to pretend that stdin comesfrom
  -h, --help                       output usage information

  Examples:
    svgr --replace-attr-values "#fff=currentColor" icon.svg
```

## License

MIT

[build-badge]: https://img.shields.io/travis/smooth-code/svgr.svg?style=flat-square
[build]: https://travis-ci.org/smooth-code/svgr
[version-badge]: https://img.shields.io/npm/v/@svgr/core.svg?style=flat-square
[package]: https://www.npmjs.com/package/@svgr/core
[license-badge]: https://img.shields.io/npm/l/@svgr/core.svg?style=flat-square
[license]: https://github.com/smooth-code/svgr/blob/master/LICENSE

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