explaingit

helgesverre/swarm

Analysis updated 2026-08-04 · repo last pushed 2026-03-13

PHPAudience · developerComplexity · 3/5MaintainedLicenseSetup · moderate

TLDR

A terminal-based AI coding assistant written in PHP that takes plain-English requests, then reads, writes, and searches your project files to generate code or explain concepts using OpenAI's API.

Mindmap

mindmap
  root((repo))
    What it does
      Plain English requests
      Generates code files
      Explains concepts
      Searches codebase
    Tech stack
      PHP
      OpenAI API
      Terminal CLI
    Security
      Project dir access only
      Shell commands disabled
      Blocks private networks
    Use cases
      Scaffold controllers
      Search code patterns
      Fetch web docs
    Audience
      Terminal power users
      PHP developers

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Scaffold a new PHP controller file by describing it in plain English from your terminal.

USE CASE 2

Search your codebase for a specific pattern without leaving the command line.

USE CASE 3

Ask for a quick explanation of a programming concept and get a text response with examples.

USE CASE 4

Fetch documentation from a web page and have it summarized in context of your project.

What is it built with?

PHPOpenAI APICLI

How does it compare?

helgesverre/swarmabolix/bitcart-woocommerceanikchand461/anyonehere
Stars0
LanguagePHPPHPPHP
Last pushed2026-03-132024-04-08
MaintenanceMaintainedDormant
Setup difficultymoderatemoderateeasy
Complexity3/53/52/5
Audiencedeveloperpm founderdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Requires PHP 8.3 or higher and a paid OpenAI API key.

Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

In plain English

Swarm is an AI-powered coding assistant that runs in your terminal. You type requests in plain English, like "create a UserController.php file" or "explain dependency injection", and it figures out what you need, whether that's generating actual code files, showing a code snippet, or just explaining a concept. It's essentially a chatbot that can read, write, and search through your project files. When you type a request, the agent first classifies what kind of help you're asking for. If you want a quick example or explanation, it just responds with text. If you need it to actually do something in your project, create a file, search your codebase, fetch a web page, it uses built-in tools to carry out the task. It remembers your last 20 messages of conversation, so you can ask follow-up questions without restating context. The whole thing runs through OpenAI's API, so you need an API key to use it. This would appeal to developers who spend a lot of time in the terminal and want quick help without switching to a browser or a full IDE. For example, you could ask it to scaffold a new controller, search your codebase for a specific pattern, or pull documentation from a web page, all from one command-line interface. It's worth noting that the project is written in PHP rather than the Python or TypeScript that most AI tools use, which makes it a relatively uncommon choice in this space. Security is built in thoughtfully. File access is restricted to your project directory by default, with protections against path traversal attacks. Shell command execution is disabled out of the box and must be explicitly turned on. The web-fetching tool blocks access to private and local network addresses. These guardrails matter because the agent can read and write files on your machine, so the constraints help prevent accidental damage. The project is labeled work-in-progress, requires PHP 8.3 or higher, and is open source under the MIT license.

Copy-paste prompts

Prompt 1
I have a Laravel project. Use the Swarm CLI to scaffold a UserController.php with RESTful methods for listing, creating, updating, and deleting users.
Prompt 2
Using Swarm, search my codebase for all places where we use the deprecated `array_walk` function and list the file paths and line numbers.
Prompt 3
Explain dependency injection to me using Swarm, and show a PHP code snippet demonstrating constructor injection in a controller.
Prompt 4
Set up Swarm on my machine, I have PHP 8.3 installed. Walk me through getting an OpenAI API key, configuring it, and running my first command to create a simple HelloWorld.php file.

Frequently asked questions

What is swarm?

A terminal-based AI coding assistant written in PHP that takes plain-English requests, then reads, writes, and searches your project files to generate code or explain concepts using OpenAI's API.

What language is swarm written in?

Mainly PHP. The stack also includes PHP, OpenAI API, CLI.

Is swarm actively maintained?

Maintained — commit in last 6 months (last push 2026-03-13).

What license does swarm use?

Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

How hard is swarm to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is swarm for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.