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

  • Remote task execution — start a session from Slack, send a task as text or 🎙️ voice message, 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.
  • Task approval — every task shows a confirmation card with Run Task / Cancel before anything executes. Nothing runs without your explicit approval.

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
!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
🎙️ Voice message Transcribed via Whisper, 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)
  • 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-1.0.2.tar.gz (27.0 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-1.0.2-py3-none-any.whl (29.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for claude_gate-1.0.2.tar.gz
Algorithm Hash digest
SHA256 0f6568630eedcd9d6b49ad240d147b1041067b877aa30ad289ea89cfe30d683f
MD5 96946cd25ef9d0ded26e7a6168c3064f
BLAKE2b-256 af77fba678bb3e7f37ea11a7eba958a6814e60527c3691e4a4b54168762f3759

See more details on using hashes here.

File details

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

File metadata

  • Download URL: claude_gate-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 29.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-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 988c3a70a5b1b62e9758d4e47736132c8cca207ef81ccbb50d08729e0daf4ac0
MD5 b8d86a79c7b8b208f6841f8599a84402
BLAKE2b-256 aced5e690413545495f5ff175e232da0d0e0c80edfb8ffe6c952f19d0bdb4e88

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