all repos — nifty @ 2d50a2d8e0919b9cc3530842d65da6c56173825d

A tiny (pseudo) package manager and script runner.

Updates
h3rald h3rald@h3rald.com
Mon, 15 Jun 2026 22:50:39 +0200
commit

2d50a2d8e0919b9cc3530842d65da6c56173825d

parent

3a816f02a8f1857b51ffcf44a4773b0e4ffb295b

8 files changed, 59 insertions(+), 166 deletions(-)

jump to
D .github/workflows/add-artifacts-to-current-release.yml

@@ -1,98 +0,0 @@

-name: Add artifacts to current release - -# Controls when the action will run. -on: - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: - -jobs: - release: - name: "Build and upload artifacts" - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: - - ubuntu-latest - - macos-latest - - windows-latest - - env: - CHOOSENIM_CHOOSE_VERSION: stable - CHOOSENIM_NO_ANALYTICS: 1 - - steps: - # Cancel other actions of the same type that might be already running - - name: "Cancel similar actions in progress" - uses: styfle/cancel-workflow-action@0.6.0 - with: - access_token: ${{ github.token }} - - # Detects OS and provide Nim-friendly OS identifiers - - name: Detect current OS - id: os - run: echo "::set-output name=id::${{matrix.os == 'ubuntu-latest' && 'linux' || matrix.os == 'macos-latest' && 'macosx' || matrix.os == 'windows-latest' && 'windows'}}" - - # Checks out the repository - - uses: actions/checkout@v2 - - # Installs libraries - - name: install musl-gcc - run: sudo apt-get install -y musl-tools - if: matrix.os == 'ubuntu-latest' - - # Sets path (Linux, macOS) - - name: Update $PATH - run: echo "$HOME/.nimble/bin" >> $GITHUB_PATH - if: matrix.os == 'macos-latest' || matrix.os == 'ubuntu-latest' - - # Sets path (Windows) - - name: Update %PATH% - run: echo "${HOME}/.nimble/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append - if: matrix.os == 'windows-latest' - - # Install the Nim compiler - - name: Install Nim - run: | - curl https://nim-lang.org/choosenim/init.sh -sSf > init.sh - sh init.sh -y - - # Build for Linux - - name: Build (Linux) - run: nimble build -y -d:release --gcc.exe:musl-gcc --gcc.linkerexe:musl-gcc --gc:orc --opt:size nifty - if: matrix.os == 'ubuntu-latest' - - # Build for macOS/Windows - - name: Build (macOS, Windows) - run: nimble build -y -d:release --gc:orc --opt:size nifty - if: matrix.os == 'macos-latest' || matrix.os == 'windows-latest' - - # Retrieve ID and Name of the current (draft) release - - name: "Get current release" - id: current-release - uses: InsonusK/get-latest-release@v1.0.1 - with: - myToken: ${{ github.token }} - exclude_types: "release" - view_top: 1 - - # Package the resulting Linux/macOS binary - - name: Create artifact (Linux, macOS) - run: zip nifty_${{steps.current-release.outputs.tag_name}}_${{steps.os.outputs.id}}_x64.zip nifty - if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest' - - # Package the resulting Windows binary - - name: Create artifact (Windows) - run: Compress-Archive -Path nifty.exe -DestinationPath nifty_${{steps.current-release.outputs.tag_name}}_windows_x64.zip - if: matrix.os == 'windows-latest' - - # Upload artifacts to current draft release - - name: "Upload to current release" - uses: xresloader/upload-to-github-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - file: "nifty_v*.zip" - overwrite: true - tag_name: ${{steps.current-release.outputs.tag_name}} - release_id: ${{steps.current-release.outputs.id }} - verbose: true
D .github/workflows/ci.yml

@@ -1,44 +0,0 @@

