Simple config handling for your app or module

Overview

conf

Simple config handling for your app or module

All you have to care about is what to persist. This module will handle all the dull details like where and how.

It does not support multiple processes writing to the same store.
I initially made this tool to let command-line tools persist some data.

If you need this for Electron, check out electron-store instead.

Install

$ npm install conf

Usage

const Conf = require('conf');

const config = new Conf();

config.set('unicorn', '๐Ÿฆ„');
console.log(config.get('unicorn'));
//=> '๐Ÿฆ„'

// Use dot-notation to access nested properties
config.set('foo.bar', true);
console.log(config.get('foo'));
//=> {bar: true}

config.delete('unicorn');
console.log(config.get('unicorn'));
//=> undefined

Or create a subclass.

API

Changes are written to disk atomically, so if the process crashes during a write, it will not corrupt the existing config.

Conf(options?)

Returns a new instance.

options

Type: object

defaults

Type: object

Default values for the config items.

Note: The values in defaults will overwrite the default key in the schema option.

schema

Type: object

JSON Schema to validate your config data.

Under the hood, the JSON Schema validator ajv is used to validate your config. We use JSON Schema draft-07 and support all validation keywords and formats.

You should define your schema as an object where each key is the name of your data's property and each value is a JSON schema used to validate that property. See more here.

Example:

const Conf = require('conf');

const schema = {
	foo: {
		type: 'number',
		maximum: 100,
		minimum: 1,
		default: 50
	},
	bar: {
		type: 'string',
		format: 'url'
	}
};

const config = new Conf({schema});

console.log(config.get('foo'));
//=> 50

config.set('foo', '1');
// [Error: Config schema violation: `foo` should be number]

Note: The default value will be overwritten by the defaults option if set.

migrations

Type: object

You can use migrations to perform operations to the store whenever a project version is upgraded.

The migrations object should consist of a key-value pair of 'version': handler. The version can also be a semver range.

Example:

const Conf = require('conf');

const store = new Conf({
	migrations: {
		'0.0.1': store => {
			store.set('debugPhase', true);
		},
		'1.0.0': store => {
			store.delete('debugPhase');
			store.set('phase', '1.0.0');
		},
		'1.0.2': store => {
			store.set('phase', '1.0.2');
		},
		'>=2.0.0': store => {
			store.set('phase', '>=2.0.0');
		}
	}
});

Note: The version the migrations use refers to the project version by default. If you want to change this behavior, specify the projectVersion option.

configName

Type: string
Default: 'config'

Name of the config file (without extension).

Useful if you need multiple config files for your app or module. For example, different config files between two major versions.

projectName

Type: string
Default: The name field in the package.json closest to where conf is imported.

You only need to specify this if you don't have a package.json file in your project or if it doesn't have a name defined within it.

projectVersion

Type: string
Default: The version field in the package.json closest to where conf is imported.

You only need to specify this if you don't have a package.json file in your project or if it doesn't have a version defined within it.

cwd

Type: string
Default: System default user config directory

You most likely don't need this. Please don't use it unless you really have to. By default, it will pick the optimal location by adhering to system conventions. You are very likely to get this wrong and annoy users.

Overrides projectName.

The only use-case I can think of is having the config located in the app directory or on some external storage.

encryptionKey

Type: string | Buffer | TypedArray | DataView
Default: undefined

This can be used to secure sensitive data if the encryption key is stored in a secure manner (not plain-text) in the Node.js app. For example, by using node-keytar to store the encryption key securely, or asking the encryption key from the user (a password) and then storing it in a variable.

In addition to security, this could be used for obscurity. If a user looks through the config directory and finds the config file, since it's just a JSON file, they may be tempted to modify it. By providing an encryption key, the file will be obfuscated, which should hopefully deter any users from doing so.

It also has the added bonus of ensuring the config file's integrity. If the file is changed in any way, the decryption will not work, in which case the store will just reset back to its default state.

When specified, the store will be encrypted using the aes-256-cbc encryption algorithm.

