{"id":21734176,"url":"https://github.com/shaunlwm/node-csgo-gsi","last_synced_at":"2025-08-21T12:30:35.280Z","repository":{"id":52657831,"uuid":"47903679","full_name":"ShaunLWM/node-csgo-gsi","owner":"ShaunLWM","description":"🔫  Zero dependencies Counter-Strike: Global Offensive Game State Integration for NodeJS","archived":false,"fork":false,"pushed_at":"2023-05-13T20:05:48.000Z","size":37,"stargazers_count":81,"open_issues_count":1,"forks_count":15,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-12-10T03:10:38.636Z","etag":null,"topics":["counter-strike","counter-strike-global-offensive","csgo","csgo-server"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/ShaunLWM.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}},"created_at":"2015-12-13T02:59:50.000Z","updated_at":"2024-10-09T02:06:14.000Z","dependencies_parsed_at":"2023-01-23T12:30:35.467Z","dependency_job_id":"e4ee9987-9b30-4d39-91c2-12f2e6131c2d","html_url":"https://github.com/ShaunLWM/node-csgo-gsi","commit_stats":{"total_commits":29,"total_committers":7,"mean_commits":4.142857142857143,"dds":0.4137931034482759,"last_synced_commit":"3b26f823e413bc0413f7b9717b7d594edba19ecd"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShaunLWM%2Fnode-csgo-gsi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShaunLWM%2Fnode-csgo-gsi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShaunLWM%2Fnode-csgo-gsi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShaunLWM%2Fnode-csgo-gsi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ShaunLWM","download_url":"https://codeload.github.com/ShaunLWM/node-csgo-gsi/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230511479,"owners_count":18237657,"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":["counter-strike","counter-strike-global-offensive","csgo","csgo-server"],"created_at":"2024-11-26T05:08:14.242Z","updated_at":"2024-12-19T23:14:39.384Z","avatar_url":"https://github.com/ShaunLWM.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# node-csgo-gsi\n\n[![npm](https://img.shields.io/npm/dt/node-csgo-gsi.svg)](https://github.com/ShaunLWM/node-csgo-gsi/releases)\n[![npm](https://img.shields.io/npm/v/node-csgo-gsi.svg)](https://www.npmjs.com/package/node-csgo-gsi)\n\nCounter-Strike: Global Offensive [Game State Integration](https://developer.valvesoftware.com/wiki/Counter-Strike:_Global_Offensive_Game_State_Integration) for node.js.\n\n## Usage\n\nInstall `gamestate_integration_node.cfg` into your CS:GO cfg directory.\n\nExample: `C:\\Program Files (x86)\\Steam\\steamapps\\common\\Counter-Strike Global Offensive\\csgo\\cfg\\gamestate_integration_node.cfg`\n\nThis file will automatically be executed on client start. Look into the console to check if it has executed successfully. As per the [documentation](https://developer.valvesoftware.com/wiki/Counter-Strike:_Global_Offensive_Game_State_Integration#Locating_CS:GO_Install_Directory), the file name should start with `gamestate_integration_` and ends with `.cfg`.\n\n```\ngamestate_integration_yourservicenamehere.cfg\n```\n\nThe console should have an output like this the moment you open CS:GO\n\n```\nLoading Game State Integration: gamestate_integration_node.cfg\n```\n\n## Installation\n`npm install node-csgo-gsi --save`\n\nor\n\n```yarn add node-csgo-gsi```\n\n``` js\nconst CSGOGSI = require(\"node-csgo-gsi\");\nlet gsi = new CSGOGSI({ options });\ngsi.on(\"EVENT_NAME\", function(\"optional data\") {\n    // EVENT_NAME is the individual event name below. Look into the example/index.js for more information\n});\n```\n\n\n## Example\n\nA sample script is in the `example` folder.\n\n\n## Options\n- ```port``` - Set the server port (default: 3000)\n- ``` authToken``` - An array of authentication token to accept from client. You can have multiple tokens (default: [] - no authentication needed)\n    - Example: Team 1 can have \"token1\". Team 2 can have \"token2\". Team1's sub team can have \"token1sub\" etc.\n\n# Events\n\n#### all\n- Returns the full posted data (use this if you do not want to use the given events provided below)\n\n## Game\n\n#### gameMap (returns String)\n- Returns current map.\n\n#### gamePhase (returns String)\n- Returns current game state.\n    - `live`\n    - `warmup`\n\n#### gameRounds (returns Integer)\n-  Returns the current round number.\n    - eg: 10\n\n#### gameCTscore (returns Object)\n- Returns the current Counter Terrorist team's score.\n```\n      \"score\": int,\n      \"consecutive_round_losses\": int,\n      \"timeouts_remaining\": int,\n      \"matches_won_this_series\": int\n```\n\n#### gameTscore (returns Object)\n- Returns the current Terrorist team's score.\n```\n      \"score\": int,\n      \"consecutive_round_losses\": int,\n      \"timeouts_remaining\": int,\n      \"matches_won_this_series\": int\n```\n\n## Round\n#### roundPhase (returns String)\n- Returns the current round state.\n    - `live`\n    - `freezetime`\n    - `over`\n\n#### roundWinTeam (returns String)\n- Returns the latest round's winner.\n    - `CT`\n    - `T`\n\n#### roundWins (returns Object)\n- Returns a key-value object of round number and reason\nExample\n```\n{\n      \"1\": \"ct_win_elimination\",\n      \"2\": \"ct_win_time\",\n      \"3\": \"ct_win_elimination\",\n      \"4\": \"ct_win_time\",\n      \"5\": \"t_win_bomb\"\n}\n```\n\n## C4\n\n#### bombState (returns String)\n- Returns C4 state.\n    - `planted`\n    - `exploded`\n    - `defused`\n\n#### bombTimeStart (returns Float)\n- Returns when C4 is planted.\n\n#### bombTimeLeft (returns Float)\n- Returns planted C4 time left.\n\n## WARNING ⚠️\nC4 timer (`bombTimeLeft` event)  is not accurate. CS:GO does not return a real time update when the bomb is planted. It's just an estimation on the library's side. Thus, do just look for the `bombState` event instead of relying on the timer.\n\n## Todo\n- None for now. Open an issue!\n\n## Credits\n- [Double0negative/CSGO-HUD](https://github.com/Double0negative/CSGO-HUD)\n\n\n# License\n\nThe MIT License (MIT)\n\nCopyright (c) 2021 Shaun","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshaunlwm%2Fnode-csgo-gsi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshaunlwm%2Fnode-csgo-gsi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshaunlwm%2Fnode-csgo-gsi/lists"}