diff --git a/docs/guides/authorizing-the-slack-cli.md b/docs/guides/authorizing-the-slack-cli.md new file mode 100644 index 00000000..96611a26 --- /dev/null +++ b/docs/guides/authorizing-the-slack-cli.md @@ -0,0 +1,122 @@ +--- +slug: /slack-cli/guides/authorizing-the-slack-cli +--- + +# Authorizing the Slack CLI {#authorize-cli} + +Once you have the Slack CLI installed for either [Windows](/slack-cli/guides/installing-the-slack-cli-for-windows) or [Mac/Linux](/slack-cli/guides/installing-the-slack-cli-for-mac-and-linux), authorize the Slack CLI in your workspace with the following command: + +```zsh +slack login +``` + +## Authorization ticket {#ticket} + +In your terminal window, you should see an authorization ticket in the form of a +slash command, and a prompt to enter a challenge code: + +```zsh +$ slack login + +πŸ“‹ Run the following slash command in any Slack channel or DM + This will open a modal with user permissions for you to approve + Once approved, a challenge code will be generated in Slack + +/slackauthticket ABC123defABC123defABC123defABC123defXYZ + +? Enter challenge code +``` + +Copy the slash command and paste it into any Slack conversation in the workspace you will be developing in. + +When you send the message containing the slash command, a modal will pop up, prompting you to grant certain permissions to the Slack CLI. Click **Confirm** in the modal to continue to the next step. + +A new modal with a challenge code will appear. Copy that challenge code, and paste it back into your terminal: + +```zsh +? Enter challenge code eXaMpLeCoDe + +βœ… You've successfully authenticated! πŸŽ‰ + Authorization data was saved to ~/.slack/credentials.json + +πŸ’‘ Get started by creating a new app with slack create my-app + Explore the details of available commands with slack help +``` + +Verify that your Slack CLI is set up by running `slack auth list` in your terminal +window: + +```zsh +$ slack auth list + +myworkspace (Team ID: T123ABC456) +User ID: U123ABC456 +Last updated: 2023-01-01 12:00:00 -07:00 +Authorization Level: Workspace +``` + +You should see an entry for the workspace you just authorized. If you don't, get a new authorization ticket with `slack login` to try +again. + +You're now ready to begin building workflow apps! + +### Version update notifications {#version-updates} + +Once a day, the Slack CLI checks for updates after running any command. When an update is available, a notification will be displayed with a link where you can find and download the new version. + +Update notifications can be disabled using a command-line flag or an environment variable. When running any command, you can append the `--skip-update` or `-s` flag. Alternatively, you can set the `SLACK_SKIP_UPDATE` environment variable and assign it any value. + +## CI/CD authorization {#ci-cd} + +Setting up a CI/CD pipeline requires authorization using a service token. Service tokens are **long-lived, non-rotatable user tokens** — they won't expire, so they can be used to perform any Slack CLI action without the need to refresh tokens. + +To get a service token, you'll use the `slack auth token` command to get a `slackauthticket`, which you'll copy and paste into your workspace to exchange for the service token. The service token will not be saved to your `credentials.json` file; instead, it is presented in the terminal for you to copy and paste for use in your CI/CD pipeline. Once copied, you'll use the `slack login --auth ` command to authorize your Slack CLI. Detailed instructions are below. + +:::info + +The service token will not conflict with your regular authentication token; you can continue using your regular authentication token within the Slack CLI while using the service token for your CI/CD pipeline. + +::: + +### Best practices for service tokens {#best-practices-tokens} + +Since a service token obtained via the Slack CLI is tied to the developer who requested it, it is recommended — especially for those who are part of large enterprises — to create a "Slack service account" within your workspace for the purpose of obtaining service tokens. + +This "Slack service account" will be identical to other user accounts, but service tokens can now be associated with this account rather than an individual organization member. This can reduce the security risk of an individual developer's token being compromised, as well as lessening the dependence on a single individual for service token access and management. + +### Obtaining a service token {#obtain-token} + +Run the following command to get a `slackauthticket`: +``` +slack auth token +``` + +Then, copy and paste the `/slackauthticket ` slash command into the message composer anywhere within your Slack workspace. + +Copy the given challenge code, and paste it into the Slack CLI prompt. + +Securely store the given service token, as this authorization information will _not_ be saved to your local `credentials.json` file. + +### Using a service token {#use-token} + +Run the following command to authorize your Slack CLI with the service token: + +``` +slack --token +``` + +The Slack CLI will attempt to verify the token and use it to log in. + +The `--token` global flag allows you to pass the service token with any Slack CLI command; for example: + +``` +slack deploy --token +``` + +### Revoking a service token {#revoke-token} + +Run the following command to revoke a service token: + +``` +slack auth revoke --token +``` diff --git a/docs/guides/deploying-with-the-slack-cli-and-github-actions.md b/docs/guides/deploying-with-the-slack-cli-and-github-actions.md new file mode 100644 index 00000000..aad6895b --- /dev/null +++ b/docs/guides/deploying-with-the-slack-cli-and-github-actions.md @@ -0,0 +1,97 @@ +--- +sidebar_label: Deploying with GitHub Actions +slug: /slack-cli/guides/deploying-the-slack-cli-with-github-actions +--- + +# Deploying with the Slack CLI & GitHub Actions + +This tutorial demonstrates how to use CI/CD to facilitate automatic deployments when code changes are pushed to GitHub. + +Before we begin, you'll need to do the following: + +* Create a new GitHub repository — any name will do. +* [Install](/slack-cli/guides/installing-the-slack-cli-for-mac-and-linux) the Slack CLI on your machine. +* [Authorize](/slack-cli/guides/authorizing-the-slack-cli) the Slack CLI to your workspace. + +Once those steps have been completed, we're ready to move on to building our automated deployment app. + +## Create a new app {#create} + +Run `slack create` to create a new Slack app project. Select a template to build from; in this case, hit **Enter** to choose the default `Issue submission` template. + +Refer to [Create or remove an app](/deno-slack-sdk/guides/creating-an-app) for more details. + +## Initial deploy {#initial-deploy} + +Run `slack deploy` to manually deploy the new app to your workspace for the first time. During the process, you'll be prompted to create a link trigger. Refer to [Link triggers](/deno-slack-sdk/guides/creating-link-triggers) for more details. + +Once created, copy the link and share it in a Slack channel. You'll see a button appear to start the workflow; click it to verify that the default workflow is functioning properly. + +## Obtain a service token {#obtain-service-token} + +To automate subsequent deployments, we'll need to obtain a [service token](/slack-cli/guides/authorizing-the-slack-cli#ci-cd) for the app. + +Navigate to the root directory of your project and run the `slack auth token` command. You'll be prompted to run a slash command called `slackauthticket`, similar to the way you authorized your app earlier. Copy that command and run it in Slack, then copy the challenge code you receive and enter it into your terminal. You'll see a service token that starts with `xoxp-` — make sure you save this token. Note that this token is connected to a specific workspace and organization. + +## Add your service token to GitHub as a secret {#add-service-token} + +In your GitHub repository, navigate to **Settings** > **Secrets and variables** > **Actions** and click **New repository secret** to add a new secret as follows: + +* Name: SLACK_SERVICE_TOKEN +* Secret: the `xoxp-` prefixed service token obtained above + +Be sure to save your changes! + +## Add a new deployment file with your GitHub actions workflow {#add-deployment-file} + +Create a folder called `.github/workflows/` and add a new file called `deployment.yml` with the following content: + +```yml +name: Slack App Deployment + +on: + push: + branches: [ main ] + +jobs: + build: + runs-on: ubuntu-latest + timeout-minutes: 5 + + steps: + - uses: actions/checkout@v4 + - name: Install Deno runtime + uses: denoland/setup-deno@v1 + with: + deno-version: v1.x + + - name: Install Slack CLI + if: steps.cache-slack.outputs.cache-hit != 'true' + run: | + curl -fsSL https://downloads.slack-edge.com/slack-cli/install.sh | bash + + - name: Deploy the app + env: + SLACK_SERVICE_TOKEN: ${{ secrets.SLACK_SERVICE_TOKEN }} + run: | + cd gh-actions-demo/ + slack deploy -s --token $SLACK_SERVICE_TOKEN +``` + +This file instructs the Slack CLI to deploy the latest revision of your repository to the Slack platform when any changes are pushed to the main branch. + +You can go with any other Linux option you prefer for the GitHub-hosted runner; refer to [About GitHub-hosted runners](https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#viewing-available-runners-for-a-repository) for more details. + +## Test it out {#test} + +To test it out, make a PR and push some changes to the main branch. If the GitHub Actions job successfully completes, your app should now be available in your workspace. + +Your GitHub repository is now set up for team collaboration! Your team members can review code changes by submitting PRs, and once these are merged into the main branch, the changes will be deployed automatically. Should you need to reverse a deployment automatically, you can create a reverting PR and quickly merge that. + +## Further reading {#read} + +Check out these articles to expand your knowledge and skills of automated deployments and the Slack CLI: + +➑️ [CI/CD overview and setup](https://tools.slack.dev/slack-cli/guides/setting-up-ci-cd-with-the-slack-cli) + +➑️ [CI/CD authorization](/slack-cli/guides/authorizing-the-slack-cli#ci-cd) diff --git a/docs/guides/installing-the-slack-cli-for-mac-and-linux.md b/docs/guides/installing-the-slack-cli-for-mac-and-linux.md new file mode 100644 index 00000000..ab02eb97 --- /dev/null +++ b/docs/guides/installing-the-slack-cli-for-mac-and-linux.md @@ -0,0 +1,168 @@ +--- +sidebar_label: Installing for MacOS & Linux +slug: /slack-cli/guides/installing-the-slack-cli-for-mac-and-linux +--- + +# Installing the Slack CLI for Mac & Linux + + +The Slack CLI is a set of tools critical to building workflow apps. This is your one-stop shop for those tools. + +✨ **If you've not used the Slack CLI before, we recommend following our [Deno Slack SDK getting started guide](/deno-slack-sdk/guides/getting-started) instead**. We'll still get your wagon loaded up before you depart for the trail, but we'll also give you some additional guidance. + +‡️ **If you need to authorize the Slack CLI, [go here](/slack-cli/guides/authorizing-the-slack-cli)**. + +:::info + +The minimum required Slack CLI version for Enterprise Grid as of September 19th, 2023 is `v2.9.0`. If you attempt to log in with an older version, you'll receive a `cli_update_required` error from the Slack API. Run `slack upgrade` to get the latest version. + +::: + + + + +**Run the automated installer from your terminal window:** + +```zsh +curl -fsSL https://downloads.slack-edge.com/slack-cli/install.sh | bash +``` + +This will install the Slack CLI and all required dependencies, including [Deno](/deno-slack-sdk/guides/installing-deno), +the runtime environment for workflow apps. If you have VSCode installed, +the [VSCode Deno +extension](https://marketplace.visualstudio.com/items?itemName=denoland.vscode-deno) +will be installed. +
+Optional: Use an alias for the Slack CLI binary + +If you have another CLI tool in your path called `slack`, you can rename the slack binary to a different name before you add it to your path. + +To do this, pass the `-s` argument to the installer script: + +```zsh +curl -fsSL https://downloads.slack-edge.com/slack-cli/install.sh | bash -s +``` + +The alias you use should come after any flags used in the installation script. For example, if you use both flags noted below to pass a version and skip the Deno installation, your install script might look like this: + +``` +curl -fsSL https://downloads.slack-edge.com/slack-cli/install.sh | bash -s -- -v 2.1.0 -d +``` + +You can also copy the Slack CLI into any folder that is already in your path (such as `/usr/local/bin`—you can use`echo $PATH` to find these), or add a new folder to your path by listing the folder you installed the Slack CLI to in `/etc/paths`. + +If you don't rename the slack binary to a different name, the installation script will detect existing binaries named `slack` and bail if it finds one—it will not overwrite your existing `slack` binary. + +
+ +
+Optional: customize installation using flags + +There are two optional flags available to customize the installation. + +1. Specify a version you'd like to install using the version flag, `-v`. The absence of this flag will ensure the latest Slack CLI version is installed. +``` +curl -fsSL https://downloads.slack-edge.com/slack-cli/install.sh | bash -s -- -v 2.1.0 +``` + +2. Skip the Deno installation by using the `-d` flag, like this: +``` +curl -fsSL https://downloads.slack-edge.com/slack-cli/install.sh | bash -s -- -d +``` +
+ +
+Troubleshooting + +#### Errors + +Error: _Failed to create a symbolic link! The installer doesn't have write access to /usr/local/bin. Please check permission and try again..._ + +Solution: Sudo actions within the scripts were removed so as not to create any security concerns. The `$HOME` env var is updated to `/root` — however, the installer is using `$HOME` for both Deno and the SDK install, which causes the whole install to be placed under `/root`, making both Deno and the SDK unusable for users without root permissions. +* For users who do not have root permissions, run the sudo actions manually as follows: `sudo mkdir -p -m 775 /usr/local/bin`, then `sudo ln -sf "$slack_cli_bin_path" "/usr/local/bin/$SLACK_CLI_NAME"` where `$slack_cli_bin_path` is typically `$HOME/.slack/bin/slack` and `$SLACK_CLI_NAME` is typically the alias (by default it’s `slack`). +* For users who do have root permissions, you can run the installation script as `sudo curl -fsSL https://downloads.slack-edge.com/slack-cli/install.sh | bash`. In this case, the script is executed as root. + +
+
+ + +**1\. Download and install [Deno](https://deno.land).** Refer to [Install Deno](/deno-slack-sdk/guides/installing-deno) for more details. + +**2\. Verify that Deno is installed and in your path.** + +The minimum version of Deno runtime required is currently version 1.37.0. + +```bash +$ deno --version +deno 1.46.2* (release, x86_64-apple-darwin) +v8 10.* +typescript 4.* +``` + +**3\. Download and install + [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git), a + dependency of the** `slack` **CLI.** + +**4\. Download the** `slack` **CLI installer for your environment.** + +   Download for macOS (.tar.gz) + +   Download for Linux (.tar.gz) + +**5\. Add the** `slack` **CLI to your path.** + +:::info +

Existing slack binary in path?

+

If you have another CLI tool in your path called slack, we recommend renaming our slack binary to a different name before adding it to your path. See the Automated installation tab for more details.

+::: + +**6\. Verify that** `slack` **is installed and in your path.** + +``` +$ slack version +Using slack v3.0.4 +``` + +**7\. Verify that all dependencies have been installed.** + +Run the following command: + +``` +$ slack doctor +``` + +**A few notes about hooks** + +If you have upgraded your CLI version but your `deno-slack-hooks` version is less than `v1.3.0`, when running `slack doctor`, you will see the following near the end of the output: + +``` +βœ” Configurations (your project's CLI settings) + Project ID: 1a2b3c4d-ef5g-67hi-8j9k1l2m3n4o + + ✘ Runtime (foundations for the application) + Error: The `doctor` hook was not found (sdk_hook_not_found) + Suggestion: Ensure this hook is implemented in your `slack.json` + + βœ” Dependencies (requisites for development) + deno_slack_hooks: 1.2.3 β†’ 1.3.0 (supported version) +``` + +In addition, if you attempt to run the `slack run` command without this dependency installed, you will see a similar error in your console: + +``` +🚫 The `start` script was not found (sdk_hook_not_found) + + πŸ’‘ Suggestion + Hook scripts are defined in the Slack configuration file ('slack.json'). + Every app requires a 'slack.json' file and you can find a working example at: + https://github.com/slack-samples/deno-starter-template/blob/main/slack.json + +``` + +Ensure that `deno-slack-hooks` is installed at the project level and that the version is not less than `v1.3.0`. + +**8\. [Install the VSCode extension for + Deno](/deno-slack-sdk/guides/installing-deno#vscode) (recommended).** + +
+
diff --git a/docs/guides/installing-the-slack-cli-for-windows.md b/docs/guides/installing-the-slack-cli-for-windows.md new file mode 100644 index 00000000..c1d0cf30 --- /dev/null +++ b/docs/guides/installing-the-slack-cli-for-windows.md @@ -0,0 +1,199 @@ +--- +sidebar_label: Installing for Windows +slug: /slack-cli/guides/installing-the-slack-cli-for-windows +--- + +# Installing the Slack CLI for Windows + + +The Slack CLI is a set of tools critical to building workflow apps. This is your one-stop shop for those tools. + +✨ **If you've not used the Slack CLI before, we recommend following our [Deno Slack SDK getting started guide](/deno-slack-sdk/guides/getting-started) instead**. We'll still get your wagon loaded up before you depart for the trail, but we'll also give you some additional guidance. + +‡️ **If you need to authorize the Slack CLI, [go here](/slack-cli/guides/authorizing-the-slack-cli)**. + +:::info + +The minimum required Slack CLI version for Enterprise Grid as of September 19th, 2023 is `v2.9.0`. If you attempt to log in with an older version, you'll receive a `cli_update_required` error from the Slack API. Run `slack upgrade` to get the latest version. + +::: + +:::warning + +**PowerShell is required for installing the Slack CLI on Windows machines.** An alternative shell will not work. + +::: + + + + +**Run the automated installer from Windows PowerShell:** + +```zsh +irm https://downloads.slack-edge.com/slack-cli/install-windows.ps1 | iex +``` + +:::warning + +PowerShell is required for installing the Slack CLI on Windows machines; an alternative shell will not work. + +::: + +This will install the Slack CLI and all required dependencies, including [Deno](/deno-slack-sdk/guides/installing-deno), +the runtime environment for workflow apps. If you have VSCode installed, +the [VSCode Deno +extension](https://marketplace.visualstudio.com/items?itemName=denoland.vscode-deno) +will be installed. + +
+Optional: Use an alias for the Slack CLI binary + +If you have another CLI tool in your path called `slack`, you can rename the slack binary to a different name before you add it to your path. + +To do this, copy the Slack CLI into any folder that is already in your path, or add a new folder to your path by listing the folder you installed the Slack CLI to in your Environment Variables. You may not have access to edit System variables, so you might need to add it to your account's User variables. You can open the Environment Variables dialog by pressing the `Win`+`R` keys to open the Run window, and then entering the following command: + +```pwsh +rundll32.exe sysdm.cpl,EditEnvironmentVariables +``` + +You can also use the `-Alias` flag as described within **Optional: customize installation using flags**. + +
+ +
+Optional: customize installation using flags + +There are several flags available to customize the installation. Since flags +cannot be passed to remote scripts, you must first download the installation +script to a local file: + +```zsh +irm https://downloads.slack-edge.com/slack-cli/install-windows.ps1 -outfile 'install-windows.ps1' +``` + +The available flags are: + +| Flag | What it does | Example | +| :-- | :-- | :-- | +| `-Alias` | Installs the Slack CLI as the provided alias | `-Alias slackcli` will create a binary named `slackcli.exe` and add it to your path | +| `-Version` | Installs a specific version of the Slack CLI | `-Version 2.1.0` installs version `2.1.0` of the Slack CLI | +| `-SkipGit` | If true, will not attempt to install Git when Git is not present | `-SkipGit $true` | +| `-SkipDeno` | If true, will not attempt to install Deno when Deno is not present | `-SkipDeno $true` | + +You can also see all available flags by passing `-?` to the installation script: + +```zsh +.\install-windows.ps1 -? +``` + +Here's an example invocation using every flag: + +```zsh +.\install-windows.ps1 -Version 2.1.0 -Alias slackcli -SkipGit $true -SkipDeno $true +``` + +
+ +
+Troubleshooting + +#### Errors + +Error: _Not working? You may need to update your session's Language Mode._ + +Solution: For the installer to work correctly, your PowerShell session's [language mode](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_language_modes?view=powershell-7.3#what-is-a-language-mode) will need to be set to `FullLanguage`. To check your session's language mode, run the following in your PowerShell window: `ps $ExecutionContext.SessionState.LanguageMode`. To run the installer, your session's language mode will need to be `FullLanguage`. If it's not, you can set your session's language mode to `FullLanguage` with the following command: `ps $ExecutionContext.SessionState.LanguageMode = "FullLanguage"` + +
+ +
+ + +**1\. Download and install [Deno](https://deno.land).** Refer to [Install Deno](/deno-slack-sdk/guides/installing-deno) for more details. + +**2\. Verify that Deno is installed and in your path.** + +The minimum version of Deno runtime required is currently version 1.37.0. + +```bash +$ deno --version +deno 1.46.2* (release, x86_64-apple-darwin) +v8 10.* +typescript 4.* +``` + +**3\. Download and install + [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git), a + dependency of the** `slack` **CLI.** + +**4\. Download the** `slack` **CLI installer for your environment.** + +   Windows (.zip) + +**5\. Add the** `slack` **CLI to your path.** + +:::info +

Existing slack binary in path?

+

If you have another CLI tool in your path called slack, we recommend renaming our slack binary to a different name before adding it to your path. See the Automated installation tab for more details.

+ +::: + +**6\. Verify that** `slack` **is installed and in your path:** +``` +$ slack version +Using slack v3.0.4 +``` + +**7\. Verify that all dependencies have been installed.** + +Run the following command: +``` +$ slack doctor +``` + +**A few notes about hooks** + +If you have upgraded your CLI version but your `deno-slack-hooks` version is less than `v1.3.0`, when running `slack doctor`, you will see the following near the end of the output: + +``` + βœ” Configurations (your project's CLI settings) + Project ID: 1a2b3c4d-ef5g-67hi-8j9k1l2m3n4o + + ✘ Runtime (foundations for the application) + Error: The `doctor` hook was not found (sdk_hook_not_found) + Suggestion: Ensure this hook is implemented in your `slack.json` + + βœ” Dependencies (requisites for development) + deno_slack_hooks: 1.2.3 β†’ 1.3.0 (supported version) +``` + +In addition, if you attempt to run the `slack run` command without this dependency installed, you will see a similar error in your console: + +``` + 🚫 The `start` script was not found (sdk_hook_not_found) + + πŸ’‘ Suggestion + Hook scripts are defined in the Slack configuration file ('slack.json'). + Every app requires a 'slack.json' file and you can find a working example at: + https://github.com/slack-samples/deno-starter-template/blob/main/slack.json +``` + +Ensure that `deno-slack-hooks` is installed at the project level and that the version is not less than `v1.3.0`. + +**8\. [Install the VSCode extension for + Deno](/deno-slack-sdk/guides/installing-deno#vscode) (recommended).** + +
+
+ +## Installing PowerShell {#powershell} + +Run the following command to install PowerShell 7 on your machine: + +```pwsh +iex "& { $(irm https://aka.ms/install-powershell.ps1) } -UseMSI" +``` + +The following articles may also be helpful should you run into any issues: + +* [Installing PowerShell on Windows](https://learn.microsoft.com/en-us/powershell/scripting/install/installing-powershell-on-windows?view=powershell-7.4) +* [How to install and update PowerShell 6](https://www.thomasmaurer.ch/2019/03/how-to-install-and-update-powershell-6/) diff --git a/docs/guides/running-slack-cli-commands.md b/docs/guides/running-slack-cli-commands.md new file mode 100644 index 00000000..ee916bb9 --- /dev/null +++ b/docs/guides/running-slack-cli-commands.md @@ -0,0 +1,58 @@ +--- +sidebar_label: Running commands +slug: /slack-cli/guides/running-slack-cli-commands +--- + +# Running Slack CLI commands + +The Slack CLI allows you to interact with your apps via the command line. Using the main command `slack`, you can create, run, and deploy apps, as well as create triggers and query datastores. + +:::info + +Running `slack help` will display available commands in your terminal window. + +::: + +Use commands as follows (unless otherwise noted): + +``` +slack [flags] +``` + +To view global flags and each subcommands flags, run the following in your terminal: + +``` +slack --help +``` + +## Commands overview {#overview} + +Below you'll find all the commands and subcommands for the Slack CLI. Each one has its own reference page. + +| Command | Description | +| :--- | :--- | +| [`slack activity`](/slack-cli/reference/commands/slack_activity) | Display the app activity logs from the Slack Platform +| [`slack app`](/slack-cli/reference/commands/slack_app) | Install, uninstall, and list teams with the app installed +| [`slack auth`](/slack-cli/reference/commands/slack_auth) | Add and remove local team authorizations +| [`slack collaborator`](/slack-cli/reference/commands/slack_collaborator) | Manage app collaborators +| [`slack create`](/slack-cli/reference/commands/slack_create) | Create a Slack project +| [`slack datastore`](/slack-cli/reference/commands/slack_datastore) | Query an app's datastore +| [`slack delete`](/slack-cli/reference/commands/slack_delete) | Delete the app +| [`slack deploy`](/slack-cli/reference/commands/slack_deploy) | Deploy the app to the Slack Platform +| [`slack doctor`](/slack-cli/reference/commands/slack_doctor) | Check and report on system and app information +| [`slack env`](/slack-cli/reference/commands/slack_env) | Add, remove, and list environment variables +| [`slack external-auth`](/slack-cli/reference/commands/slack_external-auth) | Add and remove external authorizations and client secrets for providers in your app +| [`slack feedback`](/slack-cli/reference/commands/slack_feedback) | Share feedback about your experience or project +| [`slack function`](/slack-cli/reference/commands/slack_function) | Manage the functions of an app +| [`slack install`](/slack-cli/reference/commands/slack_install) | Install the app to a team +| [`slack list`](/slack-cli/reference/commands/slack_list) | List all authorized accounts +| [`slack login`](/slack-cli/reference/commands/slack_login) | Log in to a Slack account +| [`slack logout`](/slack-cli/reference/commands/slack_logout) | Log out of a team +| [`slack manifest`](/slack-cli/reference/commands/slack_manifest) | Print the app manifest of a project or app +| [`slack platform`](/slack-cli/reference/commands/slack_platform) | Deploy and run apps on the Slack Platform +| [`slack run`](/slack-cli/reference/commands/slack_run) | Start a local server to develop and run the app locally +| [`slack samples`](/slack-cli/reference/commands/slack_samples) | List available sample apps +| [`slack trigger`](/slack-cli/reference/commands/slack_trigger) | List details of existing triggers +| [`slack uninstall`](/slack-cli/reference/commands/slack_uninstall) | Uninstall the app from a team +| [`slack upgrade`](/slack-cli/reference/commands/slack_upgrade) | Checks for available updates to the CLI or SDK +| [`slack version`](/slack-cli/reference/commands/slack_version) | Print the version number \ No newline at end of file diff --git a/docs/guides/setting-up-ci-cd-with-the-slack-cli.md b/docs/guides/setting-up-ci-cd-with-the-slack-cli.md new file mode 100644 index 00000000..f1c3dada --- /dev/null +++ b/docs/guides/setting-up-ci-cd-with-the-slack-cli.md @@ -0,0 +1,220 @@ +--- +sidebar_label: Setting up CI/CD +slug: /slack-cli/guides/setting-up-ci-cd-with-the-slack-cli + +--- + +# Setting up CI/CD with the Slack CLI + +CI/CD is an acronym for Continuous Integration and Continuous Delivery. Also referred to as _CI/CD pipeline_, it is a common term in the world of DevOps. + +DevOps is another acronym of sorts that stands for Development and Operations, a combination of software development (typically encompassing planning, building, coding, and testing) and operations (including software releases, deployment, and status monitoring). + +## What is CI/CD? {#what-cicd} + +CI/CD describes the set of tools and practices that allow development teams to automate the process of building, testing, and deploying code. Automating testing and deployment enables developers to find and address defects earlier in the development process; therefore, software applications can be delivered more quickly. + +From your first tiny commit to deploying your code to production, your code passes through various validation steps, some or all of which are performed automatically. This is the deployment pipeline in action. + +### Continuous Integration {#what-integration} + +To break it down further, Continuous Integration refers to the building and testing side of the process, and can include things like the following: + +* integrating code commits into your main repository branch, +* automatically running static (linting), unit, integration, regression, or acceptance tests on each commit; these are typically configured using a [provider](#providers), or +* automatically kicking off builds after code is successfully merged. + +An underlying philosophy of Continuous Integration is that by merging, testing, and validating code frequently, you can identify defects, conflicts, and other issues more quickly and fix them more easily. + +#### Providers {#providers} + +CI providers are tools for automating the code changes that are part of your pipeline. CI/CD processes are set up at the repository level, and since these setups are specific to each provider, yours will be slightly different depending on which one you choose. + +Some popular providers include: + +* [Github Actions](https://github.com/features/actions) +* [CircleCI](https://circleci.com/) +* [GitLab](https://about.gitlab.com/) +* [Jenkins](https://www.jenkins.io/) +* [Azure Pipelines](https://azure.microsoft.com/en-us/products/devops/pipelines) +* [Bamboo](https://www.atlassian.com/software/bamboo) + +### Continuous Delivery {#what-delivery} + +Continuous Delivery refers to the deployment side of the process, and can include things like the following: + +* automatically provisioning infrastructure; for example, user provisioning (granting users permissions to services or applications) or service provisioning (setting up credentials and system privileges) +* manually deploying code to testing or production environments +* automatically deploying code to testing or production environments (also referred to as _continuous deployment_) +* leveraging feature toggles for code not yet slated for release to production + +An underlying philosophy of Continuous Delivery is that once code is tested as part of the CI process, your code can be packaged with everything it needs and released to production at any time — so everything should be in order and ready to go at a moment's notice. + +## Continuous Integration setup {#ci-pipeline} + +Before setting up a CI/CD pipeline, you should first familiarize yourself with the [Deno](/deno-slack-sdk/guides/installing-deno) environment if you haven't already. On the CI side of things, we'll be using [Deno's built-in tools](https://deno.land/manual/tools), which allow developers to leverage tools such as GitHub Actions to add steps for testing, linting, and formatting our code. + +You'll also need to accommodate requests from your network to a variety of hosts. Refer to [Which hosts are involved in the creation and execution of apps created with the Slack CLI?](https://docs.slack.dev/faq#hosts) for more details. + +In addition, you'll need to obtain a service token to authorize your CI/CD setup. Refer to [CI/CD authorization](/slack-cli/guides/authorizing-the-slack-cli#ci-cd) for more details about obtaining, using, and revoking service tokens. + +Once you've done those things, you're ready to get started! Let's walk through an example. + +Let's take a look at the [Virtual Running Buddies sample app](https://github.com/slack-samples/deno-virtual-running-buddies). + +First, we'll open the `deno.jsonc` file located at the root of the project: + +```json +// deno.jsonc + +{ + "$schema": "https://deno.land/x/deno/cli/schemas/config-file.v1.json", + "fmt": { + "files": { + "include": [ + "README.md", + "datastores", + "external_auth", + "functions", + "manifest.ts", + "triggers", + "types", + "views", + "workflows" + ] + } + }, + "importMap": "import_map.json", + "lint": { + "files": { + "include": [ + "datastores", + "external_auth", + "functions", + "manifest.ts", + "triggers", + "types", + "views", + "workflows" + ] + } + }, + "lock": false, + "tasks": { + "test": "deno fmt --check && deno lint && deno test --allow-read --allow-none" + } +} +``` + +This file is your [configuration file](https://deno.land/manual/getting_started/configuration_file). It allows you to customize Deno's built-in TypeScript compiler, formatter, and linter. + +We'll also point to our import map here (`import_map.json`), which allows you to manage what versions of modules or the standard library are included with your project: + +```json +// import_map.json + +{ + "imports": { + "deno-slack-sdk/": "https://deno.land/x/deno_slack_sdk@2.1.5/", + "deno-slack-api/": "https://deno.land/x/deno_slack_api@2.1.1/", + "mock-fetch/": "https://deno.land/x/mock_fetch@0.3.0/" + } +} +``` + +Next, we'll look inside the `deno.yml` file, which is located in the `.github/workflows` folder for this sample. Its contents are as follows: + +```yaml +# deno.yml + +name: Deno app build and testing + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + deno: + runs-on: ubuntu-latest + timeout-minutes: 5 + + steps: + - name: Set up repo + uses: actions/checkout@v3 + + - name: Install Deno + uses: denoland/setup-deno@v1 + with: + deno-version: v1.x + + - name: Verify formatting + run: deno fmt --check + + - name: Run linter + run: deno lint + + - name: Run tests + run: deno task test + + - name: Run type check + run: deno check *.ts && deno check **/*.ts +``` + +This is the meat and potatoes of our CI setup. The pipeline is kicked off by a push to or pull request from the main branch, and then we run through all the subcommands we want to complete within the _jobs/steps_ section, including setting up our repository and installing Deno. + +This also includes calling Deno's [task runner](https://deno.land/manual/tools/task_runner) to run any unit tests we have created for our custom functions. This allows us to run all of our unit tests automatically, rather than running each one manually from the command line. In this sample, this means all of the files located in the sample app's `functions` folder ending in _test.ts_. + +✨ **For more information about creating unit tests**, refer to [Testing custom functions](/deno-slack-sdk/guides/creating-custom-functions#testing). + +:::info + +If you've created your project by [cloning one of our sample apps](/deno-slack-sdk/guides/creating-an-app), note that the `.github` folder will not be included. You'll need to create it yourself, but you can use the handy dandy **Copy** button next to the code samples on this page to get started! + +::: + +While not part of this sample app, you can also generate test coverage reports from your `deno.yml` file. For more information, refer to [Test coverage](https://deno.land/manual/basics/testing/coverage). + +## Continuous Delivery setup {#cd-pipeline} + +On the CD side of things, there are various ways you can deploy Deno projects to the cloud. Your setup will differ based on which platform you choose. + +Let's look at an example `deploy.yml` file, which you would also place in the `.github/workflows` folder along with your `deno.yml` file. The steps below need to run within the app folder and are for already-deployed apps only. Its contents are as follows: + +```yaml + +# deploy.yml + +name: Deploy to Slack Cloud + +on: + push: + tags: [ '*.*.*' ] + +jobs: + deploy: + runs-on: macos-latest + + steps: + - name: Set up repo + uses: actions/checkout@v3 + + - name: Install CLI + run: curl -fsSL https://downloads.slack-edge.com/slack-cli/install.sh | bash + + - name: Deploy + run: slack deploy --app ${{ secrets.APP }} --workspace ${{ secrets.WORKSPACE }} --token ${{ secrets.SLACK_SERVICE_TOKEN }} +``` + +Central to this file is calling the `slack deploy` command to deploy your app to Slack's managed infrastructure. Using this command, the latest changes to your app will be deployed to a workspace once pushed/pulled/merged/tagged/etc. as specified in your workflow. + +## Onward {#onward} + +Want to learn more about how to use the Slack CLI? [Start here](/slack-cli/guides/installing-the-slack-cli-for-mac-and-linux)! + +✨ **For more information about deploying to Slack's managed infrastructure**, refer to [Deploy to Slack](/deno-slack-sdk/guides/deploying-to-slack). + +✨ **For more information specific to different platforms**, refer to [Deploying Deno](https://deno.land/manual/advanced/deploying_deno). + +✨ **Just want to write some unit tests?** Refer to [Testing custom functions](/deno-slack-sdk/guides/creating-custom-functions#testing). diff --git a/docs/guides/troubleshooting-slack-cli-errors.md b/docs/guides/troubleshooting-slack-cli-errors.md new file mode 100644 index 00000000..abf8bcc5 --- /dev/null +++ b/docs/guides/troubleshooting-slack-cli-errors.md @@ -0,0 +1,26 @@ +--- +sidebar_label: Troubleshooting errors +slug: /slack-cli/guides/troubleshooting-slack-cli-errors +--- + +# Troubleshooting Slack CLI errors + +Troubleshooting errors can be tricky. There's a lot going on between your development environment, the Slack CLI, and your code! + +View the [full list of of errors in the reference](/slack-cli/reference/errors). + +## VSCode and the Deno plugin {#vscode-deno} + +If you are using VSCode with the Deno plugin and you run into an error where Deno isn't being honored properly by VSCode, this is because VSCode treats the folder that's opened as the workspace root by default + +If you open a parent folder, the `.vscode/settings.json` file must be moved to the root of _that_ folder. VSCode requires that `deno.enable: true` is set in that `.vscode/settings.json` file, and VSCode only honors this setting if it's in the root of the project. + +Other common errors you may run into are static errors when opening a parent directory that contains one or many apps inside. These include: + +* _An import path cannot end with a '.ts' extension. Consider importing './workflows/greeting_workflow.js' instead_. + * This error is due to Deno not being set up correctly. +* _Relative import path "deno-slack-sdk/mod.ts" not prefixed with / or ./ or ../deno(import-prefix-missing)_. + * This error is due to an invalid import map. + +These errors occur because of that first one we covered — VSCode treats the folder that’s opened as the workspace root by default, and looks for the `.vscode/settings.json` and `deno.jsonc` files there. To resolve this, open the app folder directly, or set up your own workspace config in VSCode. + diff --git a/docs/guides/uninstalling-the-slack-cli.md b/docs/guides/uninstalling-the-slack-cli.md new file mode 100644 index 00000000..3cb08a89 --- /dev/null +++ b/docs/guides/uninstalling-the-slack-cli.md @@ -0,0 +1,69 @@ +--- +slug: /slack-cli/guides/uninstalling-the-slack-cli +--- + +# Uninstalling the Slack CLI + +All good things come to an end! If you need to uninstall the Slack CLI, run the commands below. Note that these instructions will uninstall the Slack CLI, but not its dependencies. Follow [these instructions](https://docs.deno.com/runtime/manual/tools/script_installer#uninstall) to uninstall Deno. + +✨ **Just need to uninstall an app?** Refer to [uninstall an app from your workspace](/deno-slack-sdk/guides/creating-an-app#uninstall-app). + + + + + + +Run the following commands in your terminal window + +``` +$ rm -rf ~/.slack # Delete the download binary +$ rm /usr/local/bin/slack # Delete the command alias (replacing `slack` with a command name) +``` + + + + + +The command binary is stored in `$HOME\AppData\Local\slack-cli` or `$HOME\.slack-cli`. This binary can be removed with the following command: + +``` +rd -r $HOME\AppData\Local\slack-cli +``` + +where `$HOME` is substituted for the full path, e.g. `C:\Users\`. + +:::warning + +**As with installation, PowerShell is required for uninstallation of the Slack CLI from Windows machines.** An alternative shell will not work. + +::: + +Removing the command from the `$env:path` can be done with the following command: + +``` +$env:Path = ($env:Path -split ';' -ne "$HOME\AppData\Local\slack-cli\bin") -join ';' +``` + +Removing the command from the system path can be done with the following command: + +``` +[System.Environment]::SetEnvironmentVariable('Path', (([System.Environment]::GetEnvironmentVariable('Path', [System.EnvironmentVariableTarget]::User) -split ';' -ne '$HOME\AppData\Local\slack-cli\bin') -join ';'), [System.EnvironmentVariableTarget]::User) +``` + +Finally, general configurations can be removed with the following command: + +``` +rd -r $HOME\.slack +``` + +To check that uninstallation was successful, run the following commands and verify that you receive an error — in this case, that's a good thing! + +``` +slack version +echo $env:path +``` + + + + +Until next time! diff --git a/docs/guides/using-environment-variables-with-the-slack-cli.md b/docs/guides/using-environment-variables-with-the-slack-cli.md new file mode 100644 index 00000000..b966bda9 --- /dev/null +++ b/docs/guides/using-environment-variables-with-the-slack-cli.md @@ -0,0 +1,198 @@ +--- +sidebar_label: Using environment variables +slug: /slack-cli/guides/using-environment-variables-with-the-slack-cli +--- + +# Using environment variables with the Slack CLI + +Storing and using environment variables in an application allows for certain variables to be maintained outside of the code of the application. You can use environment variables from within Slack [functions](/deno-slack-sdk/guides/creating-custom-functions), [triggers](/deno-slack-sdk/guides/using-triggers), and [manifests](/deno-slack-sdk/guides/using-the-app-manifest). + +## Using environment variables with a custom function {#custom-function} + +When accessing environment variables from within a [custom function](/deno-slack-sdk/guides/creating-custom-functions), where you store them differs when the app is local versus deployed. + +### Storing local environment variables {#local-env-vars} + +Local environment variables are stored in a `.env` file at the root of the project and made available for use in [custom functions](/deno-slack-sdk/guides/creating-custom-functions) via the `env` [context property](/deno-slack-sdk/guides/creating-custom-functions#context). + +A local `.env` file might look like this: +```env +MY_ENV_VAR=asdf1234 +``` + +Note that changes to your `.env` file will be reflected when you restart your local development server. + +While the `.env` file should **never** be committed to source control for security reasons, you can see a sample `.env` file we've included in the [Timesheet approval sample app](https://github.com/slack-samples/deno-timesheet-approval) and the [Incident management sample app](https://github.com/slack-samples/deno-incident-management). + +### Storing deployed environment variables {#deployed-env-vars} + +When your app is [deployed](/deno-slack-sdk/guides/deploying-to-slack), it will no longer use the `.env` file. Instead, you will have to add the environment variables using the [`env add`](/slack-cli/reference/commands/slack_env_add) command. Environment variables added with `env add` will be made available to your deployed app's [custom functions](/deno-slack-sdk/guides/creating-custom-functions) just as they are locally; see examples in the next section. + +For the above example, we could run the following command before deploying our app: + +```zsh +slack env add MY_ENV_VAR asdf1234 +``` + +If your token contains non-alphanumeric characters, wrap it in quotes like this: + +```zsh +slack env add SLACK_API_URL "https://dev.slack.com/api/" +``` + +Your environment variables are always encrypted before being stored on our servers and will be automatically decrypted when you use them—including when listing environment variables with `slack env list`. + +### Access variables from within function {#access-function} + +We can retrieve the `MY_ENV_VAR` environment variable from within a [custom Slack function](/deno-slack-sdk/guides/creating-custom-functions) via the `env` [context property](/deno-slack-sdk/guides/creating-custom-functions#context) like this: + +```javascript +// functions/my_function.ts + +import { DefineFunction, SlackFunction } from "deno-slack-sdk/mod.ts"; +import { MyFunctionDefinition } from "functions/myfunction.ts" + + +export default SlackFunction(MyFunctionDefinition, ({ env }) => { + const myEnvVar = env["MY_ENV_VAR"]; + // ... + return { outputs: {} }; +}); +``` + +Environment variables also play an important part in making calls to a third-party API. Learn more about how to do that in the [FAQ](https://docs.slack.dev/faq#third-party). + +## Using environment variables with a trigger or manifest {#using-trigger-manifest} + +Accessing environment variables from within a [trigger](/deno-slack-sdk/guides/using-triggers) definition or when constructing the [manifest](/deno-slack-sdk/guides/using-the-app-manifest) differs slightly from custom functions. + +Whether your app is being run locally or already deployed, constructing these definitions happens entirely on your machine and so the environment variables stored on your machine are used. + +### Storing environment variables {#trigger-manifest-env-vars} + +Environment variables used in trigger or manifest definitions should be saved in the local `.env` file for your project [as shown above](#local-env-vars). The values from this file are collected and used when generating these definitions. + +Regardless of whether you're working with a local or deployed app, the same values from this file will be used. Read on to learn how to access these stored variables in code. + +### Accessing variables from a trigger or manifest {#accessing-trigger-manifest} + +The Deno runtime provides a helpful `load` function to autoload environment variables as part of the `dotenv` module of the standard library. We'll leverage this to easily access our environment variables. + +Including this module in code will automatically import local environment variables for immediate use! Start by adding [the latest version](https://deno.land/std/dotenv/mod.ts) of this module to your `import_map.json`: + +```json title="test" +{ + "imports": { + "deno-slack-sdk/": "https://deno.land/x/deno_slack_sdk@a.b.c/", + "deno-slack-api/": "https://deno.land/x/deno_slack_api@x.y.z/", + "std/": "https://deno.land/std@0.202.0/" + } +} +``` + +Then, you can import the module into any file that makes use of environment variables and start accessing the environment with [`Deno.env.get("VARIABLE_NAME")`](https://examples.deno.land/environment-variables) like so: + +```javascript +// manifest.ts +import { Manifest } from "deno-slack-sdk/mod.ts"; +import ExampleWorkflow from "./workflows/example_workflow.ts"; + +import "std/dotenv/load.ts"; + +export default Manifest({ + name: "Chatbot4000", + displayName: Deno.env.get("CHATBOT_DISPLAY_NAME"), + description: "Workflows for communicating with an imagined chatbot", + icon: "assets/icon.png", + workflows: [ExampleWorkflow], + outgoingDomains: [ + Deno.env.get("CHATBOT_API_URL")!, + ], + botScopes: ["commands", "chat:write", "chat:write.public"], +}); +``` + +After including this new module, you may have to run [`deno cache manifest.ts`](https://docs.deno.com/runtime/manual/getting_started/command_line_interface#cache-and-compilation-flags) to refresh your local dependency cache. + +Variable values such as these are commonly used to specify [outgoing domains](/deno-slack-sdk/guides/using-the-app-manifest#manifest-properties) used by functions, channel IDs for [event triggers](/deno-slack-sdk/guides/creating-event-triggers#event-object), or client IDs of an [external authentication](/deno-slack-sdk/guides/integrating-with-services-requiring-external-authentication#define) provider. But, don't let that limit you β€” environment variables can be used in so many other places! + +#### Requiring environment variables values {#required-manifest-variable-values} + +Setting values for environment variables can sometimes be forgotten, which can cause problems at runtime. Catching errors for these missing values early is often better than waiting for that runtime problem. + +Including a `!` with your call to `Deno.env.get()` will ensure this value is defined at the time of building a definition and will throw an error otherwise. + +The previous example uses this pattern to ensure an outgoing domain is always set: + +```javascript + outgoingDomains: [ + Deno.env.get("CHATBOT_API_URL")!, + ], +``` + +With this addition, running `slack deploy` without defining a value for `CHATBOT_API_URL` in the `.env` file will throw an error to give you a chance to set it before actually deploying! + +## Enabling debug mode {#debug} + +The included environment variable `SLACK_DEBUG` can enable a basic debug mode. Set `SLACK_DEBUG` to `true` to have all function-related payloads logged. + +For local apps, add the following to your `.env` file: + +``` +SLACK_DEBUG=true +``` + +For deployed apps, run the following command before deployment: + +``` +slack env add SLACK_DEBUG true +``` + +## Included local and deployed variables {#included} + +Slack provides two environment variables by default, `SLACK_WORKSPACE` and `SLACK_ENV`. The workspace name is specified by `SLACK_WORKSPACE` and `SLACK_ENV` provides a distinction between the `local` and `deployed` app. Use these values if you want to have different values based on the workspace or environment that the app is installed in. + +These variables are automatically included when generating the manifest or triggers only. For access from within a custom function, these variables can be set from the `.env` file or with the [`env add`](/slack-cli/reference/commands/slack_env_add) command. + +A custom `WorkspaceMapSchema` can be created and used with these variables to decide which values to use for certain instances of an app. This can be used as an alternative to a local `.env` file or in conjunction with it. The following snippet works well for inclusion in your app manifest, or for triggers (for example, to change event trigger channel IDs): + +```javascript +// Custom schemas can be defined for workspace values +type WorkspaceSchema = { channel_id: string }; +type WorkspaceMapSchema = { + [workspace: string]: { + [environment: string]: WorkspaceSchema; + }; +}; + +// Custom values can be set for each known workspace +export const workspaceValues: WorkspaceMapSchema = { + beagoodhost: { + deployed: { + channel_id: "C123ABC456", + }, + local: { + channel_id: "C123ABC456", + }, + }, + sandbox: { + deployed: { + channel_id: "C222BBB222", + }, + local: { + channel_id: "C222BBB222", + }, + }, +}; + +// Fallback options can also be defined +export const defaultValues: WorkspaceSchema = { + channel_id: "{{data.channel_id}}", +}; + +// Included environment variables will determine which value is used +const environment = Deno.env.get("SLACK_ENV") || ""; +const workspace = Deno.env.get("SLACK_WORKSPACE") || ""; +const { channel_id } = workspaceValues[workspace]?.[environment] ?? + defaultValues; +``` diff --git a/docs/guides/using-slack-cli-on-an-enterprise-grid-organization.md b/docs/guides/using-slack-cli-on-an-enterprise-grid-organization.md new file mode 100644 index 00000000..07ed67a8 --- /dev/null +++ b/docs/guides/using-slack-cli-on-an-enterprise-grid-organization.md @@ -0,0 +1,116 @@ +--- +sidebar_label: Using on Enterprise Grid +slug: /slack-cli/guides/using-slack-cli-on-an-enterprise-grid-organization +--- + +# Using Slack CLI on an Enterprise Grid organization + +There are a few extra requirements, steps and considerations when you're developing on an Enterprise Grid organization. + +While we'll discuss a few special privileges provided to those powerful Org Admins, the following material is recommended reading for all developers on an Enterprise Grid organization. + +## Enterprise Grid terminology {#terminology} + +This guide will use the following terms: +* Organization - The Enterprise Grid organization. The Slack CLI refers to your organization as your `team`. +* Workspace - An Enterprise Grid organization can contain multiple workspaces. +* Org Admins - An administrator of the Enterprise Grid organization. Org Primary Owners and Org Owners also have the privileges of Org Admins. +* User - Anyone with a Slack account in the Enterprise Grid organization. +* Developer - Someone building a workflow app in an Enterprise Grid organization, on any of its workspaces. + +For example, imagine there is a _Kingdom of Britain organization_. _King Arthur_ is one of its Org Admins. This organization contains the _Knights of the Round Table_ workspace, of which _King Arthur_ is a member, along with other users such as _Mordred_ and _Lancelot_. + +With the terms defined, here's what Org Admins and developers need to know about the Slack CLI. + +## Using a compatible version of the Slack CLI {#using} + +Any developer using the Slack CLI in an organization will need to use v2.9.0 or later of Slack CLI. + +Keeping your version of the Slack CLI up-to-date is recommended for a bevy of reasons. The Slack CLI will also prompt you to update. + +If you're not sure if you're on a recent enough version, you can check with the following command: + +``` +slack --version +``` + +If you're experiencing login errors, try checking what version of the Slack CLI you're using! You won't be able to log in to an organization on earlier versions of the Slack CLI. + +## Logging in to an Enterprise Grid organization {#log-in} + +Developers log in with the Slack CLI tool to **their entire organization**. + +The login steps are the same as any other user, whether you are an Org Admin or not. Use the `slack login` command and paste the `/slackauthticket ` in any Slack channel or DM. Doing so will log you into the entire organization. + +You can confirm this is the case with the `slack auth list` command. You'll get the following output: + +``` +OrgName (Team ID: E123ABC456) +User ID: U123ABC456 +Last Updated: 2023-12-31 23:59:59 -7:00 +Authorization Level: Organization +``` + +Since you're logged in to your organization, the apps you create will belong to your organization. + +### Enterprise Grid developers already logged into a workspace {#log-in-workspace} +Prior to Slack CLI v2.9.0, the Slack CLI was not compatible with an entire Enterprise Grid. Developers could, however, log in to a workspace of their organization. A developer who was developing with the Slack CLI prior to v2.9.0 may still show the following output from `slack auth list`: + +``` +WorkspaceName (Team ID: T123ABC456) +User ID: U123ABC456 +Last Updated: 2023-12-31 23:59:59 -7:00 +Authorization Level: Workspace +``` + +This legacy workspace-specific level authorization will still work, but is no longer grantable to new developers. If you log out or invalidate your login, you'll log in again with an organization level authorization. + +Apps created with a legacy workspace-level authorization can still be managed by app owners or app collaborators with organization-level authorization, provided the workspace belongs to the organization. + +## Requesting Admin Approval {#requesting-approval} + +By default, [Admin Approval of Apps](/deno-slack-sdk/guides/controlling-permissions-for-admins) is turned on for all Slack Enterprise Grid organizations. + +Here's what the request flow looks like when trying to install an app to an organization: + +1. Attempt to install your app with the CLI. The CLI will prompt you to request access if it is required. A request is sent to your organization admin. The request includes its [OAuth scopes](https://docs.slack.dev/authentication/) and outgoing domains. +2. Slackbot messages you confirming the request has been sent. +3. Slackbot messages the organization admin with the request. +4. An Org Admin approves the request. +5. Slackbot messages you informing you of the approval. +6. Attempt to install your app again. Installation should succeed. + +If your organization turned Admin Approval of Apps off, then no approval is needed. The first attempt to install your app should succeed. + +## Granting access to specific workspaces {#granting-access} + +While workflow apps are _installed_ on an entire organization, they do not necessarily have _access_ to every workspace in the organization. + +Granting access to workspaces is done when an app is [run on a local development server](/deno-slack-sdk/guides/developing-locally) or [deployed to production](/deno-slack-sdk/guides/deploying-to-slack). The Slack CLI will prompt you to select whether to install with access to a single workspace or all workspaces in an organization. + +You can also skip the prompt and proactively grant the desired access by appending `-org-workspace-grant ` to the relevant command. + +For running on a local development server: + +``` +slack run -org-workspace-grant +``` + +For deploying to production: + +``` +slack deploy -org-workspace-grant +``` + +## Adjusting access to specific workspaces {#adjusting-access} + +Org Admins can adjust an app's access grants anytime after granting their approval. Admins can change what workspaces the app has access to via Administration Settings. From there: + +1. _Manage Organization_ +2. _Integrations_ +3. _Installed Apps_ +4. _App Page_ +5. _Manage_ +6. Select _Remove from a workspace_ or _Add to more workspaces_ + +Use this process to ensure only desired apps are available in the proper workspaces. \ No newline at end of file diff --git a/docs/guides/using-slack-cli-with-bolt-frameworks.md b/docs/guides/using-slack-cli-with-bolt-frameworks.md new file mode 100644 index 00000000..e238f92c --- /dev/null +++ b/docs/guides/using-slack-cli-with-bolt-frameworks.md @@ -0,0 +1,43 @@ +--- +sidebar_label: Using with Bolt frameworks +--- + +# Using the Slack CLI with Bolt frameworks + +You can use the Slack CLI to streamline development of apps using [Bolt for JavaScript](/tools.slack.dev/bolt-js) and [Bolt for Python](/tools.slack.dev/bolt-python). + +## Getting started + +Creating a Bolt app via the Slack CLI is similar to creating other apps with the Slack CLI. Run the following command to begin: + +``` +slack create +``` + +Select an option from the following list. For this example, choose **Starter app**: + +```zsh +// highlight-next-line +> Starter app - Getting started Slack app +Automation app - Custom steps and workflows +AI app - Slack agents & assistants +View more samples +``` + +You will then be prompted to choose between **Bolt for JavaScript** or **Bolt for Python**. Choose your favorite flavor. + +Your app will be cloned from the respective [JavaScript](https://github.com/slack-samples/bolt-js-starter-template) or [Python](https://github.com/slack-samples/bolt-python-starter-template) project template on our Slack Platform Sample Code repository, and its project dependencies will be installed. Then, `cd` into your project folder. + +:::info + +For Bolt for Python projects, automatic project dependency installation is currently unsupported, and will need to be done manually. For more information, refer to [Getting started with Bolt for Python](https://tools.slack.dev/bolt-python/getting-started). + +::: + +To run your new app, use the `slack run` command with the experiment flag as follows: + +``` +slack run +``` + +You'll be prompted to choose your team/workspace, and then your app should let you know that it's up and running. πŸŽ‰ \ No newline at end of file diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 00000000..62f90caf --- /dev/null +++ b/docs/index.md @@ -0,0 +1,20 @@ +# Slack CLI + +The Slack command-line interface (CLI) allows you to create and manage Slack apps from the command line. Use it in combination with the Deno Slack SDK, or the Bolt frameworks for JavaScript and Python. + +Follow the installation guide for either [MacOS / Linux](/slack-cli/guides/installing-the-slack-cli-for-mac-and-linux) or [Windows](/slack-cli/guides/installing-the-slack-cli-for-windows) to get set up. Then, follow the the [Authorization guide](/slack-cli/guides/authorizing-the-slack-cli) to connect your workspace. + +## Getting help + +This site has lots of guides on the Slack CLI. There's also an in-depth reference both for [commands](/slack-cli/reference/commands/slack) and [errors](/slack-cli/reference/errors). + +If you otherwise get stuck, we're here to help. The following are the best ways to get assistance working through your issue: + +* [Issue Tracker](http://github.com/slackapi/slack-cli/issues) for questions, bug reports, feature requests, and general discussion related to the Slack CLI. Try searching for an existing issue before creating a new one. +* [Email](mailto:support@slack.com) our developer support team: `support@slack.com`. + +## Contributing + +These docs live within the open source [Slack CLI](https://github.com/slackapi/slack-cli) repository. + +We welcome contributions from everyone! Please check out our [Contributor's Guide](https://github.com/slackapi/slack-cli/blob/main/.github/CONTRIBUTING.md) for how to contribute in a helpful and collaborative way. \ No newline at end of file diff --git a/docs/reference/commands/slack.md b/docs/reference/commands/slack.md new file mode 100644 index 00000000..0bb3f6c4 --- /dev/null +++ b/docs/reference/commands/slack.md @@ -0,0 +1,69 @@ +## slack + +Slack command-line tool + +### Synopsis + +CLI to create, run, and deploy Slack apps + +Get started by reading the docs: [https://tools.slack.dev/deno-slack-sdk](/deno-slack-sdk) + +``` +slack [flags] +``` + +### Examples + +``` +$ slack login # Log in to your Slack account +$ slack create # Create a new Slack app +$ slack init # Initialize an existing Slack app +$ slack run # Start a local development server +$ slack deploy # Deploy to the Slack Platform +``` + +### Options + +``` + -a, --app string use a specific app ID or environment + --config-dir string use a custom path for system config directory + -e, --experiment strings use the experiment(s) in the command + -f, --force ignore warnings and continue executing command + -h, --help help for slack + --no-color remove styles and formatting from outputs + -s, --skip-update skip checking for latest version of CLI + -w, --team string select workspace or organization by team name or ID + --token string set the access token associated with a team + -v, --verbose print debug logging and additional info +``` + +### SEE ALSO + +* [slack activity](slack_activity) - Display the app activity logs from the Slack Platform +* [slack app](slack_app) - Install, uninstall, and list teams with the app installed +* [slack auth](slack_auth) - Add and remove local team authorizations +* [slack collaborator](slack_collaborator) - Manage app collaborators +* [slack create](slack_create) - Create a new Slack project +* [slack datastore](slack_datastore) - Interact with an app's datastore +* [slack delete](slack_delete) - Delete the app +* [slack deploy](slack_deploy) - Deploy the app to the Slack Platform +* [slack doctor](slack_doctor) - Check and report on system and app information +* [slack env](slack_env) - Add, remove, or list environment variables +* [slack external-auth](slack_external-auth) - Adjust settings of external authentication providers +* [slack feedback](slack_feedback) - Share feedback about your experience or project +* [slack function](slack_function) - Manage the functions of an app +* [slack init](slack_init) - Initialize a project to work with the Slack CLI +* [slack install](slack_install) - Install the app to a team +* [slack list](slack_list) - List all authorized accounts +* [slack login](slack_login) - Log in to a Slack account +* [slack logout](slack_logout) - Log out of a team +* [slack manifest](slack_manifest) - Print the app manifest of a project or app +* [slack platform](slack_platform) - Deploy and run apps on the Slack Platform +* [slack project](slack_project) - Create, manage, and doctor a project +* [slack run](slack_run) - Start a local server to develop and run the app locally +* [slack samples](slack_samples) - List available sample apps +* [slack trigger](slack_trigger) - List details of existing triggers +* [slack uninstall](slack_uninstall) - Uninstall the app from a team +* [slack upgrade](slack_upgrade) - Checks for available updates to the CLI or SDK +* [slack version](slack_version) - Print the version number + diff --git a/docs/reference/commands/slack_activity.md b/docs/reference/commands/slack_activity.md new file mode 100644 index 00000000..ea23f642 --- /dev/null +++ b/docs/reference/commands/slack_activity.md @@ -0,0 +1,60 @@ +## slack activity + +Display the app activity logs from the Slack Platform + +### Synopsis + +Display the app activity logs from the Slack Platform + +``` +slack activity [flags] +``` + +### Examples + +``` +$ slack platform activity # Display app activity logs for an app +$ slack platform activity -t # Continuously poll for new activity logs +``` + +### Options + +``` + --component string component type to filter + --component-id string component id to filter + (either a function id or workflow id) + --event string event type to filter + -h, --help help for activity + --idle int time to poll without results before exiting + in minutes (default 5) + -i, --interval int polling interval in seconds (default 3) + --level string minimum log level to display (default "info") + (trace, debug, info, warn, error, fatal) + --limit int limit the amount of logs retrieved (default 100) + --max-date-created int maximum timestamp to filter + (unix timestamp in microseconds) + --min-date-created int minimum timestamp to filter + (unix timestamp in microseconds) + --source string source (slack or developer) to filter + -t, --tail continuously poll for new activity + --trace-id string trace id to filter +``` + +### Options inherited from parent commands + +``` + -a, --app string use a specific app ID or environment + --config-dir string use a custom path for system config directory + -e, --experiment strings use the experiment(s) in the command + -f, --force ignore warnings and continue executing command + --no-color remove styles and formatting from outputs + -s, --skip-update skip checking for latest version of CLI + -w, --team string select workspace or organization by team name or ID + --token string set the access token associated with a team + -v, --verbose print debug logging and additional info +``` + +### SEE ALSO + +* [slack](slack) - Slack command-line tool + diff --git a/docs/reference/commands/slack_app.md b/docs/reference/commands/slack_app.md new file mode 100644 index 00000000..acdbd450 --- /dev/null +++ b/docs/reference/commands/slack_app.md @@ -0,0 +1,51 @@ +## slack app + +Install, uninstall, and list teams with the app installed + +### Synopsis + +Install, uninstall, and list teams with the app installed + +``` +slack app [flags] +``` + +### Examples + +``` +$ slack install # Install a production app to a team +$ slack link # Link an existing app to the project +$ slack list # List all teams with the app installed +$ slack uninstall # Uninstall an app from a team +$ slack delete # Delete an app and app info from a team +``` + +### Options + +``` + -h, --help help for app +``` + +### Options inherited from parent commands + +``` + -a, --app string use a specific app ID or environment + --config-dir string use a custom path for system config directory + -e, --experiment strings use the experiment(s) in the command + -f, --force ignore warnings and continue executing command + --no-color remove styles and formatting from outputs + -s, --skip-update skip checking for latest version of CLI + -w, --team string select workspace or organization by team name or ID + --token string set the access token associated with a team + -v, --verbose print debug logging and additional info +``` + +### SEE ALSO + +* [slack](slack) - Slack command-line tool +* [slack app delete](slack_app_delete) - Delete the app +* [slack app install](slack_app_install) - Install the app to a team +* [slack app link](slack_app_link) - Add an existing app to the project +* [slack app list](slack_app_list) - List teams with the app installed +* [slack app uninstall](slack_app_uninstall) - Uninstall the app from a team + diff --git a/docs/reference/commands/slack_app_delete.md b/docs/reference/commands/slack_app_delete.md new file mode 100644 index 00000000..8abd4aa1 --- /dev/null +++ b/docs/reference/commands/slack_app_delete.md @@ -0,0 +1,46 @@ +## slack app delete + +Delete the app + +### Synopsis + +Uninstall the app from the team and permanently delete the app and all of its data + +``` +slack app delete [flags] +``` + +### Examples + +``` +# Delete an app and app info from a team +$ slack app delete + +# Delete a specific app from a team +$ slack app delete --team T0123456 --app local +``` + +### Options + +``` + -h, --help help for delete +``` + +### Options inherited from parent commands + +``` + -a, --app string use a specific app ID or environment + --config-dir string use a custom path for system config directory + -e, --experiment strings use the experiment(s) in the command + -f, --force ignore warnings and continue executing command + --no-color remove styles and formatting from outputs + -s, --skip-update skip checking for latest version of CLI + -w, --team string select workspace or organization by team name or ID + --token string set the access token associated with a team + -v, --verbose print debug logging and additional info +``` + +### SEE ALSO + +* [slack app](slack_app) - Install, uninstall, and list teams with the app installed + diff --git a/docs/reference/commands/slack_app_install.md b/docs/reference/commands/slack_app_install.md new file mode 100644 index 00000000..b0d3e293 --- /dev/null +++ b/docs/reference/commands/slack_app_install.md @@ -0,0 +1,47 @@ +## slack app install + +Install the app to a team + +### Synopsis + +Install the app to a team + +``` +slack app install [flags] +``` + +### Examples + +``` +$ slack app install # Install a production app to a team + +# Install a production app to a specific team +$ slack app install --team T0123456 +``` + +### Options + +``` + -h, --help help for install + --org-workspace-grant string grant access to a specific org workspace ID + (or 'all' for all workspaces in the org) +``` + +### Options inherited from parent commands + +``` + -a, --app string use a specific app ID or environment + --config-dir string use a custom path for system config directory + -e, --experiment strings use the experiment(s) in the command + -f, --force ignore warnings and continue executing command + --no-color remove styles and formatting from outputs + -s, --skip-update skip checking for latest version of CLI + -w, --team string select workspace or organization by team name or ID + --token string set the access token associated with a team + -v, --verbose print debug logging and additional info +``` + +### SEE ALSO + +* [slack app](slack_app) - Install, uninstall, and list teams with the app installed + diff --git a/docs/reference/commands/slack_app_link.md b/docs/reference/commands/slack_app_link.md new file mode 100644 index 00000000..491046f1 --- /dev/null +++ b/docs/reference/commands/slack_app_link.md @@ -0,0 +1,56 @@ +## slack app link + +Add an existing app to the project + +### Synopsis + +Saves an existing app to a project to be available to other commands. + +The provided App ID and Team ID are stored in the apps.json or apps.dev.json +files in the .slack directory of a project. + +The environment option decides how an app is handled and where information +should be stored. Production apps should be 'deployed' while apps used for +testing and development should be considered 'local'. + +Only one app can exist for each combination of Team ID and environment. + +``` +slack app link [flags] +``` + +### Examples + +``` +# Add an existing app to a project +$ slack app link + +# Add a specific app without using prompts +$ slack app link --team T0123456789 --app A0123456789 --environment deployed +``` + +### Options + +``` + -E, --environment string environment to save existing app (local, deployed) + -h, --help help for link +``` + +### Options inherited from parent commands + +``` + -a, --app string use a specific app ID or environment + --config-dir string use a custom path for system config directory + -e, --experiment strings use the experiment(s) in the command + -f, --force ignore warnings and continue executing command + --no-color remove styles and formatting from outputs + -s, --skip-update skip checking for latest version of CLI + -w, --team string select workspace or organization by team name or ID + --token string set the access token associated with a team + -v, --verbose print debug logging and additional info +``` + +### SEE ALSO + +* [slack app](slack_app) - Install, uninstall, and list teams with the app installed + diff --git a/docs/reference/commands/slack_app_list.md b/docs/reference/commands/slack_app_list.md new file mode 100644 index 00000000..3ce1de2b --- /dev/null +++ b/docs/reference/commands/slack_app_list.md @@ -0,0 +1,44 @@ +## slack app list + +List teams with the app installed + +### Synopsis + +List all teams that have installed the app + +``` +slack app list [flags] +``` + +### Examples + +``` +$ slack app list # List all teams with the app installed +``` + +### Options + +``` + --all-org-workspace-grants display all workspace grants for an app + installed to an organization + -h, --help help for list +``` + +### Options inherited from parent commands + +``` + -a, --app string use a specific app ID or environment + --config-dir string use a custom path for system config directory + -e, --experiment strings use the experiment(s) in the command + -f, --force ignore warnings and continue executing command + --no-color remove styles and formatting from outputs + -s, --skip-update skip checking for latest version of CLI + -w, --team string select workspace or organization by team name or ID + --token string set the access token associated with a team + -v, --verbose print debug logging and additional info +``` + +### SEE ALSO + +* [slack app](slack_app) - Install, uninstall, and list teams with the app installed + diff --git a/docs/reference/commands/slack_app_uninstall.md b/docs/reference/commands/slack_app_uninstall.md new file mode 100644 index 00000000..4554f008 --- /dev/null +++ b/docs/reference/commands/slack_app_uninstall.md @@ -0,0 +1,42 @@ +## slack app uninstall + +Uninstall the app from a team + +### Synopsis + +Uninstall the app from a team without deleting the app or its data + +``` +slack app uninstall [flags] +``` + +### Examples + +``` +$ slack app uninstall # Uninstall an app from a team +``` + +### Options + +``` + -h, --help help for uninstall +``` + +### Options inherited from parent commands + +``` + -a, --app string use a specific app ID or environment + --config-dir string use a custom path for system config directory + -e, --experiment strings use the experiment(s) in the command + -f, --force ignore warnings and continue executing command + --no-color remove styles and formatting from outputs + -s, --skip-update skip checking for latest version of CLI + -w, --team string select workspace or organization by team name or ID + --token string set the access token associated with a team + -v, --verbose print debug logging and additional info +``` + +### SEE ALSO + +* [slack app](slack_app) - Install, uninstall, and list teams with the app installed + diff --git a/docs/reference/commands/slack_auth.md b/docs/reference/commands/slack_auth.md new file mode 100644 index 00000000..e5572af4 --- /dev/null +++ b/docs/reference/commands/slack_auth.md @@ -0,0 +1,49 @@ +## slack auth + +Add and remove local team authorizations + +### Synopsis + +Add and remove local team authorizations + +``` +slack auth [flags] +``` + +### Examples + +``` +$ slack auth list # List all authorized accounts +$ slack auth login # Log in to a Slack account +$ slack auth logout # Log out of a team +``` + +### Options + +``` + -h, --help help for auth +``` + +### Options inherited from parent commands + +``` + -a, --app string use a specific app ID or environment + --config-dir string use a custom path for system config directory + -e, --experiment strings use the experiment(s) in the command + -f, --force ignore warnings and continue executing command + --no-color remove styles and formatting from outputs + -s, --skip-update skip checking for latest version of CLI + -w, --team string select workspace or organization by team name or ID + --token string set the access token associated with a team + -v, --verbose print debug logging and additional info +``` + +### SEE ALSO + +* [slack](slack) - Slack command-line tool +* [slack auth list](slack_auth_list) - List all authorized accounts +* [slack auth login](slack_auth_login) - Log in to a Slack account +* [slack auth logout](slack_auth_logout) - Log out of a team +* [slack auth revoke](slack_auth_revoke) - Revoke an authentication token +* [slack auth token](slack_auth_token) - Collect a service token + diff --git a/docs/reference/commands/slack_auth_list.md b/docs/reference/commands/slack_auth_list.md new file mode 100644 index 00000000..a0a8f6f5 --- /dev/null +++ b/docs/reference/commands/slack_auth_list.md @@ -0,0 +1,42 @@ +## slack auth list + +List all authorized accounts + +### Synopsis + +List all authorized accounts + +``` +slack auth list [flags] +``` + +### Examples + +``` +$ slack auth list # List all authorized accounts +``` + +### Options + +``` + -h, --help help for list +``` + +### Options inherited from parent commands + +``` + -a, --app string use a specific app ID or environment + --config-dir string use a custom path for system config directory + -e, --experiment strings use the experiment(s) in the command + -f, --force ignore warnings and continue executing command + --no-color remove styles and formatting from outputs + -s, --skip-update skip checking for latest version of CLI + -w, --team string select workspace or organization by team name or ID + --token string set the access token associated with a team + -v, --verbose print debug logging and additional info +``` + +### SEE ALSO + +* [slack auth](slack_auth) - Add and remove local team authorizations + diff --git a/docs/reference/commands/slack_auth_login.md b/docs/reference/commands/slack_auth_login.md new file mode 100644 index 00000000..bb481242 --- /dev/null +++ b/docs/reference/commands/slack_auth_login.md @@ -0,0 +1,55 @@ +## slack auth login + +Log in to a Slack account + +### Synopsis + +Log in to a Slack account in your team + +``` +slack auth login [flags] +``` + +### Examples + +``` +# Login to a Slack account with prompts +$ slack auth login + +# Login to a Slack account without prompts, this returns a ticket +$ slack auth login --no-prompt + +# Complete login using ticket and challenge code +$ slack auth login --challenge 6d0a31c9 --ticket ISQWLiZT0OtMLO3YWNTJO0... + +# Login with a user token +$ slack auth login --token xoxp-... +``` + +### Options + +``` + --challenge string provide a challenge code for pre-authenticated login + -h, --help help for login + --no-prompt login without prompts using ticket and challenge code + --ticket string provide an auth ticket value + --token string provide a token for a pre-authenticated login +``` + +### Options inherited from parent commands + +``` + -a, --app string use a specific app ID or environment + --config-dir string use a custom path for system config directory + -e, --experiment strings use the experiment(s) in the command + -f, --force ignore warnings and continue executing command + --no-color remove styles and formatting from outputs + -s, --skip-update skip checking for latest version of CLI + -w, --team string select workspace or organization by team name or ID + -v, --verbose print debug logging and additional info +``` + +### SEE ALSO + +* [slack auth](slack_auth) - Add and remove local team authorizations + diff --git a/docs/reference/commands/slack_auth_logout.md b/docs/reference/commands/slack_auth_logout.md new file mode 100644 index 00000000..c45731eb --- /dev/null +++ b/docs/reference/commands/slack_auth_logout.md @@ -0,0 +1,44 @@ +## slack auth logout + +Log out of a team + +### Synopsis + +Log out of a team, removing any local credentials + +``` +slack auth logout [flags] +``` + +### Examples + +``` +$ slack auth logout # Select a team to log out of +$ slack auth logout --all # Log out of all team +``` + +### Options + +``` + -A, --all logout of all workspaces + -h, --help help for logout +``` + +### Options inherited from parent commands + +``` + -a, --app string use a specific app ID or environment + --config-dir string use a custom path for system config directory + -e, --experiment strings use the experiment(s) in the command + -f, --force ignore warnings and continue executing command + --no-color remove styles and formatting from outputs + -s, --skip-update skip checking for latest version of CLI + -w, --team string select workspace or organization by team name or ID + --token string set the access token associated with a team + -v, --verbose print debug logging and additional info +``` + +### SEE ALSO + +* [slack auth](slack_auth) - Add and remove local team authorizations + diff --git a/docs/reference/commands/slack_auth_revoke.md b/docs/reference/commands/slack_auth_revoke.md new file mode 100644 index 00000000..7181b48a --- /dev/null +++ b/docs/reference/commands/slack_auth_revoke.md @@ -0,0 +1,42 @@ +## slack auth revoke + +Revoke an authentication token + +### Synopsis + +Revoke an authentication token + +``` +slack auth revoke [flags] +``` + +### Examples + +``` +$ slack auth revoke --token xoxp-1-4921830... # Revoke a service token +``` + +### Options + +``` + -h, --help help for revoke +``` + +### Options inherited from parent commands + +``` + -a, --app string use a specific app ID or environment + --config-dir string use a custom path for system config directory + -e, --experiment strings use the experiment(s) in the command + -f, --force ignore warnings and continue executing command + --no-color remove styles and formatting from outputs + -s, --skip-update skip checking for latest version of CLI + -w, --team string select workspace or organization by team name or ID + --token string set the access token associated with a team + -v, --verbose print debug logging and additional info +``` + +### SEE ALSO + +* [slack auth](slack_auth) - Add and remove local team authorizations + diff --git a/docs/reference/commands/slack_auth_token.md b/docs/reference/commands/slack_auth_token.md new file mode 100644 index 00000000..ccc99d23 --- /dev/null +++ b/docs/reference/commands/slack_auth_token.md @@ -0,0 +1,52 @@ +## slack auth token + +Collect a service token + +### Synopsis + +Log in to a Slack account in your team + +``` +slack auth token [flags] +``` + +### Examples + +``` +# Create a service token with prompts +$ slack auth token + +# Gather a service token without prompts, this returns a ticket +$ slack auth token --no-prompt + +# Complete authentication using a ticket and challenge code +$ slack auth token --challenge 6d0a31c9 --ticket ISQWLiZT0OtMLO3YWNTJO0... +``` + +### Options + +``` + --challenge string provide a challenge code for pre-authenticated login + -h, --help help for token + --no-prompt login without prompts using ticket and challenge code + --ticket string provide an auth ticket value +``` + +### Options inherited from parent commands + +``` + -a, --app string use a specific app ID or environment + --config-dir string use a custom path for system config directory + -e, --experiment strings use the experiment(s) in the command + -f, --force ignore warnings and continue executing command + --no-color remove styles and formatting from outputs + -s, --skip-update skip checking for latest version of CLI + -w, --team string select workspace or organization by team name or ID + --token string set the access token associated with a team + -v, --verbose print debug logging and additional info +``` + +### SEE ALSO + +* [slack auth](slack_auth) - Add and remove local team authorizations + diff --git a/docs/reference/commands/slack_collaborator.md b/docs/reference/commands/slack_collaborator.md new file mode 100644 index 00000000..25f8c9fb --- /dev/null +++ b/docs/reference/commands/slack_collaborator.md @@ -0,0 +1,49 @@ +## slack collaborator + +Manage app collaborators + +### Synopsis + +Manage app collaborators + +``` +slack collaborator [flags] +``` + +### Examples + +``` +$ slack collaborator add bots@slack.com # Add a collaborator from email +$ slack collaborator list # List all of the collaborators + +# Remove a collaborator by user ID +$ slack collaborator remove USLACKBOT +``` + +### Options + +``` + -h, --help help for collaborator +``` + +### Options inherited from parent commands + +``` + -a, --app string use a specific app ID or environment + --config-dir string use a custom path for system config directory + -e, --experiment strings use the experiment(s) in the command + -f, --force ignore warnings and continue executing command + --no-color remove styles and formatting from outputs + -s, --skip-update skip checking for latest version of CLI + -w, --team string select workspace or organization by team name or ID + --token string set the access token associated with a team + -v, --verbose print debug logging and additional info +``` + +### SEE ALSO + +* [slack](slack) - Slack command-line tool +* [slack collaborator add](slack_collaborator_add) - Add a new collaborator to the app +* [slack collaborator list](slack_collaborator_list) - List all collaborators of an app +* [slack collaborator remove](slack_collaborator_remove) - Remove a collaborator from an app + diff --git a/docs/reference/commands/slack_collaborator_add.md b/docs/reference/commands/slack_collaborator_add.md new file mode 100644 index 00000000..24f0a3e8 --- /dev/null +++ b/docs/reference/commands/slack_collaborator_add.md @@ -0,0 +1,44 @@ +## slack collaborator add + +Add a new collaborator to the app + +### Synopsis + +Add a collaborator to your app by Slack email address or user ID + +``` +slack collaborator add [email|user_id] [flags] +``` + +### Examples + +``` +$ slack collaborator add # Add a collaborator via prompt +$ slack collaborator add bot@slack.com # Add a collaborator from email +$ slack collaborator add USLACKBOT # Add a collaborator by user ID +``` + +### Options + +``` + -h, --help help for add +``` + +### Options inherited from parent commands + +``` + -a, --app string use a specific app ID or environment + --config-dir string use a custom path for system config directory + -e, --experiment strings use the experiment(s) in the command + -f, --force ignore warnings and continue executing command + --no-color remove styles and formatting from outputs + -s, --skip-update skip checking for latest version of CLI + -w, --team string select workspace or organization by team name or ID + --token string set the access token associated with a team + -v, --verbose print debug logging and additional info +``` + +### SEE ALSO + +* [slack collaborator](slack_collaborator) - Manage app collaborators + diff --git a/docs/reference/commands/slack_collaborator_list.md b/docs/reference/commands/slack_collaborator_list.md new file mode 100644 index 00000000..26a737f5 --- /dev/null +++ b/docs/reference/commands/slack_collaborator_list.md @@ -0,0 +1,42 @@ +## slack collaborator list + +List all collaborators of an app + +### Synopsis + +List all collaborators of an app + +``` +slack collaborator list [flags] +``` + +### Examples + +``` +$ slack collaborator list # List all of the collaborators +``` + +### Options + +``` + -h, --help help for list +``` + +### Options inherited from parent commands + +``` + -a, --app string use a specific app ID or environment + --config-dir string use a custom path for system config directory + -e, --experiment strings use the experiment(s) in the command + -f, --force ignore warnings and continue executing command + --no-color remove styles and formatting from outputs + -s, --skip-update skip checking for latest version of CLI + -w, --team string select workspace or organization by team name or ID + --token string set the access token associated with a team + -v, --verbose print debug logging and additional info +``` + +### SEE ALSO + +* [slack collaborator](slack_collaborator) - Manage app collaborators + diff --git a/docs/reference/commands/slack_collaborator_remove.md b/docs/reference/commands/slack_collaborator_remove.md new file mode 100644 index 00000000..b9714bbe --- /dev/null +++ b/docs/reference/commands/slack_collaborator_remove.md @@ -0,0 +1,44 @@ +## slack collaborator remove + +Remove a collaborator from an app + +### Synopsis + +Remove a collaborator from an app by Slack email address or user ID + +``` +slack collaborator remove [email|user_id] [flags] +``` + +### Examples + +``` +$ slack collaborator remove # Remove collaborator on prompt +$ slack collaborator remove bot@slack.com # Remove collaborator by email +$ slack collaborator remove USLACKBOT # Remove collaborator using ID +``` + +### Options + +``` + -h, --help help for remove +``` + +### Options inherited from parent commands + +``` + -a, --app string use a specific app ID or environment + --config-dir string use a custom path for system config directory + -e, --experiment strings use the experiment(s) in the command + -f, --force ignore warnings and continue executing command + --no-color remove styles and formatting from outputs + -s, --skip-update skip checking for latest version of CLI + -w, --team string select workspace or organization by team name or ID + --token string set the access token associated with a team + -v, --verbose print debug logging and additional info +``` + +### SEE ALSO + +* [slack collaborator](slack_collaborator) - Manage app collaborators + diff --git a/docs/reference/commands/slack_create.md b/docs/reference/commands/slack_create.md new file mode 100644 index 00000000..7c65ccc2 --- /dev/null +++ b/docs/reference/commands/slack_create.md @@ -0,0 +1,48 @@ +## slack create + +Create a new Slack project + +### Synopsis + +Create a new Slack project on your local machine from an optional template + +``` +slack create [name] [flags] +``` + +### Examples + +``` +# Create a new project from a template +$ slack create my-project + +# Start a new project from a specific template +$ slack create my-project -t slack-samples/deno-hello-world +``` + +### Options + +``` + -b, --branch string name of git branch to checkout + -h, --help help for create + -t, --template string template URL for your app +``` + +### Options inherited from parent commands + +``` + -a, --app string use a specific app ID or environment + --config-dir string use a custom path for system config directory + -e, --experiment strings use the experiment(s) in the command + -f, --force ignore warnings and continue executing command + --no-color remove styles and formatting from outputs + -s, --skip-update skip checking for latest version of CLI + -w, --team string select workspace or organization by team name or ID + --token string set the access token associated with a team + -v, --verbose print debug logging and additional info +``` + +### SEE ALSO + +* [slack](slack) - Slack command-line tool + diff --git a/docs/reference/commands/slack_datastore.md b/docs/reference/commands/slack_datastore.md new file mode 100644 index 00000000..b25b08a6 --- /dev/null +++ b/docs/reference/commands/slack_datastore.md @@ -0,0 +1,81 @@ +## slack datastore + +Interact with an app's datastore + +### Synopsis + +Interact with the items stored in an app's datastore. + +This command is supported for apps deployed to Slack managed infrastructure but +other apps can attempt to run the command with the --force flag. + +Discover the datastores: [https://tools.slack.dev/deno-slack-sdk/guides/using-datastores](https://tools.slack.dev/deno-slack-sdk/guides/using-datastores) + +``` +slack datastore [flags] +``` + +### Examples + +``` +# Add a new entry to the datastore +$ slack datastore put --datastore tasks '{"item": {"id": "42", "description": "Create a PR", "status": "Done"}}' + +# Add two new entries to the datastore +$ slack datastore bulk-put --datastore tasks '{"items": [{"id": "12", "description": "Create a PR", "status": "Done"}, {"id": "42", "description": "Approve a PR", "status": "Pending"}]}' + +# Update the entry in the datastore +$ slack datastore update --datastore tasks '{"item": {"id": "42", "description": "Create a PR", "status": "Done"}}' + +# Get an item from the datastore +$ slack datastore get --datastore tasks '{"id": "42"}' + +# Get two items from datastore +$ slack datastore bulk-get --datastore tasks '{"ids": ["12", "42"]}' + +# Remove an item from the datastore +$ slack datastore delete --datastore tasks '{"id": "42"}' + +# Remove two items from the datastore +$ slack datastore bulk-delete --datastore tasks '{"ids": ["12", "42"]}' + +# Query the datastore for specific items +$ slack datastore query --datastore tasks '{"expression": "#status = :status", "expression_attributes": {"#status": "status"}, "expression_values": {":status": "In Progress"}}' + +# Count number of items in datastore +$ slack datastore count --datastore tasks +``` + +### Options + +``` + -h, --help help for datastore +``` + +### Options inherited from parent commands + +``` + -a, --app string use a specific app ID or environment + --config-dir string use a custom path for system config directory + -e, --experiment strings use the experiment(s) in the command + -f, --force ignore warnings and continue executing command + --no-color remove styles and formatting from outputs + -s, --skip-update skip checking for latest version of CLI + -w, --team string select workspace or organization by team name or ID + --token string set the access token associated with a team + -v, --verbose print debug logging and additional info +``` + +### SEE ALSO + +* [slack](slack) - Slack command-line tool +* [slack datastore bulk-delete](slack_datastore_bulk-delete) - Delete multiple items from a datastore +* [slack datastore bulk-get](slack_datastore_bulk-get) - Get multiple items from a datastore +* [slack datastore bulk-put](slack_datastore_bulk-put) - Create or replace a list of items in a datastore +* [slack datastore count](slack_datastore_count) - Count the number of items in a datastore +* [slack datastore delete](slack_datastore_delete) - Delete an item from a datastore +* [slack datastore get](slack_datastore_get) - Get an item from a datastore +* [slack datastore put](slack_datastore_put) - Create or replace an item in a datastore +* [slack datastore query](slack_datastore_query) - Query a datastore for items +* [slack datastore update](slack_datastore_update) - Create or update an item in a datastore + diff --git a/docs/reference/commands/slack_datastore_bulk-delete.md b/docs/reference/commands/slack_datastore_bulk-delete.md new file mode 100644 index 00000000..d0f237a8 --- /dev/null +++ b/docs/reference/commands/slack_datastore_bulk-delete.md @@ -0,0 +1,52 @@ +## slack datastore bulk-delete + +Delete multiple items from a datastore + +### Synopsis + +Delete multiple items from a datastore. + +This command is supported for apps deployed to Slack managed infrastructure but +other apps can attempt to run the command with the --force flag. + +``` +slack datastore bulk-delete [flags] +``` + +### Examples + +``` +# Delete two items from the datastore +$ slack datastore bulk-delete --datastore tasks '{"ids": ["12", "42"]}' + +# Delete two items from the datastore with an expression +$ slack datastore bulk-delete '{"datastore": "tasks", "ids": ["12", "42"]}' +``` + +### Options + +``` + --datastore string the datastore used to store items + -h, --help help for bulk-delete + --show only construct a JSON expression + --unstable kick the tires of experimental features +``` + +### Options inherited from parent commands + +``` + -a, --app string use a specific app ID or environment + --config-dir string use a custom path for system config directory + -e, --experiment strings use the experiment(s) in the command + -f, --force ignore warnings and continue executing command + --no-color remove styles and formatting from outputs + -s, --skip-update skip checking for latest version of CLI + -w, --team string select workspace or organization by team name or ID + --token string set the access token associated with a team + -v, --verbose print debug logging and additional info +``` + +### SEE ALSO + +* [slack datastore](slack_datastore) - Interact with an app's datastore + diff --git a/docs/reference/commands/slack_datastore_bulk-get.md b/docs/reference/commands/slack_datastore_bulk-get.md new file mode 100644 index 00000000..9b6a5adc --- /dev/null +++ b/docs/reference/commands/slack_datastore_bulk-get.md @@ -0,0 +1,53 @@ +## slack datastore bulk-get + +Get multiple items from a datastore + +### Synopsis + +Get multiple items from a datastore. + +This command is supported for apps deployed to Slack managed infrastructure but +other apps can attempt to run the command with the --force flag. + +``` +slack datastore bulk-get [flags] +``` + +### Examples + +``` +# Get two items from datastore +$ slack datastore bulk-get --datastore tasks '{"ids": ["12", "42"]}' + +# Get two items from datastore with an expression +$ slack datastore bulk-get '{"datastore": "tasks", "ids": ["12", "42"]}' +``` + +### Options + +``` + --datastore string the datastore used to store items + -h, --help help for bulk-get + --output string output format: text, json (default "text") + --show only construct a JSON expression + --unstable kick the tires of experimental features +``` + +### Options inherited from parent commands + +``` + -a, --app string use a specific app ID or environment + --config-dir string use a custom path for system config directory + -e, --experiment strings use the experiment(s) in the command + -f, --force ignore warnings and continue executing command + --no-color remove styles and formatting from outputs + -s, --skip-update skip checking for latest version of CLI + -w, --team string select workspace or organization by team name or ID + --token string set the access token associated with a team + -v, --verbose print debug logging and additional info +``` + +### SEE ALSO + +* [slack datastore](slack_datastore) - Interact with an app's datastore + diff --git a/docs/reference/commands/slack_datastore_bulk-put.md b/docs/reference/commands/slack_datastore_bulk-put.md new file mode 100644 index 00000000..b6cbb4af --- /dev/null +++ b/docs/reference/commands/slack_datastore_bulk-put.md @@ -0,0 +1,53 @@ +## slack datastore bulk-put + +Create or replace a list of items in a datastore + +### Synopsis + +Create or replace a list of items in a datastore. + +This command is supported for apps deployed to Slack managed infrastructure but +other apps can attempt to run the command with the --force flag. + +``` +slack datastore bulk-put [flags] +``` + +### Examples + +``` +# Create or replace two new entries in the datastore +$ slack datastore bulk-put --datastore tasks '{"items": [{"id": "12", "description": "Create a PR", "status": "Done"}, {"id": "42", "description": "Approve a PR", "status": "Pending"}]}' + +# Create or replace two new entries in the datastore with an expression +$ slack datastore bulk-put '{"datastore": "tasks", "items": [{"id": "12", "description": "Create a PR", "status": "Done"}, {"id": "42", "description": "Approve a PR", "status": "Pending"}]}' +``` + +### Options + +``` + --datastore string the datastore used to store items + --from-file string store multiple items from a file of JSON Lines + -h, --help help for bulk-put + --show only construct a JSON expression + --unstable kick the tires of experimental features +``` + +### Options inherited from parent commands + +``` + -a, --app string use a specific app ID or environment + --config-dir string use a custom path for system config directory + -e, --experiment strings use the experiment(s) in the command + -f, --force ignore warnings and continue executing command + --no-color remove styles and formatting from outputs + -s, --skip-update skip checking for latest version of CLI + -w, --team string select workspace or organization by team name or ID + --token string set the access token associated with a team + -v, --verbose print debug logging and additional info +``` + +### SEE ALSO + +* [slack datastore](slack_datastore) - Interact with an app's datastore + diff --git a/docs/reference/commands/slack_datastore_count.md b/docs/reference/commands/slack_datastore_count.md new file mode 100644 index 00000000..55e4e342 --- /dev/null +++ b/docs/reference/commands/slack_datastore_count.md @@ -0,0 +1,53 @@ +## slack datastore count + +Count the number of items in a datastore + +### Synopsis + +Count the number of items in a datastore that match a query expression or just +all of the items in the datastore. + +This command is supported for apps deployed to Slack managed infrastructure but +other apps can attempt to run the command with the --force flag. + +``` +slack datastore count [expression] [flags] +``` + +### Examples + +``` +# Count all items in a datastore +$ slack datastore count --datastore tasks + +# Count number of items in datastore that match a query +$ slack datastore count '{"datastore": "tasks", "expression": "#status = :status", "expression_attributes": {"#status": "status"}, "expression_values": {":status": "In Progress"}}' +``` + +### Options + +``` + --datastore string the datastore used to store items + -h, --help help for count + --show only construct a JSON expression + --unstable kick the tires of experimental features +``` + +### Options inherited from parent commands + +``` + -a, --app string use a specific app ID or environment + --config-dir string use a custom path for system config directory + -e, --experiment strings use the experiment(s) in the command + -f, --force ignore warnings and continue executing command + --no-color remove styles and formatting from outputs + -s, --skip-update skip checking for latest version of CLI + -w, --team string select workspace or organization by team name or ID + --token string set the access token associated with a team + -v, --verbose print debug logging and additional info +``` + +### SEE ALSO + +* [slack datastore](slack_datastore) - Interact with an app's datastore + diff --git a/docs/reference/commands/slack_datastore_delete.md b/docs/reference/commands/slack_datastore_delete.md new file mode 100644 index 00000000..ab62d6ba --- /dev/null +++ b/docs/reference/commands/slack_datastore_delete.md @@ -0,0 +1,52 @@ +## slack datastore delete + +Delete an item from a datastore + +### Synopsis + +Delete an item from a datastore. + +This command is supported for apps deployed to Slack managed infrastructure but +other apps can attempt to run the command with the --force flag. + +``` +slack datastore delete [flags] +``` + +### Examples + +``` +# Remove an item from the datastore +$ slack datastore delete --datastore tasks '{"id": "42"}' + +# Remove an item from the datastore with an expression +$ slack datastore delete '{"datastore": "tasks", "id": "42"}' +``` + +### Options + +``` + --datastore string the datastore used to store items + -h, --help help for delete + --show only construct a JSON expression + --unstable kick the tires of experimental features +``` + +### Options inherited from parent commands + +``` + -a, --app string use a specific app ID or environment + --config-dir string use a custom path for system config directory + -e, --experiment strings use the experiment(s) in the command + -f, --force ignore warnings and continue executing command + --no-color remove styles and formatting from outputs + -s, --skip-update skip checking for latest version of CLI + -w, --team string select workspace or organization by team name or ID + --token string set the access token associated with a team + -v, --verbose print debug logging and additional info +``` + +### SEE ALSO + +* [slack datastore](slack_datastore) - Interact with an app's datastore + diff --git a/docs/reference/commands/slack_datastore_get.md b/docs/reference/commands/slack_datastore_get.md new file mode 100644 index 00000000..b5ba4ba4 --- /dev/null +++ b/docs/reference/commands/slack_datastore_get.md @@ -0,0 +1,53 @@ +## slack datastore get + +Get an item from a datastore + +### Synopsis + +Get an item from a datastore. + +This command is supported for apps deployed to Slack managed infrastructure but +other apps can attempt to run the command with the --force flag. + +``` +slack datastore get [flags] +``` + +### Examples + +``` +# Get an item from the datastore +$ slack datastore get --datastore tasks '{"id": "42"}' + +# Get an item from the datastore with an expression +$ slack datastore get '{"datastore": "tasks", "id": "42"}' +``` + +### Options + +``` + --datastore string the datastore used to store items + -h, --help help for get + --output string output format: text, json (default "text") + --show only construct a JSON expression + --unstable kick the tires of experimental features +``` + +### Options inherited from parent commands + +``` + -a, --app string use a specific app ID or environment + --config-dir string use a custom path for system config directory + -e, --experiment strings use the experiment(s) in the command + -f, --force ignore warnings and continue executing command + --no-color remove styles and formatting from outputs + -s, --skip-update skip checking for latest version of CLI + -w, --team string select workspace or organization by team name or ID + --token string set the access token associated with a team + -v, --verbose print debug logging and additional info +``` + +### SEE ALSO + +* [slack datastore](slack_datastore) - Interact with an app's datastore + diff --git a/docs/reference/commands/slack_datastore_put.md b/docs/reference/commands/slack_datastore_put.md new file mode 100644 index 00000000..0b481950 --- /dev/null +++ b/docs/reference/commands/slack_datastore_put.md @@ -0,0 +1,52 @@ +## slack datastore put + +Create or replace an item in a datastore + +### Synopsis + +Create or replace an item in a datastore. + +This command is supported for apps deployed to Slack managed infrastructure but +other apps can attempt to run the command with the --force flag. + +``` +slack datastore put [flags] +``` + +### Examples + +``` +# Add a new entry to the datastore +$ slack datastore put --datastore tasks '{"item": {"id": "42", "description": "Create a PR", "status": "Done"}}' + +# Add a new entry to the datastore with an expression +$ slack datastore put '{"datastore": "tasks", "item": {"id": "42", "description": "Create a PR", "status": "Done"}}' +``` + +### Options + +``` + --datastore string the datastore used to store items + -h, --help help for put + --show only construct a JSON expression + --unstable kick the tires of experimental features +``` + +### Options inherited from parent commands + +``` + -a, --app string use a specific app ID or environment + --config-dir string use a custom path for system config directory + -e, --experiment strings use the experiment(s) in the command + -f, --force ignore warnings and continue executing command + --no-color remove styles and formatting from outputs + -s, --skip-update skip checking for latest version of CLI + -w, --team string select workspace or organization by team name or ID + --token string set the access token associated with a team + -v, --verbose print debug logging and additional info +``` + +### SEE ALSO + +* [slack datastore](slack_datastore) - Interact with an app's datastore + diff --git a/docs/reference/commands/slack_datastore_query.md b/docs/reference/commands/slack_datastore_query.md new file mode 100644 index 00000000..1cfc767a --- /dev/null +++ b/docs/reference/commands/slack_datastore_query.md @@ -0,0 +1,60 @@ +## slack datastore query + +Query a datastore for items + +### Synopsis + +Query a datastore for items. + +This command is supported for apps deployed to Slack managed infrastructure but +other apps can attempt to run the command with the --force flag. + +``` +slack datastore query [flags] +``` + +### Examples + +``` +# Collect a limited set of items from the datastore +$ slack datastore query --datastore tasks '{"limit": 8}' --output json + +# Collect items from the datastore starting at a cursor +$ slack datastore query --datastore tasks '{"cursor": "eyJfX2NWaV..."}' + +# Query the datastore for specific items +$ slack datastore query --datastore tasks '{"expression": "#status = :status", "expression_attributes": {"#status": "status"}, "expression_values": {":status": "In Progress"}}' + +# Query the datastore for specific items with only an expression +$ slack datastore query '{"datastore": "tasks", "expression": "#status = :status", "expression_attributes": {"#status": "status"}, "expression_values": {":status": "In Progress"}}' +``` + +### Options + +``` + --datastore string the datastore used to store items + -h, --help help for query + --output string output format: text, json (default "text") + --show only construct a JSON expression + --to-file string save items directly to a file as JSON Lines + --unstable kick the tires of experimental features +``` + +### Options inherited from parent commands + +``` + -a, --app string use a specific app ID or environment + --config-dir string use a custom path for system config directory + -e, --experiment strings use the experiment(s) in the command + -f, --force ignore warnings and continue executing command + --no-color remove styles and formatting from outputs + -s, --skip-update skip checking for latest version of CLI + -w, --team string select workspace or organization by team name or ID + --token string set the access token associated with a team + -v, --verbose print debug logging and additional info +``` + +### SEE ALSO + +* [slack datastore](slack_datastore) - Interact with an app's datastore + diff --git a/docs/reference/commands/slack_datastore_update.md b/docs/reference/commands/slack_datastore_update.md new file mode 100644 index 00000000..837bb491 --- /dev/null +++ b/docs/reference/commands/slack_datastore_update.md @@ -0,0 +1,52 @@ +## slack datastore update + +Create or update an item in a datastore + +### Synopsis + +Create or update an item in a datastore. + +This command is supported for apps deployed to Slack managed infrastructure but +other apps can attempt to run the command with the --force flag. + +``` +slack datastore update [flags] +``` + +### Examples + +``` +# Update the entry in the datastore +$ slack datastore update --datastore tasks '{"item": {"id": "42", "description": "Create a PR", "status": "Done"}}' + +# Update the entry in the datastore with an expression +$ slack datastore update '{"datastore": "tasks", "item": {"id": "42", "description": "Create a PR", "status": "Done"}}' +``` + +### Options + +``` + --datastore string the datastore used to store items + -h, --help help for update + --show only construct a JSON expression + --unstable kick the tires of experimental features +``` + +### Options inherited from parent commands + +``` + -a, --app string use a specific app ID or environment + --config-dir string use a custom path for system config directory + -e, --experiment strings use the experiment(s) in the command + -f, --force ignore warnings and continue executing command + --no-color remove styles and formatting from outputs + -s, --skip-update skip checking for latest version of CLI + -w, --team string select workspace or organization by team name or ID + --token string set the access token associated with a team + -v, --verbose print debug logging and additional info +``` + +### SEE ALSO + +* [slack datastore](slack_datastore) - Interact with an app's datastore + diff --git a/docs/reference/commands/slack_delete.md b/docs/reference/commands/slack_delete.md new file mode 100644 index 00000000..6aef357f --- /dev/null +++ b/docs/reference/commands/slack_delete.md @@ -0,0 +1,46 @@ +## slack delete + +Delete the app + +### Synopsis + +Uninstall the app from the team and permanently delete the app and all of its data + +``` +slack delete [flags] +``` + +### Examples + +``` +# Delete an app and app info from a team +$ slack app delete + +# Delete a specific app from a team +$ slack app delete --team T0123456 --app local +``` + +### Options + +``` + -h, --help help for delete +``` + +### Options inherited from parent commands + +``` + -a, --app string use a specific app ID or environment + --config-dir string use a custom path for system config directory + -e, --experiment strings use the experiment(s) in the command + -f, --force ignore warnings and continue executing command + --no-color remove styles and formatting from outputs + -s, --skip-update skip checking for latest version of CLI + -w, --team string select workspace or organization by team name or ID + --token string set the access token associated with a team + -v, --verbose print debug logging and additional info +``` + +### SEE ALSO + +* [slack](slack) - Slack command-line tool + diff --git a/docs/reference/commands/slack_deploy.md b/docs/reference/commands/slack_deploy.md new file mode 100644 index 00000000..5a994cae --- /dev/null +++ b/docs/reference/commands/slack_deploy.md @@ -0,0 +1,47 @@ +## slack deploy + +Deploy the app to the Slack Platform + +### Synopsis + +Deploy the app to the Slack Platform + +``` +slack deploy [flags] +``` + +### Examples + +``` +# Select the workspace to deploy to +$ slack platform deploy +$ slack platform deploy --team T0123456 # Deploy to a specific team +``` + +### Options + +``` + -h, --help help for deploy + --hide-triggers do not list triggers and skip trigger creation prompts + --org-workspace-grant string grant access to a specific org workspace ID + (or 'all' for all workspaces in the org) +``` + +### Options inherited from parent commands + +``` + -a, --app string use a specific app ID or environment + --config-dir string use a custom path for system config directory + -e, --experiment strings use the experiment(s) in the command + -f, --force ignore warnings and continue executing command + --no-color remove styles and formatting from outputs + -s, --skip-update skip checking for latest version of CLI + -w, --team string select workspace or organization by team name or ID + --token string set the access token associated with a team + -v, --verbose print debug logging and additional info +``` + +### SEE ALSO + +* [slack](slack) - Slack command-line tool + diff --git a/docs/reference/commands/slack_doctor.md b/docs/reference/commands/slack_doctor.md new file mode 100644 index 00000000..2c58b715 --- /dev/null +++ b/docs/reference/commands/slack_doctor.md @@ -0,0 +1,51 @@ +## slack doctor + +Check and report on system and app information + +### Synopsis + +Check and report on relevant system (and sometimes app) dependencies + +System dependencies can be reviewed from any directory +* This includes operating system information and Deno and Git versions + +While app dependencies are only shown within a project directory +* This includes the Deno Slack SDK, API, and hooks versions of an app +* New versions will be listed if there are any updates available + +Unfortunately, the doctor command cannot heal all problems + +``` +slack doctor [flags] +``` + +### Examples + +``` +$ slack doctor # Create a status report of system dependencies +``` + +### Options + +``` + -h, --help help for doctor +``` + +### Options inherited from parent commands + +``` + -a, --app string use a specific app ID or environment + --config-dir string use a custom path for system config directory + -e, --experiment strings use the experiment(s) in the command + -f, --force ignore warnings and continue executing command + --no-color remove styles and formatting from outputs + -s, --skip-update skip checking for latest version of CLI + -w, --team string select workspace or organization by team name or ID + --token string set the access token associated with a team + -v, --verbose print debug logging and additional info +``` + +### SEE ALSO + +* [slack](slack) - Slack command-line tool + diff --git a/docs/reference/commands/slack_env.md b/docs/reference/commands/slack_env.md new file mode 100644 index 00000000..0b388b6d --- /dev/null +++ b/docs/reference/commands/slack_env.md @@ -0,0 +1,57 @@ +## slack env + +Add, remove, or list environment variables + +### Synopsis + +Add, remove, or list environment variables for apps deployed to Slack managed +infrastructure. + +This command is supported for apps deployed to Slack managed infrastructure but +other apps can attempt to run the command with the --force flag. + +Explore more: [Environment variables](/slack-cli/guides/using-environment-variables-with-the-slack-cli) + +``` +slack env [flags] +``` + +### Examples + +``` +$ slack env add MAGIC_PASSWORD abracadbra # Add an environment variable + +# List all environment variables +$ slack env list + +# Remove an environment variable +$ slack env remove MAGIC_PASSWORD +``` + +### Options + +``` + -h, --help help for env +``` + +### Options inherited from parent commands + +``` + -a, --app string use a specific app ID or environment + --config-dir string use a custom path for system config directory + -e, --experiment strings use the experiment(s) in the command + -f, --force ignore warnings and continue executing command + --no-color remove styles and formatting from outputs + -s, --skip-update skip checking for latest version of CLI + -w, --team string select workspace or organization by team name or ID + --token string set the access token associated with a team + -v, --verbose print debug logging and additional info +``` + +### SEE ALSO + +* [slack](slack) - Slack command-line tool +* [slack env add](slack_env_add) - Add an environment variable to the app +* [slack env list](slack_env_list) - List all environment variables for the app +* [slack env remove](slack_env_remove) - Remove an environment variable from the app + diff --git a/docs/reference/commands/slack_env_add.md b/docs/reference/commands/slack_env_add.md new file mode 100644 index 00000000..ac7e7c32 --- /dev/null +++ b/docs/reference/commands/slack_env_add.md @@ -0,0 +1,53 @@ +## slack env add + +Add an environment variable to the app + +### Synopsis + +Add an environment variable to an app deployed to Slack managed infrastructure. + +If a name or value is not provided, you will be prompted to provide these. + +This command is supported for apps deployed to Slack managed infrastructure but +other apps can attempt to run the command with the --force flag. + +``` +slack env add [flags] +``` + +### Examples + +``` +# Prompt for an environment variable +$ slack env add +$ slack env add MAGIC_PASSWORD abracadbra # Add an environment variable + +# Prompt for an environment variable value +$ slack env add SECRET_PASSWORD +``` + +### Options + +``` + -h, --help help for add + --value string set the environment variable value +``` + +### Options inherited from parent commands + +``` + -a, --app string use a specific app ID or environment + --config-dir string use a custom path for system config directory + -e, --experiment strings use the experiment(s) in the command + -f, --force ignore warnings and continue executing command + --no-color remove styles and formatting from outputs + -s, --skip-update skip checking for latest version of CLI + -w, --team string select workspace or organization by team name or ID + --token string set the access token associated with a team + -v, --verbose print debug logging and additional info +``` + +### SEE ALSO + +* [slack env](slack_env) - Add, remove, or list environment variables + diff --git a/docs/reference/commands/slack_env_list.md b/docs/reference/commands/slack_env_list.md new file mode 100644 index 00000000..38b2d881 --- /dev/null +++ b/docs/reference/commands/slack_env_list.md @@ -0,0 +1,46 @@ +## slack env list + +List all environment variables for the app + +### Synopsis + +List all of the environment variables of an app deployed to Slack managed +infrastructure. + +This command is supported for apps deployed to Slack managed infrastructure but +other apps can attempt to run the command with the --force flag. + +``` +slack env list [flags] +``` + +### Examples + +``` +$ slack env list # List all environment variables +``` + +### Options + +``` + -h, --help help for list +``` + +### Options inherited from parent commands + +``` + -a, --app string use a specific app ID or environment + --config-dir string use a custom path for system config directory + -e, --experiment strings use the experiment(s) in the command + -f, --force ignore warnings and continue executing command + --no-color remove styles and formatting from outputs + -s, --skip-update skip checking for latest version of CLI + -w, --team string select workspace or organization by team name or ID + --token string set the access token associated with a team + -v, --verbose print debug logging and additional info +``` + +### SEE ALSO + +* [slack env](slack_env) - Add, remove, or list environment variables + diff --git a/docs/reference/commands/slack_env_remove.md b/docs/reference/commands/slack_env_remove.md new file mode 100644 index 00000000..8229108f --- /dev/null +++ b/docs/reference/commands/slack_env_remove.md @@ -0,0 +1,51 @@ +## slack env remove + +Remove an environment variable from the app + +### Synopsis + +Remove an environment variable from an app deployed to Slack managed +infrastructure. + +If no variable name is provided, you will be prompted to select one. + +This command is supported for apps deployed to Slack managed infrastructure but +other apps can attempt to run the command with the --force flag. + +``` +slack env remove [flags] +``` + +### Examples + +``` +# Select an environment variable to remove +$ slack env remove +$ slack env remove MAGIC_PASSWORD # Remove an environment variable +``` + +### Options + +``` + -h, --help help for remove + --name string choose the environment variable name +``` + +### Options inherited from parent commands + +``` + -a, --app string use a specific app ID or environment + --config-dir string use a custom path for system config directory + -e, --experiment strings use the experiment(s) in the command + -f, --force ignore warnings and continue executing command + --no-color remove styles and formatting from outputs + -s, --skip-update skip checking for latest version of CLI + -w, --team string select workspace or organization by team name or ID + --token string set the access token associated with a team + -v, --verbose print debug logging and additional info +``` + +### SEE ALSO + +* [slack env](slack_env) - Add, remove, or list environment variables + diff --git a/docs/reference/commands/slack_external-auth.md b/docs/reference/commands/slack_external-auth.md new file mode 100644 index 00000000..b6e42167 --- /dev/null +++ b/docs/reference/commands/slack_external-auth.md @@ -0,0 +1,61 @@ +## slack external-auth + +Adjust settings of external authentication providers + +### Synopsis + +Adjust external authorization and authentication providers of a workflow app. + +This command is supported for apps deployed to Slack managed infrastructure but +other apps can attempt to run the command with the --force flag. + +Explore providers: [Integrating with external auth providers](/guides/integrating-with-services-requiring-external-authentication/) + +``` +slack external-auth [flags] +``` + +### Examples + +``` +# Initiate OAuth2 flow for a selected provider +$ slack external-auth add + +# Set client secret for an app and provider +$ slack external-auth add-secret + +# Remove authorization for a specific provider +$ slack external-auth remove + +# Select authorization for a specific provider in a workflow +$ slack external-auth select-auth +``` + +### Options + +``` + -h, --help help for external-auth +``` + +### Options inherited from parent commands + +``` + -a, --app string use a specific app ID or environment + --config-dir string use a custom path for system config directory + -e, --experiment strings use the experiment(s) in the command + -f, --force ignore warnings and continue executing command + --no-color remove styles and formatting from outputs + -s, --skip-update skip checking for latest version of CLI + -w, --team string select workspace or organization by team name or ID + --token string set the access token associated with a team + -v, --verbose print debug logging and additional info +``` + +### SEE ALSO + +* [slack](slack) - Slack command-line tool +* [slack external-auth add](slack_external-auth_add) - Initiate the OAuth2 flow for a provider +* [slack external-auth add-secret](slack_external-auth_add-secret) - Add the client secret for a provider +* [slack external-auth remove](slack_external-auth_remove) - Remove the saved tokens for a provider +* [slack external-auth select-auth](slack_external-auth_select-auth) - Select developer authentication of a workflow + diff --git a/docs/reference/commands/slack_external-auth_add-secret.md b/docs/reference/commands/slack_external-auth_add-secret.md new file mode 100644 index 00000000..51043185 --- /dev/null +++ b/docs/reference/commands/slack_external-auth_add-secret.md @@ -0,0 +1,53 @@ +## slack external-auth add-secret + +Add the client secret for a provider + +### Synopsis + +Add the client secret for an external provider of a workflow app. + +This secret will be used when initiating the OAuth2 flow. + +This command is supported for apps deployed to Slack managed infrastructure but +other apps can attempt to run the command with the --force flag. + +``` +slack external-auth add-secret [flags] +``` + +### Examples + +``` +# Input the client secret for an app and provider +$ slack external-auth add-secret + +# Set the client secret for an app and provider +$ slack external-auth add-secret -p github -x ghp_token +``` + +### Options + +``` + -h, --help help for add-secret + -p, --provider string the external auth Provider Key to add a secret to + -x, --secret string external auth client secret for the provider +``` + +### Options inherited from parent commands + +``` + -a, --app string use a specific app ID or environment + --config-dir string use a custom path for system config directory + -e, --experiment strings use the experiment(s) in the command + -f, --force ignore warnings and continue executing command + --no-color remove styles and formatting from outputs + -s, --skip-update skip checking for latest version of CLI + -w, --team string select workspace or organization by team name or ID + --token string set the access token associated with a team + -v, --verbose print debug logging and additional info +``` + +### SEE ALSO + +* [slack external-auth](slack_external-auth) - Adjust settings of external authentication providers + diff --git a/docs/reference/commands/slack_external-auth_add.md b/docs/reference/commands/slack_external-auth_add.md new file mode 100644 index 00000000..7db24a85 --- /dev/null +++ b/docs/reference/commands/slack_external-auth_add.md @@ -0,0 +1,50 @@ +## slack external-auth add + +Initiate the OAuth2 flow for a provider + +### Synopsis + +Initiate the OAuth2 flow for an external auth provider of a workflow app. + +This command is supported for apps deployed to Slack managed infrastructure but +other apps can attempt to run the command with the --force flag. + +``` +slack external-auth add [flags] +``` + +### Examples + +``` +# Select a provider to initiate the OAuth2 flow for +$ slack external-auth add + +# Initiate the OAuth2 flow for the provided provider +$ slack external-auth add -p github +``` + +### Options + +``` + -h, --help help for add + -p, --provider string the external auth Provider Key to add a secret to +``` + +### Options inherited from parent commands + +``` + -a, --app string use a specific app ID or environment + --config-dir string use a custom path for system config directory + -e, --experiment strings use the experiment(s) in the command + -f, --force ignore warnings and continue executing command + --no-color remove styles and formatting from outputs + -s, --skip-update skip checking for latest version of CLI + -w, --team string select workspace or organization by team name or ID + --token string set the access token associated with a team + -v, --verbose print debug logging and additional info +``` + +### SEE ALSO + +* [slack external-auth](slack_external-auth) - Adjust settings of external authentication providers + diff --git a/docs/reference/commands/slack_external-auth_remove.md b/docs/reference/commands/slack_external-auth_remove.md new file mode 100644 index 00000000..042334b5 --- /dev/null +++ b/docs/reference/commands/slack_external-auth_remove.md @@ -0,0 +1,60 @@ +## slack external-auth remove + +Remove the saved tokens for a provider + +### Synopsis + +Remove tokens saved to external authentication providers of a workflow app. + +Existing tokens are only removed from your app, but are not revoked or deleted! +Tokens must be invalidated using the provider's developer console or via APIs. + +This command is supported for apps deployed to Slack managed infrastructure but +other apps can attempt to run the command with the --force flag. + +``` +slack external-auth remove [flags] +``` + +### Examples + +``` +# Remove a token from the selected provider +$ slack external-auth remove + +# Remove a token from the specified provider +$ slack external-auth remove -p github + +# Remove all tokens from the specified provider +$ slack external-auth remove --all -p github + +# Remove all tokens from all providers +$ slack external-auth remove --all +``` + +### Options + +``` + -A, --all remove tokens for all providers or the specified provider + -h, --help help for remove + -p, --provider string the external auth Provider Key to remove a token for +``` + +### Options inherited from parent commands + +``` + -a, --app string use a specific app ID or environment + --config-dir string use a custom path for system config directory + -e, --experiment strings use the experiment(s) in the command + -f, --force ignore warnings and continue executing command + --no-color remove styles and formatting from outputs + -s, --skip-update skip checking for latest version of CLI + -w, --team string select workspace or organization by team name or ID + --token string set the access token associated with a team + -v, --verbose print debug logging and additional info +``` + +### SEE ALSO + +* [slack external-auth](slack_external-auth) - Adjust settings of external authentication providers + diff --git a/docs/reference/commands/slack_external-auth_select-auth.md b/docs/reference/commands/slack_external-auth_select-auth.md new file mode 100644 index 00000000..f74aec61 --- /dev/null +++ b/docs/reference/commands/slack_external-auth_select-auth.md @@ -0,0 +1,50 @@ +## slack external-auth select-auth + +Select developer authentication of a workflow + +### Synopsis + +Select the saved developer authentication to use when calling external APIs from +functions in a workflow app. + +This command is supported for apps deployed to Slack managed infrastructure but +other apps can attempt to run the command with the --force flag. + +``` +slack external-auth select-auth [flags] +``` + +### Examples + +``` +# Select the saved developer authentication in a workflow +$ slack external-auth select-auth --workflow #/workflows/workflow_callback --provider google_provider --external-account user@salesforce.com +``` + +### Options + +``` + -E, --external-account string external account identifier for the provider + -h, --help help for select-auth + -p, --provider string provider of the developer account + -W, --workflow string workflow to set developer authentication for +``` + +### Options inherited from parent commands + +``` + -a, --app string use a specific app ID or environment + --config-dir string use a custom path for system config directory + -e, --experiment strings use the experiment(s) in the command + -f, --force ignore warnings and continue executing command + --no-color remove styles and formatting from outputs + -s, --skip-update skip checking for latest version of CLI + -w, --team string select workspace or organization by team name or ID + --token string set the access token associated with a team + -v, --verbose print debug logging and additional info +``` + +### SEE ALSO + +* [slack external-auth](slack_external-auth) - Adjust settings of external authentication providers + diff --git a/docs/reference/commands/slack_feedback.md b/docs/reference/commands/slack_feedback.md new file mode 100644 index 00000000..72d9e407 --- /dev/null +++ b/docs/reference/commands/slack_feedback.md @@ -0,0 +1,46 @@ +## slack feedback + +Share feedback about your experience or project + +### Synopsis + +Help us make the Slack Platform better by completing a survey + +``` +slack feedback [flags] +``` + +### Examples + +``` +$ slack feedback # Open a feedback survey in your browser +``` + +### Options + +``` + -h, --help help for feedback + --name string name of the survey: + platform-improvements + + --no-prompt run command without prompts +``` + +### Options inherited from parent commands + +``` + -a, --app string use a specific app ID or environment + --config-dir string use a custom path for system config directory + -e, --experiment strings use the experiment(s) in the command + -f, --force ignore warnings and continue executing command + --no-color remove styles and formatting from outputs + -s, --skip-update skip checking for latest version of CLI + -w, --team string select workspace or organization by team name or ID + --token string set the access token associated with a team + -v, --verbose print debug logging and additional info +``` + +### SEE ALSO + +* [slack](slack) - Slack command-line tool + diff --git a/docs/reference/commands/slack_function.md b/docs/reference/commands/slack_function.md new file mode 100644 index 00000000..598098ea --- /dev/null +++ b/docs/reference/commands/slack_function.md @@ -0,0 +1,56 @@ +## slack function + +Manage the functions of an app + +### Synopsis + +Functions are pieces of logic that complete the puzzle of workflows in Workflow +Builder. Whatever that puzzle might be. + +Inspect and configure the custom functions included in an app with this command. +Functions can be added as a step in Workflow Builder and shared among teammates. + +Learn more about functions: [https://tools.slack.dev/deno-slack-sdk/guides/creating-functions](https://tools.slack.dev/deno-slack-sdk/guides/creating-functions) + +``` +slack function [flags] +``` + +### Examples + +``` +# Select a function and choose distribution options +$ slack function distribute + +# Distribute a function to everyone in a workspace +$ slack function distribute --name callback_id --everyone + +# Lookup the distribution information for a function +$ slack function distribute --info +``` + +### Options + +``` + -h, --help help for function +``` + +### Options inherited from parent commands + +``` + -a, --app string use a specific app ID or environment + --config-dir string use a custom path for system config directory + -e, --experiment strings use the experiment(s) in the command + -f, --force ignore warnings and continue executing command + --no-color remove styles and formatting from outputs + -s, --skip-update skip checking for latest version of CLI + -w, --team string select workspace or organization by team name or ID + --token string set the access token associated with a team + -v, --verbose print debug logging and additional info +``` + +### SEE ALSO + +* [slack](slack) - Slack command-line tool +* [slack function access](slack_function_access) - Adjust who can access functions published from an app + diff --git a/docs/reference/commands/slack_function_access.md b/docs/reference/commands/slack_function_access.md new file mode 100644 index 00000000..a7feea42 --- /dev/null +++ b/docs/reference/commands/slack_function_access.md @@ -0,0 +1,70 @@ +## slack function access + +Adjust who can access functions published from an app + +### Synopsis + +Adjust who can **access** functions published by an app when building a workflow in +Workflow Builder. + +New functions are granted access to **app collaborators** by default. This includes +both the **reader** and **owner** permissions. Access can also be **granted** or **revoked** to +specific **users** or **everyone** alongside the **app collaborators**. + +Workflows that include a function with limited access can still be invoked with +a trigger of the workflow. The **access** command applies to Workflow Builder access +only. + +``` +slack function access [flags] +``` + +### Examples + +``` +# Select a function and choose access options +$ slack function access + +# Share a function with everyone in a workspace +$ slack function access --name callback_id --everyone + +# Revoke function access for multiple users +$ slack function access --name callback_id --revoke \ + --users USLACKBOT,U012345678,U0RHJTSPQ3 + +# Lookup access information for a function +$ slack function access --info +``` + +### Options + +``` + -A, --app-collaborators grant access to only fellow app collaborators + -E, --everyone grant access to everyone in installed workspaces + -F, --file string specify access permissions using a file + -G, --grant grant access to --users to use --name + -h, --help help for access + -I, --info check who has access to the function --name + -N, --name string the callback_id of a function in your app + -R, --revoke revoke access for --users to use --name + -U, --users string a comma-separated list of Slack user IDs +``` + +### Options inherited from parent commands + +``` + -a, --app string use a specific app ID or environment + --config-dir string use a custom path for system config directory + -e, --experiment strings use the experiment(s) in the command + -f, --force ignore warnings and continue executing command + --no-color remove styles and formatting from outputs + -s, --skip-update skip checking for latest version of CLI + -w, --team string select workspace or organization by team name or ID + --token string set the access token associated with a team + -v, --verbose print debug logging and additional info +``` + +### SEE ALSO + +* [slack function](slack_function) - Manage the functions of an app + diff --git a/docs/reference/commands/slack_init.md b/docs/reference/commands/slack_init.md new file mode 100644 index 00000000..a5c1d11d --- /dev/null +++ b/docs/reference/commands/slack_init.md @@ -0,0 +1,62 @@ +## slack init + +Initialize a project to work with the Slack CLI + +### Synopsis + +Initializes a project to support the Slack CLI. + +Adds a .slack directory with the following files: +- project-name/.slack +- project-name/.slack/.gitignore +- project-name/.slack/config.json +- project-name/.slack/hooks.json + +Adds the Slack CLI hooks dependency to your project: +- Deno: Unsupported +- Node.js: Updates package.json +- Python: Updates requirements.txt + +Installs your project dependencies when supported: +- Deno: Supported +- Node.js: Supported +- Python: Unsupported + +Adds an existing app to your project (optional): +- Prompts to add an existing app from app settings +- Runs the command `slack app link` + +``` +slack init [flags] +``` + +### Examples + +``` +$ slack init # Initialize a project +``` + +### Options + +``` + -h, --help help for init +``` + +### Options inherited from parent commands + +``` + -a, --app string use a specific app ID or environment + --config-dir string use a custom path for system config directory + -e, --experiment strings use the experiment(s) in the command + -f, --force ignore warnings and continue executing command + --no-color remove styles and formatting from outputs + -s, --skip-update skip checking for latest version of CLI + -w, --team string select workspace or organization by team name or ID + --token string set the access token associated with a team + -v, --verbose print debug logging and additional info +``` + +### SEE ALSO + +* [slack](slack) - Slack command-line tool + diff --git a/docs/reference/commands/slack_install.md b/docs/reference/commands/slack_install.md new file mode 100644 index 00000000..ce5186d8 --- /dev/null +++ b/docs/reference/commands/slack_install.md @@ -0,0 +1,47 @@ +## slack install + +Install the app to a team + +### Synopsis + +Install the app to a team + +``` +slack install [flags] +``` + +### Examples + +``` +$ slack app install # Install a production app to a team + +# Install a production app to a specific team +$ slack app install --team T0123456 +``` + +### Options + +``` + -h, --help help for install + --org-workspace-grant string grant access to a specific org workspace ID + (or 'all' for all workspaces in the org) +``` + +### Options inherited from parent commands + +``` + -a, --app string use a specific app ID or environment + --config-dir string use a custom path for system config directory + -e, --experiment strings use the experiment(s) in the command + -f, --force ignore warnings and continue executing command + --no-color remove styles and formatting from outputs + -s, --skip-update skip checking for latest version of CLI + -w, --team string select workspace or organization by team name or ID + --token string set the access token associated with a team + -v, --verbose print debug logging and additional info +``` + +### SEE ALSO + +* [slack](slack) - Slack command-line tool + diff --git a/docs/reference/commands/slack_list.md b/docs/reference/commands/slack_list.md new file mode 100644 index 00000000..7c08ee75 --- /dev/null +++ b/docs/reference/commands/slack_list.md @@ -0,0 +1,42 @@ +## slack list + +List all authorized accounts + +### Synopsis + +List all authorized accounts + +``` +slack list [flags] +``` + +### Examples + +``` +$ slack auth list # List all authorized accounts +``` + +### Options + +``` + -h, --help help for list +``` + +### Options inherited from parent commands + +``` + -a, --app string use a specific app ID or environment + --config-dir string use a custom path for system config directory + -e, --experiment strings use the experiment(s) in the command + -f, --force ignore warnings and continue executing command + --no-color remove styles and formatting from outputs + -s, --skip-update skip checking for latest version of CLI + -w, --team string select workspace or organization by team name or ID + --token string set the access token associated with a team + -v, --verbose print debug logging and additional info +``` + +### SEE ALSO + +* [slack](slack) - Slack command-line tool + diff --git a/docs/reference/commands/slack_login.md b/docs/reference/commands/slack_login.md new file mode 100644 index 00000000..baf06d06 --- /dev/null +++ b/docs/reference/commands/slack_login.md @@ -0,0 +1,55 @@ +## slack login + +Log in to a Slack account + +### Synopsis + +Log in to a Slack account in your team + +``` +slack login [flags] +``` + +### Examples + +``` +# Login to a Slack account with prompts +$ slack auth login + +# Login to a Slack account without prompts, this returns a ticket +$ slack auth login --no-prompt + +# Complete login using ticket and challenge code +$ slack auth login --challenge 6d0a31c9 --ticket ISQWLiZT0OtMLO3YWNTJO0... + +# Login with a user token +$ slack auth login --token xoxp-... +``` + +### Options + +``` + --challenge string provide a challenge code for pre-authenticated login + -h, --help help for login + --no-prompt login without prompts using ticket and challenge code + --ticket string provide an auth ticket value + --token string provide a token for a pre-authenticated login +``` + +### Options inherited from parent commands + +``` + -a, --app string use a specific app ID or environment + --config-dir string use a custom path for system config directory + -e, --experiment strings use the experiment(s) in the command + -f, --force ignore warnings and continue executing command + --no-color remove styles and formatting from outputs + -s, --skip-update skip checking for latest version of CLI + -w, --team string select workspace or organization by team name or ID + -v, --verbose print debug logging and additional info +``` + +### SEE ALSO + +* [slack](slack) - Slack command-line tool + diff --git a/docs/reference/commands/slack_logout.md b/docs/reference/commands/slack_logout.md new file mode 100644 index 00000000..734333eb --- /dev/null +++ b/docs/reference/commands/slack_logout.md @@ -0,0 +1,44 @@ +## slack logout + +Log out of a team + +### Synopsis + +Log out of a team, removing any local credentials + +``` +slack logout [flags] +``` + +### Examples + +``` +$ slack auth logout # Select a team to log out of +$ slack auth logout --all # Log out of all team +``` + +### Options + +``` + -A, --all logout of all workspaces + -h, --help help for logout +``` + +### Options inherited from parent commands + +``` + -a, --app string use a specific app ID or environment + --config-dir string use a custom path for system config directory + -e, --experiment strings use the experiment(s) in the command + -f, --force ignore warnings and continue executing command + --no-color remove styles and formatting from outputs + -s, --skip-update skip checking for latest version of CLI + -w, --team string select workspace or organization by team name or ID + --token string set the access token associated with a team + -v, --verbose print debug logging and additional info +``` + +### SEE ALSO + +* [slack](slack) - Slack command-line tool + diff --git a/docs/reference/commands/slack_manifest.md b/docs/reference/commands/slack_manifest.md new file mode 100644 index 00000000..6035d014 --- /dev/null +++ b/docs/reference/commands/slack_manifest.md @@ -0,0 +1,56 @@ +## slack manifest + +Print the app manifest of a project or app + +### Synopsis + +Get the manifest of an app using either the "remote" values on app settings +or from the "local" configurations. + +Subcommands unlock additional engagements and interactions with the manifest. + +The manifest on app settings represents the latest version of the manifest. + +Project configurations use the "get-manifest" hook from ".slack/hooks.json". + +``` +slack manifest [flags] +``` + +### Examples + +``` +# Display the app manifest for the current project +$ slack manifest info + +# Validate the app manifest generated by a project +$ slack manifest validate +``` + +### Options + +``` + -h, --help help for manifest + --source string source of the app manifest ("local" or "remote") (default "local") +``` + +### Options inherited from parent commands + +``` + -a, --app string use a specific app ID or environment + --config-dir string use a custom path for system config directory + -e, --experiment strings use the experiment(s) in the command + -f, --force ignore warnings and continue executing command + --no-color remove styles and formatting from outputs + -s, --skip-update skip checking for latest version of CLI + -w, --team string select workspace or organization by team name or ID + --token string set the access token associated with a team + -v, --verbose print debug logging and additional info +``` + +### SEE ALSO + +* [slack](slack) - Slack command-line tool +* [slack manifest info](slack_manifest_info) - Print the app manifest of a project or app +* [slack manifest validate](slack_manifest_validate) - Validate the app manifest generated by a project + diff --git a/docs/reference/commands/slack_manifest_info.md b/docs/reference/commands/slack_manifest_info.md new file mode 100644 index 00000000..8309ec97 --- /dev/null +++ b/docs/reference/commands/slack_manifest_info.md @@ -0,0 +1,55 @@ +## slack manifest info + +Print the app manifest of a project or app + +### Synopsis + +Get the manifest of an app using either the "remote" values on app settings +or from the "local" configurations. + +The manifest on app settings represents the latest version of the manifest. + +Project configurations use the "get-manifest" hook from ".slack/hooks.json". + +``` +slack manifest info [flags] +``` + +### Examples + +``` +# Print the app manifest from project configurations +$ slack manifest info + +# Print the remote manifest of an app +$ slack manifest info --app A0123456789 + +# Print the app manifest gathered from App Config +$ slack manifest info --source remote +``` + +### Options + +``` + -h, --help help for info + --source string source of the app manifest ("local" or "remote") (default "local") +``` + +### Options inherited from parent commands + +``` + -a, --app string use a specific app ID or environment + --config-dir string use a custom path for system config directory + -e, --experiment strings use the experiment(s) in the command + -f, --force ignore warnings and continue executing command + --no-color remove styles and formatting from outputs + -s, --skip-update skip checking for latest version of CLI + -w, --team string select workspace or organization by team name or ID + --token string set the access token associated with a team + -v, --verbose print debug logging and additional info +``` + +### SEE ALSO + +* [slack manifest](slack_manifest) - Print the app manifest of a project or app + diff --git a/docs/reference/commands/slack_manifest_validate.md b/docs/reference/commands/slack_manifest_validate.md new file mode 100644 index 00000000..926c95a0 --- /dev/null +++ b/docs/reference/commands/slack_manifest_validate.md @@ -0,0 +1,43 @@ +## slack manifest validate + +Validate the app manifest generated by a project + +### Synopsis + +Validate the app manifest generated from a valid project directory + +``` +slack manifest validate [flags] +``` + +### Examples + +``` +# Validate the app manifest generated by a project +$ slack manifest validate +``` + +### Options + +``` + -h, --help help for validate +``` + +### Options inherited from parent commands + +``` + -a, --app string use a specific app ID or environment + --config-dir string use a custom path for system config directory + -e, --experiment strings use the experiment(s) in the command + -f, --force ignore warnings and continue executing command + --no-color remove styles and formatting from outputs + -s, --skip-update skip checking for latest version of CLI + -w, --team string select workspace or organization by team name or ID + --token string set the access token associated with a team + -v, --verbose print debug logging and additional info +``` + +### SEE ALSO + +* [slack manifest](slack_manifest) - Print the app manifest of a project or app + diff --git a/docs/reference/commands/slack_platform.md b/docs/reference/commands/slack_platform.md new file mode 100644 index 00000000..34b88f8a --- /dev/null +++ b/docs/reference/commands/slack_platform.md @@ -0,0 +1,47 @@ +## slack platform + +Deploy and run apps on the Slack Platform + +### Synopsis + +Deploy and run apps on the Slack Platform + +``` +slack platform [flags] +``` + +### Examples + +``` +$ slack run # Run an app locally in a workspace +$ slack deploy --team T0123456 # Deploy to a specific team +$ slack activity -t # Continuously poll for new activity logs +``` + +### Options + +``` + -h, --help help for platform +``` + +### Options inherited from parent commands + +``` + -a, --app string use a specific app ID or environment + --config-dir string use a custom path for system config directory + -e, --experiment strings use the experiment(s) in the command + -f, --force ignore warnings and continue executing command + --no-color remove styles and formatting from outputs + -s, --skip-update skip checking for latest version of CLI + -w, --team string select workspace or organization by team name or ID + --token string set the access token associated with a team + -v, --verbose print debug logging and additional info +``` + +### SEE ALSO + +* [slack](slack) - Slack command-line tool +* [slack platform activity](slack_platform_activity) - Display the app activity logs from the Slack Platform +* [slack platform deploy](slack_platform_deploy) - Deploy the app to the Slack Platform +* [slack platform run](slack_platform_run) - Start a local server to develop and run the app locally + diff --git a/docs/reference/commands/slack_platform_activity.md b/docs/reference/commands/slack_platform_activity.md new file mode 100644 index 00000000..294a39e4 --- /dev/null +++ b/docs/reference/commands/slack_platform_activity.md @@ -0,0 +1,60 @@ +## slack platform activity + +Display the app activity logs from the Slack Platform + +### Synopsis + +Display the app activity logs from the Slack Platform + +``` +slack platform activity [flags] +``` + +### Examples + +``` +$ slack platform activity # Display app activity logs for an app +$ slack platform activity -t # Continuously poll for new activity logs +``` + +### Options + +``` + --component string component type to filter + --component-id string component id to filter + (either a function id or workflow id) + --event string event type to filter + -h, --help help for activity + --idle int time to poll without results before exiting + in minutes (default 5) + -i, --interval int polling interval in seconds (default 3) + --level string minimum log level to display (default "info") + (trace, debug, info, warn, error, fatal) + --limit int limit the amount of logs retrieved (default 100) + --max-date-created int maximum timestamp to filter + (unix timestamp in microseconds) + --min-date-created int minimum timestamp to filter + (unix timestamp in microseconds) + --source string source (slack or developer) to filter + -t, --tail continuously poll for new activity + --trace-id string trace id to filter +``` + +### Options inherited from parent commands + +``` + -a, --app string use a specific app ID or environment + --config-dir string use a custom path for system config directory + -e, --experiment strings use the experiment(s) in the command + -f, --force ignore warnings and continue executing command + --no-color remove styles and formatting from outputs + -s, --skip-update skip checking for latest version of CLI + -w, --team string select workspace or organization by team name or ID + --token string set the access token associated with a team + -v, --verbose print debug logging and additional info +``` + +### SEE ALSO + +* [slack platform](slack_platform) - Deploy and run apps on the Slack Platform + diff --git a/docs/reference/commands/slack_platform_deploy.md b/docs/reference/commands/slack_platform_deploy.md new file mode 100644 index 00000000..979b152a --- /dev/null +++ b/docs/reference/commands/slack_platform_deploy.md @@ -0,0 +1,47 @@ +## slack platform deploy + +Deploy the app to the Slack Platform + +### Synopsis + +Deploy the app to the Slack Platform + +``` +slack platform deploy [flags] +``` + +### Examples + +``` +# Select the workspace to deploy to +$ slack platform deploy +$ slack platform deploy --team T0123456 # Deploy to a specific team +``` + +### Options + +``` + -h, --help help for deploy + --hide-triggers do not list triggers and skip trigger creation prompts + --org-workspace-grant string grant access to a specific org workspace ID + (or 'all' for all workspaces in the org) +``` + +### Options inherited from parent commands + +``` + -a, --app string use a specific app ID or environment + --config-dir string use a custom path for system config directory + -e, --experiment strings use the experiment(s) in the command + -f, --force ignore warnings and continue executing command + --no-color remove styles and formatting from outputs + -s, --skip-update skip checking for latest version of CLI + -w, --team string select workspace or organization by team name or ID + --token string set the access token associated with a team + -v, --verbose print debug logging and additional info +``` + +### SEE ALSO + +* [slack platform](slack_platform) - Deploy and run apps on the Slack Platform + diff --git a/docs/reference/commands/slack_platform_run.md b/docs/reference/commands/slack_platform_run.md new file mode 100644 index 00000000..36347d47 --- /dev/null +++ b/docs/reference/commands/slack_platform_run.md @@ -0,0 +1,55 @@ +## slack platform run + +Start a local server to develop and run the app locally + +### Synopsis + +Start a local server to develop and run the app locally while watching for file changes + +``` +slack platform run [flags] +``` + +### Examples + +``` +# Start a local development server +$ slack platform run + +# Run a local development server with debug activity +$ slack platform run --activity-level debug + +# Run a local development server with cleanup +$ slack platform run --cleanup +``` + +### Options + +``` + --activity-level string activity level to display (default "info") + --cleanup uninstall the local app after exiting + -h, --help help for run + --hide-triggers do not list triggers and skip trigger creation prompts + --no-activity hide Slack Platform log activity + --org-workspace-grant string grant access to a specific org workspace ID + (or 'all' for all workspaces in the org) +``` + +### Options inherited from parent commands + +``` + -a, --app string use a specific app ID or environment + --config-dir string use a custom path for system config directory + -e, --experiment strings use the experiment(s) in the command + -f, --force ignore warnings and continue executing command + --no-color remove styles and formatting from outputs + -s, --skip-update skip checking for latest version of CLI + -w, --team string select workspace or organization by team name or ID + --token string set the access token associated with a team + -v, --verbose print debug logging and additional info +``` + +### SEE ALSO + +* [slack platform](slack_platform) - Deploy and run apps on the Slack Platform + diff --git a/docs/reference/commands/slack_project.md b/docs/reference/commands/slack_project.md new file mode 100644 index 00000000..457149f8 --- /dev/null +++ b/docs/reference/commands/slack_project.md @@ -0,0 +1,58 @@ +## slack project + +Create, manage, and doctor a project + +### Synopsis + +Create, manage, and doctor a project and its configuration files. + +Get started by creating a new project using the **create** command. + +Initialize an existing project with CLI support using the **init** command. + +Check your project health and diagnose problems with the **doctor** command. + +``` +slack project [flags] +``` + +### Examples + +``` +# Creates a new Slack project from an optional template +$ slack project create + +# Initialize an existing project to work with the Slack CLI +$ slack project init + +# Creates a new Slack project from the sample gallery +$ slack project samples +``` + +### Options + +``` + -h, --help help for project +``` + +### Options inherited from parent commands + +``` + -a, --app string use a specific app ID or environment + --config-dir string use a custom path for system config directory + -e, --experiment strings use the experiment(s) in the command + -f, --force ignore warnings and continue executing command + --no-color remove styles and formatting from outputs + -s, --skip-update skip checking for latest version of CLI + -w, --team string select workspace or organization by team name or ID + --token string set the access token associated with a team + -v, --verbose print debug logging and additional info +``` + +### SEE ALSO + +* [slack](slack) - Slack command-line tool +* [slack project create](slack_project_create) - Create a new Slack project +* [slack project init](slack_project_init) - Initialize a project to work with the Slack CLI +* [slack project samples](slack_project_samples) - List available sample apps + diff --git a/docs/reference/commands/slack_project_create.md b/docs/reference/commands/slack_project_create.md new file mode 100644 index 00000000..52c43f46 --- /dev/null +++ b/docs/reference/commands/slack_project_create.md @@ -0,0 +1,48 @@ +## slack project create + +Create a new Slack project + +### Synopsis + +Create a new Slack project on your local machine from an optional template + +``` +slack project create [name] [flags] +``` + +### Examples + +``` +# Create a new project from a template +$ slack create my-project + +# Start a new project from a specific template +$ slack create my-project -t slack-samples/deno-hello-world +``` + +### Options + +``` + -b, --branch string name of git branch to checkout + -h, --help help for create + -t, --template string template URL for your app +``` + +### Options inherited from parent commands + +``` + -a, --app string use a specific app ID or environment + --config-dir string use a custom path for system config directory + -e, --experiment strings use the experiment(s) in the command + -f, --force ignore warnings and continue executing command + --no-color remove styles and formatting from outputs + -s, --skip-update skip checking for latest version of CLI + -w, --team string select workspace or organization by team name or ID + --token string set the access token associated with a team + -v, --verbose print debug logging and additional info +``` + +### SEE ALSO + +* [slack project](slack_project) - Create, manage, and doctor a project + diff --git a/docs/reference/commands/slack_project_init.md b/docs/reference/commands/slack_project_init.md new file mode 100644 index 00000000..1e9902d5 --- /dev/null +++ b/docs/reference/commands/slack_project_init.md @@ -0,0 +1,62 @@ +## slack project init + +Initialize a project to work with the Slack CLI + +### Synopsis + +Initializes a project to support the Slack CLI. + +Adds a .slack directory with the following files: +- project-name/.slack +- project-name/.slack/.gitignore +- project-name/.slack/config.json +- project-name/.slack/hooks.json + +Adds the Slack CLI hooks dependency to your project: +- Deno: Unsupported +- Node.js: Updates package.json +- Python: Updates requirements.txt + +Installs your project dependencies when supported: +- Deno: Supported +- Node.js: Supported +- Python: Unsupported + +Adds an existing app to your project (optional): +- Prompts to add an existing app from app settings +- Runs the command `slack app link` + +``` +slack project init [flags] +``` + +### Examples + +``` +$ slack init # Initialize a project +``` + +### Options + +``` + -h, --help help for init +``` + +### Options inherited from parent commands + +``` + -a, --app string use a specific app ID or environment + --config-dir string use a custom path for system config directory + -e, --experiment strings use the experiment(s) in the command + -f, --force ignore warnings and continue executing command + --no-color remove styles and formatting from outputs + -s, --skip-update skip checking for latest version of CLI + -w, --team string select workspace or organization by team name or ID + --token string set the access token associated with a team + -v, --verbose print debug logging and additional info +``` + +### SEE ALSO + +* [slack project](slack_project) - Create, manage, and doctor a project + diff --git a/docs/reference/commands/slack_project_samples.md b/docs/reference/commands/slack_project_samples.md new file mode 100644 index 00000000..538c35f1 --- /dev/null +++ b/docs/reference/commands/slack_project_samples.md @@ -0,0 +1,44 @@ +## slack project samples + +List available sample apps + +### Synopsis + +List and create an app from the available samples + +``` +slack project samples [flags] +``` + +### Examples + +``` +$ slack samples # Select a sample app to create +``` + +### Options + +``` + -b, --branch string name of git branch to checkout + -h, --help help for samples + -t, --template string template URL for your app +``` + +### Options inherited from parent commands + +``` + -a, --app string use a specific app ID or environment + --config-dir string use a custom path for system config directory + -e, --experiment strings use the experiment(s) in the command + -f, --force ignore warnings and continue executing command + --no-color remove styles and formatting from outputs + -s, --skip-update skip checking for latest version of CLI + -w, --team string select workspace or organization by team name or ID + --token string set the access token associated with a team + -v, --verbose print debug logging and additional info +``` + +### SEE ALSO + +* [slack project](slack_project) - Create, manage, and doctor a project + diff --git a/docs/reference/commands/slack_run.md b/docs/reference/commands/slack_run.md new file mode 100644 index 00000000..eb9c10f8 --- /dev/null +++ b/docs/reference/commands/slack_run.md @@ -0,0 +1,55 @@ +## slack run + +Start a local server to develop and run the app locally + +### Synopsis + +Start a local server to develop and run the app locally while watching for file changes + +``` +slack run [flags] +``` + +### Examples + +``` +# Start a local development server +$ slack platform run + +# Run a local development server with debug activity +$ slack platform run --activity-level debug + +# Run a local development server with cleanup +$ slack platform run --cleanup +``` + +### Options + +``` + --activity-level string activity level to display (default "info") + --cleanup uninstall the local app after exiting + -h, --help help for run + --hide-triggers do not list triggers and skip trigger creation prompts + --no-activity hide Slack Platform log activity + --org-workspace-grant string grant access to a specific org workspace ID + (or 'all' for all workspaces in the org) +``` + +### Options inherited from parent commands + +``` + -a, --app string use a specific app ID or environment + --config-dir string use a custom path for system config directory + -e, --experiment strings use the experiment(s) in the command + -f, --force ignore warnings and continue executing command + --no-color remove styles and formatting from outputs + -s, --skip-update skip checking for latest version of CLI + -w, --team string select workspace or organization by team name or ID + --token string set the access token associated with a team + -v, --verbose print debug logging and additional info +``` + +### SEE ALSO + +* [slack](slack) - Slack command-line tool + diff --git a/docs/reference/commands/slack_samples.md b/docs/reference/commands/slack_samples.md new file mode 100644 index 00000000..6956a60c --- /dev/null +++ b/docs/reference/commands/slack_samples.md @@ -0,0 +1,44 @@ +## slack samples + +List available sample apps + +### Synopsis + +List and create an app from the available samples + +``` +slack samples [flags] +``` + +### Examples + +``` +$ slack samples # Select a sample app to create +``` + +### Options + +``` + -b, --branch string name of git branch to checkout + -h, --help help for samples + -t, --template string template URL for your app +``` + +### Options inherited from parent commands + +``` + -a, --app string use a specific app ID or environment + --config-dir string use a custom path for system config directory + -e, --experiment strings use the experiment(s) in the command + -f, --force ignore warnings and continue executing command + --no-color remove styles and formatting from outputs + -s, --skip-update skip checking for latest version of CLI + -w, --team string select workspace or organization by team name or ID + --token string set the access token associated with a team + -v, --verbose print debug logging and additional info +``` + +### SEE ALSO + +* [slack](slack) - Slack command-line tool + diff --git a/docs/reference/commands/slack_trigger.md b/docs/reference/commands/slack_trigger.md new file mode 100644 index 00000000..d8c37b35 --- /dev/null +++ b/docs/reference/commands/slack_trigger.md @@ -0,0 +1,62 @@ +## slack trigger + +List details of existing triggers + +### Synopsis + +List details of existing triggers + +``` +slack trigger [flags] +``` + +### Examples + +``` +# Select who can run a trigger +$ slack trigger access +$ slack trigger create # Create a new trigger + +# Delete an existing trigger +$ slack trigger delete --trigger-id Ft01234ABCD + +# Get details for a trigger +$ slack trigger info --trigger-id Ft01234ABCD + +# List details for all existing triggers +$ slack trigger list + +# Update a trigger definition +$ slack trigger update --trigger-id Ft01234ABCD +``` + +### Options + +``` + -h, --help help for trigger +``` + +### Options inherited from parent commands + +``` + -a, --app string use a specific app ID or environment + --config-dir string use a custom path for system config directory + -e, --experiment strings use the experiment(s) in the command + -f, --force ignore warnings and continue executing command + --no-color remove styles and formatting from outputs + -s, --skip-update skip checking for latest version of CLI + -w, --team string select workspace or organization by team name or ID + --token string set the access token associated with a team + -v, --verbose print debug logging and additional info +``` + +### SEE ALSO + +* [slack](slack) - Slack command-line tool +* [slack trigger access](slack_trigger_access) - Manage who can use your triggers +* [slack trigger create](slack_trigger_create) - Create a trigger for a workflow +* [slack trigger delete](slack_trigger_delete) - Delete an existing trigger +* [slack trigger info](slack_trigger_info) - Get details for a specific trigger +* [slack trigger list](slack_trigger_list) - List details of existing triggers +* [slack trigger update](slack_trigger_update) - Updates an existing trigger + diff --git a/docs/reference/commands/slack_trigger_access.md b/docs/reference/commands/slack_trigger_access.md new file mode 100644 index 00000000..2c5e52d6 --- /dev/null +++ b/docs/reference/commands/slack_trigger_access.md @@ -0,0 +1,65 @@ +## slack trigger access + +Manage who can use your triggers + +### Synopsis + +Manage who can use your triggers + +``` +slack trigger access --trigger-id [flags] +``` + +### Examples + +``` +# Grant everyone access to run a trigger +$ slack trigger access --trigger-id Ft01234ABCD --everyone + +# Grant certain channels access to run a trigger +$ slack trigger access --trigger-id Ft01234ABCD --grant \ + --channels C012345678 + +# Revoke certain users access to run a trigger +$ slack trigger access --trigger-id Ft01234ABCD --revoke \ + --users USLACKBOT,U012345678 +``` + +### Options + +``` + -A, --app-collaborators grant permission to only app collaborators + -C, --channels string a comma-separated list of Slack channel IDs + -E, --everyone grant permission to everyone in your workspace + -G, --grant grant permission to --users or --channels to + run the trigger --trigger-id + -h, --help help for access + --include-app-collaborators include app collaborators into named + entities to run the trigger --trigger-id + -I, --info check who has access to the trigger --trigger-id + -O, --organizations string a comma-separated list of Slack organization IDs + -R, --revoke revoke permission for --users or --channels to + run the trigger --trigger-id + -T, --trigger-id string the ID of the trigger + -U, --users string a comma-separated list of Slack user IDs + -W, --workspaces string a comma-separated list of Slack workspace IDs +``` + +### Options inherited from parent commands + +``` + -a, --app string use a specific app ID or environment + --config-dir string use a custom path for system config directory + -e, --experiment strings use the experiment(s) in the command + -f, --force ignore warnings and continue executing command + --no-color remove styles and formatting from outputs + -s, --skip-update skip checking for latest version of CLI + -w, --team string select workspace or organization by team name or ID + --token string set the access token associated with a team + -v, --verbose print debug logging and additional info +``` + +### SEE ALSO + +* [slack trigger](slack_trigger) - List details of existing triggers + diff --git a/docs/reference/commands/slack_trigger_create.md b/docs/reference/commands/slack_trigger_create.md new file mode 100644 index 00000000..c0d824c5 --- /dev/null +++ b/docs/reference/commands/slack_trigger_create.md @@ -0,0 +1,67 @@ +## slack trigger create + +Create a trigger for a workflow + +### Synopsis + +Create a trigger to start a workflow + +``` +slack trigger create [flags] +``` + +### Examples + +``` +# Create a trigger by selecting an app and trigger definition +$ slack trigger create + +# Create a trigger from a definition file +$ slack trigger create --trigger-def "triggers/shortcut_trigger.ts" + +# Create a trigger for a workflow +$ slack trigger create --workflow "#/workflows/my_workflow" +``` + +### Options + +``` + --description string the description of this trigger + -h, --help help for create + --interactivity when used with --workflow, adds a + "slack#/types/interactivity" parameter + to the trigger with the name specified + by --interactivity-name + --interactivity-name string when used with --interactivity, specifies + the name of the interactivity parameter + to use (default "interactivity") + --org-workspace-grant string grant access to a specific org workspace ID + (or 'all' for all workspaces in the org) + --title string the title of this trigger + (default "My Trigger") + --trigger-def string path to a JSON file containing the trigger + definition. Overrides other flags setting + trigger properties. + --workflow string a reference to the workflow to execute + formatted as: + "#/workflows/" +``` + +### Options inherited from parent commands + +``` + -a, --app string use a specific app ID or environment + --config-dir string use a custom path for system config directory + -e, --experiment strings use the experiment(s) in the command + -f, --force ignore warnings and continue executing command + --no-color remove styles and formatting from outputs + -s, --skip-update skip checking for latest version of CLI + -w, --team string select workspace or organization by team name or ID + --token string set the access token associated with a team + -v, --verbose print debug logging and additional info +``` + +### SEE ALSO + +* [slack trigger](slack_trigger) - List details of existing triggers + diff --git a/docs/reference/commands/slack_trigger_delete.md b/docs/reference/commands/slack_trigger_delete.md new file mode 100644 index 00000000..2bcd3c73 --- /dev/null +++ b/docs/reference/commands/slack_trigger_delete.md @@ -0,0 +1,47 @@ +## slack trigger delete + +Delete an existing trigger + +### Synopsis + +Delete an existing trigger + +``` +slack trigger delete --trigger-id [flags] +``` + +### Examples + +``` +# Delete a specific trigger in a selected workspace +$ slack trigger delete --trigger-id Ft01234ABCD + +# Delete a specific trigger for an app +$ slack trigger delete --trigger-id Ft01234ABCD --app A0123456 +``` + +### Options + +``` + -h, --help help for delete + --trigger-id string the ID of the trigger +``` + +### Options inherited from parent commands + +``` + -a, --app string use a specific app ID or environment + --config-dir string use a custom path for system config directory + -e, --experiment strings use the experiment(s) in the command + -f, --force ignore warnings and continue executing command + --no-color remove styles and formatting from outputs + -s, --skip-update skip checking for latest version of CLI + -w, --team string select workspace or organization by team name or ID + --token string set the access token associated with a team + -v, --verbose print debug logging and additional info +``` + +### SEE ALSO + +* [slack trigger](slack_trigger) - List details of existing triggers + diff --git a/docs/reference/commands/slack_trigger_info.md b/docs/reference/commands/slack_trigger_info.md new file mode 100644 index 00000000..21b81ffc --- /dev/null +++ b/docs/reference/commands/slack_trigger_info.md @@ -0,0 +1,47 @@ +## slack trigger info + +Get details for a specific trigger + +### Synopsis + +Get details for a specific trigger + +``` +slack trigger info --trigger-id [flags] +``` + +### Examples + +``` +# Get details for a specific trigger in a selected workspace +$ slack trigger info --trigger-id Ft01234ABCD + +# Get details for a specific trigger +$ slack trigger info --trigger-id Ft01234ABCD --app A0123456 +``` + +### Options + +``` + -h, --help help for info + --trigger-id string the ID of the trigger +``` + +### Options inherited from parent commands + +``` + -a, --app string use a specific app ID or environment + --config-dir string use a custom path for system config directory + -e, --experiment strings use the experiment(s) in the command + -f, --force ignore warnings and continue executing command + --no-color remove styles and formatting from outputs + -s, --skip-update skip checking for latest version of CLI + -w, --team string select workspace or organization by team name or ID + --token string set the access token associated with a team + -v, --verbose print debug logging and additional info +``` + +### SEE ALSO + +* [slack trigger](slack_trigger) - List details of existing triggers + diff --git a/docs/reference/commands/slack_trigger_list.md b/docs/reference/commands/slack_trigger_list.md new file mode 100644 index 00000000..b90c8b14 --- /dev/null +++ b/docs/reference/commands/slack_trigger_list.md @@ -0,0 +1,48 @@ +## slack trigger list + +List details of existing triggers + +### Synopsis + +List details of existing triggers + +``` +slack trigger list [flags] +``` + +### Examples + +``` +# List details for all existing triggers +$ slack trigger list + +# List triggers for a specific app +$ slack trigger list --team T0123456 --app local +``` + +### Options + +``` + -h, --help help for list + -L, --limit int Limit the number of triggers to show (default 4) + -T, --type string Only display triggers of the given type, can be one of 'all', 'shortcut', 'event', 'scheduled', 'webhook', and 'external' (default "all") +``` + +### Options inherited from parent commands + +``` + -a, --app string use a specific app ID or environment + --config-dir string use a custom path for system config directory + -e, --experiment strings use the experiment(s) in the command + -f, --force ignore warnings and continue executing command + --no-color remove styles and formatting from outputs + -s, --skip-update skip checking for latest version of CLI + -w, --team string select workspace or organization by team name or ID + --token string set the access token associated with a team + -v, --verbose print debug logging and additional info +``` + +### SEE ALSO + +* [slack trigger](slack_trigger) - List details of existing triggers + diff --git a/docs/reference/commands/slack_trigger_update.md b/docs/reference/commands/slack_trigger_update.md new file mode 100644 index 00000000..6be60a4b --- /dev/null +++ b/docs/reference/commands/slack_trigger_update.md @@ -0,0 +1,64 @@ +## slack trigger update + +Updates an existing trigger + +### Synopsis + +Updates an existing trigger with the provided definition. Only supports full replacement, no partial update. + +``` +slack trigger update --trigger-id [flags] +``` + +### Examples + +``` +# Update a trigger definition with a selected file +$ slack trigger update --trigger-id Ft01234ABCD + +# Update a trigger with a workflow id and title +$ slack trigger update --trigger-id Ft01234ABCD \ + --workflow "#/workflows/my_workflow" --title "Updated trigger" +``` + +### Options + +``` + --description string the description of this trigger + -h, --help help for update + --interactivity when used with --workflow, adds a + "slack#/types/interactivity" parameter + to the trigger with the name specified + by --interactivity-name + --interactivity-name string when used with --interactivity, specifies + the name of the interactivity parameter + to use (default "interactivity") + --title string the title of this trigger + (default "My Trigger") + --trigger-def string path to a JSON file containing the trigger + definition. Overrides other flags setting + trigger properties. + --trigger-id string the ID of the trigger to update + --workflow string a reference to the workflow to execute + formatted as: + "#/workflows/" +``` + +### Options inherited from parent commands + +``` + -a, --app string use a specific app ID or environment + --config-dir string use a custom path for system config directory + -e, --experiment strings use the experiment(s) in the command + -f, --force ignore warnings and continue executing command + --no-color remove styles and formatting from outputs + -s, --skip-update skip checking for latest version of CLI + -w, --team string select workspace or organization by team name or ID + --token string set the access token associated with a team + -v, --verbose print debug logging and additional info +``` + +### SEE ALSO + +* [slack trigger](slack_trigger) - List details of existing triggers + diff --git a/docs/reference/commands/slack_uninstall.md b/docs/reference/commands/slack_uninstall.md new file mode 100644 index 00000000..b91cfcad --- /dev/null +++ b/docs/reference/commands/slack_uninstall.md @@ -0,0 +1,42 @@ +## slack uninstall + +Uninstall the app from a team + +### Synopsis + +Uninstall the app from a team without deleting the app or its data + +``` +slack uninstall [flags] +``` + +### Examples + +``` +$ slack app uninstall # Uninstall an app from a team +``` + +### Options + +``` + -h, --help help for uninstall +``` + +### Options inherited from parent commands + +``` + -a, --app string use a specific app ID or environment + --config-dir string use a custom path for system config directory + -e, --experiment strings use the experiment(s) in the command + -f, --force ignore warnings and continue executing command + --no-color remove styles and formatting from outputs + -s, --skip-update skip checking for latest version of CLI + -w, --team string select workspace or organization by team name or ID + --token string set the access token associated with a team + -v, --verbose print debug logging and additional info +``` + +### SEE ALSO + +* [slack](slack) - Slack command-line tool + diff --git a/docs/reference/commands/slack_upgrade.md b/docs/reference/commands/slack_upgrade.md new file mode 100644 index 00000000..99858cbd --- /dev/null +++ b/docs/reference/commands/slack_upgrade.md @@ -0,0 +1,46 @@ +## slack upgrade + +Checks for available updates to the CLI or SDK + +### Synopsis + +Checks for available updates to the CLI or the SDKs of a project + +If there are any, then you will be prompted to upgrade + +The changelog can be found at [https://docs.slack.dev/changelog/](https://docs.slack.dev/changelog/) + +``` +slack upgrade [flags] +``` + +### Examples + +``` +$ slack upgrade # Check for any available updates +``` + +### Options + +``` + -h, --help help for upgrade +``` + +### Options inherited from parent commands + +``` + -a, --app string use a specific app ID or environment + --config-dir string use a custom path for system config directory + -e, --experiment strings use the experiment(s) in the command + -f, --force ignore warnings and continue executing command + --no-color remove styles and formatting from outputs + -s, --skip-update skip checking for latest version of CLI + -w, --team string select workspace or organization by team name or ID + --token string set the access token associated with a team + -v, --verbose print debug logging and additional info +``` + +### SEE ALSO + +* [slack](slack) - Slack command-line tool + diff --git a/docs/reference/commands/slack_version.md b/docs/reference/commands/slack_version.md new file mode 100644 index 00000000..1bde289b --- /dev/null +++ b/docs/reference/commands/slack_version.md @@ -0,0 +1,36 @@ +## slack version + +Print the version number + +### Synopsis + +All software has versions. This is ours. + +``` +slack version [flags] +``` + +### Options + +``` + -h, --help help for version +``` + +### Options inherited from parent commands + +``` + -a, --app string use a specific app ID or environment + --config-dir string use a custom path for system config directory + -e, --experiment strings use the experiment(s) in the command + -f, --force ignore warnings and continue executing command + --no-color remove styles and formatting from outputs + -s, --skip-update skip checking for latest version of CLI + -w, --team string select workspace or organization by team name or ID + --token string set the access token associated with a team + -v, --verbose print debug logging and additional info +``` + +### SEE ALSO + +* [slack](slack) - Slack command-line tool + diff --git a/docs/reference/errors.md b/docs/reference/errors.md new file mode 100644 index 00000000..0dc696d7 --- /dev/null +++ b/docs/reference/errors.md @@ -0,0 +1,1576 @@ +# Slack CLI errors reference + +Troubleshooting errors can be tricky between your development environment, the +Slack CLI, and those encountered when running your code. Below are some common +ones, as well as a list of the errors the Slack CLI may raise, what they mean, +and some ways to remediate them. + +## Slack CLI errors list + +### access_denied {#access_denied} + +**Message**: You don't have the permission to access the specified resource + +**Remediation**: Check with your Slack admin to make sure that you have permission to access the resource. + +--- + +### add_app_to_project_error {#add_app_to_project_error} + +**Message**: Couldn't save your app's info to this project + +--- + +### already_logged_out {#already_logged_out} + +**Message**: You're already logged out + +--- + +### already_resolved {#already_resolved} + +**Message**: The app already has a resolution and cannot be requested + +--- + +### app_add_error {#app_add_error} + +**Message**: Couldn't create a new app + +--- + +### app_add_exists {#app_add_exists} + +**Message**: App already exists belonging to the team + +--- + +### app_approval_request_denied {#app_approval_request_denied} + +**Message**: This app is currently denied for installation + +**Remediation**: Reach out to an admin for additional information, or try requesting again with different scopes and outgoing domains + +--- + +### app_approval_request_eligible {#app_approval_request_eligible} + +**Message**: This app requires permissions that must be reviewed by an admin before you can install it + +--- + +### app_approval_request_pending {#app_approval_request_pending} + +**Message**: This app has requested admin approval to install and is awaiting review + +**Remediation**: Reach out to an admin for additional information + +--- + +### app_auth_team_mismatch {#app_auth_team_mismatch} + +**Message**: Specified app and team are mismatched + +**Remediation**: Try a different combination of --app, --team flags + +--- + +### app_create_error {#app_create_error} + +**Message**: Couldn't create your app + +--- + +### app_delete_error {#app_delete_error} + +**Message**: Couldn't delete your app + +--- + +### app_deploy_error {#app_deploy_error} + +**Message**: Couldn't deploy your app + +--- + +### app_deploy_function_runtime_not_slack {#app_deploy_function_runtime_not_slack} + +**Message**: Deployment to Slack is not currently supported for apps with `runOnSlack` set as false + +**Remediation**: Learn about building apps with the Deno Slack SDK: tools.slack.dev/deno-slack-sdk/ +If you are using a Bolt framework, deployment is supported under an experiment. +Add a deploy hook then run: `slack deploy --experiment=bolt` + +Otherwise start your app for local development with: `slack run` + +--- + +### app_dir_only_fail {#app_dir_only_fail} + +**Message**: The app was neither in the app directory nor created on this team/org, and cannot be requested + +--- + +### app_directory_access_error {#app_directory_access_error} + +**Message**: Couldn't access app directory + +--- + +### app_flag_required {#app_flag_required} + +**Message**: The --app flag must be provided + +**Remediation**: Choose a specific app with ``--app `` + +--- + +### app_found {#app_found} + +**Message**: An app was found + +--- + +### app_install_error {#app_install_error} + +**Message**: Couldn't install your app to a workspace + +--- + +### app_manifest_access_error {#app_manifest_access_error} + +**Message**: Couldn't access your app manifest + +--- + +### app_manifest_create_error {#app_manifest_create_error} + +**Message**: Couldn't create your app manifest + +--- + +### app_manifest_generate_error {#app_manifest_generate_error} + +**Message**: Couldn't generate an app manifest from this project + +**Remediation**: Check to make sure you are in a valid Slack project directory and that your project has no compilation errors. + +--- + +### app_manifest_update_error {#app_manifest_update_error} + +**Message**: The app manifest was not updated + +--- + +### app_manifest_validate_error {#app_manifest_validate_error} + +**Message**: Your app manifest is invalid + +--- + +### app_not_eligible {#app_not_eligible} + +**Message**: The specified app is not eligible for this API + +--- + +### app_not_found {#app_not_found} + +**Message**: The app was not found + +--- + +### app_not_hosted {#app_not_hosted} + +**Message**: App is not configured to be deployed to the Slack platform + +**Remediation**: Deploy an app containing workflow automations to Slack managed infrastructure +Read about ROSI: https://docs.slack.dev/workflows/run-on-slack-infrastructure + +--- + +### app_not_installed {#app_not_installed} + +**Message**: The provided app must be installed on this team + +--- + +### app_remove_error {#app_remove_error} + +**Message**: Couldn't remove your app + +--- + +### app_rename_app {#app_rename_app} + +**Message**: Couldn't rename your app + +--- + +### apps_list_error {#apps_list_error} + +**Message**: Couldn't get a list of your apps + +--- + +### auth_prod_token_not_found {#auth_prod_token_not_found} + +**Message**: Couldn't find a valid auth token for the Slack API + +**Remediation**: You need to be logged in to at least 1 production (slack.com) team to use this command. Log into one with the `slack login` command and try again. + +--- + +### auth_timeout_error {#auth_timeout_error} + +**Message**: Couldn't receive authorization in the time allowed + +**Remediation**: Ensure you have pasted the command in a Slack workspace and accepted the permissions. + +--- + +### auth_token_error {#auth_token_error} + +**Message**: Couldn't get a token with an active session + +--- + +### auth_verification_error {#auth_verification_error} + +**Message**: Couldn't verify your authorization + +--- + +### bot_invite_required {#bot_invite_required} + +**Message**: Your app must be invited to the channel + +**Remediation**: Try to find the channel declared the source code of a workflow or function. + +Open Slack, join the channel, invite your app, and try the command again. +Learn more: https://slack.com/help/articles/201980108-Add-people-to-a-channel + +--- + +### cannot_abandon_app {#cannot_abandon_app} + +**Message**: The last owner cannot be removed + +--- + +### cannot_add_owner {#cannot_add_owner} + +**Message**: Unable to add the given user as owner + +--- + +### cannot_count_owners {#cannot_count_owners} + +**Message**: Unable to retrieve current app collaborators + +--- + +### cannot_delete_app {#cannot_delete_app} + +**Message**: Unable to delete app + +--- + +### cannot_list_collaborators {#cannot_list_collaborators} + +**Message**: Calling user is unable to list collaborators + +--- + +### cannot_list_owners {#cannot_list_owners} + +**Message**: Calling user is unable to list owners + +--- + +### cannot_remove_collaborators {#cannot_remove_collaborators} + +**Message**: User is unable to remove collaborators + +--- + +### cannot_remove_owner {#cannot_remove_owner} + +**Message**: Unable to remove the given user + +--- + +### cannot_revoke_org_bot_token {#cannot_revoke_org_bot_token} + +**Message**: Revoking org-level bot token is not supported + +--- + +### channel_not_found {#channel_not_found} + +**Message**: Couldn't find the specified Slack channel + +**Remediation**: Try adding your app as a member to the channel. + +--- + +### cli_autoupdate_error {#cli_autoupdate_error} + +**Message**: Couldn't auto-update this command-line tool + +**Remediation**: You can manually install the latest version from http://localhost:3000/slack-cli/guides/installing-the-slack-cli-for-mac-and-linux. + +--- + +### cli_config_invalid {#cli_config_invalid} + +**Message**: Configuration invalid + +**Remediation**: Check your config.json file. + +--- + +### cli_config_location_error {#cli_config_location_error} + +**Message**: The .slack/cli.json configuration file is not supported + +**Remediation**: This version of the CLI no longer supports this configuration file. +Move the .slack/cli.json file to .slack/hooks.json and try again. + +--- + +### cli_read_error {#cli_read_error} + +**Message**: There was an error reading configuration + +**Remediation**: Check your config.json file. + +--- + +### cli_update_required {#cli_update_required} + +**Message**: Slack API requires the latest version of the Slack CLI + +**Remediation**: You can upgrade to the latest version of the Slack CLI using the command: `slack upgrade` + +--- + +### comment_required {#comment_required} + +**Message**: Your admin is requesting a reason to approve installation of this app + +--- + +### connected_org_denied {#connected_org_denied} + +**Message**: The admin does not allow connected organizations to be named_entities + +--- + +### connected_team_denied {#connected_team_denied} + +**Message**: The admin does not allow connected teams to be named_entities + +--- + +### connector_approval_pending {#connector_approval_pending} + +**Message**: A connector requires admin approval before it can be installed +Approval is pending review + +**Remediation**: Contact your Slack admin about the status of your request + +--- + +### connector_approval_required {#connector_approval_required} + +**Message**: A connector requires admin approval before it can be installed + +**Remediation**: Request approval for the given connector from your Slack admin + +--- + +### connector_denied {#connector_denied} + +**Message**: A connector has been denied for use by an admin + +**Remediation**: Contact your Slack admin + +--- + +### connector_not_installed {#connector_not_installed} + +**Message**: A connector requires installation before it can be used + +**Remediation**: Request installation for the given connector + +--- + +### credentials_not_found {#credentials_not_found} + +**Message**: No authentication found for this team + +**Remediation**: Use the command `slack login` to login to this workspace + +--- + +### customizable_input_missing_matching_workflow_input {#customizable_input_missing_matching_workflow_input} + +**Message**: Customizable input on the trigger must map to a workflow input of the same name + +--- + +### customizable_input_unsupported_type {#customizable_input_unsupported_type} + +**Message**: Customizable input has been mapped to a workflow input of an unsupported type. Only `UserID`, `ChannelId`, and `String` are supported for customizable inputs + +--- + +### customizable_inputs_not_allowed_on_optional_inputs {#customizable_inputs_not_allowed_on_optional_inputs} + +**Message**: Customizable trigger inputs must map to required workflow inputs + +--- + +### customizable_inputs_only_allowed_on_link_triggers {#customizable_inputs_only_allowed_on_link_triggers} + +**Message**: Customizable inputs are only allowed on link triggers + +--- + +### datastore_error {#datastore_error} + +**Message**: An error occurred while accessing your datastore + +--- + +### datastore_missing_primary_key {#datastore_missing_primary_key} + +**Message**: The primary key for the datastore is missing + +--- + +### datastore_not_found {#datastore_not_found} + +**Message**: The specified datastore could not be found + +--- + +### default_app_access_error {#default_app_access_error} + +**Message**: Couldn't access the default app + +--- + +### default_app_setting_error {#default_app_setting_error} + +**Message**: Couldn't set this app as the default + +--- + +### deno_not_found {#deno_not_found} + +**Message**: Couldn't find the 'deno' language runtime installed on this system + +**Remediation**: To install Deno, visit https://deno.land/#installation. + +--- + +### deployed_app_not_supported {#deployed_app_not_supported} + +**Message**: A deployed app cannot be used by this command + +--- + +### enterprise_not_found {#enterprise_not_found} + +**Message**: The `enterprise` was not found + +--- + +### fail_to_get_teams_for_restricted_user {#fail_to_get_teams_for_restricted_user} + +**Message**: Failed to get teams for restricted user + +--- + +### failed_adding_collaborator {#failed_adding_collaborator} + +**Message**: Failed writing a collaborator record for this new app + +--- + +### failed_creating_app {#failed_creating_app} + +**Message**: Failed to create the app model + +--- + +### failed_datastore_operation {#failed_datastore_operation} + +**Message**: Failed while managing datastore infrastructure + +**Remediation**: Please try again and reach out to feedback@slack.com if the problem persists. + +--- + +### failed_export {#failed_export} + +**Message**: Couldn't export the app manifest + +--- + +### failed_for_some_requests {#failed_for_some_requests} + +**Message**: At least one request was not cancelled + +--- + +### failed_to_get_user {#failed_to_get_user} + +**Message**: Couldn't find the user to install the app + +--- + +### failed_to_save_extension_logs {#failed_to_save_extension_logs} + +**Message**: Couldn't save the logs + +--- + +### file_rejected {#file_rejected} + +**Message**: Not an acceptable S3 file + +--- + +### forbidden_team {#forbidden_team} + +**Message**: The authenticated team cannot use this API + +--- + +### free_team_not_allowed {#free_team_not_allowed} + +**Message**: Free workspaces do not support the Slack platform's low-code automation for workflows and functions + +**Remediation**: You can install this app if you upgrade your workspace: https://slack.com/pricing. + +--- + +### function_belongs_to_another_app {#function_belongs_to_another_app} + +**Message**: The provided function_id does not belong to this app_id + +--- + +### function_not_found {#function_not_found} + +**Message**: The specified function couldn't be found + +--- + +### git_clone_error {#git_clone_error} + +**Message**: Git failed to clone repository + +--- + +### git_not_found {#git_not_found} + +**Message**: Couldn't find Git installed on this system + +**Remediation**: To install Git, visit https://github.com/git-guides/install-git. + +--- + +### git_zip_download_error {#git_zip_download_error} + +**Message**: Cannot download Git repository as a .zip archive + +--- + +### home_directory_access_failed {#home_directory_access_failed} + +**Message**: Failed to read/create .slack/ directory in your home directory + +**Remediation**: A Slack directory is required for retrieving/storing auth credentials and config data. Check permissions on your system. + +--- + +### hooks_json_location_error {#hooks_json_location_error} + +**Message**: Missing the Slack hooks file from project configurations + +**Remediation**: A `.slack/hooks.json` file must be present in the project's `.slack` directory. + +--- + +### hosted_apps_disallow_user_scopes {#hosted_apps_disallow_user_scopes} + +**Message**: Hosted apps do not support user scopes + +--- + +### http_request_failed {#http_request_failed} + +**Message**: HTTP request failed + +--- + +### http_response_invalid {#http_response_invalid} + +**Message**: Received an invalid response from the server + +--- + +### insecure_request {#insecure_request} + +**Message**: The method was not called via a `POST` request + +--- + +### installation_denied {#installation_denied} + +**Message**: Couldn't install the app because the installation request was denied + +**Remediation**: Reach out to one of your App Managers for additional information. + +--- + +### installation_failed {#installation_failed} + +**Message**: Couldn't install the app + +--- + +### installation_required {#installation_required} + +**Message**: A valid installation of this app is required to take this action + +**Remediation**: Install the app with `slack install` + +--- + +### internal_error {#internal_error} + +**Message**: An internal error has occurred with the Slack platform + +**Remediation**: Please reach out to feedback@slack.com if the problem persists. + +--- + +### invalid_app {#invalid_app} + +**Message**: Either the app does not exist or an app created from the provided manifest would not be valid + +--- + +### invalid_app_directory {#invalid_app_directory} + +**Message**: This is an invalid Slack app project directory + +**Remediation**: A valid Slack project includes the Slack hooks file: .slack/hooks.json + +--- + +### invalid_app_flag {#invalid_app_flag} + +**Message**: The provided --app flag value is not valid + +**Remediation**: Specify the environment with --app local or --app deployed +Or choose a specific app with ``--app `` + +--- + +### invalid_app_id {#invalid_app_id} + +**Message**: App ID may be invalid for this user account and workspace + +**Remediation**: Check to make sure you are signed into the correct workspace for this app and you have the required permissions to perform this action. + +--- + +### invalid_args {#invalid_args} + +**Message**: Required arguments either were not provided or contain invalid values + +--- + +### invalid_arguments {#invalid_arguments} + +**Message**: Slack API request parameters are invalid + +--- + +### invalid_arguments_customizable_inputs {#invalid_arguments_customizable_inputs} + +**Message**: A trigger input parameter with customizable: true cannot be set as hidden or locked, nor have a value provided at trigger creation time + +--- + +### invalid_auth {#invalid_auth} + +**Message**: Your user account authorization isn't valid + +**Remediation**: Your user account authorization may be expired or does not have permission to access the resource. Try to login to the same user account again using `slack login`. + +--- + +### invalid_challenge {#invalid_challenge} + +**Message**: The challenge code is invalid + +**Remediation**: The previous slash command and challenge code have now expired. To retry, use `slack login`, paste the slash command in any Slack channel, and enter the challenge code displayed by Slack. It is easiest to copy & paste the challenge code. + +--- + +### invalid_channel_id {#invalid_channel_id} + +**Message**: Channel ID specified doesn't exist or you do not have permissions to access it + +**Remediation**: Channel ID appears to be formatted correctly. Check if this channel exists on the current team and that you have permissions to access it. + +--- + +### invalid_cursor {#invalid_cursor} + +**Message**: Value passed for `cursor` was not valid or is valid no longer + +--- + +### invalid_datastore {#invalid_datastore} + +**Message**: Invalid datastore specified in your project + +--- + +### invalid_datastore_expression {#invalid_datastore_expression} + +**Message**: The provided expression is not valid + +**Remediation**: Verify the expression you provided is valid JSON surrounded by quotations +Use `slack datastore --help` for examples + +--- + +### invalid_distribution_type {#invalid_distribution_type} + +**Message**: This function requires distribution_type to be set as named_entities before adding users + +--- + +### invalid_flag {#invalid_flag} + +**Message**: The provided flag value is invalid + +--- + +### invalid_interactive_trigger_inputs {#invalid_interactive_trigger_inputs} + +**Message**: One or more input parameter types isn't supported by the link trigger type + +--- + +### invalid_manifest {#invalid_manifest} + +**Message**: The provided manifest file does not validate against schema. Consult the additional errors field to locate specific issues + +--- + +### invalid_manifest_source {#invalid_manifest_source} + +**Message**: A manifest does not exist at the provided source + +**Remediation**: Set 'manifest.source' to either "remote" or "local" in .slack/config.json +Read about manifest sourcing with the `slack manifest info --help` command + +--- + +### invalid_parameters {#invalid_parameters} + +**Message**: slack_cli_version supplied is invalid + +--- + +### invalid_permission_type {#invalid_permission_type} + +**Message**: Permission type must be set to `named_entities` before you can manage users + +--- + +### invalid_refresh_token {#invalid_refresh_token} + +**Message**: The given refresh token is invalid + +--- + +### invalid_request_id {#invalid_request_id} + +**Message**: The request_id passed is invalid + +--- + +### invalid_resource_id {#invalid_resource_id} + +**Message**: The resource_id for the given resource_type is invalid + +--- + +### invalid_resource_type {#invalid_resource_type} + +**Message**: The resource_type argument is invalid. + +--- + +### invalid_s3_key {#invalid_s3_key} + +**Message**: An internal error occurred + +**Remediation**: Please reach out to feedback@slack.com if the problem persists. + +--- + +### invalid_scopes {#invalid_scopes} + +**Message**: Some of the provided scopes do not exist + +--- + +### invalid_semver {#invalid_semver} + +**Message**: The provided version does not follow semantic versioning + +--- + +### invalid_slack_project_directory {#invalid_slack_project_directory} + +**Message**: Current directory is not a Slack project + +**Remediation**: Change in to a Slack project directory. A Slack project always includes the Slack hooks file (`.slack/hooks.json`). + +--- + +### invalid_token {#invalid_token} + +**Message**: The provided token is not valid + +--- + +### invalid_trigger {#invalid_trigger} + +**Message**: Invalid trigger specified in your project + +--- + +### invalid_trigger_access {#invalid_trigger_access} + +**Message**: Trigger access can not be configured for more than 10 users + +--- + +### invalid_trigger_config {#invalid_trigger_config} + +**Message**: The provided trigger object does not conform to the trigger type's schema + +--- + +### invalid_trigger_event_type {#invalid_trigger_event_type} + +**Message**: The provided event type is not allowed + +--- + +### invalid_trigger_inputs {#invalid_trigger_inputs} + +**Message**: Required inputs for the referenced function/workflow are not passed + +--- + +### invalid_trigger_type {#invalid_trigger_type} + +**Message**: The provided trigger type is not recognized + +--- + +### invalid_user_id {#invalid_user_id} + +**Message**: A value passed as a user_id is invalid + +--- + +### invalid_webhook_config {#invalid_webhook_config} + +**Message**: Only one of schema or schema_ref should be provided + +--- + +### invalid_webhook_schema_ref {#invalid_webhook_schema_ref} + +**Message**: Unable to parse the schema ref + +--- + +### invalid_workflow_app_id {#invalid_workflow_app_id} + +**Message**: A value passed as workflow_app_id is invalid or missing + +--- + +### invalid_workflow_id {#invalid_workflow_id} + +**Message**: A value passed as a workflow ID is invalid + +--- + +### is_restricted {#is_restricted} + +**Message**: Restricted users cannot request + +--- + +### local_app_not_found {#local_app_not_found} + +**Message**: Couldn't find the local app + +--- + +### local_app_not_supported {#local_app_not_supported} + +**Message**: A local app cannot be used by this command + +--- + +### local_app_removal_error {#local_app_removal_error} + +**Message**: Couldn't remove local app + +--- + +### local_app_run_error {#local_app_run_error} + +**Message**: Couldn't run app locally + +--- + +### method_not_supported {#method_not_supported} + +**Message**: This API method is not supported + +--- + +### mismatched_flags {#mismatched_flags} + +**Message**: The provided flags cannot be used together + +--- + +### missing_app_id {#missing_app_id} + +**Message**: workflow_app_id is required to update via workflow reference + +--- + +### missing_app_team_id {#missing_app_team_id} + +**Message**: team_id is required to create or update this app + +--- + +### missing_challenge {#missing_challenge} + +**Message**: Challenge must be supplied + +--- + +### missing_experiment {#missing_experiment} + +**Message**: The feature is behind an experiment not toggled on + +--- + +### missing_flag {#missing_flag} + +**Message**: An argument must be provided for the flag + +--- + +### missing_function_identifier {#missing_function_identifier} + +**Message**: Could not find the given workflow using the specified reference + +--- + +### missing_input {#missing_input} + +**Message**: A required value was not supplied as input + +--- + +### missing_options {#missing_options} + +**Message**: There are no options to select from + +--- + +### missing_scope {#missing_scope} + +**Message**: Your login is out of date + +**Remediation**: Run `slack logout` and then `slack login` again. + +--- + +### missing_scopes {#missing_scopes} + +**Message**: Additional scopes are required to create this type of trigger + +--- + +### missing_user {#missing_user} + +**Message**: The `user` was not found + +--- + +### missing_value {#missing_value} + +**Message**: Missing `value` property on an input. You must either provide the value now, or mark this input as `customizable`: `true` and provide the value at the time the trigger is executed. + +--- + +### no_file {#no_file} + +**Message**: Couldn't upload your bundled code to server + +**Remediation**: Please try again + +--- + +### no_pending_request {#no_pending_request} + +**Message**: Pending request not found + +--- + +### no_permission {#no_permission} + +**Message**: You are either not a collaborator on this app or you do not have permissions to perform this action + +**Remediation**: Contact the app owner to add you as a collaborator + +--- + +### no_token_found {#no_token_found} + +**Message**: No tokens found to delete + +--- + +### no_triggers {#no_triggers} + +**Message**: There are no triggers installed for this app + +--- + +### no_valid_named_entities {#no_valid_named_entities} + +**Message**: None of the provided named entities were valid + +--- + +### not_authed {#not_authed} + +**Message**: You are either not logged in or your login session has expired + +**Remediation**: Authorize your CLI with `slack login` + +--- + +### not_bearer_token {#not_bearer_token} + +**Message**: Incompatible token type provided + +--- + +### not_found {#not_found} + +**Message**: Couldn't find row + +--- + +### org_grant_exists {#org_grant_exists} + +**Message**: A different org workspace grant already exists for the installed app + +--- + +### org_not_connected {#org_not_connected} + +**Message**: One or more of the listed organizations was not connected + +--- + +### org_not_found {#org_not_found} + +**Message**: One or more of the listed organizations could not be found + +--- + +### os_not_supported {#os_not_supported} + +**Message**: This operating system is not supported + +--- + +### over_resource_limit {#over_resource_limit} + +**Message**: Workspace exceeded the maximum number of Run On Slack functions and/or app datastores. + +--- + +### parameter_validation_failed {#parameter_validation_failed} + +**Message**: There were problems when validating the inputs against the function parameters. See API response for more details + +--- + +### process_interrupted {#process_interrupted} + +**Message**: The process received an interrupt signal + +--- + +### project_compilation_error {#project_compilation_error} + +**Message**: An error occurred while compiling your code + +--- + +### project_config_id_not_found {#project_config_id_not_found} + +**Message**: The "project_id" property is missing from the project-level configuration file + +--- + +### project_config_manifest_source_error {#project_config_manifest_source_error} + +**Message**: Project manifest source is not valid + +**Remediation**: Set 'manifest.source' to either "remote" or "local" in .slack/config.json +Read about manifest sourcing with the `slack manifest info --help` command + +--- + +### project_file_update_error {#project_file_update_error} + +**Message**: Failed to update project files + +--- + +### prompt_error {#prompt_error} + +**Message**: An error occurred while executing prompts + +--- + +### provider_not_found {#provider_not_found} + +**Message**: The provided provider_key is invalid + +--- + +### published_app_only {#published_app_only} + +**Message**: This action is only permitted for published app IDs + +--- + +### ratelimited {#ratelimited} + +**Message**: Too many calls in succession during a short period of time + +--- + +### request_id_or_app_id_is_required {#request_id_or_app_id_is_required} + +**Message**: Must include a request_id or app_id + +--- + +### restricted_plan_level {#restricted_plan_level} + +**Message**: Your Slack plan does not have access to the requested feature + +--- + +### runtime_not_supported {#runtime_not_supported} + +**Message**: The SDK language's executable (deno, node, python, etc) was not found to be installed on the system + +--- + +### sample_create_error {#sample_create_error} + +**Message**: Couldn't create app from sample + +--- + +### scopes_exceed_app_config {#scopes_exceed_app_config} + +**Message**: Scopes requested exceed app configuration + +--- + +### sdk_config_load_error {#sdk_config_load_error} + +**Message**: There was an error while reading the Slack hooks file (`.slack/hooks.json`) or running the `get-hooks` hook + +**Remediation**: Run `slack doctor` to check that your system dependencies are up-to-date. + +--- + +### sdk_hook_get_trigger_not_found {#sdk_hook_get_trigger_not_found} + +**Message**: The `get-trigger` hook script in `.slack/hooks.json` was not found + +**Remediation**: Try defining your trigger by specifying a json file instead. + +--- + +### sdk_hook_invocation_failed {#sdk_hook_invocation_failed} + +**Message**: A script hook defined in the Slack Configuration file (`.slack/hooks.json`) returned an error + +**Remediation**: Run `slack doctor` to check that your system dependencies are up-to-date. + +--- + +### sdk_hook_not_found {#sdk_hook_not_found} + +**Message**: A script in .slack/hooks.json was not found + +**Remediation**: Hook scripts are defined in the Slack hooks file ('.slack/hooks.json'). +Every app requires a Slack hooks file and you can find a working example at: + +https://github.com/slack-samples/deno-starter-template/blob/main/.slack/hooks.json + +After creating the hooks file, you must install related hook dependencies. + +--- + +### service_limits_exceeded {#service_limits_exceeded} + +**Message**: Your workspace has exhausted the 10 apps limit for free teams. To create more apps, upgrade your Slack plan at https://my.slack.com/plans + +--- + +### shared_channel_denied {#shared_channel_denied} + +**Message**: The team admin does not allow shared channels to be named_entities + +--- + +### slack_auth_error {#slack_auth_error} + +**Message**: You are not logged into a team or have not installed an app + +**Remediation**: Use the command `slack login` to login and `slack install` to install your app + +--- + +### slack_json_location_error {#slack_json_location_error} + +**Message**: The slack.json configuration file is deprecated + +**Remediation**: Next major version of the CLI will no longer support this configuration file. +Move the slack.json file to .slack/hooks.json and continue onwards. + +--- + +### slack_slack_json_location_error {#slack_slack_json_location_error} + +**Message**: The .slack/slack.json configuration file is deprecated + +**Remediation**: Next major version of the CLI will no longer support this configuration file. +Move the .slack/slack.json file to .slack/hooks.json and proceed again. + +--- + +### socket_connection_error {#socket_connection_error} + +**Message**: Couldn't connect to Slack over WebSocket + +--- + +### streaming_activity_logs_error {#streaming_activity_logs_error} + +**Message**: Failed to stream the most recent activity logs + +--- + +### survey_config_not_found {#survey_config_not_found} + +**Message**: Survey config not found + +--- + +### system_config_id_not_found {#system_config_id_not_found} + +**Message**: The "system_id" property is missing from the system-level configuration file + +--- + +### system_requirements_failed {#system_requirements_failed} + +**Message**: Couldn't verify all system requirements + +--- + +### team_access_not_granted {#team_access_not_granted} + +**Message**: There was an issue granting access to the team + +--- + +### team_flag_required {#team_flag_required} + +**Message**: The --team flag must be provided + +**Remediation**: Choose a specific team with ``--team `` or ``--team `` + +--- + +### team_list_error {#team_list_error} + +**Message**: Couldn't get a list of teams + +--- + +### team_not_connected {#team_not_connected} + +**Message**: One or more of the listed teams was not connected by org + +--- + +### team_not_found {#team_not_found} + +**Message**: Team could not be found + +--- + +### team_not_on_enterprise {#team_not_on_enterprise} + +**Message**: Cannot query team by domain because team is not on an enterprise + +--- + +### team_quota_exceeded {#team_quota_exceeded} + +**Message**: Total number of requests exceeded team quota + +--- + +### template_path_not_found {#template_path_not_found} + +**Message**: No template app was found at the provided path + +--- + +### token_expired {#token_expired} + +**Message**: Your access token has expired + +**Remediation**: Use the command `slack login` to authenticate again + +--- + +### token_revoked {#token_revoked} + +**Message**: Your token has already been revoked + +**Remediation**: Use the command `slack login` to authenticate again + +--- + +### token_rotation_error {#token_rotation_error} + +**Message**: An error occurred while rotating your access token + +**Remediation**: Use the command `slack login` to authenticate again + +--- + +### too_many_customizable_inputs {#too_many_customizable_inputs} + +**Message**: Cannot have more than 10 customizable inputs + +--- + +### too_many_ids_provided {#too_many_ids_provided} + +**Message**: Ensure you provide only app_id OR request_id + +--- + +### too_many_named_entities {#too_many_named_entities} + +**Message**: Too many named entities passed into the trigger permissions setting + +--- + +### trigger_create_error {#trigger_create_error} + +**Message**: Couldn't create a trigger + +--- + +### trigger_delete_error {#trigger_delete_error} + +**Message**: Couldn't delete a trigger + +--- + +### trigger_does_not_exist {#trigger_does_not_exist} + +**Message**: The trigger provided does not exist + +--- + +### trigger_not_found {#trigger_not_found} + +**Message**: The specified trigger cannot be found + +--- + +### trigger_update_error {#trigger_update_error} + +**Message**: Couldn't update a trigger + +--- + +### unable_to_delete {#unable_to_delete} + +**Message**: There was an error deleting tokens + +--- + +### unable_to_open_file {#unable_to_open_file} + +**Message**: Error with file upload + +--- + +### unable_to_parse_json {#unable_to_parse_json} + +**Message**: `` Couldn't be parsed as a json object + +--- + +### uninstall_halted {#uninstall_halted} + +**Message**: The uninstall process was interrupted + +--- + +### unknown_file_type {#unknown_file_type} + +**Message**: Unknown file type, must be application/zip + +--- + +### unknown_function_id {#unknown_function_id} + +**Message**: The provided function_id was not found + +--- + +### unknown_method {#unknown_method} + +**Message**: The Slack API method does not exist or you do not have permissions to access it + +--- + +### unknown_webhook_schema_ref {#unknown_webhook_schema_ref} + +**Message**: Unable to find the corresponding type based on the schema ref + +--- + +### unknown_workflow_id {#unknown_workflow_id} + +**Message**: The provided workflow_id was not found for this app + +--- + +### unsupported_file_name {#unsupported_file_name} + +**Message**: File name is not supported + +--- + +### untrusted_source {#untrusted_source} + +**Message**: Source is by an unknown or untrusted author + +**Remediation**: Use --force flag or set trust_unknown_sources: true in config.json file to disable warning + +--- + +### user_already_owner {#user_already_owner} + +**Message**: The user is already an owner for this app + +--- + +### user_already_requested {#user_already_requested} + +**Message**: The user has a request pending for this app + +--- + +### user_cannot_manage_app {#user_cannot_manage_app} + +**Message**: You do not have permissions to install this app + +**Remediation**: Reach out to one of your App Managers to request permissions to install apps. + +--- + +### user_id_is_required {#user_id_is_required} + +**Message**: Must include a user_id to cancel request for an app with app_id + +--- + +### user_not_found {#user_not_found} + +**Message**: User cannot be found + +--- + +### user_removed_from_team {#user_removed_from_team} + +**Message**: User removed from team (generated) + +--- + +### workflow_not_found {#workflow_not_found} + +**Message**: Workflow not found + +--- + +### yaml_error {#yaml_error} + +**Message**: An error occurred while parsing the app manifest YAML file + +--- + +## Additional help + +These error codes might reference an error you've encountered, but not provide +enough details for a workaround. + +For more help, post to our issue tracker: https://github.com/slackapi/slack-cli/issues diff --git a/docs/reference/experiments.md b/docs/reference/experiments.md new file mode 100644 index 00000000..d758bc2f --- /dev/null +++ b/docs/reference/experiments.md @@ -0,0 +1,9 @@ +# Experiments + +The Slack CLI has an experiment flag, behind which we put features under development and may cause breaking changes. These features are fleeting and many will not work without a development instance, but are available for use "at your own risk." + +## Available experiments + +The following is a list of currently available experiments. We may remove an experiment once the feature is released. + +* `read-only-collaborators`: enables creating and modifying collaborator permissions via the `slack collaborator` commands. \ No newline at end of file diff --git a/docs/static/img/slack-cli-logo.svg b/docs/static/img/slack-cli-logo.svg deleted file mode 100644 index 3a69b774..00000000 --- a/docs/static/img/slack-cli-logo.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - CLI - - - \ No newline at end of file