fileExtension

Type: string
Default: 'json'

Extension of the config file.

You would usually not need this, but could be useful if you want to interact with a file with a custom file extension that can be associated with your app. These might be simple save/export/preference files that are intended to be shareable or saved outside of the app.

clearInvalidConfig

Type: boolean
Default: false

The config is cleared if reading the config file causes a SyntaxError. This is a good behavior for unimportant data, as the config file is not intended to be hand-edited, so it usually means the config is corrupt and there's nothing the user can do about it anyway. However, if you let the user edit the config file directly, mistakes might happen and it could be more useful to throw an error when the config is invalid instead of clearing.

serialize

Type: Function
Default: value => JSON.stringify(value, null, '\t')

Function to serialize the config object to a UTF-8 string when writing the config file.

You would usually not need this, but it could be useful if you want to use a format other than JSON.

deserialize

Type: Function
Default: JSON.parse

Function to deserialize the config object from a UTF-8 string when reading the config file.

You would usually not need this, but it could be useful if you want to use a format other than JSON.

projectSuffix

Type: string
Default: 'nodejs'

You most likely don't need this. Please don't use it unless you really have to.

Suffix appended to projectName during config file creation to avoid name conflicts with native apps.

You can pass an empty string to remove the suffix.

For example, on macOS, the config file will be stored in the ~/Library/Preferences/foo-nodejs directory, where foo is the projectName.

accessPropertiesByDotNotation

Type: boolean
Default: true

Accessing nested properties by dot notation. For example:

const Conf = require('conf');

const config = new Conf();

config.set({
	foo: {
		bar: {
			foobar: '๐Ÿฆ„'
		}
	}
});

console.log(config.get('foo.bar.foobar'));
//=> '๐Ÿฆ„'

Alternatively, you can set this option to false so the whole string would be treated as one key.

const Conf = require('conf');

const config = new Conf({accessPropertiesByDotNotation: false});

config.set({
	`foo.bar.foobar`: '๐Ÿฆ„'
});

console.log(config.get('foo.bar.foobar'));
//=> '๐Ÿฆ„'

watch

type: boolean
Default: false

Watch for any changes in the config file and call the callback for onDidChange or onDidAnyChange if set. This is useful if there are multiple processes changing the same config file.

Instance

You can use dot-notation in a key to access nested properties.

The instance is iterable so you can use it directly in a forโ€ฆof loop.

.set(key, value)

Set an item.

The value must be JSON serializable. Trying to set the type undefined, function, or symbol will result in a TypeError.

.set(object)

Set multiple items at once.

.get(key, defaultValue?)

Get an item or defaultValue if the item does not exist.

.reset(...keys)

Reset items to their default values, as defined by the defaults or schema option.

Use .clear() to reset all items.

.has(key)

Check if an item exists.

.delete(key)

Delete an item.

.clear()

Delete all items.

This resets known items to their default values, if defined by the defaults or schema option.

.onDidChange(key, callback)

callback: (newValue, oldValue) => {}

Watches the given key, calling callback on any changes.

When a key is first set oldValue will be undefined, and when a key is deleted newValue will be undefined.

Returns a function which you can use to unsubscribe:

const unsubscribe = conf.onDidChange(key, callback);

unsubscribe();

.onDidAnyChange(callback)

callback: (newValue, oldValue) => {}

Watches the whole config object, calling callback on any changes.

oldValue and newValue will be the config object before and after the change, respectively. You must compare oldValue to newValue to find out what changed.

Returns a function which you can use to unsubscribe:

const unsubscribe = conf.onDidAnyChange(callback);

unsubscribe();

.size

Get the item count.

.store

Get all the config as an object or replace the current config with an object:

conf.store = {
	hello: 'world'
};

.path

Get the path to the config file.

FAQ

How is this different from configstore?

