fugazi-io / webclient

web based terminal application for executing local and remote commands
http://fugazi.io
28 stars 12 forks source link

module named variables #118

Open nitzantomer opened 6 years ago

nitzantomer commented 6 years ago

The ability to declare and describe variables in a module scope. Something like:

{
    "name": "aRemoteTest",
    "title": "A (remote) Test!",
    "remote": {
        "origin": "string"
        "base": "$BASE"
    },
    "prompt": [
        {
            "property": "remote.origin",
            "message": "Enter the base url for the service"
        },
        {
            "variable": "$BASE",
            "message": "Enter the base url for the service"
        },
        {
            "variable": "$Y",
            "message": "Enter the Y param"
        }
    ],
    "variables": {
        "BASE": "string",
        "Y": "number"
    },
    "commands": {
        "doit": {
            "returns": "number",
            "syntax": [
                "do it (x number)",
                "do it (x number) for (Y number)"
            ],
            "endpoint": "/{ Y }/it/x"
        },
        "dothat": {
            "returns": "number",
            "syntax": [
                "do that (x number)",
                "do that (x number) for (Y number)"
            ],
            "endpoint": "/{ Y }/that/x"
        }
    }
}