Skip to main content

config

Manage Altostra configuration on the local machine.

Sub-Commands

list

List configuration keys and values.

alto config list

get

Get a configuration key.

alto config get <key>

Arguments

key

The configuration key to get.

Required: yes

set

Set the configuration key to the value.

alto config set <key> <value>

Arguments

key

The configuration key to set.

Required: yes
value

The value to set.

Required: yes

unset

Unset the configuration key, and revert it to its default value.

alto config unset <key>

Arguments

key

The configuration key to unset.

Required: yes

Options

--project-path

Specify project directory.

If not specified, project directory is assumed to be the current directory.

Aliases: --pp

--project

Use the current project configuration (Default).

If specified, prevents the use of --global option.

Aliases: -p, --local, -l

--global

Use global configuration, for all projects.

If specified, prevents the use of --project.

Aliases: -g

Project vs. Global configuration

Project configuration

File location is .altostra/settings.json in an Altostra project directory.

Global configuration

File location is .altostra/settings.json in the user`s home directory.

Namespaces

A configuration namespace is a hierarchical configuration space, that may override configurations from a parent configuration namespace. Configuration namespaces can be used to create unique sets of configurations, that can be switched when needed.

All Altostra settings reside in namespaces, being the root (and default) namespace, or a descendent one.

A namespace is controlled by the special configuration-key active-config. Once set, configuration is retrieved from and persisted to that namespace.

# Gets the current namespace
alto config get active-config

# Sets the current namespace to be qa-namespace
alto config set active-config qa-namespace

# Sets the current namespace back to the root namespace
alto config set active-config ""

The special string :: is considered a namespace separator. A namespace that contains this separator in it, such as parent::child, is considered to be a child namespace under a parent namespace (both under the root namespace).

Configuration precedence

When Altostra commands execute, settings values are collected from relevant namespaces and are combined to the effective configuration.

Settings can come from:

  • The specific namespace that is selected in the project configuration file.
  • An ancestor namespace (and its ancestors, up to the root namespace) of the selected namespace in the project configuration file.
  • The global configuration file.

A value from more specific namespace would always override a value from an ancestor namespace. A value from the project configuration would always override a global configuration, unless a global-override was set for the specific key.

Ready to Get Started?

Get Started for Free
© 2022 Altostra, Inc.