Welcome, Guest Login

Public Cloud Center

Environment Variable Commands

Last Updated: Apr 19, 2017 10:41AM EDT

Quick Reference

env list List your current project's environment variables.
env get <name> List a single environment variable.
env set <name> <value> Create a variable with the name and value provided, or if the project has a variable with the name provided, it will be set to the value provided.
env load <file> Create or set environment variables for a project using data loaded from a JSON file.
env delete <name> Delete the variable with the name provided.

env list

List your current project's environment variables.

Params

No Params

Prompts

select project If you have more than one project, you must select the project before continuing.

Example

$ xervo env list
Welcome to Xervo
You are logged in as spiderman
[?] Are you sure you want to use project Lizard Locator? (yes) yes
Project Lizard Locator Environment Variables
NODE_ENV = production

env get <name>

List a single environment variable.

Params

name The name of the variable to get.

Prompts

select project If you have more than one project, you must select the project before continuing.

Example

$ xervo env get NODE_ENV
Welcome to Xervo
You are logged in as spiderman
[?] Are you sure you want to use project Lizard Locator? (yes) yes
Project Lizard Locator Environment Variables
NODE_ENV = production

env set <name> <value>

Create a variable with the name and value provided, or if the project has a variable with the name provided, it will be set to the value provided.

Params

name The name of the variable to create or set.
value The value to set the variable to.

Prompts

select project If you have more than one project, you must select the project before continuing.

Example

$ xervo env set DB_AUTH 12345
Welcome to Xervo
You are logged in as spiderman
[?] Are you sure you want to use project Lizard Locator? (yes) yes
Setting DB_AUTH for project Lizard Locator
[√] Successfully set environment variable.

env load <file>

Create or set environment variables for a project using data loaded from a JSON file.

Params

file The path to the file that contains variable names and values to create or set.

Prompts

select project If you have more than one project, you must select the project before continuing.

Example

JSON data may be a hash of values or complex objects that will be parsed by your project at runtime. Object and Array values will be stringified and saved to the variable.

Note that environment variable names cannot start with numbers and can only contain alpha-numeric characters and underscores. Environment variable values cannot contain single quotes.

{
  "NODE_ENV": "production",
  "CONFIG": {
    "url": "http://example.com",
    "list": [
      "list",
      "data"
    ]
  }
}

This file creates/updates two environment variables, one with the string value 'production', the other with the string value '{"url": "http://example.com","list": ["list","data"]}'.

$ xervo env load config.json
Welcome to Xervo
You are logged in as spiderman
[?] Are you sure you want to use project Lizard Locator? (yes) yes
[√] Successfully set environment variables loaded from file.

env delete <name>

Delete the variable with the name provided

Params

name The name of the variable to delete.

Prompts

select project If you have more than one project, you must select the project before continuing.

Example

$ xervo env delete DB_AUTH
Welcome to Xervo
You are logged in as spiderman
[?] Are you sure you want to use project Lizard Locator? (yes) yes
Deleting DB_AUTH for project Lizard Locator
[√] Successfully deleted variable DB_AUTH from project Lizard Locator

Go to top
 

Contact Us

    Our Support Policy
    Submit a Support Request

  • Public Cloud Support Hours
    9am-5pm EST Mon-Fri
    Outside of these hours response times may be up to 24hrs.


    Submit a support ticket by clicking 'status and support' icon on the left side of this page.



help@hellotangible.com
https://cdn.desk.com/
false
desk
Loading
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
about
false
Invalid characters found
/customer/en_us/portal/articles/autocomplete