https://github.com/molnarmark/carbon-now-dir
🎨 Generate beautiful images of your code in files in the specified directory.
https://github.com/molnarmark/carbon-now-dir
Last synced: about 1 year ago
JSON representation
🎨 Generate beautiful images of your code in files in the specified directory.
- Host: GitHub
- URL: https://github.com/molnarmark/carbon-now-dir
- Owner: molnarmark
- License: mit
- Created: 2019-03-22T22:37:35.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-03-23T13:30:20.000Z (over 7 years ago)
- Last Synced: 2025-07-14T22:02:38.413Z (about 1 year ago)
- Language: JavaScript
- Size: 38.1 KB
- Stars: 9
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

[](https://github.com/ellerbrock/open-source-badge/)
[](https://github.com/prettier/prettier)
[](http://makeapullrequest.com)
[](https://opensource.org/licenses/MIT)
[](https://github.com/molnarmark/carbon-now-dir/graphs/commit-activity)
**carbon-now-dir** wraps around [carbon-now-cli](https://github.com/mixn/carbon-now-cli) to generate beautiful images
of the source code in the specified directory, matched by the specific wildcard.
## Installation
### npx
You can invoke `carbon-now-dir` directly by simply using `npx`
```
npx carbon-now-dir
```
### npm
```
npm install -g carbon-now-dir
```
### yarn
```
yarn global add carbon-now-dir
```
## Usage
Most of the options available in **carbon-now-cli** are available in **carbon-now-dir** too.
You can invoke `carbon-now-dir --help`, which will show:
```
Generate beautiful images of your code in files in the specified directory.
Usage
$ carbon-now-dir -w "*.js"
Options
-l, --location Image save location, default: cwd
-p, --preset Use a saved preset
-h, --headless Use only non-experimental Puppeteer features
-w, --wildcard Use a wildcard for matching files in the directory
--config Use a different, local config (read-only)
```
**NOTE:** The wildcard flag is required!
### Presets
You can reuse presets created in **carbon-now-cli** by simply passing the -p or --preset flag with the preset name.
Assuming you have a preset called `my-preset`, and you want to capture all JavaScript files in the `examples` directory,
you would write:
```
carbon-now-dir examples -w "*.js" -p my-preset
```
### More
for more in-depth documentation, you can visit the repository for [carbon-now-cli](https://github.com/mixn/carbon-now-cli).
## License
MIT © [Mark Molnar](https://github.com/molnarmark)