Distributed, realtime CLI for live Node apps.

Related tags

Command Line vantage
Overview

vantage

Build Status Gitter NPM Version


Vantage = CLI + SSH + REPL for your live node app. In one line:

require("vantage")().listen(4000);


vantage.js demo

Contents

Introduction

Vantage gives you a new perspective into your live node application not previously available.

An extension of Vorpal, Vantage turns your live Node app into a immersive CLI. Accessible remotely or locally, Vantage lets you build your own API for your application and import community extensions, introducing a new means of live diagnostics and activity for your dev and prod environments.

  • First-class CLI: tab completion, history, you name it.
  • Build your own API with the familiar syntax of commander.js.
  • SSH-like client / server setup for remote access to your live Node app.
  • Production-ready, with authentication middleware and a basic firewall.
  • Built-in REPL.

Unlike any other REPL or CLI module, Vantage allows you to remotely connect to your live app and access the CLI transparently, exactly as you would in an SSH session. Vantage can connect through an unlimited number of live Node instances across multiple machines, piping commands and information to and from your local terminal.

Made with ❤️ by @dthree.

Notice

This is now an OPEN Open Source project. I am not able to invest a significant amount of time into maintaining Vantage and so am looking for volunteers who would like to be active maintainers of the project. If you are interested, shoot me a note.

Getting Started

Tour

This Vantage tour will give you a live walk-through of vantage's features.

$ npm install -g vantage
$ vantage tour
Examples
Community
Quick Start

First, install vantage globally:

$ npm install -g vantage

Now, add the following to a file named server.js.

// Create a new instance of vantage.
var vantage = require("vantage")();

// Add the command "foo", which logs "bar".
vantage
  .command("foo")
  .description("Outputs 'bar'.")
  .action(function(args, callback) {
    this.log("bar");
    callback();
  });
  
// Name your prompt delimiter 
// "websvr~$", listen on port 80 
// and show the Vantage prompt.
vantage
  .delimiter("websvr~$")
  .listen(80)
  .show();

Run server.js. You Node app has become a CLI.

$ node server.js
websvr~$ 

Open another terminal. Because Vantage is listening on port 80, you can remotely connect to it:

$ vantage 80
$ Connecting to 127.0.0.1:80 using http...
websvr~$ 

Try out your "foo" command.

websvr~$ foo
bar
websvr~$

Now type "help" to see Vantage's built in commands in addition to "foo":

websvr~$ help

  Commands
  
    help [command]    Provides help for a given command.
    exit [options]    Exits instance of Vantage.
    use <module>      Installs a vantage extension in realtime.
    vantage [server]  Connects to another application running vantage.
    foo               Outputs "bar".

websvr~$

That's the basic idea. Once you get the hang of it, read on to learn some of the fancier things Vantage can do.

API

Vantage is an extension of Vorpal, and so inherits all of its properties and methods. For all command creation and CLI syntax, refer to Vorpal's API.

.listen(app, [options or callback], [callback])

Starts Vantage as a server.

Vantage as a standalone web server

If you just want it to listen on a port independent of your web application, simply pass in the port and Vantage will spawn a new HTTP server. Every time a client connects to Vantage, the connection callback will be thrown and include the socket.io connection object.

var vantage = new Vantage();
vantage.listen(80, function(socket){
  this.log("Accepted a connection.")
});

Vantage with an existing web server

If you want Vantage to listen on the same port as your web application, you can use Vantage's listen function in place of your existing web server's listen function.

This is useful when running clustered instances of your server, such as behind a reverse proxy, where every instance has a separate port that can only be accessed internally. In this way, you can hop into any running instance without having to remember a separate set of ports.

With Koa.js
var koa = require('koa');
var Vantage = require('vantage');

var vantage = new Vantage();
var app = koa();

vantage.listen(app, 80);
With Express.js
var express = require('express');
var Vantage = require('vantage');

var vantage = new Vantage();
var app = express();

vantage.listen(app, 80);
With Hapi.js
var Hapi = require('hapi');
var Vantage = require('vantage');

var vantage = new Vantage();
var server = new Hapi.Server();

vantage.listen(server, 80);

server.start();
With SSL / advanced options

