Giftwrap: API Docs


init

Initialize giftwrap

Usage


giftwrap init [-f]

Description

Running init will initialize giftwrap so that it can save cli's you create locally (as well as other options). This command will fail if giftwrap has already been initialized (unless -f is used, see below).

-f Reinitializes giftwrap, overwritting any settings and saved CLI's that might have already been made.

Notes

Depending on permissions, giftwrap init may have to be ran as root, i.e. sudo giftwrap init. giftwrap will change the access permissions for its config files so that sudo won't have to be ran in the future. If giftwrap is ran for the first time, or if giftwrap is ran but its config files are removed or corrupted, giftwrap init is ran implicitly.

build

Convert a javascript file into a cli.

Usage


giftwrap [build] [--name=name] [--file=...path]

Description

Running giftwrap in the root of where a file containing a javascript function is will begin the process of converting a javascript function into a cli, which can be ran in the terminal or published to npm. Interactive prompts will help giftwrap determine how the function should be converted. This is the heart of giftwrap!
--name Specify what the cli will be named. When omitted, the user is prompted for a cli name during the build process.
--file Specify the path to the javascript file that should be read, rather than reading javascript files from the location where giftwrap is ran. Absolute or relative paths are accepted.

Notes

For convience, running giftwrap implicitly runs giftwrap build (except when giftwrap is not initialized). So build can always be omitted.

run

Run a created cli

Usage


giftwrap run cli-name [...arguments]

ls

(coming soon)

options

(coming soon)