Page tree
Skip to end of metadata
Go to start of metadata

This document covers how to configure argus-cli. Most of the configuration is done out of the box, but in some cases you might want to do some more configuration.

Setting up a local config file

The toolbelt looks for a local config file called .argus_cli.yaml in your home directory.

$ touch ~/.argus_cli.yaml
$ chmod 600 ~/.argus_cli.yaml

Config fields

Argus API

All argus_api options exist under the api field in the YAML-file.

Alternative API URL

To add your own custom argus-url, you have to use the api_url parameter.

The default value here is https://portal.mnemonic.no/web/api.

api:
	api_url: <Your API URL>


Authentication

To use some functions in the API you'll have to be authenticated.

This can for example be done by SMS confirmation, username and password or API keys. It's recommended to use an API key.

API Key
api:
	api_key: <Your API Key>
	method: apikey
Username and password
api:
	username: <Your username>
	password: <Your password>
	method: username

Argus CLI

Logging

The toolbelt utilizes pythons built in logging. This has it's own config format. To get more information about it look at the python documentation.

Changing logging level

The following is how to change the logging level of the program. Examples are DEBUG, INFO, WARNING and ERROR.

logging:
	loggers:
		argus_api:
			level: <LOGGING LEVEL>
		argus_cli:
			level: <LOGGING LEVEL>

Environments

In some cases, you might want to change between different configuration environments. For example, you might want to use a different API key for some special scripts. This is where environments come in.

In an environment, you'll be using the baseline config that you've defined at the top level as a base, and work on top of that. Any keys you specify will be overwritten, others will be used as is.

These environments exist under the environment.<name> tag in your config, and can be used with the --environment option in the cli.

environment:
    test:
       api:
            api_key: 123/45/abcdefg
            method: apikey

With this example, you can use your environment like this:

argus-cli --environment test <your command here>


  • No labels