You can pass detailed options to your web server with the second argument in place of the port. These options are the same options you would pass into your web server, with a few exceptions:

  • options.port: Tells vantage what port to listen on.
  • options.ssl: A boolean that tells Vantage whether to spawn an HTTP or HTTPs server.
  • options.logActivity: When true, a TTY acting as a Vantage server that receives a connection will log when clients log in and out of the server. Defaults to false.

Default HTTPs server example:

var vantage = new Vantage();
vantage.listen(someMiddleware, {
  port: 443,
  ssl: true,
  key: fs.readFileSync('./../../server.key'),
  cert: fs.readFileSync('./../../server.crt'),
  ca: fs.readFileSync('./../../ca.crt'),
  requestCert: true,
  rejectUnauthorized: false,
});

.banner(string)

Sets a banner for display when logging into a given Vantage server.

var banner = 
"######################################################################" + 
"#                    Welcome to joescrabshack.com                    #" + 
"#                                                                    #" +
"#              All connections are monitored and recorded            #" + 
"#      Disconnect IMMEDIATELY if you are not an authorized user      #" + 
"######################################################################";
vantage
  .delimiter('appsvr:3000~$')
  .banner(banner)
  .listen(3000);
$ vantage 3000
$ Connecting to 127.0.0.1:3000...
$ Connected successfully.
######################################################################
#                    Welcome to joescrabshack.com                    # 
#                                                                    #
#              All connections are monitored and recorded            # 
#      Disconnect IMMEDIATELY if you are not an authorized user      # 
######################################################################
? user: 

Note: See authentication section for auth details.

Firewall

If your Vantage server is listening on a public-facing web port such as 80 or 443, your organization's firewall is not going to help you. This is a barebones IP firewall for limiting connections down to your internal subnets. For sensitive applications, this obviously does not replace authentication.

.firewall.policy(string)

Sets the default policy for the firewall to either ACCEPT or REJECT. Any request that does not match a rule will fall back to this policy. Returns vantage.firewall.

Defaults to ACCEPT.

// This will reject all remote connections.
vantage.firewall.policy("REJECT");

.firewall.accept(address, [subnet])

Allows a particular address / subnet to connect to Vantage. Returns vantage.firewall. If no arguments are passed, returns the currently-applied policy.

vantage.firewall
  .policy("REJECT")
  .accept("10.0.0.0/8")
  .accept("192.168.0.0", 24);

console.log(vantage.firewall.policy()) // -> REJECT  

.firewall.reject(address, [subnet])

Denies access to a particular address / subnet. Returns vantage.firewall.

vantage.firewall
  .policy("ACCEPT")
  .reject("64.0.0.0", 8)
  .reject("192.168.0.0/16");

.firewall.rules()

Returns an array of applied rules.

console.log(vantage.firewall.rules());
// -> [{ ip: "64.0.0.0", subnet: 8, rule: "REJECT" }]

.firewall.reset()

Reverts vantage.firewall to an ACCEPT policy and erases all rules.

Authentication

Vantage supports authentication strategies as middleware. It comes with a default Basic Authentication module.

vantage.auth(middleware, options)

Uses a given authentication strategy. Pass the required middleware into the first variable, and any options / configuration for that middleware as given in that module's documentation into the options parameter.

var pam = require("vantage-auth-pam");
vantage.auth(pam, options);

Vantage Basic Auth is built in, and so can be used with the "basic" string instead of requiring a module.

var users = [
    { user: "admin", pass: "4k#842jx!%s" },
    { user: "user", pass: "Unicorn11" }
];

var vantage = require("vantage")();

vantage.auth("basic", {
  "users": users,
  "retry": 3,
  "retryTime": 500,
  "deny": 1,
  "unlockTime": 3000
});
Security Note

If no vantage.auth function is declared, your app will not require authentication. As a security measure, if your NODE_ENV environment variable is not set to "development" and there is no authentication, Vantage will disallow remote connections. To permit remote connections without authentication, simply set your NODE_ENV to "development".

Building Authentication Strategies

You can publish your own custom authentication strategies for Vantage.js as its own Node module.

I am currently looking to team up with a rocket scientist like you to build a pam-based authentication strategy for Vantage. If you are interested, send me a note!

The format for publishing a strategy is simple:

