Configure Argos Translate using a JSON file

I copied some improvements I made to the configuration system from the v2 branch to the master branch. In the next version of Argos Translate (1.10) you can set configuration values from a JSON file in addition to the current method of environment variables.

Environment variables

export ARGOS_DEBUG="0"
export ARGOS_PACKAGE_INDEX="https://raw.githubusercontent.com/argosopentech/argospm-index/main/"
export ARGOS_PACKAGES_DIR="/home/<username>/.local/share/argos-translate/packages/"
export ARGOS_DEVICE_TYPE="cpu"

JSON

$HOME/.config/argos-translate/settings.json

{
    "ARGOS_DEBUG": "0",
    "ARGOS_PACKAGES_INDEX": "https://raw.githubusercontent.com/argosopentech/argospm-index/main/",
    "ARGOS_PACKAGE_DIR": "/home/<username>/.local/share/argos-translate/packages/",
    "ARGOS_DEVICE_TYPE": "cpu"
}

Configurations from environment variables supersede configurations from the JSON file.

1 Like

Nice, I typically prefer JSON to using env variables.

1 Like