inferable.ai CLI
Installation
npm install -g @inferable/cli
Usage
Authenticating the CLI
To authenticate the CLI, run inferable auth login
.
This will open a browser and prompt you to login to the management console.
Managing clusters
The inferable clusters
command contains subcommands for the management of clusters.
These include:
inferable clusters create
Create a new cluster
inferable clusters list
List clusters [aliases: ls]
inferable clusters open
Open a cluster in the console
inferable clusters info
Display information about a cluster
Read Evaluate Print Loop (REPL)
inferable repl
will spawn an interactive NodeJS shell.
This shell is authenticated with your cluster and can be used to issue calls against it's functions.
Managing the CLI context
The Inferable CLI stores context in your project's directory.
Context allows you to persist options which can be omitted from future use of the CLI.
Setting context
Context values are set with inferable context set
.
The following command will set a cluster
value in the context:
inferable context set --cluster=my-favourite-cluster
Future calls can now omit the --cluster
option.
The context value can be unset by providing an empty option value.
inferable context set --cluster
Named contexts
The CLI can maintain multiple named contexts for your project.
This can be useful when working across multiple clusters, for example different environments.
To use a named context, provide the --context
option with your command:
inferable --context=staging repl
Local Development
All commands can be run with tsx:
tsx src/index.ts <cmd>
tsx src/index.ts auth login