Skip to main content

Gate Claude Code tool use behind Slack approvals and enable remote task execution from your phone

Project description

claude-gate

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

What it does

  • Approval gate — every Bash, Write, or Edit action Claude takes pops up on your phone as a Slack button. Allow, block, or grant a 15-minute "allow all" session.
  • Remote task execution — send !run fix the login bug from Slack (or a voice message) and Claude Code runs it on your machine, streaming live progress back to you.
  • Interactive sessions!start-session opens a back-and-forth conversation with Claude directly from Slack.

Install

pipx install claude-gate

Setup

1. Create a Slack app

Use the included manifest for one-click setup:

  • Go to https://api.slack.com/apps → Create New App → From manifest
  • Paste the contents of slack-manifest.yaml (shown after cg init)
  • Install the app to your workspace and copy 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
!run <task> Run a Claude Code task (confirm via button)
!start-session Open an interactive back-and-forth session
!end-session Close the interactive session
!status Show what's running and elapsed time
!output [N] Dump the last N lines of output
!stop Kill the running task
!revoke Revoke the "Allow All Session" flag early
🎙️ Voice message Transcribed via Whisper, confirmed via button

CLI reference

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)

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)
  • OpenAI API key for voice message transcription (optional)

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

claude_gate-0.1.0.tar.gz (25.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

claude_gate-0.1.0-py3-none-any.whl (27.7 kB view details)

Uploaded Python 3

File details

Details for the file claude_gate-0.1.0.tar.gz.

File metadata

  • Download URL: claude_gate-0.1.0.tar.gz
  • Upload date:
  • Size: 25.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for claude_gate-0.1.0.tar.gz
Algorithm Hash digest
SHA256 fc6a7403c38c8f67d1ccead40c2c7c5740cd1dcc4b71e8eb89384e4608c7c87d
MD5 aa8f7bd865d79a1a71e112054c72a97f
BLAKE2b-256 7351a3e5e56368440153162897f7f87acea20ab5a2271b7cd69ed5ed1bc4ac32

See more details on using hashes here.

File details

Details for the file claude_gate-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: claude_gate-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 27.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for claude_gate-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ded044eaa2a2c07deb9dca09365558404d2bfece2ee12291da9ce5c67538d311
MD5 041e41538dd75e11fa90f6ca8cd0e806
BLAKE2b-256 f9a31e4a80c815f511e1c29c2969aed9ed9e194e8e89b51c464ca9d72d80b9c6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page