Skip to content

lockieluke/safeeval

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

safeeval

Evaluate shell scripts safely using AI-powered analysis before execution

Installation

Install globally using npm:

npm install -g safeeval-sh

Or using Bun:

bun install -g safeeval-sh

Usage

safeeval <script-url>

Example

safeeval https://example.com/install.sh

Options

  • --skip-analysis - Skip security analysis and run the script directly (not recommended)

Example with skip analysis

safeeval https://example.com/install.sh --skip-analysis

Configuration

safeeval uses OpenRouter for script analysis. You need to set up your OpenRouter API key:

  1. Get an API key from OpenRouter
  2. Set the environment variable:
export OPENROUTER_API_KEY=sk-yourapikeyhere

Add this to your shell profile (.bashrc, .zshrc, etc.) to make it permanent.

Platform Support

safeeval currently supports:

  • macOS
  • Linux

Development

Install dependencies

bun install

Run locally

bun run src/index.ts <script-url>

Build executable

bun run build-exe

License

MIT

About

Run shell scripts from remote endpoints with confidence

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published