{"id":17549937,"url":"https://github.com/g-ray/transmission-native","last_synced_at":"2025-09-24T06:32:41.592Z","repository":{"id":68799576,"uuid":"162047018","full_name":"G-Ray/transmission-native","owner":"G-Ray","description":"Native bindings for libtransmission","archived":false,"fork":false,"pushed_at":"2024-07-28T17:31:23.000Z","size":147,"stargazers_count":5,"open_issues_count":7,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-01-01T13:42:09.809Z","etag":null,"topics":["bittorrent","libtransmission","native","nodejs","torrent","transmission"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/G-Ray.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-12-16T22:30:27.000Z","updated_at":"2024-07-28T17:31:22.000Z","dependencies_parsed_at":"2023-11-11T22:23:58.700Z","dependency_job_id":"21b32000-fd86-4d05-9230-d244e52472cb","html_url":"https://github.com/G-Ray/transmission-native","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/G-Ray%2Ftransmission-native","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/G-Ray%2Ftransmission-native/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/G-Ray%2Ftransmission-native/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/G-Ray%2Ftransmission-native/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/G-Ray","download_url":"https://codeload.github.com/G-Ray/transmission-native/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234053588,"owners_count":18772117,"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":["bittorrent","libtransmission","native","nodejs","torrent","transmission"],"created_at":"2024-10-21T03:56:41.702Z","updated_at":"2025-09-24T06:32:36.257Z","avatar_url":"https://github.com/G-Ray.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# transmission-native\n\nNative bindings for libtransmission.\n\n[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)\n\n## Installation\n\nThe npm package offers prebuilt binaries only for Linux x64 for now.\nPlease refer to [development](#development) for other systems.\n\n## Usage\n\n```js\nconst Transmission = require('transmission-native')\n\n// Create a transmission instance with config folder and app name\nconst tr = new Transmission('./transmission', 'transmission')\n\nconst response = await tr.request({ method: 'session-get' })\n\n\n// Add a new torrent\nconst message = {\n    method: 'torrent-add',\n    arguments: {\n        filename: 'https://webtorrent.io/torrents/tears-of-steel.torrent'\n    }\n}\n\nconst reponse = await tr.request(message)\nconsole.log(response)\n\n// Save settings\ntr.saveSettings()\n\n// Later, when the process should be stopped, close the instance before\ntr.close()\n```\n\nPlease refer to transmission's [rpc-spec.md](https://github.com/transmission/transmission/blob/4.0.0/docs/rpc-spec.md) to find what methods and arguments are expected.\n\n## API\n\n### `tr = new Transmission(configDir, appName)`\n\nCreate a transmission instance with a specific configuration folder and application name.\\\n`configDir` is the path where settings and state of the transmission process will be loaded and stored.\n\n### `tr.request(message)`\n\nMake a request to the transmission instance.\n`message` is an object expected by transmissions's [rpc-spec.md](https://github.com/transmission/transmission/blob/4.0.0/docs/rpc-spec.md).\n\n\n```js\nconst message = { method: 'session-get' }\n\nconst reponse = await tr.request(message)\nconsole.log(response)\n\n// or as a callback\ntr.request(message, (err, response) =\u003e {\n  if (err) throw err\n  console.log(response)\n})\n```\n\n### `tr.saveSettings()`\n\nSave transmission settings.\n\n### `tr.close()`\n\nSave settings and close the session.\n\n## Development\n\nYou'll need to install required build tools and libraries for your platform in order to compile libtransmission:\n\n## Fedora / RHEL\n```sh\nsudo dnf install cmake gcc-c++ libcurl-devel openssl-devel\n```\n\n## Windows\n```sh\nvcpkg install curl --triplet=x64-windows-static\nvcpkg install openssl --triplet=x64-windows\n```\n\n```sh\nnpm run fetch-deps\n# For Windows you need to set VCPKG_INSTALLATION_ROOT env variable\n# $Env:VCPKG_INSTALLATION_ROOT=\"PATH_TO_VCPKG\"\nnpm run build-transmission\nnpm install\nnpm test # optional\n```\n\n## License\n\nGPL-3.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fg-ray%2Ftransmission-native","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fg-ray%2Ftransmission-native","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fg-ray%2Ftransmission-native/lists"}