{"id":17999485,"url":"https://github.com/zeex/samp-server-cli","last_synced_at":"2025-03-26T06:31:39.692Z","repository":{"id":6093863,"uuid":"7320871","full_name":"Zeex/samp-server-cli","owner":"Zeex","description":"Control server configuration via command line (without manually editing server.cfg)","archived":false,"fork":false,"pushed_at":"2021-05-08T13:44:18.000Z","size":94,"stargazers_count":15,"open_issues_count":0,"forks_count":1,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-10-16T13:36:49.178Z","etag":null,"topics":["cli","pip","python","sa-mp"],"latest_commit_sha":null,"homepage":"http://forum.sa-mp.com/showthread.php?t=455296","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Zeex.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}},"created_at":"2012-12-25T22:09:02.000Z","updated_at":"2023-02-18T21:02:28.000Z","dependencies_parsed_at":"2022-09-16T14:43:33.952Z","dependency_job_id":null,"html_url":"https://github.com/Zeex/samp-server-cli","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zeex%2Fsamp-server-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zeex%2Fsamp-server-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zeex%2Fsamp-server-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zeex%2Fsamp-server-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Zeex","download_url":"https://codeload.github.com/Zeex/samp-server-cli/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":222121380,"owners_count":16934966,"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":["cli","pip","python","sa-mp"],"created_at":"2024-10-29T22:13:12.125Z","updated_at":"2024-10-29T22:13:12.710Z","avatar_url":"https://github.com/Zeex.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\r\nsamp-server-cli\r\n===============\r\n\r\nThis is a small Python script that lets you quickly start your SA-MP server \r\nfrom the command line without opening, editing, and saving server.cfg every\r\ntime you need to change some option. It generates a new server.cfg based on \r\nthe command line arguments you use and optionally starts the server. This can\r\nmake it much easier to test various scripts and plugins during development \r\n(for example, I use it for testing plugins).\r\n\r\nRequirements\r\n------------\r\n\r\nPython 2.7+ or Python 3.\r\n\r\nUsage\r\n-----\r\n\r\nYou can define the root directory of your SA-MP server installation by \r\nsetting `SAMP_SERVER_ROOT` (see below) and start it from anywhere. If you're\r\nworking on a plugin and want to test it, you just do:\r\n\r\n```\r\nsamp-server-cli -d ./path/to/plugin.so\r\n```\r\n\r\nBy default `samp-server-cli` uses the \"bare\" gamemode (`gamemodes/bare.pwn`).\r\nIf you want to test some code snippet that you compiled to `somescript.amx`\r\nsimply run:\r\n\r\n```\r\nsamp-server-cli -g ./somescript\r\n```\r\n\r\n(the `.amx` part should be omitted)\r\n\r\nWhen you use `./` in front of a file name passed to `-d`, `-g`, or `-f` it\r\nmeans that it's relative to the current working directory. When you don't,\r\nit means that the path is relative to the corresponding directory (`plugins`,\r\n`gamemodes`, and `filterscripts` respectively).\r\n\r\nInstallation\r\n------------\r\n\r\nUse pip to install a stable version from the Python Package Index:\r\n\r\n```sh\r\nsudo pip install samp-server-cli\r\n```\r\n\r\nor only for the current user:\r\n\r\n```sh\r\npip install --user samp-server-cli\r\n```\r\n\r\nThis will create a shell script in your `~/.local/bin` or `/usr/local/bin`\r\ndirectory on Linux and a .exe file in `C:\\PythonXY\\Scripts` on Windows.\r\n\r\nAlternatively, you can install samp-server-cli by running the accompanying\r\nsetup script:\r\n\r\n```sh\r\npython setup.py install\r\n```\r\n\r\nFinally, you can just download this repository and run samp-server-cli out\r\nof the box using one of the wrapper scripts shipped with the source code.\r\n\r\nPost-install configuration\r\n--------------------------\r\n\r\nOne thing you may need to do after installing samp-server-cli is to set\r\nthe `SAMP_SERVER_ROOT` environment variable to the absolute path of your\r\nserver's root directory (where samp03svr or samp-server.exe is located).\r\n\r\nIf you don't do it the script will seach for the server executable file \r\nin the following locations:\r\n\r\n* The current working directory\r\n* The directory in which samp-server-cli is located\r\n* The value of the `SAMP_SERVER_ROOT` variable (if defined)\r\n\r\nYou can also specify the exact command to start the server using \r\n`--command` in which case the script will not attempt to find the server\r\nexecutable.\r\n\r\nExamples\r\n--------\r\n\r\nHow to run a gamemode with default settings:\r\n\r\n```\r\nsamp-server-cli -g grandlarc\r\n```\r\n\r\nHow to run a publicly accessible server with maxplayers 10 and RCON\r\npassword \"test\":\r\n\r\n```\r\nsamp-server-cli -g grandlarc -q -R test -M 10\r\n```\r\n\r\nUsing filterscripts:\r\n\r\n```\r\nsamp-server-cli -g grandlarc -f fsdebug -f gl_actions -f gl_realtime\r\n```\r\n\r\nUsing plugins:\r\n\r\n```\r\nsamp-server-cli -g grandlarc -d crashdetect -d streamer\r\n```\r\n\r\nAdding non-standard server.cfg options:\r\n\r\n```\r\nsamp-server-cli -g grandlarc -d profiler -x some_option its_value\r\n```\r\n\r\nUsing existing server.cfg file:\r\n\r\n```\r\nsamp-server-cli --no-config\r\n```\r\n\r\nReading command line arguments from a file:\r\n\r\n```\r\nsamp-server-cli @filename\r\n```\r\n\r\nOther options\r\n-------------\r\n\r\nTo see the complete list of command line options run `samp-server-cli -h`.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzeex%2Fsamp-server-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzeex%2Fsamp-server-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzeex%2Fsamp-server-cli/lists"}