Skip to main content

claude-gate

Gate Claude Code tool use behind approvals and control it remotely from your phone via Slack DMs.

What it does

  • Remote task execution — start a session from Slack, send a task as text, 🎙️ voice message, or 🖼️ image, confirm it with a button, and Claude Code runs it on your machine.
  • Interactive sessions — !start-session opens a back-and-forth conversation with Claude directly from Slack. Follow-up messages run instantly within the same session.
  • Session resume — !sessions lists your last 10 sessions with a Resume button on each. Pick up any previous conversation exactly where you left off.
  • Task approval — every task shows a confirmation card with Run Task / Cancel before anything executes. Nothing runs without your explicit approval.
  • Per-session model switching — switch between Fable, Opus, Sonnet, and Haiku mid-session with !model opus. Resets to default when the session ends.

Install

pipx install claude-gate

Setup

1. Create a Slack app

Run the guided setup to get the manifest and step-by-step instructions:

cg setup-slack

This prints the Slack app manifest and walks you through creating the app, installing it to your workspace, and copying the Bot Token (xoxb-...) and App Token (xapp-...).

2. Initialise your project

Run this from your project root:

cg init

This creates .claude/ with all hook scripts and settings, then prompts for your tokens.

3. Verify and start

cg doctor   # confirms tokens work
cg up       # starts the daemon (Ctrl+C to stop)
cg up -d    # or run it in the background

Slack commands

Command What it does
!start-session Open an interactive back-and-forth session
!end-session Close the interactive session
!sessions List last 10 sessions with Resume buttons
!help Show all available commands
!status Show what's running and elapsed time
!output [N] Dump the last N lines of output
!stop Kill the running task
!log Show the path to the full task log file
!revoke Revoke the "Allow All Session" flag early
!model Show the current model for this session
!model list List all available models
!model fable Switch to Fable 5 (claude-fable-5) for this session
!model opus Switch to Opus 5 (claude-opus-5) for this session
!model sonnet Switch to Sonnet 5 (claude-sonnet-5) for this session
!model haiku Switch to Haiku 4.5 (claude-haiku-4-5) for this session
!model reset Reset to default model (claude-sonnet-5)
🎙️ Voice message Transcribed via Whisper, confirmed via button (requires active session)
🖼️ Image(s) Saved to .claude/images/, caption becomes the task — confirmed via button (requires active session)

CLI reference

cg setup-slack     Print Slack app manifest and guided setup (start here)
cg init            Scaffold .claude/ and configure credentials
cg init --adopt    Existing .claude/ setup — just write .env
cg up              Start daemon in foreground
cg up -d           Start daemon detached (background)
cg down            Stop background daemon
cg status          Show daemon status and recent logs
cg logs [-f]       Tail activity and daemon logs
cg doctor          Verify tokens, deps, hook integrity
cg upgrade-hooks   Update hook files from package (backs up yours first)
cg remove          Remove claude-gate from the current project

Requirements

  • Python 3.10+
  • A Slack workspace where you can install apps
  • claude CLI installed and authenticated
  • notify-send for desktop notifications (optional — sudo apt install libnotify-bin on Linux, brew install terminal-notifier on Mac)
  • OpenAI API key for voice message transcription (optional — images work without it)

How it works

Claude Code runs hooks before every tool use. The hooks in .claude/hooks/ post an approval card to your Slack DM and wait for your response. The daemon (cg up) listens for incoming Slack messages and spawns claude --print subprocesses for remote tasks.

See CLAUDE.md for the full architecture.

License

MIT

Metadata

Release files for claude-gate 1.0.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for claude-gate 1.0.6
File Size Uploaded
claude_gate-1.0.6.tar.gz 31.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for claude-gate 1.0.6
File Interpreter ABI Platform
claude_gate-1.0.6-py3-none-any.whl Python 3 none any Details

Total release size: 64.2 kB

Release files / claude_gate-1.0.6.tar.gz

Download URL claude_gate-1.0.6.tar.gz
Size 31.0 kB
Tags Source
SHA-256 checksum
How to use checksums
9ed6df1dcdcddefb242119212151b33ba24c7a01c8e72e280f30505559630acd
BLAKE2b-256 checksum
How to use checksums
8a7f392f91e916964618a78d872f221b853cafe87b3c5def66622641d61420da
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.12

Release files / claude_gate-1.0.6-py3-none-any.whl

Download URL claude_gate-1.0.6-py3-none-any.whl
Size 33.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
919f3df06da014b07ddf8aed07bab6972348348b7d6f0bc627749f247924b79e
BLAKE2b-256 checksum
How to use checksums
c5a0a8ad0ab00432807256c556ce383b03c43f264cdf336192f73591a2f6c5bf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.12

Release history Release notifications | RSS feed

This release

1.0.6 This release

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page