A cross-platform cli to illustrate interacting with VSTS
Last updated 2 years ago by robbiedhickey .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @robbiedhickey/vsts-demo-cli 
SYNC missed versions from official npm registry.


A cross-platform cli to illustrate interacting with VSTS.

oclif License: MIT


  • Set up a Personal Access Token in your VSTS instance
  • Install a version of Node >= 8
  • The cli must be installed globally: npm install -g @robbiedhickey/vsts-demo-cli


This package consists of a basic framework powered by oclif that enables a modular way to build multi-command CLIs. The feature set is currently minimal, but it will allow a user to initialize a connection to a TFS instance that they own or have access to, persist the credentials, and subsequently use the credentials in a later session to list the projects they have access to. The cli is also cross platform.

From a usability standpoint, the cli includes general and command-specific help output (i.e. vsts-demo-cli help and vsts-demo-cli help init). The cli also displays spinners with contextual messages during asynchronous operations. When errors occur in a multi-step operation, the spinners will indicate which step(s) failed, provide a more detailed error message, and terminate the process. For commands that include flags like vsts-demo-cli init, the cli supports both passing of the parameters explicitly as well as an interactive mode which will prompt the user for input in a guided questionnaire. The questionnaire will also perform some basic validation to help the user fall into the pit of success. The cli can also output ascii-tables to the console, which is demonstrated with the vsts-demo-cli projects:list command. Finally, a user can use vsts-demo-cli clear to purge their stored configuration settings.

From a technical standpoint, the project illustrates some basic usage of oclif test framework, and includes configuration for linting and measuring test coverage. If you can't live without a static type system, oclif also comes bundled with type declarations and embraces TypeScript in their documentation.


$ npm install -g @robbiedhickey/vsts-demo-cli
$ vsts-demo-cli COMMAND
running command...
$ vsts-demo-cli (-v|--version|version)
@robbiedhickey/vsts-demo-cli/2.3.2 darwin-x64 node-v8.9.0
$ vsts-demo-cli --help [COMMAND]
  $ vsts-demo-cli COMMAND


vsts-demo-cli clear

clears the stored user configuration settings

  $ vsts-demo-cli clear

See code: src/commands/clear.js

vsts-demo-cli help [COMMAND]

display help for vsts-demo-cli

  $ vsts-demo-cli help [COMMAND]

  COMMAND  command to show help for

  --all  see all commands in CLI

See code: @oclif/plugin-help

vsts-demo-cli init

initializes cli against a vsts instance

  $ vsts-demo-cli init

  -t, --token=token  personal access token for your vsts instance
  -u, --url=url      url of the vsts instance (i.e. https://myvsts.visualstudio.com)

  Persists VSTS configuration and user data to make future uses of the utility seamless.

See code: src/commands/init.js

vsts-demo-cli projects:list

lists all vsts projects the user has access to

  $ vsts-demo-cli projects:list

See code: src/commands/projects/list.js

Current Tags

  • 2.3.2                                ...           latest (2 years ago)

10 Versions

  • 2.3.2                                ...           2 years ago
  • 2.3.1                                ...           2 years ago
  • 2.3.0                                ...           2 years ago
  • 2.2.0                                ...           2 years ago
  • 2.1.0                                ...           2 years ago
  • 2.0.0                                ...           2 years ago
  • 1.0.0                                ...           2 years ago
  • 0.0.3                                ...           2 years ago
  • 0.0.2                                ...           2 years ago
  • 0.0.1                                ...           2 years ago
Maintainers (1)
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 1
Last Month 1
Dependencies (10)
Dev Dependencies (10)
Dependents (0)

Copyright 2014 - 2017 © taobao.org |