QUICKSTART

Quickstart

Install, authorize, branch on the result, execute. Only PERMIT means execute. See the decision model →

  1. Install

    npm install trigguard
    pip install trigguard
  2. Run the demo

    No API key required.

    npx trigguard demo
  3. Create an organization

    One click in the console.

    Create organization

  4. Generate an API key

    Set TRIGGUARD_API_KEY for live authorize().

    Open console

  5. Authorize, branch, execute

    Execute only on PERMIT. Other outcomes: see the decision model →

    import { authorize } from "trigguard";
    
    const result = await authorize({
      surface: "deploy.release",
      actor: "my-service",
    });
    
    if (result.decision === "PERMIT") {
      await execute();
    }
    from trigguard import authorize
    
    result = authorize(
        surface="deploy.release",
        actor="my-service",
    )
    
    if result["decision"] == "PERMIT":
        execute()

    Need to validate a receipt? → Verification guide

Next steps