{"id":18613391,"url":"https://github.com/perkovec/tg-cli-node","last_synced_at":"2025-07-18T07:06:05.914Z","repository":{"id":68262055,"uuid":"66982401","full_name":"Perkovec/tg-cli-node","owner":"Perkovec","description":"Node.js wrapper for telegram-cli","archived":false,"fork":false,"pushed_at":"2020-02-01T15:40:45.000Z","size":23,"stargazers_count":26,"open_issues_count":6,"forks_count":12,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-07-08T18:08:41.464Z","etag":null,"topics":["node-wrapper","telegram-cli","tg-cli-node"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Perkovec.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null}},"created_at":"2016-08-30T22:30:18.000Z","updated_at":"2024-03-03T14:56:30.000Z","dependencies_parsed_at":"2023-04-22T14:17:48.741Z","dependency_job_id":null,"html_url":"https://github.com/Perkovec/tg-cli-node","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Perkovec/tg-cli-node","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Perkovec%2Ftg-cli-node","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Perkovec%2Ftg-cli-node/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Perkovec%2Ftg-cli-node/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Perkovec%2Ftg-cli-node/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Perkovec","download_url":"https://codeload.github.com/Perkovec/tg-cli-node/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Perkovec%2Ftg-cli-node/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265716306,"owners_count":23816354,"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":["node-wrapper","telegram-cli","tg-cli-node"],"created_at":"2024-11-07T03:21:54.210Z","updated_at":"2025-07-18T07:06:05.864Z","avatar_url":"https://github.com/Perkovec.png","language":"JavaScript","readme":"# tg-cli-node\nNode.js wrapper for [telegram-cli](https://github.com/vysheng/tg)\n\n[Docs](https://github.com/Perkovec/tg-cli-node/wiki/Documentation)\n\n## How to use\nInstall package from npm:\n```bash\nnpm install tg-cli-node\n```\n\nCreate `config.js` with:\n```javascript\nconst path = require('path');\nconst os = require('os');\n\nmodule.exports = {\n    telegram_cli_path: path.join(__dirname, 'tg/bin/telegram-cli'), //path to tg-cli (see https://github.com/vysheng/tg)\n    telegram_cli_socket_path: path.join( os.tmpdir(), 'socket'), // path for socket file\n    server_publickey_path: path.join(__dirname, 'tg/tg-server.pub'), // path to server key (traditionally, in %tg_cli_path%/tg-server.pub)\n}\n```\n\nOpen your app script and use this example:\n```javascript\nconst TelegramAPI = require('tg-cli-node');\nconst config = require('./config');\n\nconst Client = new TelegramAPI(config);\n\nClient.connect(connection =\u003e {\n    connection.on('message', message =\u003e {\n        console.log('message:', message);\n    });\n\n    connection.on('error', e =\u003e {\n        console.log('Error from Telegram API:', e);\n    });\n\n    connection.on('disconnect', () =\u003e {\n        console.log('Disconnected from Telegram API');\n    });\n});\n```","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperkovec%2Ftg-cli-node","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fperkovec%2Ftg-cli-node","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperkovec%2Ftg-cli-node/lists"}