Skip to content
This repository has been archived by the owner on Dec 7, 2023. It is now read-only.

add a CLI to interact with the server #50

Open
JeanMertz opened this issue Aug 25, 2019 · 1 comment
Open

add a CLI to interact with the server #50

JeanMertz opened this issue Aug 25, 2019 · 1 comment

Comments

@JeanMertz
Copy link
Contributor

The CLI could be the second client next to the web client.

The idea would be that the CLI provides limited, but useful functionality without having to visit the website.

Basically, you would be able to do things like:

automaat task search PATTERN
automaat task run NAME --var1=value1 --var2=value2
...

Those two would be the most basic commands needed to make it useful, but there are others as well.

Depending on how far we want to go, the second one could be interactive if no variables are provided, asking you to provide the correct values for each required (or optional) variable.

@JeanMertz
Copy link
Contributor Author

Dump from my local (old) TODO:

  • Create a new client (CLI) to launch pipelines from the terminal:

    export AUTOMAAT_SERVER=http://localhost:8000
    export AUTOMAAT_TOKEN=xxx
    
    automaat search "pipeline name"
    
    # Pipeline names get normalized by lowercasing them,
    # and replacing spaces with newlines.
    automaat run PIPELINE_NAME --variable "var-key: var-value"
    automaat run PIPELINE_NAME -v var-key:var-value
    
    automaat describe pipeline-name
    
    automaat list
    automaat list pipelines
    automaat list global-variables
    
    # By not specifying `--file`, your default $EDITOR will open
    # with a simple pipeline template (in YAML) and some instructions.
    # By saving that file, it is used as the pipeline input.
    automaat create pipeline --file path/to/json_or_yaml_file
    automaat create global-variable --name "Hello World" "Hello Variable Value"
    
    # Or, just call the binary `au`, there doesn't exist one by default, and its shorter.
    au search pipeline

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant