CLI commands

setup

Auto-setup for Claude Code, Cursor, and other integrations.


Automatically configures Security Layer integration with AI tools.

Usage

sl setup claude-code
sl setup cursor

Subcommands

setup claude-code

Installs Security Layer hooks into ~/.claude/hooks.json.

PreToolUse hooks (evaluated before the tool runs):

  • Bash — Shell command execution
  • Write — File creation
  • Edit — File modification
  • WebFetch — URL fetching
  • NotebookEdit — Jupyter notebook edits

PostToolUse hooks (run after the tool completes):

  • Bash — Track command execution context
  • Read — Track file reads for taint elevation
  • WebFetch — Track web content fetches for taint elevation

Each hook calls sl hook claude-code with the appropriate flags.

Exit codes: 0 on success or if Claude Code is not found.

setup cursor

Provides instructions for protecting Cursor. Native hook integration is planned for v1 — currently, use the shell shim:

sl shield enable

Exit codes: Always 0.

See also

On this page