I'm also the author of configstore. While it's pretty good, I did make some mistakes early on that are hard to change at this point. This module is the result of everything I learned from making configstore. Mainly where the config is stored. In configstore, the config is stored in ~/.config (which is mainly a Linux convention) on all systems, while conf stores config in the system default user config directory. The ~/.config directory, it turns out, often have an incorrect permission on macOS and Windows, which has caused a lot of grief for users.

Can I use YAML or another serialization format?

The serialize and deserialize options can be used to customize the format of the config file, as long as the representation is compatible with utf8 encoding.

Example using YAML:

const Conf = require('conf');
const yaml = require('js-yaml');

const config = new Conf({
	fileExtension: 'yaml',
	serialize: yaml.safeDump,
	deserialize: yaml.safeLoad
});

Related

  • electron-store - Simple data persistence for your Electron app or module
  • cache-conf - Simple cache config handling for your app or module
Comments
  • Add support for observing key paths

    Add support for observing key paths

    Fixes https://github.com/sindresorhus/electron-store/issues/14

    Inspired partly by electron-settings.

    @sindresorhus if you'd like anything else to be added, let me know ๐Ÿ‘

    opened by ghost 24
  • Move to TypeScript

    Move to TypeScript

    Got everything sorted out as requested. I did not add dot paths yet because we should get a good base first. That should be a seperate PR.

    Everything is nicely typed now. The only thing that break for now, and I want your opinion on this first, is the schema. The schema now requires the enum JSONSchemaType for defining the types. I feel like that might be annoying for users, they will need to fix all their schemas. WDYT?

    image

    Fixes #86


    IssueHunt Summary

    Referenced issues

    This pull request has been submitted to:


    IssueHunt has been backed by the following sponsors. Become a sponsor

    opened by sneljo1 21
  • Breaks if no package.json is present

    Breaks if no package.json is present

    If there is no package.json available then the path is null and you can't stop it from breaking.

    Even if you manually provide the projectName in options it will still break. This adds a few simple checks to prevent it from blowing up when you do provide the name.

    I've also added an appropriate test, which properly fails when run without the changes to index.js and correctly passes once added.

    opened by jimbuck 14
  • Fix issue with `onDidChange` not always being called

    Fix issue with `onDidChange` not always being called

    Fixes #108 and fixes https://github.com/sindresorhus/electron-store/issues/93

    Adds a configuration option called watchFile.

    Works exactly like watch but uses fs.watchFile instead of fs.watch, allowing the subscription to read changes in the file more than once.

    useEffect(()=>{
        store.onDidChange('myKey', (newV, oldV) => {
          console.log(`Changed from ${oldV} to ${newV}`)
        })
    },[])
    

    image

    Clearly slower (sometimes, benchmarking is unreliable 100/2000ms) than watch but the only way to truly watch a file in React (and possible other scenarios, but not tested).

    opened by nhevia 13
  • Provide way to omit __interal__ from store on get

    Provide way to omit __interal__ from store on get

    The internal key causes some problems, both during write (https://github.com/sindresorhus/conf/issues/114) and at read (can't trust MyStore.keys() or MyStore.values() without omitting internal). We should at least export the variable so the client can manually omit it (and at best, provide a more ergonomic patternโ€”perhaps a WeakMap?)

    opened by willium 12
  • Add support for migrations

    Add support for migrations

    Fixes https://github.com/sindresorhus/conf/issues/74


    IssueHunt Summary

    Referenced issues

    This pull request has been submitted to:


    IssueHunt has been backed by the following sponsors. Become a sponsor

    opened by rafaelramalho19 12
  • Replace deprecated `crypto.createDecipher()` and `crypto.createCipher()` Node.js methods

    Replace deprecated `crypto.createDecipher()` and `crypto.createCipher()` Node.js methods

    Fix sindresorhus/electron-store#67

    It is better than #72 in this way:

    • It doesn't break existing encrypted data
    • The data encryption is secure and could be used for security purposes
    opened by popod 10
  • Add feature to disable dot-notation

    Add feature to disable dot-notation

    Issuehunt badges

    Hi! I'm working on a project that uses reverse-domain naming for namespaces, and we need to store some data with the namespace as the key. Where we'd expect

    {
        "cc.xylobol.test": {
            "foo": "bar"
        }
    }
    

    we end up with

    {
        "cc": {
            "xylobol": {
                "test": {
                    "foo": "bar"
                }
            }
        }
    }
    

    instead due to the dot-notation. Is there a pre-existing way to disable this? If not, could it be added as a feature?

    Thank you in advanced. Xylobol

    IssueHunt Summary

    yaodingyd yaodingyd has been rewarded.

    Sponsors (Total: $40.00)

    Tips

    enhancement help wanted :gift: Rewarded on Issuehunt 
    opened by Xylobol 10
  • Rewrite in TypeScript

    Rewrite in TypeScript

    Closes #86

    It's my first time working on Typescript, so this can be a bit bad.


    IssueHunt Summary

    Referenced issues

    This pull request has been submitted to:


    IssueHunt has been backed by the following sponsors. Become a sponsor

    opened by rafaelramalho19 9
  • Add option to validate JSON file

    Add option to validate JSON file

    If the option validate is true and the configuration file is not a valid JSON, it throws an exception. References https://github.com/sindresorhus/electron-store/issues/35

    opened by bampakoa 9
  • unable to use conf inside a webworker

    unable to use conf inside a webworker

    Hi there,

    I'm using conf inside a webworker and experiencing some issues in making it work. The webworker is initiated from Electron, but has nodeIntegrationInWorker and nodeIntegration at all places so the context there is of NodeJS, not browser ~ electron one.

    (When I want to use config file from the main process of electron, Im using electron-store ๐Ÿ˜ƒ )

    The error Im getting is the following: image After digging a little inside the error, it got me to these lines in conf's index.js: image as you can see here, the cache deletion is being targeted at the wrong path when using the __filename , probably on runtime this special variable is being translated into this not-so-nice electron path ๐Ÿ˜ž

    I also tried to use electron-store (although the webworker has a node context) but it gave this error: image

    Will be happy to get some advise about it, or if it's something that needs to be added to this awesome library, I'd be happy to contribute ๐Ÿ˜Ž

    thanks!

    opened by edenhermelin 8
  • Support for ESM

    Support for ESM

    Hi, are there plans to support ESM? We are using conf from an ESM-based CLI and because Conf is CJS the loading of the various modules that are part of this package can't be loaded concurrently with the rest of the modules of the CLI.

    I'd be happy to go ahead with the implementation but I'd need some input on what the suggested tooling is for generating CJS and ESM modules. Thanks in advance.

    opened by pepicrft 0
  • Add option to use other encryption algorithm (i.e., AES-256-GCM)

    Add option to use other encryption algorithm (i.e., AES-256-GCM)

    Right now, AES-256-CBC is hardcoded as encryption algorithm. Other AES-256 modes, such as GCM, offer some benefits over CBC (like authentication). Changing this would be a breaking change, so a possibility would be to introduce an option to specify the encryption algorithm used.

    I haven't looked too much into the encryption implementation, but using other AES-256 modes may require some other changes, like making sure the auth tag is added to the ciphertext.

    enhancement help wanted 
    opened by Mrtenz 0
  • onDidChange doesn't support dot-notation for nested properties

    onDidChange doesn't support dot-notation for nested properties

    I get a typescript compilation error when I try to pass in a key with dot-notation to the onDidChange method. This seems to happen because the type of key the onDidChange method is expecting is keyof <StoreType>. This doesn't include the nested object properties.

    Requesting to add an overload that takes a key of type string. Just like the get or set.

    Thanks!

    interface Config {
      foo: Foo;
    };
    
    interface Foo {
      bar: string;
    };
    
    export const defaults: Config = {
      foo: {
        bar: "foobar"
      }
    };
    
    const store = new Store<Config>({
      defaults,
    });
    
    // ERROR - Argument of type '"foo.bar"' is not assignable to parameter of type 'keyof Config'.
    store.onDidChange('foo.bar', (nVal, oVal) => {
      console.log(nVal, oVal);
    });
    
    opened by hdhilip98 0
  • Store.set is not type checked

    Store.set is not type checked

    This line makes Typescript accept any key/value for set

    https://github.com/sindresorhus/conf/blob/06b640d8cfa22d020b1ac1996a9dca0fc0289f83/source/index.ts#L197

    I think it should be safe to remove since get does not have an equivalent overload

    opened by Trinovantes 1
  • Debouncer causing the onDidChange callbacks to get delayed by 5 seconds when registered multiple times

    Debouncer causing the onDidChange callbacks to get delayed by 5 seconds when registered multiple times

    https://github.com/sindresorhus/conf/blob/9d535a3d05a4cfd6bce4d033a1690b9c7d3b7bb9/source/index.ts#L498

    When the onDidChange is registered multiple times (In main and renderer process separately in electron-store), all of the callbacks gets delayed by 5 seconds due to debouncing. Any specific reason to add this debouncing?

    opened by wrongsahil 2
Releases(v10.2.0)
  • v10.2.0(Jul 30, 2022)

  • v10.1.2(Mar 30, 2022)

  • v10.1.1(Nov 29, 2021)

  • v10.1.0(Nov 21, 2021)

  • v10.0.3(Sep 15, 2021)

  • v10.0.2(Aug 8, 2021)

  • v10.0.1(Apr 21, 2021)

  • v10.0.0(Apr 19, 2021)

  • v9.0.2(Feb 12, 2021)

  • v9.0.1(Feb 7, 2021)

  • v9.0.0(Jan 22, 2021)

    • Make the clearInvalidConfig option false by default b291021 A lot of people found the previous default surprising.

    https://github.com/sindresorhus/conf/compare/v8.0.0...v9.0.0

    Source code(tar.gz)
    Source code(zip)
  • v8.0.0(Jan 7, 2021)

    Breaking

    • Fix .clear() behavior (#136) 259ba9b Previously, it would not reset the values back to the default ones specified in the defaults or schema option. It correctly does this now.
    • Update ajv to version 7. This might affect user using the schema option.

    https://github.com/sindresorhus/conf/compare/v7.1.2...v8.0.0

    Source code(tar.gz)
    Source code(zip)
  • v7.1.2(Aug 13, 2020)

  • v7.1.1(Jul 17, 2020)

  • v7.1.0(Jul 17, 2020)

  • v7.0.1(Jul 3, 2020)

  • v7.0.0(Jul 3, 2020)

    Breaking

    • Require Node.js 10 e28b8d9

    Improvements

    • Move to TypeScript (#104) 41b0c10 This hopefully should result in better types.

    https://github.com/sindresorhus/conf/compare/v6.2.4...v7.0.0

    Source code(tar.gz)
    Source code(zip)
  • v6.2.4(Apr 12, 2020)

    • Fix issue with package.json inference when using the cwd option (#107) 3ef2da0

    https://github.com/sindresorhus/conf/compare/v6.2.3...v6.2.4

    Source code(tar.gz)
    Source code(zip)
  • v6.2.3(Apr 5, 2020)

  • v6.2.1(Feb 22, 2020)

  • v6.2.0(Nov 1, 2019)

    • Warning: The migrations option is buggy. Don't use it at this time.
    • Add semver range capabilities into migrations (#88) df3a256

    https://github.com/sindresorhus/conf/compare/v6.1.0...v6.2.0

    Source code(tar.gz)
    Source code(zip)
  • v6.1.0(Sep 29, 2019)

  • v6.0.1(Sep 10, 2019)

    • Fix the TypeScript types (#90) b5a4676 The types were accidentally looser than intended.

    https://github.com/sindresorhus/conf/compare/v6.0.0...v6.0.1

    Source code(tar.gz)
    Source code(zip)
  • v6.0.0(Sep 9, 2019)

    Breaking for TypeScript users

    • Improve TypeScript typings (#73) ef63b11 ff54952 93ace80 The types were made much better, but it will probably break for some users. You can now properly define a strongly-typed store. Example. Note: There's no way to use a dot-path like config.get('foo.bar') with a typed store. We're looking into how to support that: https://github.com/sindresorhus/conf/issues/86

    Enhancements

    • Add support for migrations (#83) 931ffce

    Fixes

    • Add temporary workaround for Conf being packaged in a Snap app 68bbb46

    https://github.com/sindresorhus/conf/compare/v5.0.0...v6.0.0

    Source code(tar.gz)
    Source code(zip)
  • v5.0.0(Jun 20, 2019)

    This version does not have any breaking changes. It's a major version as it has an automatic migration-step for the encryptionKey option. So if you're using that option, please continue reading.

    Short story, Node.js deprecated the below APIs and we had to do encryption differently. Conf should be able to read both the new and old encryption format and it will write the new encryption format if you change any config. The migration is fully automatic, but please test your app thoroughly in case there are any issues.

    • Replace deprecated crypto.createDecipher() and crypto.createCipher() Node.js methods (#76) 177fe65

    https://github.com/sindresorhus/conf/compare/v4.1.0...v5.0.0

    Source code(tar.gz)
    Source code(zip)
  • v4.1.0(Jun 1, 2019)

    • Add accessPropertiesByDotNotation option (#67) 94f71c5
    • Add .onDidAnyChange method (#66) 0c942e1

    https://github.com/sindresorhus/conf/compare/v4.0.2...v4.1.0

    Source code(tar.gz)
    Source code(zip)
  • v4.0.2(Apr 28, 2019)

    • TypeScript - Fix parameter name order for onDidChange callback (#70) 201c2ff

    https://github.com/sindresorhus/conf/compare/v4.0.1...v4.0.2

    Source code(tar.gz)
    Source code(zip)
  • v4.0.1(Apr 11, 2019)

  • v4.0.0(Apr 2, 2019)

    Breaking

    • The config is now stored in %APPDATA% instead of %LOCALAPPDATA% on Windows, which is more correct. There's unfortunately no automatic migration path. To continue using the old config location, run npm i 'env-paths@^1.0.0' and set the cwd option:

      	const Conf = require('conf');
      	const envPaths = require('env-paths');
      
      	const config = new Conf({
      		cwd: envPaths('<projectName>', {suffix: 'nodejs'}).config
      	});
      
    • For TypeScript users only: Refactor TypeScript definition to CommonJS compatible export (#64) 277d70a - You need to change import Conf from 'conf'; to import Conf = require('conf');

    Enhancements


    https://github.com/sindresorhus/conf/compare/v3.0.0...v4.0.0

    Source code(tar.gz)
    Source code(zip)
  • v3.0.0(Mar 4, 2019)

    Breaking:

    • Require Node.js 8 e30cdad
    • Prevent unsupported JSON values d162504

    Enhancements:

    • Add TypeScript definition (#61) 330e011
    • Add clearInvalidConfig option d725709
    • Add serialize and deserialize options (#59) e18a4a3

    https://github.com/sindresorhus/conf/compare/v2.2.0...v3.0.0

    Source code(tar.gz)
    Source code(zip)
Owner
Sindre Sorhus
Full-Time Open-Sourcerer. Wants more empathy & kindness in open source. Focuses on Swift & JavaScript. Makes macOS apps, CLI tools, npm packages. Likes unicorns
Sindre Sorhus
Uses marked-terminal to render a README.md for any npm module in the terminal.

modhelp Uses marked-terminal to render a README.md for any npm module in the terminal. Now with built-in pager! Page up/down, arrow keys to scroll lin

Jason Livesay 23 Feb 8, 2022
An npm module to run Snowflake in a headless browser to help censored users connect to the Tor network.

snowflake-cli An npm module to run Snowflake in a headless browser to help censored users connect to the Tor network. Note: depending on your environm

yan 8 Mar 24, 2022
Pathokun, a path generator, updates your content just with your frontend by HTTP GET Request!

Pathokun Pathokun, a path generator, update your content just with your frontend by HTTP GET Request! In this way you can make Full-Stack project with

Pathokun 15 Feb 7, 2022
Add stdin support to any CLI app that accepts file input

tmpin Add stdin support to any CLI app that accepts file input It pipes stdin to a temp file and spawns the chosen app with the temp file path as the

Sindre Sorhus 121 Oct 3, 2022
Mobile app splash screen generator

mobisplash-cli Mobile app splash screen generator Install $ npm install --global mobisplash-cli Usage $ mobisplash --help Usage $ mobisplash <

Sam Verschueren 65 Oct 3, 2022
Control the Plash app from the command-line

plash-cli Control the Plash app from the command-line Install $ npm install --global plash Requires Node.js 14 or later. Requires Plash 2.3.0 or late

Sindre Sorhus 33 Dec 30, 2022
A group listening chat app that utilizes the spotify api to enable the users to queue, pause, change songs, as well as chat with each other

Next.js + Tailwind CSS Example This example shows how to use Tailwind CSS (v3.0) with Next.js. It follows the steps outlined in the official Tailwind

Zach McLean 1 Dec 19, 2021
Sample app that shows how to integrate Salesforce with Slack.

Ready to Fly Sample app to showcase Slack + Salesforce integrations. This app has been created using the Salesforce Slack Starter Kit. For a detailed

Trailhead Apps 34 Dec 16, 2022
Clii - Easily build a cli app

Clii Easily build a cli app. Write some functions, jsdoc it, clii automatically turns it into a cli. Clii Quick Start Cli Tool License Quick Start Ins

null 38 Sep 9, 2022
A command line interface for programmatically creating data silos on app.transcend.io

Table of Contents Overview Installation Authentication transcend.yml Usage tr-pull tr-push CI Integration Dynamic Variables tr-scan Overview A command

Transcend 15 Dec 13, 2022
a simple zero-configuration command-line http server

http-server: a command-line http server http-server is a simple, zero-configuration command-line http server. It is powerful enough for production usa

http ... PARTY! 12.4k Jan 4, 2023
A simple development http server with live reload capability.

Live Server This is a little development server with live reload capability. Use it for hacking your HTML/JavaScript/CSS files, but not for deploying

Tapio Vierros 4k Dec 31, 2022
A simple CLI tool to create and manage xhelpers-api projects

A simple CLI tool to create and manage xhelpers-api projects

null 2 Feb 25, 2022
Find and fix problems in your JavaScript code.

ESLint Website | Configuring | Rules | Contributing | Reporting Bugs | Code of Conduct | Twitter | Mailing List | Chat Room ESLint is a tool for ident

ESLint 22k Jan 8, 2023
Test your internet connection speed and ping using speedtest.net from the CLI

speed-test Test your internet connection speed and ping using speedtest.net from the CLI Install Ensure you have Node.js version 8+ installed. Then ru

Sindre Sorhus 3.8k Jan 7, 2023
Get your public IP address - very fast!

public-ip Get your public IP address - very fast! In Node.js, it queries the DNS records of OpenDNS, Google DNS, and HTTPS services to determine your

Sindre Sorhus 962 Dec 25, 2022
Translations with speech synthesis in your terminal as a node package

Normit Normit is an easy way to translate stuff in your terminal. You can check out its Ruby gem version termit. Installation npm install normit -g Us

Paweล‚ Urbanek 234 Jan 1, 2023
:sparkles: Make your JSON look AWESOME

Make your JSON objects look AWESOME! This package allows you to give style to your JSON on your console! Installation : $ npm install jsome if you n

Khalid REHIOUI 234 Dec 3, 2022
Terminal recorder: Record your termial session into HTML

terminal-recorder Terminal recorder allows you to record your bash session, and export it to html so then you can share it with your friends. GitHub P

Cristian Cortez 104 Mar 3, 2022