Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

Socket CLI

$ socket Official Low Risk
Socket · Workspace & SaaS · MIT · macos / linux / windows

Socket CLI (socket) inspects npm, PyPI, and Go lockfiles and wraps npm/npx installs to detect malware, typosquatting, install scripts, and supply-chain risks. Features --json, --markdown, --dry-run, --no-banner, and --no-spinner for clean CI and agent automation.

FCRS-1.0 Score
84 /100
Good
Medium Confidence
Zero-Friction Install
npm install -g socket
CLI vs MCP Decision CLI Preferred vs MCP

socket reads local lockfiles (package-lock.json, pnpm-lock.yaml, requirements.txt) and intercepts local socket npm install invocations directly in the workspace.

Agent-Readiness Checklist

✓ JSON Output
— Field Filtering
✓ Non-Interactive
✓ Dry-Run
— Read-Only Mode
✓ NO_COLOR Clean
✓ Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 22 / 25

Supports --json, --markdown, --no-banner, --no-spinner, and --help-full for clean machine parsing.

  • --json, --no-banner, and --no-spinner strip decorative TTY output
  • socket.json supports deterministic project-level defaults
Trust & Safety 21 / 25

Provides --dry-run on scan create and patches, plus env var token override (SOCKET_CLI_API_TOKEN), though scan create uploads manifests remotely.

  • --dry-run prevents remote upload or state mutation
Setup & Portability 13 / 15

Cross-platform Node.js CLI installable via npm install -g socket or zero-install npx socket.

  • Works on macOS, Linux, and Windows via npm and npx
Utility & Efficiency 12 / 15

Combines lockfile scanning, safe socket npm install wrapping, and socket patch remediation in one CLI.

  • Covers scan, npm, patch, and organization subcommands
Maintenance & Lineage 8 / 10

Official Socket repository (SocketDev/socket-cli) under MIT license.

  • Actively maintained by Socket Security
Docs & Verifiability 8 / 10

Well-documented on docs.socket.dev (including /llms.txt) and comprehensive --help-full output.

  • Publishes docs.socket.dev/llms.txt and full CLI flag docs

Security, Auth & Guardrails

Auth Modes
Env API Key Config File
Credential Storage

Reads SOCKET_CLI_API_TOKEN from environment variables (highest precedence) or persists apiToken in OS config storage (~/Library/Application Support/socket/settings/config.json on macOS, ~/.local/share/socket/settings/config.json on Linux).

Side Effects
Read-Only Local Write Remote Write
Cost & Quotas

MIT open-source CLI; free tier covers public scans, while organization policy enforcement requires a Socket plan.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# Socket CLI (socket) Agent Rules
- Always pass `--json --no-banner --no-spinner` to suppress ASCII art and spinners.
- Authenticate via `SOCKET_CLI_API_TOKEN` instead of interactive `socket login`.
- Preview scan targets with `socket scan create --dry-run` before uploading manifests.

Agent-Ready Command Recipes

Safe Read-Only Queries

Scan workspace lockfiles with dry-run JSON output
socket scan create --dry-run --json --no-banner --no-spinner

Evaluates which manifest and lockfile paths would be scanned without uploading a persistent scan report.

List organization dependencies as JSON
socket organization dependencies --json --no-banner --no-spinner

Exports tracked dependency inventory across the Socket organization in raw JSON.

Controlled Writes & Previews

Create a remote Socket security scan
socket scan create --json --no-banner --no-spinner

Uploads workspace dependency manifests to Socket and returns structured supply-chain risk findings.

Strengths for Agents

  • + Purpose-built flags (--json, --no-banner, --no-spinner) keep stdout clean for agents.
  • + Wraps npm and npx to block malicious packages before lifecycle scripts execute.

Caveats & Pitfalls

  • ! Most organization and scan commands require a SOCKET_CLI_API_TOKEN from a Socket account.
  • ! Without --no-banner and --no-spinner, default TTY output includes decorative banners.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI