GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - eduhds/JsonScripts: JsonScripts CLI. Run scripts/shell snippets from JSON file definition.

BranchesTags
Open more actions menu

Latest commit

 

History

62 Commits
62 Commits

Folders and files

NameName
Last commit message
Last commit date
.devcontainer
.devcontainer
 
 
.vscode
.vscode
 
 
Sources
Sources
 
 
docs
docs
 
 
scripts
scripts
 
 
.gitignore
.gitignore
 
 
.swift-format
.swift-format
 
 
LICENSE.txt
LICENSE.txt
 
 
Package.resolved
Package.resolved
 
 
Package.swift
Package.swift
 
 
README.md
README.md
 
 
jsonscripts-1024x1024.png
jsonscripts-1024x1024.png
 
 
scripts.json
scripts.json
 
 

Repository files navigation

JsonScripts

eduhds/JsonScripts

Swift macOS Linux

JsonScripts CLI. Run scripts/shell snippets from JSON file definition.

Install

Download executable from releases.

Tip: Consider using gspm to download and install assets from GitHub releases!

Usage

USAGE: jnss <command> [--file <file>] [--verbose] [<arguments> ...] [-var <var> ...]

ARGUMENTS:
  <command>               init|list|<alias> Specify a builtin command or a command alias from scripts.json
  <arguments>             Command arguments

OPTIONS:
  -f, --file <file>       Specify the json file, default is "./scripts.json"
  --verbose               Verbose mode
  -var <var>              Specify multiple key-value pairs in the format 'key=value'.
  --version               Show the version.
  -h, --help              Show help information.

Definition file format

{
  "version": 1,
  "variables": {
    "name": "JsonScripts"
  },
  "scripts": {
    "hello": "echo 'Hello from {{name}}'"
  }
}

Examples

# Generate a scripts.json
jnss init

# List available scripts
jnss list

# Run a command by alias
jnss hello

# Run a command from a scripts.json placed in another location
jnss hello --file /path/to/scripts.json

# Passing command line args
jnss foo -- --bar

# Passing variables (will override one if already exists in .json file)
jnss hello -var 'name=world'

# Changing shell
SHELL=/bin/bash jnss hello

Development

Run

swift run jnss hello

Build

# Build for release
swift run jnss build
# Deploy GitHub release
swift run jnss release -var 'tag=<tag here>' -- .build/release/jnss*.tar.gz

License

GPL-3.0 license

Credits/Thanks

  • apple/swift-argument-parser
  • jordanbaird/Prism

About

JsonScripts CLI. Run scripts/shell snippets from JSON file definition.

Topics

automationclicommand-linecommand-line-tooljsonjson-automationjson-clijson-scriptsscript-runnerscriptingshellswifttask-automation

Resources

Readme
GPL-3.0 license
Activity

Stars

3 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.