{"id":13550388,"url":"https://github.com/sapegin/shipit","last_synced_at":"2025-04-05T09:07:39.109Z","repository":{"id":11833959,"uuid":"14389789","full_name":"sapegin/shipit","owner":"sapegin","description":"Minimalistic SSH deployment","archived":false,"fork":false,"pushed_at":"2020-04-08T17:46:30.000Z","size":39,"stargazers_count":568,"open_issues_count":2,"forks_count":37,"subscribers_count":20,"default_branch":"master","last_synced_at":"2025-03-29T08:07:19.059Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","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/sapegin.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":"License.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-11-14T08:58:04.000Z","updated_at":"2024-12-22T19:13:29.000Z","dependencies_parsed_at":"2022-09-23T02:30:53.220Z","dependency_job_id":null,"html_url":"https://github.com/sapegin/shipit","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sapegin%2Fshipit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sapegin%2Fshipit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sapegin%2Fshipit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sapegin%2Fshipit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sapegin","download_url":"https://codeload.github.com/sapegin/shipit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247312078,"owners_count":20918344,"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":[],"created_at":"2024-08-01T12:01:32.482Z","updated_at":"2025-04-05T09:07:39.076Z","avatar_url":"https://github.com/sapegin.png","language":"Shell","readme":"# shipit :shipit:\n\nMinimalistic SSH deployment.\n\n![shipit](https://d3vv6lp55qjaqc.cloudfront.net/items/0c1z211n0b1m3d1g370u/shipit.png)\n\n## Installation\n\nCopy this one-liner and run it in your shell:\n\n```bash\nSHPT=/usr/local/bin/shipit \u0026\u0026 curl -o $SHPT https://raw.githubusercontent.com/sapegin/shipit/master/bin/shipit \u0026\u0026 chmod +x $SHPT \u0026\u0026 unset SHPT\n```\n\nYou can use this command to update shipit too.\n\n**Note:** Use `sudo` or replace `/usr/local/bin/shipit` to path somewhere inside your home directory.\n\n## Usage\n\n```bash\nshipit [option] \u003ccommand\u003e\n```\n\n### Commands\n\n| Command         | Aliases | Description |\n| --------------- | ------- | ----------- |\n| `\u003ctarget\u003e`      | | Execute `target` target on the remote host |\n| list            | ls | Print list of available targets |\n| console         | shell, ssh | Open an SSH session on remote host |\n| exec `\u003ccmd\u003e`    | run | Execute `cmd` on the remote host |\n| copy `\u003cfile\u003e`   | cp | Copy `files` to the remote host |\n| --version       | -V | Print shipit version |\n| --help          | -h | Print help |\n\n### Options\n\n| Option          | Description |\n| --------------- | ----------- |\n| -c, --config    | Config file path (default: `.shipit`) |\n| -r, --remote    | Override remote host |\n| -v, --verbose   | Enable verbose mode for SSH |\n\n### Examples\n\nExecute `deploy` target:\n\n```bash\nshipit\n```\n\nExecute `status` target:\n\n```bash\nshipit status\n```\n\nShow a list of available targets:\n\n```bash\nshipit list\n```\n\nExecute `uptime` command on the remote host:\n\n```bash\nshipit exec uptime\n```\n\n## Configuration\n\nYou need to create `.shipit` file in your project’s directory.\n\nHere is a typical config:\n\n```ini\nhost='myhost'\npath='sites/example.com'\n\n[deploy:local]\ngit push origin master\n\n[deploy]\ngit checkout master\ngit pull\nnpm install\ngrunt build\n\n[status]\nuptime\n```\n\nThe only required things are `host` and `path` parameters, and `[deploy]` or `[deploy:local]` target.\n\nFor non-standard port number and to specify which SSH key to use, edit your SSH config, `~/.ssh/config`:\n\n```\nhost example.com\nIdentityFile ~/.ssh/keyfile\nport 10022\nuser usernamehere\n```\n\n### Parameters\n\n### host\n\nIt’s the same host you use in `ssh` command. It could be string of format `\u003cusername\u003e@\u003cip\u003e:\u003cport\u003e` or just a name of `~/.ssh/config` record.\n\n### path\n\nProject path on remote host. shipit will `cd` to this directory before executing any command.\n\n### Targets\n\nTarget is just a bunch of shell command that will be executed on remote host via SSH. You can define as many targets as you want.\n\nNote that you can’t use blank lines inside targets but you can use comments (#) and other things—it’s just a shell script.\n\n### Local targets\n\nIf you append `:local` to a target name (like `[name:local]`) it will be executed on your local machine before remote target with the same name. You can define only local, only remote or both targets.\n\nIn case of any errors in local target remote target won’t be executed.\n\nYou can use these variables:\n\n* `$SSH_HOST` — your config’s `host` value,\n* `$SSH_PATH` — your config’s `path` value.\n\n## Examples\n\n### Deploy from Git\n\n```ini\nhost='myhost'\npath='sites/example.com'\n\n[deploy:local]\ngit push origin master\n\n[deploy]\ngit checkout master\ngit pull\nnpm install\nnpm prune\nnpm run build\n```\n\n### Deploy with `rsync`\n\n```ini\nhost='myhost'\npath='sites/example.com'\n\n[deploy:local]\nnpm test\nnpm run build\nrsync --archive --compress --force --delete public/ $SSH_HOST:$SSH_PATH\n```\n\n## Changelog\n\nThe changelog can be found on the [Releases page](https://github.com/sapegin/shipit/releases).\n\n## Sponsoring\n\nThis software has been developed with lots of coffee, buy me one more cup to keep it going.\n\n\u003ca href=\"https://www.buymeacoffee.com/sapegin\" target=\"_blank\"\u003e\u003cimg src=\"https://cdn.buymeacoffee.com/buttons/lato-orange.png\" alt=\"Buy Me A Coffee\" height=\"51\" width=\"217\" \u003e\u003c/a\u003e\n\n---\n\n## Authors and license\n\n[Artem Sapegin](https://sapegin.me) and [contributors](https://github.com/sapegin/shipit/graphs/contributors).\n\nMIT License, see the included [License.md](License.md) file.\n","funding_links":["https://www.buymeacoffee.com/sapegin"],"categories":["Shell","For Developers"],"sub_categories":["Directory Navigation"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsapegin%2Fshipit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsapegin%2Fshipit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsapegin%2Fshipit/lists"}