slackapi / slackapi/slack-cli

[FEATURE] Environment variable to simplify `--token` global flag

Open
#217 2 comments 0 reactions 1 assignee View on GitHub

@hello-ashleyintech is already working on this.

Since Feb 5, 2025.

enhancement
Dominant language
Go
Stars
305
Forks
46
Avg merge
1d 11h
Merged PRs (30d)
23

Description

Description of the problem being solved

When using the Slack CLI in CI/CD pipelines today, an auth token must be used (instead of the traditional slack login method). This requires the usage of the --token global flag in every single command (commands which may very well appear in logs, etc.)

Instead, it would be much more secure (and also convenient) to allow an environment variable to be used as a fallback for the global flag. This is already the case for --config-dir, which can be specified via SLACK_CONFIG_DIR instead (see documentation here).

It would be wonderful if we could also specify an environment variable like SLACK_AUTH_TOKEN, instead of specifying --token for every command.

Alternative solutions

Being able to log in with a token (and not having to keep repeating it afterwards).

However, an environment variable would be even better (and probably easier to implement as well).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.