npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

better-decomposerize

v1.6.5

Published

[![npm](https://img.shields.io/npm/v/better-decomposerize.svg)](https://www.npmjs.com/package/better-decomposerize) [![MatrixDJ96 on GitHub](https://img.shields.io/badge/MatrixDJ96-100000?logo=github&logoColor=white)](https://github.com/MatrixDJ96)

Downloads

623

Readme

better-decomposerize

npm MatrixDJ96 on GitHub

https://decomposerize.com - Turns Docker Compose files into docker run commands.

Looking for the reverse? https://composerize.com / Composerize

Want to convert between Docker Compose file formats? https://composeverter.com / Composeverter

CLI

Install globally:

npm install -g better-decomposerize

The installed command is still:

decomposerize

Basic usage:

decomposerize docker-compose.yml

Options can be placed before the compose file:

decomposerize --docker-run --multiline docker-compose.yml

If input is piped or redirected, the CLI reads from stdin:

cat docker-compose.yml | decomposerize --docker-run
decomposerize --docker-run < docker-compose.yml

If neither a compose file nor stdin input is provided, the CLI exits with an error and prints the help message.

CLI options

Usage: decomposerize [options] <compose-file>
  • --help, -h
  • --services=service1,service2
  • --docker-run
  • --docker-run-command=<cmd>
  • --docker-run-rm
  • --docker-run-detach
  • --docker-build
  • --stop-and-remove
  • --create-volumes
  • --create-networks
  • --delete-images
  • --ansible-env-vars-format
  • --multiline
  • --long-args
  • --arg-value-separator=<sep>

API

The package exports a function:

const decomposerize = require('better-decomposerize');

Signature

decomposerize(dockerComposeContent, configuration = {})
  • dockerComposeContent: a string containing the Docker Compose YAML.
  • configuration: optional configuration object.

Supported configuration fields:

  • services: string[]
  • stopAndRemoveContainers: boolean
  • createVolumes: boolean
  • createNetworks: boolean
  • dockerBuild: boolean
  • dockerRun: boolean
  • dockerRunCommand: string
  • dockerRunRm: boolean
  • dockerRunDetach: boolean
  • deleteImages: boolean
  • ansibleEnvVarsFormat: boolean
  • multiline: boolean
  • 'long-args': boolean
  • 'arg-value-separator': ' ' | '='

Example

const decomposerize = require('better-decomposerize');

const dockerComposeInput = `
version: '3'
services:
  myapp:
    image: myapp-image
`;

const configuration = {
  dockerRun: true,
  dockerRunCommand: 'docker run',
  dockerRunRm: true,
  dockerRunDetach: false,
  multiline: true,
  'long-args': false,
  'arg-value-separator': ' ',
};

const output = decomposerize(dockerComposeInput, configuration);

console.log(output);

Development

This package uses make for common tasks:

make eslint
make test
make build
make rebuild
make release
make publish

Build outputs

  • dist/decomposerize.js → library bundle
  • dist/cli.bundle.js → bundled npm CLI
  • dist/decomposerize → standalone executable built with Node SEA

Standalone binary

Build the standalone executable:

make release

Run it:

./dist/decomposerize docker-compose.yml

Install it system-wide:

sudo make install

Install it under a custom prefix:

make install PREFIX=$HOME/.local

Uninstall it:

sudo make uninstall
make uninstall PREFIX=$HOME/.local

Contributing

  • Clone a fork of the repo and install dependencies with yarn
  • Make your changes and build them with make build
  • Run make test

Maintainers

License

MIT