{"id":19750905,"url":"https://github.com/sheepla/pswebsh","last_synced_at":"2026-05-14T00:40:22.065Z","repository":{"id":104298373,"uuid":"394337681","full_name":"sheepla/PsWebsh","owner":"sheepla","description":"🐚 websh client for PowerShell","archived":false,"fork":false,"pushed_at":"2021-08-09T15:11:30.000Z","size":87,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-28T08:32:05.974Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PowerShell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sheepla.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}},"created_at":"2021-08-09T15:11:20.000Z","updated_at":"2022-05-23T16:43:49.000Z","dependencies_parsed_at":null,"dependency_job_id":"1f068b05-24f1-48d0-8b58-985c56af3e3b","html_url":"https://github.com/sheepla/PsWebsh","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sheepla/PsWebsh","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sheepla%2FPsWebsh","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sheepla%2FPsWebsh/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sheepla%2FPsWebsh/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sheepla%2FPsWebsh/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sheepla","download_url":"https://codeload.github.com/sheepla/PsWebsh/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sheepla%2FPsWebsh/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":285879588,"owners_count":27247109,"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-11-22T02:00:05.934Z","response_time":64,"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":"2024-11-12T02:40:38.933Z","updated_at":"2025-11-23T00:04:49.068Z","avatar_url":"https://github.com/sheepla.png","language":"PowerShell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🐚 pswebsh\n\n\u003cp align=\"right\"\u003e\u003cimg src=\"https://img.shields.io/github/languages/top/sheepla/pswebsh?style=flat-square\" /\u003e\u003c/p\u003e\n\nPowerShellから [websh](https://github.com/jiro4989/websh) のAPIを使ってシェル芸を実行するCLIクライアント。\n\n\u003cdiv align=\"center\"\u003e\u003cimg src=\"./screenshot.png\" width=\"70%\"\u003e\u003c/div\u003e\n\n## 機能\n\n- シェル芸の実行\n- 実行結果の出力\n- 画像の投稿\n- 実行結果の画像をローカルに保存\n- 保存した画像をデフォルトの画像ビューアで開く(`-ShowImage` スイッチを付けると有効になります。)\n\n## 環境・バージョン\n\n以下の環境でテストしています。\n\n- PowerShell Core 7.0.3 (Windows/Linux)\n- Windows PowerShell 5.1 (Windows)\n\n## 使い方\n\n### シェル芸を実行\n\n`-Code` パラメータに記述するか、パイプラインから入力します。\n\n```pwsh\nPS\u003e Invoke-Websh -Code 'uname -a'\n\nLinux e9b38cbb8ec8 4.15.0-55-generic #60-Ubuntu SMP Tue Jul 2 18:22:20 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux\n\nPS\u003e 'uname -a' | Invoke-Websh\n\nLinux d643fdbf8022 4.15.0-55-generic #60-Ubuntu SMP Tue Jul 2 18:22:20 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux\n```\n\n`-Code` パラメータを指定しない場合はプロンプトが表示されます。\n\n```pwsh\nPS\u003e Invoke-Websh\n\ncmdlet Invoke-Websh at command pipeline position 1\n\nSupply values for the following parameters:\n\nCode: echo hello\n\nhello\n```\n\n### 実行結果の画像を保存\n\nシェル芸bot上の `/images/` に保存した画像は、ローカルのtempディレクトリ以下に保存されます。\n\n- Windows: `%LOCALAPPDATA%\\Temp\\websh`\n- Linux: `/tmp/websh`\n\n`-ShowImage` スイッチを付けると、保存した画像をデフォルトの画像ビューアで開きます。\n\n```pwsh\nPS\u003e 'screenfetch | textimg -s' | Invoke-Websh -ShowImage\n```\n\n### 保存した画像をまとめて削除\n\n保存した画像をまとめて削除するには、`Clear-WebshImageCache` コマンドレットを使います。\n\n### 画像を投稿\n\n- `-UploadImages` パラメータに画像ファイルのパスを指定します。\n- 複数枚の画像を投稿するには、画像ファイルのパスを `,`で区切ります。\n- シェル芸bot・webshの仕様上最大4枚まで投稿できます。\n- 投稿した画像は、シェル芸botイメージ上の `/media/0` ～ `/media/3` に配置されます。\n\n```\nPS\u003e Invoke-Websh -UploadImages ./hoge.png, ./fuga.png -Code 'ls -l /media'\n合計 96\n-rw-r--r-- 1 root root 48877  3月 24 23:57 0\n-rw-r--r-- 1 root root 48670  3月 24 23:57 1\n```\n\n### サーバーの状態を確認\n\n`Test-WebshStatus` コマンドレットでサーバーの状態を確認することができます。\n\n```powershell\nPS\u003e Test-WebshStatus\n\n```\n\n## インストール\n\n依存するモジュールやCLIツール等はありません。このリポジトリをcloneして `Import-Module` で読み込みます。\n\n```powershell\n# cd to module root dir\ncd ~/Documents/WindowsPowerShell/Modules/ # Windows PowerShell\ncd ~/Documents/PowerShell/Modules/        # PowerShell Core on Windows\ncd ~/.config/PowerShell/Modules/          # PowerShell Core on Linux\n\n# clone this repository\ngit clone https://github.com/sheepla/PsWebsh.git\n# import this module\nImport-Module PsWebsh\n```\n\nPowerShellの起動時に自動で読み込ませたい場合は、`$PROFILE` ファイルに以下の行を追記してください。\n\n```powershell\nImport-Module PsWebsh\n```\n\n## 謝辞\n\n[jiro4989](https://github.com/jiro4989) 様の [websh](https://github.com/jiro4989/websh) APIを利用しています。\n素晴らしいサービスをありがとうございます。\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsheepla%2Fpswebsh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsheepla%2Fpswebsh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsheepla%2Fpswebsh/lists"}