Skip to content

Configuration

Southclaws edited this page Jul 17, 2018 · 3 revisions

Aside from pawn.json files, sampctl itself can be configured globally via a file or environment variables.

Inside the cache directory, sampctl will search for a config file which can be either JSON, YAML or TOML. As well this, any of the fields can also be overwritten with environment variables.

Configuration Fields

config indicates values that are read from the configuration file and env indicates an environment variable that can be used to override any value read from the configuration file.

  • (string) config: user_id: An automatically set value by sampctl, it's an anonymous user ID for metrics
  • (bool) config: metrics, env: SAMPCTL_METRICS: Whether or not to report telemetry metrics
  • (string) config: default_user, env: SAMPCTL_DEFAULT_USER: the default username for package init
  • (string) config: github_token, env: SAMPCTL_GITHUB_TOKEN: GitHub API token for extended API rate limit
  • (string) config: git_username, env: SAMPCTL_GIT_USERNAME: Git username for private repositories
  • (string) config: git_password, env: SAMPCTL_GIT_PASSWORD: Git password for private repositories

Bool values can be any of: true, false, 1, 0.

Continuous Integration

sampctl will also detect if it's running inside a continuous integration server by checking if CI is set. This is a known environment variable on TravisCI and GitLab. Other CI services have not been tested, please file an issue if you use a CI server that does not behave this way and we can figure something out.

Clone this wiki locally