CLI

Overview

The Neurelo CLI is a tool that helps you to use some of Neurelo’s features programmatically from outside of the UI. You can download the latest version from the Neurelo dashboard. Neurelo's CLI is currently support for the following operating systems

  • MacOS 64-bit (ARM and Intel based)

  • Linux 64-bit (ARM and Intel based)

Modes

Neurelo CLI supports two modes of operations - an interactive mode and a non-interactive mode. In the interactive mode, you can enter the command without options, and you will be prompted with responses for the next steps. In the non-interactive mode, you can enter the full command, including options, and the necessary action(s) will be performed without prompts.

- Interactive Mode

This is the mode the CLI will be in when you enter the command with no sub-options and press the Enter key. You will then be prompted on the next steps through the responses. This mode is useful when you are interacting live with the CLI as a user.

- Non-Interactive Mode

This is the mode in the CLI when you enter the full command, including its sub-options, on one line and press the Enter key. The necessary action(s) will be performed without prompts.

Installation

Visit https://dashboard.neurelo.com and navigate to the user menu on the top right. Click on the "Download CLI" button. You will be redirected to the download page where you can find different versions of the CLI to download for your preferred platform (Mac or Linux are both available).

After downloading the binary, please ensure it's executable by executing

chmod +x ./binary-path-here

MacOS Specific Installation Instructions

You might be warned that this application is from an unknown developer. To bypass this, simply open the Security and Privacy pane in the System Settings of your mac, scroll down in that page, and press 'Open Anyway' next to the Neurelo CLI binary name. You'll be prompted once more when trying to run the binary - click 'Open Anyway', and then you will be able to use the CLI.

Commands

To check if the installation was successful, use the following command to display the available options for Neurelo’s CLI:

Note - we are using 'neurelo' as the name of the binary in the text that follows. Please use the name of your binary in these commands instead

$ neurelo 

Output similar to the following is displayed:

Usage: neurelo [options] command

CLI to interact with Neurelo's Data Access Platform

Options:
  -h, --help      Display all the options

Commands:
  login           Authenticate the user utilizing the Neurelo CLI
  project         Interact with projects
  env             Interact with environments from the selected project
  commit          Interact with commits from the selected project
  datasource      Interact with data sources from the selected project
  branch          Interact with branches from the selected project
  sdk             Interact with Neurelo SDKs
  help            Display help for specified command

login

To use the Neurelo CLI, you must first login with the following command which will be redirected automatically to Neurelo's dashboard to proceed with the authentication.

$ neurelo login

After successful login, you can start using the CLI.

The session is valid for 1 hour after being authenticated. You may need to re-login after the session expires.

project

This command provides support for all the projects that user has access to. The following subcommands are available for use with theproject command:

  • get

    Return the information from an specific project.

    • Interactive mode:

    $ neurelo project get
    • Options:

    —-id String of project id to be retrieved.

    $ neurelo project get --id <projectId>
  • ls

    Return a list of all projects that the current user has access to.

    $ neurelo project ls
  • use

    Select a project to use as part of the CLI session context.

    This subcommand is useful for interacting with other Neurelo features such as environments.

    • Interactive mode:

    $ neurelo project use
    • Options:

    —-id String of project id that will be used for the session context.

    $ neurelo project use --id <projectId>

env

This command provides support for working with the environments that user has access to in the selected project.

Remember to select a project with `neurelo project use` first

Check the following subcommands to use with env command:

  • get

    Return the information from a specific environment, such as environment id, environment name, project name, and the organization name.

    • Interactive mode:

    $ neurelo env get
    • Options:

    —-id (String) Environment id to be retrieved

    $ neurelo env get --id <environmentId>
  • use

    Select an environment to use as part of the CLI session context

    This subcommand is needed for interacting with other features that specific environment.

    • Interactive mode:

    $ neurelo env use
    • Options:

    --id String of environment id that will be selected as part of session context.

    $ neurelo env use --id <environmentId>
  • add

    Create a new environment for a selected project.

    • Interactive mode:

    $ neurelo env add
    • Options:

    If you use this subcommand with options, all options are required except for those marked as optional.

    —-name (String) Name for the new environment

    —-region (String) Region for the environment [us-east-2/us-west-2]

    —-commitId (String) Commit ID that will be selected for environment. Hint: Get the commit id with neurelo commit ls command.

    —-datasourceId [Optional] (String) Datasource id that will be attached to environment. Hint: Get data source id with neurelo datasource ls

    $ neurelo env add
    	--name <name> 
    	--region <region> 
    	--commitId <commitId> 
    	--datasourceId <dataSourceId> 
  • ls

    Return a list of all environments that current user has access to within the selected project.

    $ neurelo env ls
  • update

    Update the configuration for a selected environment. Currently the CLI supports updating the commit id. To use this subcommand it is necessary to select environment with neurelo env use

    • Interactive mode:

    $ neurelo env update 
    • Options:

    --commitId (String) Commit ID that will be updated

    $ neurelo env update --commitId <commitId>
  • start

    Start the runners for the selected environment

    $ neurelo env start
  • stop

    Stop the runners for the selected environment

    $ neurelo env stop

commit

This command provides support for working with the commits in a project that the user has access to

Remember to select a project with `neurelo project use`

Check the following subcommands to use with commit command:

  • ls

    Return a list of all commits in the selected project. If you use interactive mode, this will retrieve from default branch, otherwise if you use the option specifying the branch it will return a list from selected branch.

    • Interactive mode (Default branch):

    $ neurelo commit ls
    • Options:

    --branch (String) Branch ID that will be selected to get the commit list.

    $ neurelo commit ls --branch <branchId>

datasource

This command provides support for working with the data sources that the user has access to

Remember to select a project with `neurelo project use`

Check the following subcommands to use with thedatasource command:

  • attach

    Attach a data source to the selected environment. To use this subcommand, first select the environment with neurelo env use

    • Options:

    --id (String) Data source id to be attached to environment.

    $ neurelo datasource attach --id <datasourceId>
  • detach

    Detach a data source from the selected environment. To use this subcommand select the environment with neurelo env use

    • Options:

    --id (String) Data source id that will be detached from environment

    $ neurelo datasource detach --id <datasourceId>
  • ls

    Return a list of all data sources in the selected environment.

    $ neurelo datasource ls
  • rm

    Delete a data source from the selected project

    • Options:

    --id String of data source id that will be deleted

    $ neurelo datasource rm --id <datasourceId>

branch

This command provides support for working with the branches that the user has access to.

Remember to select a project with `neurelo project use`

Check the following subcommand to use with the branch command:

  • ls

    Return a list of all branches available in selected project.

    $ neurelo branch ls

sdk

This command provides support for downloading the sdks that user can use from selected project.

Remember to select a project with `neurelo project use`

Check the following subcommands to use with the sdk command:

  • download

    Download the sdk for a specific language given the commit id.

    • Interactive mode:

    $ neurelo sdk download
    • Options:

    --language (String) SDK type to download [typescript/python/golang]

    --commitId (String) Commit ID for which the SDK will be downloaded

    $ neurelo sdk download --language <languageName> --commitId <commitId>

Last updated