CLI
Last updated
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 supported for the following operating systems -
MacOS 64-bit (ARM and Intel based)
Linux 64-bit (ARM and Intel based)
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
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.
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.
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.
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.
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
Output similar to the following is displayed:
Use neurelo [command] -h
to see the available subcommands for a given command
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.
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.
You can also create a machine user
for using the CLI. Please refer to this documentation for creating and using a machine user.
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:
Options:
—-id
String of project id to be retrieved.
ls
Return a list of all projects that the current user has access to.
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:
Options:
—-id
String of project id that will be used for the session context.
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:
Options:
—-id
(String) Environment id to be retrieved
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:
Options:
--id
String of environment id that will be selected as part of session context.
add
Create a new environment for a selected project.
Interactive mode:
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
ls
Return a list of all environments that current user has access to within the selected project.
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:
Options:
--commitId
(String) Commit ID that will be updated
start
Start the runners for the selected environment
stop
Stop the runners for the selected environment
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):
Options:
--branch
(String) Branch ID that will be selected to get the commit list.
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.
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
ls
Return a list of all data sources in the selected environment.
rm
Delete a data source from the selected project
Options:
--id
String of data source id that will be deleted
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.
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:
Options:
--language
(String) SDK type to download [typescript/python/golang]
--commitId
(String) Commit ID for which the SDK will be downloaded