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 cursorSubcommands
setup claude-code
Installs Security Layer hooks into ~/.claude/hooks.json.
PreToolUse hooks (evaluated before the tool runs):
Bash— Shell command executionWrite— File creationEdit— File modificationWebFetch— URL fetchingNotebookEdit— Jupyter notebook edits
PostToolUse hooks (run after the tool completes):
Bash— Track command execution contextRead— Track file reads for taint elevationWebFetch— 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 enableExit codes: Always 0.
See also
- Claude Code integration
- Cursor integration
- hook — The hook handler