{"id":50372600,"url":"https://github.com/rtugeek/release","last_synced_at":"2026-05-30T08:02:38.993Z","repository":{"id":347914831,"uuid":"1184914483","full_name":"rtugeek/release","owner":"rtugeek","description":"A simple Node.js CLI tool to deploy files and run commands on a remote server via SSH","archived":false,"fork":false,"pushed_at":"2026-03-30T02:31:32.000Z","size":51,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-03-30T05:30:50.117Z","etag":null,"topics":["deployment","devops","ssh"],"latest_commit_sha":null,"homepage":"https://widgetjs.cn","language":"TypeScript","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/rtugeek.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-18T03:48:13.000Z","updated_at":"2026-03-30T02:31:35.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/rtugeek/release","commit_stats":null,"previous_names":["rtugeek/release"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/rtugeek/release","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rtugeek%2Frelease","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rtugeek%2Frelease/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rtugeek%2Frelease/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rtugeek%2Frelease/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rtugeek","download_url":"https://codeload.github.com/rtugeek/release/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rtugeek%2Frelease/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33684414,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-30T02:00:06.278Z","response_time":92,"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":["deployment","devops","ssh"],"created_at":"2026-05-30T08:02:38.058Z","updated_at":"2026-05-30T08:02:38.979Z","avatar_url":"https://github.com/rtugeek.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @widget-js/release\n\n![npm version](https://img.shields.io/npm/v/@widget-js/release.svg)\n![npm downloads](https://img.shields.io/npm/dm/@widget-js/release.svg)\n![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)\n\nA lightweight, lightning-fast Node.js CLI tool that helps you copy files/folders to a remote server and execute commands via SSH. Designed for developers who want a simple, scriptable deployment process without the overhead of heavy automation frameworks.\n\n### Features\n\n- 🪶 **Extremely Lightweight**: No complex setup, just a simple JSON file.\n- 🚀 **Fast**: Glob pattern matching and concurrency support for file uploads.\n- 🔑 **Smart SSH**: Automatically parses your `~/.ssh/config` for aliases, users, and private keys.\n- 🛡️ **Interactive**: Prompts for encrypted SSH key passphrases on-the-fly and caches them.\n- 🌍 **Multi-Host**: Deploy to one or multiple servers sequentially with a single command.\n\n## Why not Ansible? (Comparison)\n\nWhile [Ansible](https://www.ansible.com/) is an incredibly powerful industry standard for IT automation, it can often be overkill for everyday developer tasks.\n\n| Feature / Aspect   | `@widget-js/release`                                   | Ansible                                                    |\n| :----------------- | :----------------------------------------------------- | :--------------------------------------------------------- |\n| Best For           | Simple frontend/Node.js deployments, personal projects | Bare-metal provisioning, complex enterprise infrastructure |\n| **Learning Curve** | **Zero** (Basic JSON and shell commands)               | **High** (Requires learning YAML, Playbooks, Inventory)    |\n| **Ecosystem**      | Node.js (No Python dependency required)                | Python-based                                               |\n| **Configuration**  | A single straightforward JSON array                    | Complex directory structures, Roles, and Playbooks         |\n| **Idempotency**    | No (Runs commands exactly as defined)                  | Yes (Ensures specific state without rerunning)             |\n| **Core Action**    | Simply \"copy files \u0026 run commands\"                     | Full system configuration \u0026 state management               |\n\n## Installation\n\nInstall the package globally using npm or yarn:\n\n```bash\nnpm install -g @widget-js/release\n# or\nyarn global add @widget-js/release\n```\n\nOr run it directly using `npx`:\n\n```bash\nnpx @widget-js/release\n```\n\n## Configuration\n\nCreate a JSON file (e.g., `release.json`) to define your deployment script.\n\n### Example `release.json`:\n\n```json\n{\n  \"host\": [\"192.168.1.100\", \"nyhq\"],\n  \"port\": 22,\n  \"username\": \"root\",\n  \"password\": \"your-password\",\n  \"privateKey\": \"./path/to/private-key.pem\",\n  \"passphrase\": \"your-key-passphrase\",\n  \"steps\": [\n    {\n      \"type\": \"upload\",\n      \"local\": \"./dist\",\n      \"remote\": \"/var/www/app/dist\",\n      \"pattern\": \"**/*\",\n      \"ignore\": [\"**/*.map\", \"node_modules/**\"]\n    },\n    {\n      \"type\": \"command\",\n      \"command\": \"cd /var/www/app \u0026\u0026 yarn install\"\n    },\n    {\n      \"type\": \"upload\",\n      \"local\": \"./package.json\",\n      \"remote\": \"/var/www/app/package.json\"\n    },\n    {\n      \"type\": \"command\",\n      \"command\": \"cd /var/www/app \u0026\u0026 pm2 restart my-app\"\n    }\n  ]\n}\n```\n\n### Configuration Fields:\n\n- `host` (string | Array): The server's IP address, hostname, or **SSH Alias**. You can pass a single string or an array of strings to deploy to multiple servers. The CLI will automatically parse `~/.ssh/config` to resolve HostName, User, Port, and IdentityFile if an alias is provided.\n- `port` (number, optional): SSH port. Default is `22`. (Can be read from `~/.ssh/config`)\n- `username` (string, optional): SSH username. (Can be read from `~/.ssh/config`)\n- `password` (string, optional): SSH password. You can also use `privateKey` instead.\n- `privateKey` (string, optional): Path to your SSH private key file. (Can be read from `~/.ssh/config`'s `IdentityFile`)\n- `passphrase` (string, optional): Passphrase for the private key, if it is encrypted.\n- `steps` (Array): An ordered list of steps to execute.\n  - **Upload Step**\n    - `type`: `\"upload\"`\n    - `local` (string): Local path relative to where you run the command.\n    - `remote` (string): Absolute path on the remote server.\n    - `pattern` (string, optional): Glob pattern to filter files (e.g., `\"**/*.js\"`).\n    - `ignore` (string | Array, optional): Glob pattern(s) to ignore (e.g., `\"**/*.map\"`).\n  - **Command Step**\n    - `type`: `\"command\"`\n    - `command` (string): Shell command to execute on the remote server.\n\n## Usage\n\n```bash\n# If no file is specified, it defaults to 'release.json'\nrelease\n\n# Or specify a custom config file\nrelease ./custom-config.json\n\n# Limit deployment to a specific host defined in your config\nrelease --limit nyhq\n\n# Stop execution if any host fails (by default, it skips errors and continues)\nrelease --no-skip-error\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frtugeek%2Frelease","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frtugeek%2Frelease","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frtugeek%2Frelease/lists"}