npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

screeps-bot-hivemind

v3.0.0

Published

Welcome to Hivemind, an open-source AI bot designed to autonomously operate within the universe of the game [screeps](https://screeps.com). Hivemind is built for both private and official servers, serving as decent bot-opponents on your private servers, o

Readme

Hivemind: An Advanced AI Bot for Screeps

Welcome to Hivemind, an open-source AI bot designed to autonomously operate within the universe of the game screeps. Hivemind is built for both private and official servers, serving as decent bot-opponents on your private servers, or as a solid base for developing your own screeps bot.

Code Climate

Table of Contents

Project Overview

Hivemind was originally developed as a fully automated bot on the official screeps servers with the intention of serving as a capable sparring partner on private servers.

It is intended to be used without interaction, but the bot's behaviour can be customized through an array of settings. There's also a limited pallette of commands for manual interaction.

Getting Started

Prerequisites

  • Node.js (version 16), use nvm or something similar to downgrade if necessary
  • A screeps account
  • An active screeps API key, if you want to push code directly

Installation

Installing as a private server bot

Your best bet for finding up-to-date information on setting up a private server with custom bots is checking the pinned messages in the #servers channel of the official screeps discord. In general, once you have a private server set up, you should be able to add screeps-bot-hivemind as an npm dependency, add it to your server's configuration file, and then spawn in the bot using the screeps private server CLI.

Building from source

  1. Clone the Repository:

    git clone https://github.com/Mirroar/hivemind.git
    cd hivemind
  2. Install Dependencies:

    npm install
  3. Set up files intended for customization:

    cp settings.local.example.ts src/settings.local.ts
    cp relations.local.example.ts src/relations.local.ts
  4. Transpile TypeScript to JavaScript:

    rollup -c
  5. Deploy: You can copy the files from the dist directory to the server using the screeps game client.

    Alternatively, you can push the code using grunt (requires copying Gruntfile.example.js to Gruntfile.cjs and adding your account information):

    grunt screeps --gruntfile Gruntfile.cjs

Features

Capabilities

  • Resource Management: Automatically scout, mine, and defend energy sources.
  • Expansion: Capable of expanding into new suitable rooms.
  • Construction: Manages structure planning and building.
  • Boosts: Harvests, distributes and processes minerals into boosts.
  • Commodities: Harvests and processes commodities from highway rooms.
  • Power: Harvests and processes power from highways rooms.
  • Power Creeps: Creates, upgrades, spawns and manages operator power creeps to help with economy.
  • Economy: Dynamically trades resources on the market.

Limitations

  • Combat: Does not automatically attack other players' rooms.
  • Defense: No handling of incoming nukes.
  • Economy: No automatic mineral mining from source keeper rooms.

Reasoning

If you're just starting out with screeps, you're probably better off trying to write your own bot instead of using a developed bot such as this one as a base. Much of the game's fun comes from figuring out solutions and then watching your code run like a (more or less) well-oiled machine.

There is also a general dislike with "non coding players" (NCPs) in the screeps community. The term describes players that only download and run open-source bots without modification, thus not actually "playing" the game, since most of the game revolves around writing your own code.

Because of this, Hivemind is released with limited combat capabilities, so it can be killed by players that invested time into writing their own code. Otherwise the optimal way to play would be downloading open-source bots like this one, and soon most people would just be using the same bot. Don't be surprised if players around you act agressively, especially if you're using an open-source bot.

If you want to have the ability to stand up against other strong players, you will need to write better combat code yourself.

Customization

To adjust the bot's behavior to your liking, you may copy settings.local.example.ts to src/settings.local.ts and override any of the settings from src/settings.default.ts.

Customize diplomatic relations by copying relations.local.example.ts to src/relations.local.ts and adjusting it to your needs.

Manual interaction

Take a look at snippets.js for common console commands you might want to use when running this bot.

Contributing

Contributions are welcome! Please check out our issues tracker for more information on how you can contribute.

License

Hivemind is released under the MIT License. See the LICENSE file for more details.

Troubleshooting

If you encounter issues, feel free to create an issue or post your questions to the #hivemind channel in the official screeps discord.