An open API service indexing awesome lists of open source software.

https://github.com/h3rald/nifty

A decentralised (pseudo) package manager and script runner
https://github.com/h3rald/nifty

nim package-manager

Last synced: 21 days ago
JSON representation

A decentralised (pseudo) package manager and script runner

Awesome Lists containing this project

README

        

[![Nimble](https://raw.githubusercontent.com/yglukhov/nimble-tag/master/nimble.png)](https://nimble.directory/pkg/nifty)

[![Release](https://img.shields.io/github/release/h3rald/nifty.svg)](https://github.com/h3rald/nifty/releases/latest)
[![License](https://img.shields.io/github/license/h3rald/nifty.svg)](https://raw.githubusercontent.com/h3rald/nifty/master/LICENSE)

# Nifty

*nifty* is a decentralized (pseudo) package manager and script runner written in [Nim](https://nim-lang.org).

## Main features

In a nutshell, *nifty* is a program that executes user-defined scripts on a set of folders or files within a user-define package folder. It doesn't do (almost) anything by itself, it just relies on other programs and utilities that are typically already available on your system like [git](https://git-scm.com) and [curl](https://curl.haxx.se) to do all the heavy-lifting.

### Run side-by-side your existing package manager

*nifty* doesn't claim to replace your existing package manager, therefore it tries not to get too much in the way of your existing project structure. All it needs to work resides in a humble `nifty.json` file that is used to:

* keep track of what packages are part of the current project
* provide the full definition of all the available commands and how to execute them on specific packages

The folder where packages will be stored is by default set to a [packages](class:kwd) subfolder within the current project directory, but even this can be configured in the `nifty.json` file.

→ For an example of `nifty.json` file, see [the one used by HastyScribe](https://github.com/h3rald/hastyscribe/blob/master/nifty.json).

### Define your own packages

For *nifty*, a package can be a folder containing files, or even a single files. Through the `nifty.json` file, you can define:

* The *source* of a package (typically a git repository or event just a URL).
* Whether the package supports *git*, *curl* or any other command that will be used to retrieve its contents.

### Define your own commands

You can use your `nifty.json` to teach *nifty* new tricks, i.e. how to execute new commands on packages. Your commands look like... well, CLI commands, except that you can use placeholders like `{{name}}` and `{{src}}` in them for your package name, source, etc.

### Run on many different platforms and regardless of the type of project

*nifty* is a self-contained executable program written in [Nim](https://nim-lang.org) and runs on all platforms where Nim compiles. Also, unlike other package managers that are typically used within the context of one specific programming language (like [NPM](https://www.npmjs.com) for Javascript or [RubyGems](https://rubygems.org) for Ruby), *nifty* can be used in virtually any project, regardless of the programming language used.

## Usage

* `nifty help []` · Display help on the specified command (or all commands).
* `nifty info ` · Displays information on
* `nifty init []` · Initializes a project in the current directory (using as storage directory).
* `nifty list` · Lists all dependencies (recursively) of the current project.
* `nifty map ` · Configures a new or existing package .
* `nifty remove []` · Removes the specified package (or all packages) from the storage directory.
* `nifty unmap ` · Unmaps the previously-mapped package .
* `nifty update` · Updates the command definitions for the current project and migrate nifty.json file (if necessary).
* `nifty install []` · Installs the specified package (or all mapped packages) to the storage directory.
* `nifty upgrade []` · Upgrades the specified previously-installed package (or all packages).

→ For more information, see the [Nifty User Guide](https://h3rald.com/nifty/Nifty_UserGuide.htm).