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

node-offly

v1.0.10

Published

Cloud hosted docker containers right from Node.js, completely free, using the offly API.

Readme

The easiest way to use docker without installing it or paying for a cloud service.

Quickstart

Note: You'll need an offly API key in order to use the Node.js API. Don't worry, we only require an API key for verification. The service is completely free!

First, install node-offly:

npm install node-offly

Then, import it into your project:

const offly = require("node-offly");

Then, the first thing you need to do is call offly.init() with your API key to get authenticated:

const offly = require("node-offly");

offly.init("YOUR_API_KEY");

Note: It is a better idea to store API keys in environment variables instead of exposing them in your code. Don't ever share your API key with anyone, because your API key gives access to your containers.

Examples

Create a docker container:

offly.createContainer(IMAGE, NAME, PASSWORD);

// Example (creates an Ubuntu 24.04 container)
// The password field is a custom password for
// the user account inside the container
offly.createContainer("offly", "MyAwesomeContainer", "password123").then(() => {
  console.log("Container created!");
});

Note: For all available images, see the official documentation.

Start a docker container:

offly.startContainer("MyAwesomeContainer").then(() => {
  console.log("Container started!");
});

Note: All functions in the API will return a promise.

Stop a docker container:

offly.stopContainer("MyAwesomeContainer");

Remove a container:

// Example
// The password field should be your offly account
// password, which is required for verification
// when deleting containers
offly.removeContainer("MyAwesomeContainer", "password123");

Rename a container:

offly.renameContainer("MyAwesomeContainer", "SomeOtherName");

Set the current container in the workspace (optional) for ease of use:

offly.workspace.currentContainer = "MyAwesomeContainer";

// Now you can just call functions without the name!
offly.stopContainer();

offly.startContainer();

offly.execCommand("ls -l /");

All methods

Containers API

Main functions for creating containers, removing containers, etc.

  • createContainer(image, name, password)

    • image: String. The image you want to create the container with.
    • name: String. The custom name for this container. Must be between 3-30 characters and only contain letters, numbers, and underscores.
    • password: String. The password for the user inside the container. Will be used for SSH and other logins. Must be between 8-60 characters.
  • removeContainer(name, password)

    • name: String. The name of the container you want to remove.
    • password: String. Your offly account password. Required for verification when deleting containers.
  • renameContainer(name, newName)

    • name: String. The name of the container you want to rename.
    • newName: String. The new name for this container. Must follow same naming rules as before.
  • startContainer(name)

    • name: String. The name of the container you want to start.
  • stopContainer(name)

    • name: String. The name of the container you want to stop.
  • execCommand(name, command, stream, callback)

    • name: String. The name of the container you want to execute the shell command in.
    • command: String. Any shell command you want to execute inside this container.
    • stream: Boolean. Whether the command's output should be streamed as it runs or if all output will be returned when the command finishes.
    • callback(output): Function. If stream is set to true, then all stderr and stdout data will be streamed here. The output will be an object containing .stderr, .stdout, and .finished.
  • logs(container)

    • container: String. The name of the container you want to retrieve logs from.

Filesystem API

Functions for accessing and controlling files inside of containers.

  • readFile(container, path)

    • container: String. The name of the container you want to read the file in.
    • path: String. The path to the file inside the container you want to read.
  • writeFile(container, path, data)

    • container: String. The name of the container you want to write the file in.
    • path: String. The path to the file inside the container you want to write to.
    • data: String. The UTF-8 contents you want to write to the file.
  • addFile(container, path)

    • container: String. The name of the container you want to create the file in.
    • path: String. The path to the new file you want to create inside the container.
  • addFolder(container, path)

    • container: String. The name of the container you want to create the folder in.
    • path: String. The path to the new folder you want to create inside the container.
  • copyFile(container, file, directory)

    • container: String. The name of the container you want to copy the file or folder in.
    • file: String. The path to the original file or folder you want to copy inside the container.
    • directory: String. The path to the target directory you want to copy the file or folder to inside the container.
  • removeFile(container, path)

    • container: String. The name of the container you want to delete the file or folder in.
    • path: String. The path to the file or folder you want to delete inside the container.
  • moveFile(container, path, newPath)

    • container: String. The name of the container you want to move the file or folder in.
    • path: String. The path to the original file or folder you want to move/rename inside the container.
    • newPath: String. The path where the file or folder will move to inside the container.
  • uploadFile(container, localPath, directory)

    • container: String. The name of the container you want to upload the file to.
    • localPath: String. The path to the local file on your computer that you want to upload.
    • directory: String. The path to the directory inside the container where the uploaded file will be placed.
  • readDirectory(container, directory)

    • container: String. The name of the container you want to read the directory in.
    • directory: String. The path to the directory you want to read inside the container.

For more examples and better documentation, see the official offly Docs.

Support

Thanks for the contributions to all of our projects in 2025!

If you'd like to tell us about a problem you're having, have a curious question about offly or the offly API, or just want to provide a thanks, open an Issue on our GitHub repository or reach out to us using the contact page.

License

The offly Node.js/NPM package and all offly related services are licensed under the GPL 3.0 License.

View License

Copyright © 2021-2025 Parking Master

Copyright © 2025 offly