---
title: "llm-self-defense vs llm"
type: "comparison"
canonical_url: "https://www.graphcanon.com/compare/poloclub-llm-self-defense-vs-simonw-llm"
tools: ["poloclub-llm-self-defense", "simonw-llm"]
---

# llm-self-defense vs llm

*GraphCanon updated Jul 12, 2026*

## Verdict

Pick llm-self-defense when license: llm-self-defense is BSD-3-Clause, llm is Apache-2.0; pick llm when license: llm is Apache-2.0, llm-self-defense is BSD-3-Clause.

[llm-self-defense](https://github.com/poloclub/llm-self-defense) reports 52 GitHub stars, 7 forks, and 7 open issues, last pushed May 21, 2024. [llm](https://llm.datasette.io) has 12k stars, 920 forks, and 645 open issues, last pushed Jul 9, 2026. Figures are from public GitHub metadata via [llm-self-defense's repository](https://github.com/poloclub/llm-self-defense) and [llm's repository](https://github.com/simonw/llm).

| | [llm-self-defense](/tools/poloclub-llm-self-defense.md) | [llm](/tools/simonw-llm.md) |
| --- | --- | --- |
| Tagline | LLM Self Defense: By Self Examination, LLMs know they are being tricked | Access large language models from the command-line |
| Stars | 52 | 12,172 |
| Forks | 7 | 920 |
| Open issues | 7 | 645 |
| Language | Python | Python |
| Adopt for | - | Decision-critical facts for 'llm' |
| Persona | - | - |
| Runtime | - | - |
| License | BSD-3-Clause | Apache-2.0 |
| Categories | Developer Tools, Inference & Serving, LLM Frameworks | Inference & Serving, LLM Frameworks |

## Trust and health

_Sourced signals - not a safety guarantee. No winner column._

| | [llm-self-defense](/tools/poloclub-llm-self-defense.md) | [llm](/tools/simonw-llm.md) |
| --- | --- | --- |
| Maintenance | Dormant (18%) | Very active (96%) |
| Days since push | 781d | 1d |
| Open issues (now) | 7 | 645 |
| Owner type | Organization | User |
| Security scan | 157 low (157 low) | No lockfile |
| Full report | [trust report](/tools/poloclub-llm-self-defense/trust.md) | [trust report](/tools/simonw-llm/trust.md) |

## Shared compatibility

- **Python**: [llm-self-defense](/tools/poloclub-llm-self-defense.md) - Python runtime; [llm](/tools/simonw-llm.md) - Python runtime

## Decision facts: llm

- **Requirements:** - Installation supports multiple methods including `pip`, Homebrew (with caveats noted), `pipx`, and `uv`.; - Requires an OpenAI API key for certain functionalities.
- **Adopt for:** Decision-critical facts for 'llm'
- **License detail:** Apache-2.0

## Choose when

### Choose llm-self-defense if…

- License: llm-self-defense is BSD-3-Clause, llm is Apache-2.0.
- Tags unique to llm-self-defense: python.
- Also covers Developer Tools.

### Choose llm if…

- License: llm is Apache-2.0, llm-self-defense is BSD-3-Clause.
- Requirements: - Installation supports multiple methods including `pip`, Homebrew (with caveats noted), `pipx`, and `uv`.; - Requires an OpenAI API key for certain functionalities..
- Tags unique to llm: ai, llms, openai.
- - You prioritize command-line interaction over graphical interfaces, as llm is designed to provide a seamless CLI experience with multiple installation methods.

## When NOT to use llm-self-defense

- Last GitHub push was 782 days ago (dormant maintenance, May 21, 2024). Validate activity before betting a new project on llm-self-defense.
- Developer Tools: A gateway is overkill when you're pinned to a single provider and model.
- Inference & Serving: Self-hosting rarely beats a hosted API on cost until you have steady, high-volume traffic.
- LLM Frameworks: Avoid a framework for a single prompt-and-retrieve call; the abstraction can cost more than it saves.

## When NOT to use llm

- - If you require real-time visual feedback or a graphical interface for interacting with language models, as llm is strictly command-line-based.
- - If your primary focus is on model training rather than inference or serving, since llm is aimed at accessing and using pre-trained models.

## Common questions

### What is the difference between llm-self-defense and llm?

llm-self-defense: LLM Self Defense: By Self Examination, LLMs know they are being tricked. llm: Access large language models from the command-line. See the comparison table for live GitHub stats and shared categories.

### When should I choose llm-self-defense over llm?

Choose llm-self-defense over llm when License: llm-self-defense is BSD-3-Clause, llm is Apache-2.0; Tags unique to llm-self-defense: python; Also covers Developer Tools.

### When should I choose llm over llm-self-defense?

Choose llm over llm-self-defense when License: llm is Apache-2.0, llm-self-defense is BSD-3-Clause; Requirements: - Installation supports multiple methods including `pip`, Homebrew (with caveats noted), `pipx`, and `uv`.; - Requires an OpenAI API key for certain functionalities.; Tags unique to llm: ai, llms, openai; - You prioritize command-line interaction over graphical interfaces, as llm is designed to provide a seamless CLI experience with multiple installation methods.

### When should I avoid llm-self-defense?

Last GitHub push was 782 days ago (dormant maintenance, May 21, 2024). Validate activity before betting a new project on llm-self-defense. Developer Tools: A gateway is overkill when you're pinned to a single provider and model. Inference & Serving: Self-hosting rarely beats a hosted API on cost until you have steady, high-volume traffic. LLM Frameworks: Avoid a framework for a single prompt-and-retrieve call; the abstraction can cost more than it saves.

### When should I avoid llm?

- If you require real-time visual feedback or a graphical interface for interacting with language models, as llm is strictly command-line-based. - If your primary focus is on model training rather than inference or serving, since llm is aimed at accessing and using pre-trained models.

### Is llm-self-defense or llm more popular on GitHub?

llm has more GitHub stars (12,172 vs 52). Stars measure visibility, not whether either tool fits your constraints.

### Are llm-self-defense and llm open source?

Yes - both are open-source projects on GitHub (llm-self-defense: BSD-3-Clause, llm: Apache-2.0).

### Where can I find alternatives to llm-self-defense or llm?

GraphCanon lists graph-backed alternatives at [llm-self-defense alternatives](/tools/poloclub-llm-self-defense/alternatives) and [llm alternatives](/tools/simonw-llm/alternatives) ([llm-self-defense markdown twin](/tools/poloclub-llm-self-defense/alternatives.md), [llm markdown twin](/tools/simonw-llm/alternatives.md)), ranked by typed relationship edges rather than popularity votes.

### Is there a machine-readable version of this comparison?

Yes. The markdown twin at [this comparison](/compare/poloclub-llm-self-defense-vs-simonw-llm.md) mirrors this page for agents and LLM crawlers, with the same stats table and FAQ answers.

### Which is better maintained, llm-self-defense or llm?

llm-self-defense: Dormant. llm: Very active. Compare maintenance labels, days since push, and release cadence in the trust section below - stars alone do not measure maintenance.

### Where are the full trust reports for llm-self-defense and llm?

GraphCanon publishes per-repo trust reports with dated maintenance, provenance, and scan summaries: [llm-self-defense trust report](/tools/poloclub-llm-self-defense/trust); [llm trust report](/tools/simonw-llm/trust).

---

**Machine-readable endpoints**

- JSON: [`/api/graphcanon/graph?tool=poloclub-llm-self-defense`](/api/graphcanon/graph?tool=poloclub-llm-self-defense)
- LLM index: [/llms.txt](/llms.txt)
- Full corpus: [/llms-full.txt](/llms-full.txt)

_GraphCanon - The knowledge graph for AI development. https://www.graphcanon.com/_