module.exports = function(vantage, options) {

  // The Vantage instance is exposed through
  // the `vantage` parameter. `options` exposes
  // options passed in by the strategy's user, and
  // is defined by you.

  // This is where you can persist the log on state of 
  // the users attempting to log in, etc.

  // You return a function, which executes
  // in the same context as a vantage command.
  // Every time the user attempts to connect,
  // this function runs. In it you can prompt
  // the user, etc.
  return function(args, callback) {

    /** 
     * Args exposes several pieces of data
     * you can use:
     * {
     *   // If the user pre-passes auth data, it will be
     *   // available here. Otherwise, prompt him for it.
     *   user: "admin", 
     *   pass: "Unicorn11",
     *   // This is based on socket.io's connection handshake,
     *   // and has a lot more data than this.
     *   handshake: { 
     *     host: "192.168.0.1",
     *     port: "800"
     *   }
     * }
     */

    // Prompt user / look up credentials, etc.

    // Authentication is determined by your
    // callback: `callback(message, authenticated)`.

    // Example of rejected auth.
    callback("Invalid credentials.", false);

    // Example of accepted auth.
    // callback(void 0, true);
  }

}

Events

Vantage extends EventEmitter.prototype. Simply use vantage.on('event', fn) and vantage.emit('event', data). The following events are supported:

Socket.io client / server events

Vantage uses socket.io to handle all communication between instances. The following events map to the default socket.io events:

  • client_connect: Maps to connect for socket.io-client.

  • client_connect_error: Maps to connect_error for socket.io-client.

  • client_error: Maps to error for socket.io-client.

  • client_disconnect: Maps to disconnect for socket.io-client.

  • server_connection: Maps to connection for socket.io.

  • server_disconnect: Maps to disconnect for socket.io.

Vantage client / server events
  • client_keypress: Fires on keypress on local client terminal.

  • client_prompt_submit: Fires when the CLI prompt has been submitted with a command, including ''.

  • client_command_executed: Fires at the client once the command has been received back as executed.

  • client_command_error: Fires at the client if a command comes back with an error thrown.

  • server_command_received: Fires at the end-server actually executing a command receives the command.

  • server_command_executed: Fires at the end-server once the command has successfully executed.

  • server_command_error: Fires at the end-server if the command has thrown an error.

Automation

Vantage allows you execute your API commands from javascript synchronously, using either callbacks or promises.

.connect(server, port, [options or callback], [callback])

Connects to another instance of Vantage. Returns callback or promise.

// With a promise
vantage.connect('127.0.0.1', 8001).then(function(data){
  // ... 
}).catch(function(err){
  console.log('Error connecting: ' + err);
});

// With a callback
vantage.connect('127.0.0.1', 8001, function(err) {
  if (!err) {
    // ... connected
  }
});
Options
  • ssl: Set to true if server you are connecting to uses HTTPS.

.exec(command, [callback])

Executes an API command string. Returns a callback or Promise.

// Using Promises:
vantage.exec("vantage 8001").then(function(data){
  return vantage.exec("roll dough");
}).then(function(data){
  return vantage.exec("add cheese");
}).then(function(data){
  return vantage.exec("add pepperoni");
}).then(function(data){
  return vantage.exec("shape crust");
}).then(function(data){
  return vantage.exec("insert into oven");
}).then(function(data){
  return vantage.exec("wait 480000");
}).then(function(data){
  return vantage.exec("remove from oven");
}).then(function(data){
  return vantage.exec("enjoy");
}).catch(function(err){
  console.log("Error baking pizza: " + err);
  app.orderOut();
});

// Using callbacks:
vantage.exec("vantage 8001", function(err, data) {
  if (!err) {
    vantage.exec("bake pizza", function(err, pizza){
      if (!err) {
        app.eat(pizza);
      }
    });
  }
});

Extensions

Just like Vorpal, Vantage supports extensions. Creating extensions is simple and is covered in Vorpal's documentation.

License

MIT

Footnotes

Er, that GIF... I'm so confused...

That's okay. Here's what happened:

  1. In my terminal, I started a local Node web server:
$ node websvr.js

Normally, you would simply see what you logged, and would have no interaction with Node. Instead, Vantage gave us a prompt:

