Add run command

This commit is contained in:
Daniel Flanagan 2022-02-17 12:56:18 -06:00
parent 1f01cf0295
commit d2f0b0de39
Signed by: lytedev
GPG Key ID: 5B2020A0F9921EF4
1 changed files with 26 additions and 20 deletions

View File

@ -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