JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 83
  • Score
    100M100P100Q85714F
  • License MIT

Set up Haystack verification for your project

Package Exports

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@haystackeditor/cli) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    @haystackeditor/cli

    Set up Haystack verification for your project. When PRs are opened, an AI agent spins up your app in a sandbox and verifies changes work correctly.

    Quick Start

    npx @haystackeditor/cli init

    This auto-detects your framework, package manager, and ports, then creates:

    • .haystack.yml - Configuration for the verification agent
    • .agents/skills/haystack.md - Skill file for AI agent discovery

    Commands

    haystack init

    Interactive setup wizard:

    npx @haystackeditor/cli init       # Interactive wizard
    npx @haystackeditor/cli init -y    # Accept all defaults

    haystack status

    Check if your project is configured:

    npx @haystackeditor/cli status

    haystack login

    Authenticate with GitHub (required for secrets management):

    npx @haystackeditor/cli login

    This uses GitHub's device flow - you'll get a code to enter at github.com/login/device.

    # Log out (removes stored credentials)
    npx @haystackeditor/cli logout

    haystack secrets

    Manage secrets that will be injected into your sandbox environment:

    # List all secrets (keys only, values are never shown)
    npx @haystackeditor/cli secrets list
    
    # Set a secret
    npx @haystackeditor/cli secrets set OPENAI_API_KEY sk-xxx
    
    # Delete a secret
    npx @haystackeditor/cli secrets delete OPENAI_API_KEY

    Secrets are encrypted and stored securely. They're automatically injected as environment variables when the sandbox runs your app.

    Scopes: By default, secrets are user-scoped. You can also scope to an org or repo:

    # Org-scoped (available to all repos in the org)
    npx @haystackeditor/cli secrets set API_KEY xxx --scope org --scope-id myorg
    
    # Repo-scoped (available only to this repo)
    npx @haystackeditor/cli secrets set API_KEY xxx --scope repo --scope-id owner/repo

    Configuration

    The init command creates .haystack.yml:

    version: "1"
    name: my-app
    
    dev_server:
      command: pnpm dev
      port: 3000
      ready_pattern: "Local:"
      env:
        SKIP_AUTH: "true"
    
    verification:
      commands:
        - name: build
          run: pnpm build
        - name: lint
          run: pnpm lint

    Customizing After Init

    If your app has... Add this
    Login/authentication Auth bypass env var in dev_server.env
    Key user journeys Flows describing what to verify
    API calls needing auth Fixtures to mock responses

    See the generated .agents/skills/haystack.md for full documentation on flows, fixtures, and monorepo configuration.

    How It Works

    1. You run npx @haystackeditor/cli init and commit the config
    2. When a PR is opened, Haystack's AI agent:
      • Spins up your app in a Modal sandbox
      • Reads the flows to understand what to verify
      • Navigates the app autonomously
      • Captures screenshots and evidence
      • Reports results on the PR

    License

    MIT