{"id":14983526,"url":"https://github.com/shipgirlproject/indomitable","last_synced_at":"2026-04-21T12:01:26.428Z","repository":{"id":37481077,"uuid":"502253291","full_name":"shipgirlproject/Indomitable","owner":"shipgirlproject","description":"A lightweight (the actual ship is heavy though),  performant, \u0026 powerful sharder for Discord.JS","archived":false,"fork":false,"pushed_at":"2025-01-04T03:53:29.000Z","size":664,"stargazers_count":34,"open_issues_count":1,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-28T19:26:22.897Z","etag":null,"topics":["cluster","clustering","discord","discordjs","fast","lightweight","shard","sharding"],"latest_commit_sha":null,"homepage":"http://shipgirl.moe/Indomitable/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shipgirlproject.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-06-11T04:55:12.000Z","updated_at":"2025-05-10T09:45:11.000Z","dependencies_parsed_at":"2023-02-12T15:45:45.997Z","dependency_job_id":"716937b4-7826-4923-ae3e-df9404fc1a81","html_url":"https://github.com/shipgirlproject/Indomitable","commit_stats":{"total_commits":259,"total_committers":3,"mean_commits":86.33333333333333,"dds":"0.21235521235521237","last_synced_commit":"5075657d015d5588235f601a2963a428f5700c41"},"previous_names":["shipgirlproject/indomitable","deivu/indomitable"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/shipgirlproject/Indomitable","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shipgirlproject%2FIndomitable","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shipgirlproject%2FIndomitable/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shipgirlproject%2FIndomitable/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shipgirlproject%2FIndomitable/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shipgirlproject","download_url":"https://codeload.github.com/shipgirlproject/Indomitable/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shipgirlproject%2FIndomitable/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32091053,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-21T11:25:29.218Z","status":"ssl_error","status_checked_at":"2026-04-21T11:25:28.499Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cluster","clustering","discord","discordjs","fast","lightweight","shard","sharding"],"created_at":"2024-09-24T14:07:20.117Z","updated_at":"2026-04-21T12:01:26.405Z","avatar_url":"https://github.com/shipgirlproject.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Indomitable\n\n\u003e A lightweight (the actual ship is heavy though), performant, and powerful sharder for Discord.JS\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://cdn.donmai.us/original/9b/cf/__indomitable_azur_lane_drawn_by_kincora__9bcf19b2f822ce75ea707e5047882d6a.png\"\u003e \n\u003c/p\u003e\n\n\u003e The ShipGirl Project; ⓒ Azur Lane\n\n## Features\n\n- Fast\n\n- Lightweight\n\n- Reliable\n\n- ESM \u0026 CommonJS supported\n\n- Shard Concurrency Support\n\n- Easy to use promised based IPC\n\n- No dependencies\n\n- Very cute (and lazy)\n\n## Used in prod by the ff:\n\n\u003e Chip (https://chipbot.gg/)\n\n\u003e Kashima (https://kashima.saya.moe/)\n\n\u003e Or add your own!\n\n## Installation\n\n- Stable\n\n\u003e `npm install indomitable`\n\n- Dev\n\n\u003e `npm install https://github.com/Deivu/Indomitable.git#master`\n\n## Documentation\n\n🔗 https://indomitable.shipgirl.moe/\n\n\u003e Don't forget to read my \"Notes\" below!\n\n## Example Usage\n\n\u003e Basic usage\n\n```js\nconst { Indomitable } = require(\"indomitable\");\nconst { Client } = require(\"discord.js\");\nconst token = \"your_token\";\n\nconst manager = new Indomitable({ client: Client, token }).on(\n  \"error\",\n  console.error\n);\n\nmanager.spawn();\n```\n\n\u003e Basic usage with more Indomitable Options\n\n```js\nconst { Indomitable } = require(\"indomitable\");\nconst { Client } = require(\"discord.js\");\nconst token = \"your_token\";\n\nconst options = {\n  // Processes to run\n  clusterCount: 2,\n  // Websocket shards to run\n  shardCount: 8,\n  // Discord.js options\n  clientOptions: {\n    intents: [1 \u003c\u003c 0], // Bitwise for GUILD intent only\n  },\n  // Auto restart processes that have been killed\n  // This defaults to false by default unless you specify it\n  autoRestart: true,\n  // Discord.js client\n  client: Client,\n  // Your bot token\n  token,\n};\n\nconst manager = new Indomitable(options).on(\"error\", console.error);\n\nmanager.spawn();\n```\n\n\u003e Broadcasteval as one way to get data across shards\n\n```js\n// Saya's note:\n// Not recommended as every broadcastEval uses eval() internally\n// Consider learning the ipc system of this library in future to get data across your clusters\nclient.shard\n  .broadcastEval((client) =\u003e client.guilds.cache.size)\n  .then(console.log);\n```\n\n\u003e Example of a very basic ipc communication (non repliable)\n\n```js\n// Primary Process\nindomitable.on(\"message\", (message) =\u003e {\n  if (message.content.op === \"something\") {\n    doSomething();\n  }\n});\n// ClientWorker Process (your client most likely)\nclient.shard.send({ content: { op: \"something\" } }).catch(console.error);\n```\n\n\u003e Example of a very basic ipc communication (repliable)\n\n```js\n// Primary Process\nindomitable.on(\"message\", (message) =\u003e {\n  if (message.content.op === \"something\") {\n    if (!message.repliable) return; // check if the message is repliable just incase, though it won't error even it is not\n    const someValue = doSomething();\n    message.reply(someValue);\n  }\n});\n// ClientWorker Process (your client most likely)\nclient.shard\n  .send({ content: { op: \"something\" }, repliable: true })\n  .then(console.log)\n  .catch(console.error);\n```\n\n\u003e You could also do it reversely (main process asking data from clusters instead of clusters asking main process)\n\n```js\n// Primary Process\n// send to specific cluster\nindomitable.send(0, { content: { op: \"nya\" } }).catch(console.error);\n// send to specific cluster with repliable\nindomitable\n  .send(0, { content: { op: \"something\" }, repliable: true })\n  .then(console.log)\n  .catch(console.error);\n// broadcast to all clusters\nindomitable.broadcast({ content: { op: \"meow\" } }).catch(console.error);\n// broadcast to all clusters with repliable is possible as well\nindomitable\n  .broadcast({ content: { op: \"meow\" }, repliable: true })\n  .then(console.log)\n  .catch(console.error);\n\n// ClientWorker Process (your client most likely)\nclient.shard.on(\"message\", (message) =\u003e {\n  if (message.content.op === \"something\") {\n    if (!message.repliable) return;\n    const someValue = doSomething();\n    message.reply(someValue);\n  }\n  if (message.content.op === \"nya\") {\n    doSomething();\n  }\n  if (message.content.op === \"meow\") {\n    if (!message.repliable) return;\n    message.reply(\"nya\");\n  }\n});\n```\n\n\u003e Reconfiguring Indomitable on the go, to launch more clusters or more shard, or more on both\n\n```js\n// Reconfigure to launch more shards based on Discord Recommendation without spawning more clusters\nindomitable\n  .reconfigure()\n  .then(() =\u003e console.log(\"Done, Indomitable is reconfigured\"));\n// Reconfigure to launch more clusters based on your value, but leave the shards based on Discord's recommendation\nindomitable\n  .reconfigure({ clusters: 8 })\n  .then(() =\u003e console.log(\"Done, Indomitable is reconfigured\"));\n// Reconfigure to launch more clusters or shards based on your values\nindomitable\n  .reconfigure({ clusters: 8, shards: 8 })\n  .then(() =\u003e console.log(\"Done, Indomitable is reconfigured\"));\n// Do not run restart() or restartAll() while this is running. It will cause your cluster / clusters to restart twice.\nif (!indomitable.isBusy) indomitable.restartAll();\n// Do not use reconfigure for just restarting all clusters sequentially, still use .restartAll() for that\nindomitable.restartAll();\n```\n\n\u003e Enabling concurrency handling (across all your shards) (Read Notes Below)\n\n```js\nconst { Indomitable } = require(\"indomitable\");\nconst { Client } = require(\"discord.js\");\nconst token = \"your_token\";\n\nconst options = {\n  // Processes to run\n  clusterCount: 2,\n  // Websocket shards to run\n  shardCount: 8,\n  // Discord.js options\n  clientOptions: {\n    intents: [1 \u003c\u003c 0], // Bitwise for GUILD intent only\n  },\n  // Auto restart processes that have been killed\n  // This defaults to false by default unless you specify it\n  autoRestart: true,\n  // Enable max concurrency handling\n  handleConcurrency: true,\n  // Your Discord.js client\n  client: Client,\n  // Your bot token\n  token,\n};\n\nconst manager = new Indomitable(options).on(\"error\", console.error);\n\nmanager.spawn();\n```\n\n- Indomitable's concurrency handling will work in **any shard # and cluster #** regardless\n\n- Pair this with **waitForReady** disabled, and you will get amazingly fast boot times, specially for those who have access to big bot sharding.\n\n- Reduces your identify calls by following global max_concurrency identifies resulting into better connection quality\n\n### Notes\n\n- You don't need to call `client.login('token');` yourself, Indomitable will call it for you.\n\n- Extended clients that extend from discord.js client will work, as long as you use `client.login('token');` to get your bot running\n\n- Your Discord.JS Client ShardClientUtil is replaced with Indomitable's ShardClientUtil. Refer to our docs for documentation 🔗 https://deivu.github.io/Indomitable/classes/client_ShardClientUtil.ShardClientUtil.html\n\n### Other Links\n\n[Support](https://discord.gg/FVqbtGu) (#Development)\n\n### Indomitable Options\n\n| Option            | Type             | Description                                                                  | Required | Default                                            |\n| ----------------- | ---------------- | ---------------------------------------------------------------------------- | -------- | -------------------------------------------------- |\n| clusterCount      | number or 'auto' | How many clusters we should spawn                                            | No       | 'auto'                                             |\n| shardCount        | number or 'auto' | How many websocket shards we should make                                     | No       | 'auto'                                             |\n| clientOptions     | Object           | Discord.JS Client Options                                                    | No       | {}                                                 |\n| clusterSettings   | Object           | Options for the forked process                                               | No       | {}                                                 |\n| ipcTimeout        | number           | Timeout before we fail a request                                             | No       | 30000                                              |\n| spawnTimeout      | number           | Timeout before we fail a cluster spawn                                       | No       | 60000 (multiplied by clusterShardCount internally) |\n| spawnDelay        | number           | Time to wait before spawning a new cluster                                   | No       | 5000                                               |\n| autoRestart       | boolean          | If you want to auto restart the shards that have been killed unintentionally | No       | false                                              |\n| waitForReady      | boolean          | If you want to wait for cluster ready before spawning another cluster        | No       | true                                               |\n| handleConcurrency | boolean          | Whether you want to handle shard concurrency properly                        | No       | false                                              |\n| client            | Client           | Your Discord.JS non modified OR modified client                              | Yes      | None                                               |\n| token             | string           | The token of your bot                                                        | Yes      | None                                               |\n\n### Made with ❤ by `@ichimakase` (https://github.com/Deivu/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshipgirlproject%2Findomitable","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshipgirlproject%2Findomitable","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshipgirlproject%2Findomitable/lists"}