websvr~$ 
  1. I typed help, which gave me a list of all of Vantage's built-in commands as well as commands I added.

  2. In my websvr.js, I gave Vantage a command that would turn on logging only for web requests. By logging domains of activity, this assists productivity in debugging. To run this, I typed debug web, and it started logging all web requests.

  3. I then typed debug off, which disabled log output.

  4. By then entering the repl command, I entered a special REPL "mode" where I can access the raw javascript and objects in my application, while it's running. This is the equivalent of running $ node in your terminal, except it is in the context of your live application!

  5. Satisfied with repl mode, I exited out of it with the exit command.

  6. So that's nice, you can access the local Node instance in your terminal. But what about remote or daemonized applications? By using the built-in vantage command, I remotely connect to my Node database API listening on port 5001, by running vantage 127.0.0.1:5001.

  7. Just like SSH, I'm now "in" the new instance, and my prompt changed to dbsvr~$.

  8. This server supports another Vantage mode. By typing sql, I enter "sql mode". Using this, I typed an arbitrary SQL command and it connected to my database and executed it. When done, I entered exit.

  9. I felt like checking out the latest trend on Hacker News. I typed help and was disappointed to find there was no hacker-news API command.

  10. Fortunately, someone made an extension for that - an NPM module called vantage-hacker-news. To download it and import the commands into Vantage in realtime, I typed use vantage-hacker-news.

  11. With this command, vantage did a temporary npm install on the module and loaded it into the application's memory. By typing help again, I can see I now have a new Vantage command registered: hacker-news!

  12. I used the command: hacker-news --length 3, and this showed me the top 3 items trending on Hacker News. One of them was obviously an article on the Node event loop, because Node is awesome.

  13. Satisfied, I typed exit, which brought me back to my web server.

  14. I then typed exit -f (for --force) to actually quit the web server, which was running locally in my terminal.




vantage.js

Bitdeli Badge

