How do I get started?

main
2b706d3build(deps): bump golang.org/x/sys from 0.39.0 to 0.40.0 (#300)

how do i get started?

Avatar of Claude Opus 4.5Claude Opus 4.5commented

I'd be happy to help you get started with the slack-cli repository! Let me first explore the codebase to understand its structure and find any getting started documentation.

Let me also check out the Maintainers' Guide for building from source and explore the docs folder:

Let me get more details on building from source and check the Makefile:

Now I have a good overview! Here's how to get started with the Slack CLI:


##Getting Started with Slack CLI

###Option 1: Download a Pre-built Release (Easiest)

If you just want to use the CLI:

###Option 2: Build from Source (For Development)

####Prerequisites

  1. Install Go - Use the official installer. Check minimum version in go.mod
  2. Install golangci-lint (for linting):
    curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin
    

####Build Commands

# Initialize (fetch tags)
make init

# Build the CLI (runs lint, then compiles to ./bin/slack)
make build

# Run tests
make test

# Run linter only
make lint

After building, the binary is at ./bin/slack:

./bin/slack --help
./bin/slack [command] --help

###Project Structure

DirectoryPurpose
cmd/Commands - input/output processing
internal/Private packages with shared logic
bin/Build artifacts (compiled binary)
docs/Documentation and guides
scripts/Installation scripts
test/Test data and helpers

Would you like me to dive deeper into any specific area, like exploring the commands, the internal packages, or the documentation?

Avatar of Julian BenegasJulian Benegascommented

does this help me develop a slack app? should i use "bolt"? is this compatible with that? does this help me try out my slack app as i build it?

Avatar of Claude Opus 4.5Claude Opus 4.5commented

Great questions! Let me explore the codebase to understand how the CLI relates to Slack app development and Bolt.

Now I have a comprehensive picture. Let me summarize this for you:


##Yes! The Slack CLI absolutely helps you develop Slack apps!

###What the Slack CLI does for app development:

CommandPurpose
slack createScaffold a new Slack app from a template
slack runRun your app locally for development (hot-reload, watches for file changes)
slack deployDeploy your app to production
slack triggerCreate/manage triggers (events that invoke your app)
slack activityView logs and debug your running app
slack manifestManage your app's configuration

###Is it compatible with Bolt? Yes!

The CLI works with multiple frameworks:

  • Bolt for JavaScript (bolt-js)
  • Bolt for Python (bolt-python)
  • Deno Slack SDK

###Quick Start with Bolt:

# 1. Create a new app
slack create my-app

# 2. You'll be prompted to choose:
#    > Starter app
#    Then choose: Bolt for JavaScript or Bolt for Python

# 3. Enter your project folder
cd my-app

# 4. Run your app locally for development
slack run

The slack run command:

  • Starts a local development server
  • Uses Socket Mode to connect your local app to Slack's backend
  • Watches for file changes and reloads automatically
  • Shows you activity logs in real-time

###How it works under the hood:

When you run slack run, the CLI:

  1. Creates a Socket Mode WebSocket connection to Slack
  2. Routes events from Slack to your locally running app
  3. Lets you iterate quickly without deploying

###Templates available:

When you run slack create, you can pick from:

  • Starter app - Basic getting started template
  • Automation app - Custom steps and workflows
  • AI app - Slack agents & assistants
  • View more samples - Browse additional templates

The Bolt templates are cloned from:


TL;DR: The Slack CLI is your development companion for building Slack apps. It works great with Bolt (JS or Python), lets you run your app locally with slack run, and handles all the connection plumbing so you can focus on building your app.

Would you like me to dive deeper into any specific command or workflow?

Avatar of Julian BenegasJulian Benegascommented

this isn't compatible with vercel/next.js, right? like this would be hosted in slack's infra?

Avatar of Claude Opus 4.5Claude Opus 4.5commented

Great question! Let me dig into the deployment options and hosting to clarify this.

Now I have the full picture. Let me give you a clear answer:


##You're right to ask — there are two different hosting models here:

###1. Deno Slack SDK → Hosted on Slack's infrastructure

  • When you use slack deploy with a Deno app, it deploys to Slack's managed infrastructure
  • This is the "Run on Slack" model
  • You cannot host this on Vercel/Next.js — it's Slack's serverless runtime

###2. Bolt (JS/Python) → You host it yourself!

  • Bolt apps are self-hosted — you run them on your own infrastructure
  • This can work with Vercel, AWS, Heroku, your own server, etc.
  • The CLI helps with local development (slack run), but deployment is your responsibility

From the docs:

Types of SDKs:

  1. Slack Deno SDK - Run on Slack
  2. Bolt Frameworks (JavaScript, Python, and Java) - Remote using Slack's Bolt Framework
  3. No SDK at all - Run on Slack, Remote Self-Hosted

###So for Next.js/Vercel:

The Slack CLI is still useful for:

  • slack create — scaffolding a Bolt JS app
  • slack run — local development with Socket Mode (connects your local machine to Slack)
  • Managing your app manifest, triggers, auth, etc.

But for production, you'd:

  1. Build your Bolt JS app (potentially as API routes in Next.js)
  2. Deploy to Vercel yourself
  3. Configure your Slack app to point to your Vercel URL for webhooks/events

###The catch with Vercel/Next.js:

Bolt apps typically use either:

  • Socket Mode — persistent WebSocket connection (what slack run uses locally) — won't work on Vercel (serverless = no persistent connections)
  • HTTP Mode — receives events via HTTP POST to your endpoints — works great on Vercel

So yes, you can build a Slack app with Bolt JS and host it on Vercel, but you'd use HTTP mode for receiving events, not Socket Mode.


TL;DR:

  • Deno apps → Slack hosts them
  • Bolt apps → You host them (Vercel works, but use HTTP mode, not Socket Mode)
  • The CLI helps with both during development, but only "deploys" Deno apps to Slack's infra

Would you like me to look into the Bolt JS HTTP mode setup, or explore how the CLI could still help manage your self-hosted app?

Avatar of Julian BenegasJulian Benegascommented

cool, thanks


END OF POST

Log in to add a comment
Claude Opus 4.5
How do I get started? — slackapi/slack-cli