From d2f0b0de39d7e82e21fb1c14f8f250b2f1de9366 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Thu, 17 Feb 2022 12:56:18 -0600 Subject: [PATCH] Add run command --- readme.md | 46 ++++++++++++++++++++++++++-------------------- 1 file changed, 26 insertions(+), 20 deletions(-) diff --git a/readme.md b/readme.md index 22f2ff3..4a77c63 100644 --- a/readme.md +++ b/readme.md @@ -62,6 +62,12 @@ deno compile -A -o poc-cli.darwin.x86_64 --target x86_64-apple-darwin src/core.t deno compile -A -o poc-cli.darwin.aarch64 --target aarch64-apple-darwin src/core.ts ``` +### Run Without Compiling + +``` +deno run -A src/core.ts +``` + ### Deploy Artifacts ``` @@ -86,53 +92,53 @@ It's self-documenting... sort of! poc-cli ``` ------ +--- # My Old Notes Below! ------ +--- # Pluggable CLI - Each subcommand is a plugin? - Versioning and/or stability will be important? - - Maybe plugins _never_ change and instead you prefix them with a version? - - How can we build stability into the system? + - Maybe plugins _never_ change and instead you prefix them with a version? + - How can we build stability into the system? - Some subset or all plugins are already known - Auto-download plugins when attempting to run a command - Completions for subcommands - - Are completions provided for commands not-yet-installed? Does attempting to - complete a subcommand's commands install the plugin and process its - completions? + - Are completions provided for commands not-yet-installed? Does attempting to + complete a subcommand's commands install the plugin and process its + completions? - Will have configuration # Core functions - What plugins are available to me? - - HTTP GET (and cache?) some known human- and machine-readable manifest - - JSON, YAML, Cue, or Ion? + - HTTP GET (and cache?) some known human- and machine-readable manifest + - JSON, YAML, Cue, or Ion? - Install a plugin - - HTTP GET + - HTTP GET - Delete a plugin - - rm -r dir + - rm -r dir - Update self - - download new binary and replace self with it + - download new binary and replace self with it - Update plugin - - replace plugin + - replace plugin - Run a plugin with some given arguments - - call plugin with args + - call plugin with args # Components I See - Core - - Knows where to find manifest (may cache locally) - - Installs, updates, deletes plugins using information in manifest - - Can update or uninstall itself - - Can run plugins + - Knows where to find manifest (may cache locally) + - Installs, updates, deletes plugins using information in manifest + - Can update or uninstall itself + - Can run plugins - Manifest - - Contains information about where to find plugins and their versions + - Contains information about where to find plugins and their versions - Plugins - - Probably dumb scripts that call fancier things + - Probably dumb scripts that call fancier things [upstream]: https://git.lyte.dev/lytedev/pluggable-cli-deno [github]: https://github.com/lytedev/pluggable-cli-deno