Comments
  • Repeated output

    Repeated output

    when you run the simple example like var vantage = require("vantage")();

    // Add the command "foo", which logs "bar". vantage .command("foo") .description("Outputs 'bar'.") .action(function(args, callback) { this.log("bar"); callback(); });

    vantage .delimiter("websvr~$") .listen(5003) .show();

    and you type foo, you get foo repeated then bar. Why is foo repeating? websvr~$ foo websvr~$ foo (this is the repeated output) bar

    opened by wonderdogone 18
  • tutorial not working on windows

    tutorial not working on windows

    Step 5: start server 3001 Successfully spawned server

    Step 6: vantage 3001 Error connecting. 503 service unavailable

    You're in. Notice the prompt changed.

    (Prompt does not change)

    Step 7: port undefined

    An extrenal process is spawned but it does not repond. Any idea what's causing this?

    opened by eurochriskelly 15
  • Best way to asynchronously logs to Vantage?

    Best way to asynchronously logs to Vantage?

    Hi,

    I wanted to make a debug as we can see in the Gif. So, using express, I started by making a middleware to get all requests information but now I'm asking myself on how to properly send theses logs to my vantage instance.

    I thought that I can send the log function of my debug command to the global scope (then the middleware can use it to log everything he has to) but I find this very crappy.

    Thanks for your councils.

    opened by MrHalfman 8
  • connections should be transparent

    connections should be transparent

    Piping stdout downstream.

    Perhaps there's a good use-case for this but by default it would be nice if connecting from a remote did nothing but connect up the repl. If someone wants to suck the stdout into their connected client, then they could make a command for that (or you could make it a standard built-in command).

    In addition, it probably shouldn't redirect output totally, rather it should just duplicate the output.

    opened by timoxley 7
  • Better support for HapiJS connections

    Better support for HapiJS connections

    Hapi has a few different states for connections, by default there isn't a "connection" until server.connection is called.

    This PR handles

    No .connection call (creates a labelled connection for vantage) Multiple connections with an option to select a specific server via the options and connectionLabel Singular .connection call.

    Hope it helps!

    opened by davemackintosh 6
  • several build errors

    several build errors

    Getting these when installing vantage,

    utf-8-validate

    $ if not defined npm_config_node_gyp (node "C:\Users\loote\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node  rebuild )
    Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
      bufferutil.cc
    C:\projects\vantage-test\node_modules\nan\nan.h(263): error C2995: 'v8::Local<T> _NanEnsureLocal(v8::Local<T>)': function template has already been defined [C:\projects\vantage-test\node_modules\bufferutil\build\bufferutil.vcxproj]
      C:\projects\vantage-test\node_modules\nan\nan.h(256): note: see declaration of '_NanEnsureLocal'
    C:\projects\vantage-test\node_modules\nan\nan.h(661): error C3083: 'smalloc': the symbol to the left of a '::' must be a type [C:\projects\vantage-test\node_modules\bufferutil\build\bufferutil.vcxproj]
    C:\projects\vantage-test\node_modules\nan\nan.h(661): error C2039: 'FreeCallback': is not a member of 'node' [C:\projects\vantage-test\node_modules\bufferutil\build\bufferutil.vcxproj]
      C:\Users\loote\.node-gyp\5.7.0\include\node\node_object_wrap.h(8): note: see declaration of 'node'
    C:\projects\vantage-test\node_modules\nan\nan.h(661): error C2061: syntax error: identifier 'FreeCallback' [C:\projects\vantage-test\node_modules\bufferutil\build\bufferutil.vcxproj]
    C:\projects\vantage-test\node_modules\nan\nan.h(665): error C2065: 'callback': undeclared identifier [C:\projects\vantage-test\node_modules\bufferutil\build\bufferutil.vcxproj]
    C:\projects\vantage-test\node_modules\nan\nan.h(665): error C2065: 'hint': undeclared identifier [C:\projects\vantage-test\node_modules\bufferutil\build\bufferutil.vcxproj]
    C:\projects\vantage-test\node_modules\nan\nan.h(672): error C2665: 'node::Buffer::New': none of the 4 overloads could convert all the argument types [C:\projects\vantage-test\node_modules\bufferutil\build\bufferutil.vcxproj]
      C:\Users\loote\.node-gyp\5.7.0\include\node\node_buffer.h(43): note: could be 'v8::MaybeLocal<v8::Object> node::Buffer::New(v8::Isolate *,char *,size_t)'
      C:\Users\loote\.node-gyp\5.7.0\include\node\node_buffer.h(31): note: or       'v8::MaybeLocal<v8::Object> node::Buffer::New(v8::Isolate *,v8::Local<v8::String>,node::encoding)'
      C:\projects\vantage-test\node_modules\nan\nan.h(672): note: while trying to match the argument list '(v8::Isolate *, const char *, uint32_t)'
    C:\projects\vantage-test\node_modules\nan\nan.h(676): error C2440: 'return': cannot convert from 'v8::MaybeLocal<v8::Object>' to 'v8::Local<v8::Object>' [C:\projects\vantage-test\node_modules\bufferutil\build\bufferutil.vcxproj]
      C:\projects\vantage-test\node_modules\nan\nan.h(676): note: No constructor could take the source type, or constructor overload resolution was ambiguous
    C:\projects\vantage-test\node_modules\nan\nan.h(683): error C2039: 'Use': is not a member of 'node::Buffer' [C:\projects\vantage-test\node_modules\bufferutil\build\bufferutil.vcxproj]
      C:\Users\loote\.node-gyp\5.7.0\include\node\node_buffer.h(8): note: see declaration of 'node::Buffer'
    C:\projects\vantage-test\node_modules\nan\nan.h(683): error C3861: 'Use': identifier not found [C:\projects\vantage-test\node_modules\bufferutil\build\bufferutil.vcxproj]
    gyp ERR! build error
    

    bufferutil

    $ if not defined npm_config_node_gyp (node "C:\Users\loote\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node  rebuild )
    Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
      bufferutil.cc
    C:\projects\vantage-test\node_modules\nan\nan.h(263): error C2995: 'v8::Local<T> _NanEnsureLocal(v8::Local<T>)': function template has already been defined [C:\projects\vantage-test\node_modules\bufferutil\build\bufferutil.vcxproj]
      C:\projects\vantage-test\node_modules\nan\nan.h(256): note: see declaration of '_NanEnsureLocal'
    C:\projects\vantage-test\node_modules\nan\nan.h(661): error C3083: 'smalloc': the symbol to the left of a '::' must be a type [C:\projects\vantage-test\node_modules\bufferutil\build\bufferutil.vcxproj]
    C:\projects\vantage-test\node_modules\nan\nan.h(661): error C2039: 'FreeCallback': is not a member of 'node' [C:\projects\vantage-test\node_modules\bufferutil\build\bufferutil.vcxproj]
      C:\Users\loote\.node-gyp\5.7.0\include\node\node_object_wrap.h(8): note: see declaration of 'node'
    C:\projects\vantage-test\node_modules\nan\nan.h(661): error C2061: syntax error: identifier 'FreeCallback' [C:\projects\vantage-test\node_modules\bufferutil\build\bufferutil.vcxproj]
    C:\projects\vantage-test\node_modules\nan\nan.h(665): error C2065: 'callback': undeclared identifier [C:\projects\vantage-test\node_modules\bufferutil\build\bufferutil.vcxproj]
    C:\projects\vantage-test\node_modules\nan\nan.h(665): error C2065: 'hint': undeclared identifier [C:\projects\vantage-test\node_modules\bufferutil\build\bufferutil.vcxproj]
    C:\projects\vantage-test\node_modules\nan\nan.h(672): error C2665: 'node::Buffer::New': none of the 4 overloads could convert all the argument types [C:\projects\vantage-test\node_modules\bufferutil\build\bufferutil.vcxproj]
      C:\Users\loote\.node-gyp\5.7.0\include\node\node_buffer.h(43): note: could be 'v8::MaybeLocal<v8::Object> node::Buffer::New(v8::Isolate *,char *,size_t)'
      C:\Users\loote\.node-gyp\5.7.0\include\node\node_buffer.h(31): note: or       'v8::MaybeLocal<v8::Object> node::Buffer::New(v8::Isolate *,v8::Local<v8::String>,node::encoding)'
      C:\projects\vantage-test\node_modules\nan\nan.h(672): note: while trying to match the argument list '(v8::Isolate *, const char *, uint32_t)'
    C:\projects\vantage-test\node_modules\nan\nan.h(676): error C2440: 'return': cannot convert from 'v8::MaybeLocal<v8::Object>' to 'v8::Local<v8::Object>' [C:\projects\vantage-test\node_modules\bufferutil\build\bufferutil.vcxproj]
      C:\projects\vantage-test\node_modules\nan\nan.h(676): note: No constructor could take the source type, or constructor overload resolution was ambiguous
    C:\projects\vantage-test\node_modules\nan\nan.h(683): error C2039: 'Use': is not a member of 'node::Buffer' [C:\projects\vantage-test\node_modules\bufferutil\build\bufferutil.vcxproj]
      C:\Users\loote\.node-gyp\5.7.0\include\node\node_buffer.h(8): note: see declaration of 'node::Buffer'
    C:\projects\vantage-test\node_modules\nan\nan.h(683): error C3861: 'Use': identifier not found [C:\projects\vantage-test\node_modules\bufferutil\build\bufferutil.vcxproj]
    gyp ERR! build error
    

    Info

    Windows 10
    node v5.7.0
    npm 3.3.3
    vantage @1.5.2
    
    opened by looterz 5
  • Expose delimiter to commander?

    Expose delimiter to commander?

    Allows for later change delimiter in the process of a command. Similarly, it'd good to expose all other run-time related system variables for more featured plugins.

    Say, it would be awesome to replace the delimiter after a login?

    opened by joesonw 5
  • 1.4.0 remote connection seem to be broken

    1.4.0 remote connection seem to be broken

    Had a code work fine 1.3.5

    Deploy and pull vantage 1.4.0 connect don't fail and do get events for connection but don't get prompt and cannot send commands.

    Downgrade to 1.3.5 fixed the problem.

    opened by mulyoved 4
  • Web client

    Web client

    Hi, congratulations for this very nice project ! I would like to know if a web client was planned. If not, have you any recommandations to start making one ?

    opened by PymZoR 4
  • Duplicate client connections on server restart (resulting in duplicate console output)

    Duplicate client connections on server restart (resulting in duplicate console output)

    Hi,

    If the vantage server restarts while client sessions are connected, the client(s) reconnect and then display duplicate output in response to any commands. E.g:

    Webapp~$ help
    
    Commands:
    
        help [command]              Provides help for a given command.
        exit [options]              Exists instance of Vantage.
        vantage [options] [server]  Connects to another instance of Node running Vantage.
        use [options] <module>      Installs a vantage extension in realtime.
    
    *** SERVER RESTART HERE ***
    Webapp~$ help
    
    Commands:
    
        help [command]              Provides help for a given command.
        exit [options]              Exists instance of Vantage.
        vantage [options] [server]  Connects to another instance of Node running Vantage.
        use [options] <module>      Installs a vantage extension in realtime.
    
    
      Commands:
    
        help [command]              Provides help for a given command.
        exit [options]              Exists instance of Vantage.
        vantage [options] [server]  Connects to another instance of Node running Vantage.
        use [options] <module>      Installs a vantage extension in realtime.
    
    Webapp~$
    

    Further restarts result in additional duplication. Any suggestions on how to resolve this? Thanks.

    opened by rxl881 4
  • More explanation?

    More explanation?

    I'm intrigued... but I don't get it. What exactly is this for? I get comander.js, but this lib somehow exposes a cli to my existing app in production? I'm not sure I get it. :(

    opened by young-steveo 4
  • vorpal version in package that npm installs different from one in repository

    vorpal version in package that npm installs different from one in repository

    I'm noticing that although vantage project on github depends on vorpal 1.11.0, as per its package.json, the package.json file that is under node_modules/vantage after installing via npm references vorpal 1.0.5. How would it be possible to fix this? Both projects are remarkable btw, many thanks!

    opened by roboticbit 0
  • Vantage Command Missing Number Data

    Vantage Command Missing Number Data

    in vantage i input the following command:

    $ start test 1111111112312345425
    { options: {}, platform: 'test', uid: 1111111112312345500 }
    

    1111111112312345425 missing the ending data 1111111112312345500 ???

    1111111112312345425
    1111111112312345500
    

    i have tried the newest version "commander". it hasn't this bug. is this vantage bug?

    opened by cnzx219 1
  • Command definition - when 0 is given as a argument, it's not recognized

    Command definition - when 0 is given as a argument, it's not recognized

        var cmd = this.server.command('use [apps]');
    
        cmd.action(function(args, callback) {
            args.apps === undefined // true !
            callback();
        });
    

    The above applies for the console input:

    > use 0

    I'd expect args.apps === 0

    opened by fogine 0
  • TypeError: vantage._pause is not a function

    TypeError: vantage._pause is not a function

    After I've fixed the #67 error when I connect to a server via vantage client, I get an error printed to the client console :

    (node:19581) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: vantage._pause is not a function

    I've not found the actual code that causes this error.

    Vantage version: 1.7.0 Node: 6.8.0

    opened by fogine 2
  • fix ReferenceError: chalk is not defined

    fix ReferenceError: chalk is not defined

    When I try to connect to a vantage server with client. I get an error:

    [ERROR] (node:15363) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): ReferenceError: chalk is not defined

    printed to console of server process.

    this fixes the bug

    opened by fogine 0
Releases(v1.3.12)
  • v1.3.12(Aug 24, 2015)

  • v1.3.0(Aug 7, 2015)

    New features

    • Variadic arguments
    • Command-specifc auto-completion

    Changes

    • Removed -h as a help option on commands, as it can lead to conflicts. Still supported are --help and /?.
    Source code(tar.gz)
    Source code(zip)
  • v1.0(Jul 25, 2015)

  • v0.4.2-beta(Jul 24, 2015)

    This is the pre-release beta in preparation for 1.0.

    New Features

    • Built-in authentication
    • Support for authentication middleware
    • Built-in REPL access
    • "Mode" command
    • "Use" command: import modules in realtime
    • Support for command aliases
    • Support for hidden commands

    Fixed

    • Session architecture redesigned:

    Vantage now supports an unlimited number of independent sessions to and from each Vantage instance. A single Node instance can now support multiple instances of Vantage as well.

    • Logging re-designed:

    All stdout generated from a Vantage session stays within its session and doesn't "leak" to other consoles or sessions.

    • Re-designed UI

    The Vantage prompt underwent a heavy refactor to eliminate duplicate prompts or logging.

    Source code(tar.gz)
    Source code(zip)
  • v0.2.13-alpha(Jun 22, 2015)

    This is the first official release of Vantage. I would like to get additional user-feedback in addition to authentication support before bumping up to v1.0. Any contributions assisting in getting to v1.0 are very appreciated.

    Source code(tar.gz)
    Source code(zip)
Owner
dc
Vorpal, Cash, and other things.
dc
Pretty diff to html javascript cli (diff2html-cli)

diff2html-cli Diff to Html generates pretty HTML diffs from unified and git diff output in your terminal Table of Contents Features Online Example Dis

Rodrigo Fernandes 404 Dec 19, 2022
LinkFree CLI is a command line tool that helps you to create your LinkFree profile through CLI.

LinkFree CLI LinkFree CLI is a command line tool that helps you to create your LinkFree profile through CLI. Demo Using the CLI (Commands) Note First

Pradumna Saraf 32 Dec 26, 2022
download torrents with node from the CLI

torrent Download torrents from the command line usage torrent <magnet link OR path to .torrent file> Download a torrent from a magnet link to torre

Max Ogden 619 Dec 26, 2022
Node.js Open CLI Framework. Built with 💜 by Heroku.

oclif: Node.JS Open CLI Framework ?? Description ?? Getting Started Tutorial ✨ Features ?? Requirements ?? CLI Types ?? Usage ?? Examples ?? Commands

oclif 8k Jan 4, 2023
A Node.js CLI to download PDF invoices from Stripe.

A Node.js CLI to download PDF invoices from Stripe.

Fabian Hedin 1 Feb 13, 2022
Node.js CLI tool to generate a set of favicons from a single input file.

This is a simple CLI tool to generate an optimized set of favicons from a single input file. Icons are optimized in terms of both size and quantity (n

null 6 Nov 11, 2022
A simple development http server with live reload capability.

Live Server This is a little development server with live reload capability. Use it for hacking your HTML/JavaScript/CSS files, but not for deploying

Tapio Vierros 4k Dec 31, 2022
🌈 React for interactive command-line apps

React for CLIs. Build and test your CLI output using components. Ink provides the same component-based UI building experience that React offers in the

Vadim Demedes 19.7k Jan 9, 2023
Build apps, themes, and hydrogen storefronts for Shopify

Shopify CLI With the Shopify command line interface (Shopify CLI 3.0), you can: build custom storefronts and manage their hosting initialize, build, d

Shopify 96 Jan 2, 2023
Infinite Red's cutting edge React Native project boilerplate, along with a CLI, component/model generators, and more!

Ignite - the hottest React Native boilerplate Battle-tested React Native boilerplate The culmination of five years of constant React Native developmen

Infinite Red, Inc. 14.7k Dec 29, 2022
CLI tool for running Yeoman generators

yo What's Yeoman? Yeoman helps you to kickstart new projects, prescribing best practices and tools to help you stay productive. To do so, we provide a

Yeoman 3.6k Dec 30, 2022
Test your internet connection speed and ping using speedtest.net from the CLI

speed-test Test your internet connection speed and ping using speedtest.net from the CLI Install Ensure you have Node.js version 8+ installed. Then ru

Sindre Sorhus 3.8k Jan 7, 2023
:white_square_button: WhatsApp chat from commandline/console/cli using GoogleChrome puppeteer

Whatspup Use Whatsapp from commandline/console/cli using GoogleChrome puppeteer! ?? Features ✅ Send and receive messages ✅ Read Receipts ✅ Switch betw

Sarfraz Ahmed 343 Dec 1, 2022
:notes: Control iTunes via CLI

itunes-remote Control iTunes via your terminal ?? Using JXA via osascript via Node.js. Requirements Node.js (v0.12.7 or greater) Mac OS X (Yosemite 10

Michael Kühnel 422 Nov 19, 2022
Add stdin support to any CLI app that accepts file input

tmpin Add stdin support to any CLI app that accepts file input It pipes stdin to a temp file and spawns the chosen app with the temp file path as the

Sindre Sorhus 121 Oct 3, 2022
A CLI for peer-to-peer file sharing using the Hypercore Protocol.

A CLI for peer-to-peer file sharing (and more) using the Hypercore Protocol.

Hypercore Protocol 207 Dec 30, 2022
Git commit CLI

commitme Based on this gist by @gustavopch Installation You can install this on your package using npm i -D commitme or run it once using npx commitme

Roz 7 Jun 6, 2021
An extension geared towards Spotify users with larger libraries; view all your playlists that contain a specific song with the click of a button. Designed for Spicetify (https://github.com/khanhas/spicetify-cli)

ViewPlaylistsWithSong An extension developed for Spicetify that allows you to view all the playlists in your library that contain a certain song. Idea

null 21 Dec 13, 2022