- Done
- Next
- create files at given location (even remotely or in docker image)
- Workarounds
- Future
- Descoped
- can run scripts based on yaml hierarchy
- can run scripts based on yaml hierarchy (using prefixes)
- can prompt user if path not complete
- can prompt for env from stdin (allow providing defaults)
- prompt user with a "replayable" script
- external env var prerequisites (e.g. must have ZIPDROP_V3_BEARER_TOKEN)
- env vars -> resolving env vars
- opt to list resolved env values
- support specifying multiple environments (comma delimited)
- keep a history log (incl timestamp)
- don't include process.env in the
--printenv - throw error if $cmd is missing required environment variables
- $ask > $choices (include populate from $cmd etc)
- env vars specific to the script being run
- $imports - extend from other yaml configs
- --init script (also happens if no config file)
- Create new config > "Blank"
- Create new config > "NPM"
- Create new config > from existing NPM (package.json)
- run --init if no args supplied
- No loop on list
- hide debug output behind an opts
- consolidate
string,$envand$resolveto behave the same way ($envis a clash!) - replay last command / replay from log using
_log_option - $imports > extend to support remote (https://) urls (and a
--pulloption) - ability to run in docker container
$image: node:lts-alpine - ABI support
- ABI - discover json files with
{ abi: [...], address: '0xabc' }up to a max depth of 5 - ABI - support view/non-payable functions (with args)
- ABI - support payable functions (requires wallet) =>
env.PRIVATE_KEY - ABI - support historical function calls =>
env.BLOCK_NUMBER - ABI - document options (e.g.
plugins: abi: true)
- ABI - discover json files with
- support emoji followed by space as a script name prefix (ignored when using prefix matchers)
- support auto adding emojis 🪝📁
plugins: icons: true/falseto toggle (default: true) - should normalise (lowercase and diacritics) strings, when matching script names
- swap logging for LOG_LEVEL env var (info, debug, warn, error)
- ensure ONLY script output is captured in the
j run > out.txt- so jobs can be chained - add non-interactive
--batchmode arg - handling of sensitive env vars -> include env groups specify per $cmd, only for that $cmd
$envIncludes: 'secretEnvGroup' - support JSON as input for $choices (
$filter/$fieldsMapping/$sort) - list environments
- add relaxed json parsing for --stdin
- support jsonpath in $fieldsMapping
- append a
?to indicate optionalimports: - $cmd - add ability to show a custom error message for non-zero exits
$errorMessage(+documentation, +unittests) - add custom warning just in time - if trying to run $image and docker is not available
- add
npmplugin (default true) - add
makeplugin (default true) - create an
$sshaugment for$cmd, similar to$image(use aSSH_SCRIPTfor overriding) - when run, warn if not the latest version (check using
npm view @mountainpass/hooked-cli version) - teardown orphaned docker containers on SYSINT
- resolve
$sshhostname - ensure local env is resolved, BEFORE imports (esp -> DOCKER_ARCHIVE)
- exclude host environment variables when running $script
- use "->" arrow to list select (because sometimes colours aren't present) (i.e. use
listinstead ofrawlist) - Scripts that run scripts, should inherit the system's environment variables.
-
add ability for $envChoice - prompt user for a required environment to load
-
if calling self... don't exit the environment! call within system.
-
limit history to last 1000x
-
$cmd> add ability to$timeoutMs -
$cmd> add ability to$retries(retries on error, default0=disabled,-1=indefinite, additional$retryDelayMs) -
ability to add
$envat any sub level in scripts -
show success / error messages after environment?
-
show success / error messages after scripts?
-
remember where we got to last "scripts"
-
remember previous stdin (use as defaults)
-
allow
$cmdonly scripts to be specified as a string on the env key? -
allow environment resolution in all
*_SCRIPTS. -
document the
pluginsoptions -
imports> add checksum verification (similar to docker sha256) -
imports> add github.com (shorthand for https://raw.githubusercontent.com) -
imports> use etag to check if changed -
scripts> add regex search to cli and inapp selection - e.g. "build zip" => "build.*zip" => "build platform image to local zip" -
$ask> check that defaults work for text and choices -
(cli args) > document reason we want
$askoption to be explicitly defined, and not just an environment variable
- add dynamic scripts for npm
- add ability to specify
requiredEnvNames: <ENV_NAME>: <string error message> - hooked.yaml version validation - yml:
version: >1.0.20 - update "rerun" command with inputs (JUST IN TIME, after $ask resolution!) (in yellow!)
- cleanup .env and .tmp on startup
-
make
$envFromHostoverridable from the top level (feature flag) -
allow overriding default docker run script
- build
- document
- write unit test
-
support openapi calls - e.g. https://api-engineering.nyc3.digitaloceanspaces.com/spec-ci/DigitalOcean-public.v2.yaml
-
publish a yaml schema definition - e.g. # yaml-language-server: $schema=https://my.url.to/the/schema vs https://www.schemastore.org/json/
-
dynamic exec paths - e.g. npm, makefile, abi files, openapi specs, etc
-
if only one possible child path, prompt user to run it straight away
-
secrets - best practice: don't import into environment, share a file instead
-
secrets - parse output stream and obfuscate e.g.
***if printed -
provide an example of a "poll until available" script
- e.g.
curl --fail-with-body ...
- e.g.
- add a warning on homedir/import scripts if the chmod isn't
400(optional) - Inquirer > Press to continue -> important for destructive operations? (e.g. overwrite prod) (workaround:
read -p "Are you sure? " -n 1 -r)
- ability to dyanmically fetch the next script's children
- styling
- Add description
- Add colour (edited)
- Add emoji support
- Tty handling - show error message? (already handled?)
- Inquirer > Add autocomplete plugin
- Inquirer > Tree plugin
- Slack runner
- global settings > username or ssh key
- identity, in history, use for ssh key gen and approval
- permissions (only really enforcable on server)
- run remotely (e.g. on build server, esp for gated access)
- concept of
prerequisites(e.g. must have 'node' installed, or $cmd must exit with 0)
-
$inject - inject yaml from a file- nah, just use the $imports instead-
local -
remote (e.g.extends: https://myserver/foo.yaml) -
global settings under user profile > env vars
-
-
leverage existing scripts-
Npm- nah, just use hooked instead! -
Makefile- nah, just use hooked instead! -
auto detect child folders with hooked.yaml?- nah, just use the $import feature instead!
-
-
Input type > Remote (e.g. rest api)- just use $cmd to populate inputs (one line per choice) -
javascript - e.g. Math.max(10, ${DATE})- just use docker and/or $cmd -
add more executors (e.g. javascript?)- nah, user can just leverage a container or cli tool (same as above) -
have "shared" environment variables (env agnostic)just use multi environments -
--init script > Create new config > "Docker"if standardised, this could be a remote file -
--init script > Create new config > $HOME/hooked.yamlleft to the user to setup -
--init script > Create new config > from existing Makefiletoo obscure, wait until desired before creating -
Inquirer > Use the Inquirer - "Defaults" parameter- already have this behaviour -
Inquirer > Exit option -> Interrupted plugin (esc to quit)just use ctrl+c -
opt to list all commands- unnecessary, can already prompt user -
non-interactive mode? -
opt to select env names? (as opposed to having a default) -
change-infrom json to-in key=val key2=val2(var args causes clashes with script targets) -
$imports > extend $cmd to optionally specify a $cwd (current working directory e.g. relative to an imported script?)- tricky, any imported file should parameterise this, or be agnostic of dir -
Pipelines- couldn't that just use a script? -
consolidate- No - stdin must be a separate output, so that jobs can be replayedenvandstdin? -
secrets - make- No need for special top level env$secretenvs, that are only imported explicitly for a single run -
add max limit of 1000 records to history- No, simply truncate your own history e.g.echo "$(tail -50 .hooked_history.log)" > .hooked_history.log