# deployr-cli
**Repository Path**: RepoMirror/deployr-cli
## Basic Information
- **Project Name**: deployr-cli
- **Description**: No description available
- **Primary Language**: Unknown
- **License**: Apache-2.0
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2022-03-12
- **Last Updated**: 2025-01-17
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# deployr-cli
> The [DeployR](http://go.microsoft.com/fwlink/?LinkID=692163) command line interface.
## Overview
DeployR CLI is a [Command Line Tool (CLI)](http://en.wikipedia.org/wiki/Command-line_interface) for running useful
[DeployR](http://go.microsoft.com/fwlink/?LinkID=692163) utilities. Although the
current feature set is minimal, many more CLI commands will be added going
forward.
## Prerequisites
- Install the latest stable version of [Node.js](http://nodejs.org/) (version 0.10.x).
- A running [DeployR](https://msdn.microsoft.com/en-us/microsoft-r/deployr-installation) server to connect to.
**Note** to Windows users that have the [Microsoft HPC Pack](https://msdn.microsoft.com/en-us/library/cc853440%28v=vs.85%29.aspx).
If your environment has the Microsoft HPC Pack, the `node.exe` from Node.js can
conflict with the `node.exe` from the Microsoft HPC Pack (same name). You can
view the [open issue](https://github.com/joyent/node/issues/7773) here.
The current solution is to manually reorder the paths in the `PATH` environment
variable giving Node.js's path a higher priority after installation.
## Installation
The DeployR CLI is installed and managed via [npm](http://npmjs.org), the [Node.js](http://nodejs.org/) package manager.
To get started, you will want to install the DeployR command line interface (CLI)
globally. You may need to use sudo for (OSX, *nix, BSD, etc). If you are using
Windows, run your command shell as Administrator.
One-line install using [npm](http://npmjs.org):
```
npm install -g deployr-cli
```
This will put the `di` command in your system path allowing it to be run from
any location.
## Usage
DeployR CLI is self documenting and the best way to become familiar with the tool is to
try it out from your command line:
```
di ...
```
### Commands
Command | Purpose
:------------------------------------------ | :-------
`di` | Displays the 'Main menu' User Interface.
`di help` | Prints out a list of available commands.
`di help ` | Prints out the _help_ text associated with the command.
`di endpoint` | Set the DeployR server endpoint.
`di login` | Log into DeployR.
`di logout` | Log out of DeployR.
`di whoami` | Displays the current logged in user to DeployR.
`di install example` | Install a pre-built example.
`di install example ` | Install a pre-built example by example name.
`di about` | Displays DeployR server information based on the set server `endpoint`.
`di config` | Allow you to edit your local `di` [configuration](#diconf-file) file.
`di config list` | Lists all configuration values currently set in the configuration file.
`di config set ` | Sets the specified pair in the `di` configuration.
`di config get ` | Gets the value for the specified in the `di` configuration.
`di config delete ` | Deletes the specified in the `di` configuration.
## Help
All commands have corresponding _help_ text associated with it. To read the help
text for a `di` command, type:
```
di help
```
For example, to display the help text for the `whoami` command:
## .diconf file
All configuration data for your local DeployR CLI install is located in the *.diconf*
file in your home directory. Directly modifying this file is not advised. You
should be able to make all configuration changes from the _main menu_ UI or via:
```
di config
```
Example:
```
di config set endpoint http://dhost:port # set the DeployR server endpoint
```
If you need to have multiple configuration files, use --diconf options.
Example:
```
di --diconf /path/to/other/configuration/.diconf
```
## Options
di [commands] [options]
--version prints DeployR version and exit
--diconf [file] specify file to load configuration from
--help prints cli help and exit
## Tab Completion
**System Requirements**
- bash
Any other shell other than `bash` will simply ignore tab completions. The first
time you run `$ di` from the command line it will add to your `.bashrc` or
`.bash_profile` or .`profile` the necessary hooks. Upon sourcing these files,
the next time you run `$ di ` the completions with appear.
Example:
```
$ di lo
login logout
$ di w
whoami
```
## API Documentation
For advance usage, see our [API documentation](http://microsoft.github.io/deployr-cli)
## Notes
Inspired by the [nodejitsu](https://www.nodejitsu.com) CLI and others.
## License
Copyright (C) 2010-2016, Microsoft Corporation
This program is licensed to you under the terms of Version 2.0 of the Apache
License. This program is distributed WITHOUT ANY EXPRESS OR IMPLIED WARRANTY,
INCLUDING THOSE OF NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR
PURPOSE. Please refer to the [Apache License 2.0](http://www.apache.org/licenses/LICENSE-2.0) for more details.