Quickstart Guide
Get up and running with ctxsec in under 2 minutes.
1. Installation
One-Line Install Script
From Source (Go 1.24+)
git clone https://github.com/gosecio/ctxsec.git
cd ctxsec
CGO_ENABLED=0 go build -o bin/ctx ./cmd/ctx
sudo mv bin/ctx /usr/local/bin/ctx
Verify installation:
2. Initialize in Your Workspace
Run ctx init inside any repository to automatically detect your AI development environment (Antigravity, Cursor, Claude, or VS Code):
This generates:
- ctxsec.yaml: Project policy rules and role definitions.
- .agents/hooks.json: Lifecycle hook adapter for Antigravity and Claude Code.
3. Verify Local Kernel Sandbox
Test that ctxsec can enforce in-kernel isolation on your operating system:
# Inspect sandbox detection
ctx sandbox inspect
# Test a simulated sandboxed command
ctx exec --role=researcher -- bash -c "touch /tmp/malicious.txt"
Output:
[ctxsec:kernel] Enforcing Apple Seatbelt SBPL profile for role: researcher
touch: /tmp/malicious.txt: Operation not permitted
[ctxsec] Hardware syscall blocked: EPERM
4. Evaluate Security Policies
Run policy evaluations locally:
Next Steps
- Explore the Google CEL Hypervisor for declarative microsecond rule authoring.
- Learn how Apple Seatbelt & Linux bwrap enforce hardware-level syscall containment.
- Scaffold production-ready Go microservices with gosec.io or inspect the live platform at ctxsec.io.