# knob-tool

> An easy to use way to deploy to Github Packages for Docker.

Latest version **1.0.1** (published 2020-08-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install knob-tool
pnpm add knob-tool
yarn add knob-tool
bun add knob-tool
```

Provides the command `knob`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2020-08-12 |
| First published | 2020-08-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 9.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | MoonBarc |
| Maintainers | moonbarc |

## Links

- npm: https://www.npmjs.com/package/knob-tool
- Repository: https://github.com/MoonBarc/Knob
- Homepage: https://github.com/MoonBarc/Knob#readme
- Issues: https://github.com/MoonBarc/Knob/issues
- npm.io page: https://npm.io/package/knob-tool

## Dependencies (1)

- [chalk](https://npm.io/package/chalk.md) ^4.1.0

## Recent versions

- 1.0.1 (latest) — 2020-08-12
- 1.0.0 — 2020-08-12

## README

# Knob
A simple cli app that builds a docker image, tags it with a version, and pushes it to GitHub Packages for Docker.

Made by MoonBarc so he doesn't lose his sanity when developing for Docker.

## Docs
In order to use Knob, you must have a `Knobfile` in your current directory. A Knobfile defines things like the version, url, and authorization details.
Here's an example:
```shell
# Knobfile v0.1
# This is an example Knobfile.

# Fallback for when $ask receives no input or when using $default
SETDEFAULT 0.1

# Use $ask to get a prompt from the terminal, or fall back to the latest default set above.
VERSION $ask

# <username>: Github username <token-path>: A plain github token stored at that path.
LOGIN MoonBarc ~/GH_TOKEN.txt

# $version is replaced with the version specified.
URL docker.pkg.github.com/hypersapling/master-node/mkube-master:$version
```

There are 4 verbs so far:
`[SETDEFAULT,VERSION,LOGIN,URL]`

### [!] The login and URL verbs are required

There are also 3 system variables (custom ones coming soon)
The system variables include:
`[ask,version,default]`

These need to be started using a `$` and can be put anywhere except inside of a verb.
### `$ask`
The ask variable is special, and will prompt the user for the value when running the Knobfile
### `$default`
The default variable is the fallback value for when a user does not specify anything in an `$ask` prompt, and can be changed using the `SETDEFAULT` verb.
### `$version`
The version variable can be changed using the `VERSION` verb.

Make sure the Dockerfile and Knobfile are both in the root directory!


### Have fun!

---
_Source: https://npm.io/package/knob-tool · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
