{"id":19969349,"url":"https://github.com/drunkdream/pytmate","last_synced_at":"2025-07-11T03:33:43.516Z","repository":{"id":56372500,"uuid":"300688250","full_name":"drunkdream/pytmate","owner":"drunkdream","description":"Python implementation of tmate（内网终端分享、在线调试Github Actions）","archived":false,"fork":false,"pushed_at":"2022-06-29T15:21:51.000Z","size":53,"stargazers_count":9,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-18T03:03:48.730Z","etag":null,"topics":["onlinedebug","shell"],"latest_commit_sha":null,"homepage":"","language":"Python","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/drunkdream.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}},"created_at":"2020-10-02T17:24:12.000Z","updated_at":"2025-05-09T05:41:02.000Z","dependencies_parsed_at":"2022-08-15T17:31:13.763Z","dependency_job_id":null,"html_url":"https://github.com/drunkdream/pytmate","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/drunkdream/pytmate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drunkdream%2Fpytmate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drunkdream%2Fpytmate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drunkdream%2Fpytmate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drunkdream%2Fpytmate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/drunkdream","download_url":"https://codeload.github.com/drunkdream/pytmate/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drunkdream%2Fpytmate/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264721595,"owners_count":23653963,"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":["onlinedebug","shell"],"created_at":"2024-11-13T02:49:46.708Z","updated_at":"2025-07-11T03:33:43.417Z","avatar_url":"https://github.com/drunkdream.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pytmate\n\n## 什么是tmate\n\n[tmate](https://tmate.io/)是一款可以用于终端分享的工具，同时也提供了平台能力，用户可以使用平台将内网中的终端分享到外网访问。\n\n## 什么是pytmate\n\ntmate本身只支持类Unix系统（MacOS、Linux等），不支持Windows。而pytmate使用纯Python开发，可以支持全系统，使用也更加方便。\n\n## 环境要求\n\n* Windows 7以上（推荐使用`Windows 10 1809`以上，低版本不支持`pty`）\n* Linux\n* MacOS\n\nPython版本要求`\u003e=3.6`\n\n## 安装\n\n```bash\n$ pip install tmate\n```\n\n## 如何使用\n\n```bash\n$ tmate\n[TMateClient] Connect SSH server ssh.tmate.io:22...\n[Notify] web session read only: https://tmate.io/t/ro-Q5VKGqmt24FxTnUqtdzCZHhtR\n[Notify] ssh session read only: ssh ro-Q5VKGqmt24FxTnUqtdzCZHhtR@xxx.tmate.io\n[Notify] web session: https://tmate.io/t/9bv76cP3W95ftZFbWtYtW4xJ7\n[Notify] ssh session: ssh 9bv76cP3W95ftZFbWtYtW4xJ7@xxx.tmate.io\n\n```\n\nWeb端访问终端可以在浏览器中打开`web session: `后面的URL。\n\nSSH访问可以使用`ssh session: `后面的命令行。\n\n## 在线调试Github Actions\n\n创建以下workflow：`remote-ssh.yml`\n\n```yml\nname: Remote-SSH\non:\n  watch:\n    types: started\njobs:\n  SSH:\n    name: Run on ${{ matrix.os }}\n    runs-on: ${{ matrix.os }}\n    strategy:\n      max-parallel: 4\n      matrix:\n        python-version: [3.6]\n        os: [windows-latest, ubuntu-latest, macOS-latest]\n    steps:\n      - name: Set up Python ${{ matrix.python-version }}\n        uses: actions/setup-python@v1\n        with:\n          python-version: ${{ matrix.python-version }}\n      - name: Install dependencies\n        run: |\n          python -m pip install --upgrade pip\n          python -m pip install -U tmate\n      - name: SSH connection to Actions\n        run: |\n            python -m tmate\n```\n\n`Star`项目会自动触发该workflow。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrunkdream%2Fpytmate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdrunkdream%2Fpytmate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrunkdream%2Fpytmate/lists"}