{"id":29835246,"url":"https://github.com/livekit/server-sdk-ruby","last_synced_at":"2025-07-29T12:17:39.135Z","repository":{"id":37073845,"uuid":"397411027","full_name":"livekit/server-sdk-ruby","owner":"livekit","description":"LiveKit Server SDK for Ruby","archived":false,"fork":false,"pushed_at":"2025-07-21T18:18:59.000Z","size":1276,"stargazers_count":32,"open_issues_count":10,"forks_count":22,"subscribers_count":18,"default_branch":"main","last_synced_at":"2025-07-21T20:24:55.994Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/livekit.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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,"zenodo":null}},"created_at":"2021-08-17T22:57:08.000Z","updated_at":"2025-04-24T16:39:00.000Z","dependencies_parsed_at":"2024-04-25T23:29:11.591Z","dependency_job_id":"793ed1a6-4213-428b-9710-5738625e0253","html_url":"https://github.com/livekit/server-sdk-ruby","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/livekit/server-sdk-ruby","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/livekit%2Fserver-sdk-ruby","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/livekit%2Fserver-sdk-ruby/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/livekit%2Fserver-sdk-ruby/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/livekit%2Fserver-sdk-ruby/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/livekit","download_url":"https://codeload.github.com/livekit/server-sdk-ruby/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/livekit%2Fserver-sdk-ruby/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267685559,"owners_count":24127706,"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","status":"online","status_checked_at":"2025-07-29T02:00:12.549Z","response_time":2574,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2025-07-29T12:17:38.438Z","updated_at":"2025-07-29T12:17:39.118Z","avatar_url":"https://github.com/livekit.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!--BEGIN_BANNER_IMAGE--\u003e\n\n\u003cpicture\u003e\n  \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"/.github/banner_dark.png\"\u003e\n  \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"/.github/banner_light.png\"\u003e\n  \u003cimg style=\"width:100%;\" alt=\"The LiveKit icon, the name of the repository and some sample code in the background.\" src=\"https://raw.githubusercontent.com/livekit/server-sdk-ruby/main/.github/banner_light.png\"\u003e\n\u003c/picture\u003e\n\n\u003c!--END_BANNER_IMAGE--\u003e\n\n# LiveKit Server API for Ruby\n\n\u003c!--BEGIN_DESCRIPTION--\u003e\nUse this SDK to interact with \u003ca href=\"https://livekit.io/\"\u003eLiveKit\u003c/a\u003e server APIs and create access tokens from your Ruby backend.\n\u003c!--END_DESCRIPTION--\u003e\n\nThis library is designed to work with Ruby 2.6.0 and above.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n### Gemfile\n\n```ruby\ngem 'livekit-server-sdk'\n```\n\nand then `bundle install`.\n\n### Install system-wide\n\n```shell\ngem install livekit-server-sdk\n```\n\n## Usage\n\n### Creating Access Tokens\n\nCreating a token for participant to join a room.\n\n```ruby\nrequire 'livekit'\n\ntoken = LiveKit::AccessToken.new(api_key: 'yourkey', api_secret: 'yoursecret')\ntoken.identity = 'participant-identity'\ntoken.name = 'participant-name'\ntoken.video_grant = LiveKit::VideoGrant.new(roomJoin: true, room: 'room-name')\ntoken.attributes = { \"mykey\" =\u003e \"myvalue\" }\nputs token.to_jwt\n```\n\nBy default, a token expires after 6 hours. You may override this by passing in `ttl` when creating the token. `ttl` is expressed in seconds.\n\n### Setting Permissions with Access Tokens\n\nIt's possible to customize the permissions of each participant. See more details at [access tokens guide](https://docs.livekit.io/guides/access-tokens#room-permissions).\n\n### Room Service\n\n`RoomServiceClient` is a Twirp-based client that provides management APIs to LiveKit. You can connect it to your LiveKit endpoint. See [service apis](https://docs.livekit.io/guides/server-api) for a list of available APIs.\n\n```ruby\nrequire 'livekit'\n\nclient = LiveKit::RoomServiceClient.new('https://my.livekit.instance',\n    api_key: 'yourkey', api_secret: 'yoursecret')\n\nname = 'myroom'\n\nclient.list_rooms\n\nclient.list_participants(room: name)\n\nclient.mute_published_track(room: name, identity: 'participant',\n                            track_sid: 'track-id', muted: true)\n\nclient.remove_participant(room: name, identity: 'participant')\n\nclient.delete_room(room: name)\n```\n\n### Egress Service\n\n`EgressServiceClient` is a ruby client to EgressService. Refer to [docs](https://docs.livekit.io/guides/egress) for more usage examples\n\n```ruby\nrequire 'livekit'\n\n# starting a room composite to S3\negressClient = LiveKit::EgressServiceClient.new(\n    \"https://your-url\",\n    api_key: 'key',\n    api_secret: 'secret'\n);\n\ninfo = egressClient.start_room_composite_egress(\n    'room-name',\n    LiveKit::Proto::EncodedFileOutput.new(\n        file_type: LiveKit::Proto::EncodedFileType::MP4,\n        filepath: \"my-recording.mp4\",\n        s3: LiveKit::Proto::S3Upload.new(\n            access_key: 'access-key',\n            secret: 'secret',\n            region: 'bucket-region',\n            bucket: 'bucket'\n        )\n    )\n)\nputs info\n\n# starting a track composite to RTMP\nurls = Google::Protobuf::RepeatedField.new(:string, ['rtmp://url1', 'rtmps://url2'])\ninfo = egressClient.start_track_composite_egress(\n    'room-name',\n    LiveKit::Proto::StreamOutput.new(\n        protocol: LiveKit::Proto::StreamProtocol::RTMP,\n        urls: urls\n    ),\n    audio_track_id: 'TR_XXXXXXXXXXXX',\n    video_track_id: 'TR_XXXXXXXXXXXX'\n)\nputs info\n```\n\n### Environment Variables\n\nYou may store credentials in environment variables. If api-key or api-secret is not passed in when creating a `RoomServiceClient` or `AccessToken`, the values in the following env vars will be used:\n\n- `LIVEKIT_API_KEY`\n- `LIVEKIT_API_SECRET`\n\n## License\n\nThe gem is available as open source under the terms of Apache 2.0 License.\n\n\u003c!--BEGIN_REPO_NAV--\u003e\n\u003cbr/\u003e\u003ctable\u003e\n\u003cthead\u003e\u003ctr\u003e\u003cth colspan=\"2\"\u003eLiveKit Ecosystem\u003c/th\u003e\u003c/tr\u003e\u003c/thead\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\u003ctd\u003eLiveKit SDKs\u003c/td\u003e\u003ctd\u003e\u003ca href=\"https://github.com/livekit/client-sdk-js\"\u003eBrowser\u003c/a\u003e · \u003ca href=\"https://github.com/livekit/client-sdk-swift\"\u003eiOS/macOS/visionOS\u003c/a\u003e · \u003ca href=\"https://github.com/livekit/client-sdk-android\"\u003eAndroid\u003c/a\u003e · \u003ca href=\"https://github.com/livekit/client-sdk-flutter\"\u003eFlutter\u003c/a\u003e · \u003ca href=\"https://github.com/livekit/client-sdk-react-native\"\u003eReact Native\u003c/a\u003e · \u003ca href=\"https://github.com/livekit/rust-sdks\"\u003eRust\u003c/a\u003e · \u003ca href=\"https://github.com/livekit/node-sdks\"\u003eNode.js\u003c/a\u003e · \u003ca href=\"https://github.com/livekit/python-sdks\"\u003ePython\u003c/a\u003e · \u003ca href=\"https://github.com/livekit/client-sdk-unity\"\u003eUnity\u003c/a\u003e · \u003ca href=\"https://github.com/livekit/client-sdk-unity-web\"\u003eUnity (WebGL)\u003c/a\u003e · \u003ca href=\"https://github.com/livekit/client-sdk-esp32\"\u003eESP32\u003c/a\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003eServer APIs\u003c/td\u003e\u003ctd\u003e\u003ca href=\"https://github.com/livekit/node-sdks\"\u003eNode.js\u003c/a\u003e · \u003ca href=\"https://github.com/livekit/server-sdk-go\"\u003eGolang\u003c/a\u003e · \u003cb\u003eRuby\u003c/b\u003e · \u003ca href=\"https://github.com/livekit/server-sdk-kotlin\"\u003eJava/Kotlin\u003c/a\u003e · \u003ca href=\"https://github.com/livekit/python-sdks\"\u003ePython\u003c/a\u003e · \u003ca href=\"https://github.com/livekit/rust-sdks\"\u003eRust\u003c/a\u003e · \u003ca href=\"https://github.com/agence104/livekit-server-sdk-php\"\u003ePHP (community)\u003c/a\u003e · \u003ca href=\"https://github.com/pabloFuente/livekit-server-sdk-dotnet\"\u003e.NET (community)\u003c/a\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003eUI Components\u003c/td\u003e\u003ctd\u003e\u003ca href=\"https://github.com/livekit/components-js\"\u003eReact\u003c/a\u003e · \u003ca href=\"https://github.com/livekit/components-android\"\u003eAndroid Compose\u003c/a\u003e · \u003ca href=\"https://github.com/livekit/components-swift\"\u003eSwiftUI\u003c/a\u003e · \u003ca href=\"https://github.com/livekit/components-flutter\"\u003eFlutter\u003c/a\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003eAgents Frameworks\u003c/td\u003e\u003ctd\u003e\u003ca href=\"https://github.com/livekit/agents\"\u003ePython\u003c/a\u003e · \u003ca href=\"https://github.com/livekit/agents-js\"\u003eNode.js\u003c/a\u003e · \u003ca href=\"https://github.com/livekit/agent-playground\"\u003ePlayground\u003c/a\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003eServices\u003c/td\u003e\u003ctd\u003e\u003ca href=\"https://github.com/livekit/livekit\"\u003eLiveKit server\u003c/a\u003e · \u003ca href=\"https://github.com/livekit/egress\"\u003eEgress\u003c/a\u003e · \u003ca href=\"https://github.com/livekit/ingress\"\u003eIngress\u003c/a\u003e · \u003ca href=\"https://github.com/livekit/sip\"\u003eSIP\u003c/a\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003eResources\u003c/td\u003e\u003ctd\u003e\u003ca href=\"https://docs.livekit.io\"\u003eDocs\u003c/a\u003e · \u003ca href=\"https://github.com/livekit-examples\"\u003eExample apps\u003c/a\u003e · \u003ca href=\"https://livekit.io/cloud\"\u003eCloud\u003c/a\u003e · \u003ca href=\"https://docs.livekit.io/home/self-hosting/deployment\"\u003eSelf-hosting\u003c/a\u003e · \u003ca href=\"https://github.com/livekit/livekit-cli\"\u003eCLI\u003c/a\u003e\u003c/td\u003e\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\u003c!--END_REPO_NAV--\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flivekit%2Fserver-sdk-ruby","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flivekit%2Fserver-sdk-ruby","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flivekit%2Fserver-sdk-ruby/lists"}