sentinelayer-cli

raw JSON →
0.8.11 verified Mon Apr 27 auth: no javascript

CLI tool for scaffolding Sentinelayer spec/prompt/guide artifacts and bootstrapping SENTINELAYER_TOKEN via browser auth. Current stable version 0.8.11. Release cadence is high (multiple releases per week). Key differentiators: non-interactive CI mode, BYOK token mode, GitHub auth integration, and multi-command support (auth, scan, omargate, audit). Requires Node.js ^20.0.0 or ^22.0.0. Compatible with Windows via 'sentinelayer-cli' binary due to 'sl' alias conflict with PowerShell's Set-Location. Includes compatibility aliases: create-sentinelayer, sentinel, sl.

error Error: 'sl' is not recognized as an internal or external command, operable program or batch file.
cause On Windows, 'sl' is a built-in PowerShell alias for Set-Location. Running 'sl' from cmd.exe or PowerShell with the alias may fail.
fix
Use 'sentinelayer-cli' or 'slc' instead of 'sl' on Windows. Or run 'sl' in a context where the package's binary is preferred.
error Error: The engine "node" is incompatible with this module. Expected version "^20.0.0 || ^22.0.0". Got "18.x.x"
cause Node.js version is too old. Package requires Node.js >=20.0.0 or >=22.0.0.
fix
Upgrade Node.js using nvm, fnm, or download from nodejs.org. Run: nvm install 20.
error Error: Non-interactive mode requires SENTINELAYER_CLI_INTERVIEW_JSON environment variable to be set.
cause The --non-interactive flag was provided but the environment variable is missing.
fix
Set SENTINELAYER_CLI_INTERVIEW_JSON with a valid JSON string before running the command.
error Error: Failed to open browser for auth. Could not find browser.
cause The CLI tries to open a browser for auth but cannot detect one in the environment (e.g., headless CI).
fix
Use --skip-browser-open flag when running in headless CI. If managed auth needed, ensure a browser is available or use BYOK mode.
error Error: GitHub CLI not found. Please install 'gh' and login.
cause The injectSecret feature requires gh CLI to set secrets, but it's not installed.
fix
Install GitHub CLI from https://cli.github.com/ and authenticate with 'gh auth login'.
breaking Windows PowerShell 'sl' alias conflicts with built-in Set-Location. Using 'sl' will run Set-Location instead of sentinelayer-cli.
fix Use 'sentinelayer-cli' or 'slc' alias instead of 'sl' on Windows PowerShell.
breaking Node.js engine requirement: ^20.0.0 || ^22.0.0. Older versions (e.g. 18.x) are unsupported and may throw engine check errors.
fix Upgrade Node.js to v20 or v22, or use npx with an explicit Node version manager.
deprecated Legacy binary 'create-sentinelayer' may be removed in future versions; use 'sentinelayer-cli' primary binary.
fix Switch to 'npx sentinelayer-cli@latest' instead of 'npx create-sentinelayer'.
gotcha In non-interactive mode, both SENTINELAYER_CLI_INTERVIEW_JSON and --non-interactive are required; missing either reverts to interactive prompts.
fix Set the environment variable and pass the --non-interactive flag. Also use --skip-browser-open in headless CI.
gotcha Token injection to GitHub Actions secrets requires 'gh' CLI installed and authenticated. May fail silently if gh is missing.
fix Ensure GitHub CLI (gh) is installed and logged in (gh auth login) before running with injectSecret:true.
breaking Agent leave events: prior to v0.8.11, CLI processes exiting via SIGINT/SIGTERM/crash did not emit 'agent_leave', causing dashboard to show stale agents as active.
fix Upgrade to v0.8.11 or later. The fix added process-local tracking and flush handlers.
npm install sentinelayer-cli
yarn add sentinelayer-cli
pnpm add sentinelayer-cli

Scaffold a new project with sentinelayer-cli in interactive mode, then use non-interactive with environment variable for automation.

npx sentinelayer-cli@latest my-app
# Or with non-interactive JSON:
SENTINELAYER_CLI_INTERVIEW_JSON='{"projectName":"demo","projectDescription":"Secure code review bot","aiProvider":"openai","codingAgent":"copilot","authMode":"byok","generationMode":"detailed","audienceLevel":"developer","projectType":"greenfield","techStack":["TypeScript","Node.js"],"features":["auth"],"connectRepo":false,"injectSecret":false}' \
  npx sentinelayer-cli@latest demo --non-interactive --skip-browser-open