-name: CI - -# Controls when the action will run. -on: - # Triggers the workflow on push or pull request events but only for the master branch - push: - branches: [master] - tags-ignore: ["**"] - pull_request: - branches: [master] - tags-ignore: ["**"] - - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: - -# A workflow run is made up of one or more jobs that can run sequentially or in parallel -jobs: - # This workflow contains a single job called "ci" - ci: - # The type of runner that the job will run on - runs-on: ubuntu-latest - env: - CHOOSENIM_CHOOSE_VERSION: stable - CHOOSENIM_NO_ANALYTICS: 1 - - # Steps represent a sequence of tasks that will be executed as part of the job - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v2 - - - name: install musl-gcc - run: sudo apt-get install -y musl-tools - - - name: Update $PATH - run: echo "$HOME/.nimble/bin" >> $GITHUB_PATH - - - name: Install Nim - run: | - curl https://nim-lang.org/choosenim/init.sh -sSf > init.sh - sh init.sh -y - - - name: Build - run: | - nimble build -y -d:release --gcc.exe:musl-gcc --gcc.linkerexe:musl-gcc
A CHANGELOG.md

@@ -0,0 +1,41 @@

+## Changelog + +### v780-0 (2026-06-15) + +* Re-released using Convergent Versioning. + +### v1.2.3 (2023-08-02) + +* Fixed Nim 2.0 compilation errors. + +### v1.2.2 (2020-10-25) + +* Updated to Nim v1.4.0. + +### v1.2.1 (2020-09-19) + +* Added tasklists to help system +* Now sorting commands in help +* No warning will be displayed in case of missing commands (only debug messages) + +### v1.2.0 (2020-09-12) + +* Added support for custom package directories (dir field). +* Added support for task lists. + +### v1.1.0 (2018-10-21) + +* Added purge command to remove storage directory and all its contents. +* Added -f option to skip confirmations. + +### v1.0.1 (2018-10-21) + +* Added support for installation via Nimble. + +### v1.0.0 (2018-04-29) + +* First public release. + +### v0.1.0 (2016-11-19) + +* Initial release. Implemented core functionalities.
M LICENSELICENSE

@@ -1,6 +1,6 @@

MIT License -Copyright (c) 2016 Fabio Cevasco +Copyright (c) Fabio Cevasco Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal
M README.mdREADME.md

@@ -1,19 +1,12 @@

-**Important** This project was moved to [sourcehut](https://git.sr.ht/~h3rald/nifty) on 2026-06-15. - -[![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 *nifty* is a decentralized (pseudo) package manager and script runner written in [Nim](https://nim-lang.org). -## Main features +### 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 +#### 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:

@@ -24,22 +17,22 @@ 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.

&rarr; 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 +#### 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 +#### 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 +#### 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 +### Usage * `nifty help [<command>]` &middot; Display help on the specified command (or all commands). * `nifty info <package>` &middot; Displays information on <package>
M nifty.nimblenifty.nimble

@@ -12,9 +12,9 @@ import niftypkg/config

# Package -version = pkgVersion -author = pkgAuthor -description = pkgDescription +version = "1.2.4" +author = "Fabio Cevasco" +description = "A decentralized (pseudo) package manager and script runner." license = "MIT" bin = @["nifty"] srcDir = "src"
M src/nifty.nimsrc/nifty.nim

@@ -19,7 +19,7 @@ niftypkg/project,

niftypkg/messaging let usage* = """ $1 v$2 - $3 - (c) 2017-2020 $4 + (c) 2016-2026 $4 Usage: nifty <command> [<package>] Executes <command> (on <package>).

@@ -32,7 +32,7 @@ Default: info

--force, -f Do not ask for confirmation when executing the specified command. --help, -h Displays this message. --version, -h Displays the version of the application. -""" % [pkgTitle, pkgVersion, pkgDescription, pkgAuthor] +""" % [pkgTitle, pkgVersionLabel, pkgDescription, pkgAuthor] var force = false
M src/niftypkg/config.nimsrc/niftypkg/config.nim

@@ -1,5 +1,6 @@

const - pkgTitle* = "nifty" - pkgVersion* = "1.2.3" - pkgAuthor* = "Fabio Cevasco" - pkgDescription* = "A decentralized (pseudo) package manager and script runner." + pkgTitle* = "nifty" + pkgVersion* = "7800" + pkgVersionLabel* = "v780-0" + pkgAuthor* = "Fabio Cevasco" + pkgDescription* = "A decentralized (pseudo) package manager and script runner."