Set the workspace that CLI commands use, per command, per shell, per project, or as your default. You need the CLI installed and signed in and access to a workspace. No workspace yet? Create one.
Find the ID
nevia whoamiCopy the full ID of the workspace and use it in place of
01d4cnjjq40hnnh0nwmkg35nv2h below. With one workspace, such as the default
one from your first sign-in, commands use it without a selection.
Save a default
nevia workspace use 01d4cnjjq40hnnh0nwmkg35nv2h
nevia workspace currentuse writes the default to your user config.toml. current shows the effective
workspace and its source. To confirm API access to it, run nevia workspace get.
Override one command
nevia workspace get --workspace 01d4cnjjq40hnnh0nwmkg35nv2hSelect for a shell
export NEVIA_WORKSPACE=01d4cnjjq40hnnh0nwmkg35nv2h
nevia workspace currentClear it with unset NEVIA_WORKSPACE.
Select for a project
nevia workspace use 01d4cnjjq40hnnh0nwmkg35nv2h --local
nevia workspace current--local writes .nevia.toml in the current directory. Commands in that directory
and its subdirectories use the workspace.
Precedence
--workspaceon the command.NEVIA_WORKSPACE.- The nearest
.nevia.toml. - The default in your user
config.toml.
A positional workspace argument, such as nevia workspace get 01d4cnjjq40hnnh0nwmkg35nv2h,
beats all four.
Clear the default with nevia workspace use --unset. Clear the project selection
with nevia workspace use --local --unset. The file stays in place.
With several workspaces and no selection, commands fail with no workspace selected
and list them.
When the selected workspace is removed
nevia workspace rm clears your saved default if it names the removed workspace.
It leaves .nevia.toml and NEVIA_WORKSPACE alone and reports when either one
names the removed workspace. If someone removes the workspace elsewhere, such as in
the console, commands fail with exit code 3 and name the source of the selection.
The CLI does not switch to another workspace on its own.
Command options are in nevia workspace use.
Next, create a database in your selected workspace.