{"id":25838578,"url":"https://github.com/enriqcg/rcon-srcds","last_synced_at":"2025-03-01T03:51:53.930Z","repository":{"id":32695663,"uuid":"140160029","full_name":"EnriqCG/rcon-srcds","owner":"EnriqCG","description":"A zero-dependency Typescript library for the Source/Minecraft RCON Protocol","archived":false,"fork":false,"pushed_at":"2024-06-08T15:50:42.000Z","size":61,"stargazers_count":61,"open_issues_count":9,"forks_count":20,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-16T00:33:43.206Z","etag":null,"topics":["async-await","csgo-server","minecraft-server","nodejs","promise","rcon","rcon-client","rcon-protocol","typescript"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/rcon-srcds","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/EnriqCG.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":"2018-07-08T11:00:26.000Z","updated_at":"2024-09-23T23:36:01.000Z","dependencies_parsed_at":"2024-06-18T21:32:57.194Z","dependency_job_id":"ecf1eb35-c482-4188-8a56-f1b1765bb545","html_url":"https://github.com/EnriqCG/rcon-srcds","commit_stats":{"total_commits":26,"total_committers":7,"mean_commits":"3.7142857142857144","dds":0.5769230769230769,"last_synced_commit":"d603a8b81d148965ba2af4219948cf8086bc71f4"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EnriqCG%2Frcon-srcds","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EnriqCG%2Frcon-srcds/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EnriqCG%2Frcon-srcds/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EnriqCG%2Frcon-srcds/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EnriqCG","download_url":"https://codeload.github.com/EnriqCG/rcon-srcds/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241313171,"owners_count":19942418,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["async-await","csgo-server","minecraft-server","nodejs","promise","rcon","rcon-client","rcon-protocol","typescript"],"created_at":"2025-03-01T03:51:53.329Z","updated_at":"2025-03-01T03:51:53.920Z","avatar_url":"https://github.com/EnriqCG.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RCON library for NodeJS\n[According to Valve's RCON specification](https://developer.valvesoftware.com/wiki/Source_RCON_Protocol)\n\n## Install\n```console\nnpm install rcon-srcds --save\n```\n\n## Usage\n```typescript\n// ES5 import\nconst server = new Rcon(options);\n\n// ES5+ import\nimport Rcon from 'rcon-srcds';\n```\n\n### Options\nThese are the default values.\n```typescript\n{\n    host: '127.0.0.1',          // Host\n    port: 27015,                // Port\n    maximumPacketSize: 0,       // Maximum packet bytes (0 = no limit)\n    encoding: 'ascii',          // Packet encoding (ascii, utf8)\n    timeout: 1000               // in ms\n}\n```\n\n*The maximum possible value of packet size is **4096** bytes*: https://developer.valvesoftware.com/wiki/Source_RCON_Protocol#Packet_Size\n\n## Minecraft Compatibility\nAlthough the package name implies exclusive compatibility with Source games, Minecraft servers also use Valve's RCON implementation, so there should not be any issues using this package for your Minecraft projects!\n\n## Examples\nUsing async/await:\n```typescript\nimport Rcon from 'rcon-srcds';\nconst server = new Rcon({ host: '127.0.0.1', port: 25010 });\ntry {\n    await server.authenticate('your_rcon_password');\n    console.log('authenticated');\n    let status = await server.execute('status'); // You can read `status` reponse\n    server.execute('mp_autokick 0'); // no need to read the response\n} catch(e) {\n    console.error(e);\n}\n```\nUsing (native) promises:\n```typescript\nimport Rcon from 'rcon-srcds';\nconst server = new Rcon({ port: 25010 });\n\nserver.authenticate('rcon_password')\n    .then(() =\u003e {\n        console.log('authenticated');\n        return server.execute('status');\n    })\n    .then(console.log)\n    .catch(console.error);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fenriqcg%2Frcon-srcds","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fenriqcg%2Frcon-srcds","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fenriqcg%2Frcon-srcds/lists"}