{"id":15372172,"url":"https://github.com/crispgm/go-van","last_synced_at":"2025-04-15T14:06:24.439Z","repository":{"id":57506972,"uuid":"155406009","full_name":"crispgm/go-van","owner":"crispgm","description":"Simple project files watcher and deployer","archived":false,"fork":false,"pushed_at":"2023-02-26T02:58:23.000Z","size":143,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-15T14:06:11.582Z","etag":null,"topics":["deploy-tool","sync-files"],"latest_commit_sha":null,"homepage":"","language":"Go","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/crispgm.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,"publiccode":null,"codemeta":null},"funding":{"custom":"https://www.buymeacoffee.com/crispgm"}},"created_at":"2018-10-30T15:09:20.000Z","updated_at":"2023-02-26T03:20:58.000Z","dependencies_parsed_at":"2024-10-16T12:20:59.780Z","dependency_job_id":"83ffd4f1-e3c6-4dca-a39a-2869caf2fe31","html_url":"https://github.com/crispgm/go-van","commit_stats":{"total_commits":94,"total_committers":3,"mean_commits":"31.333333333333332","dds":"0.37234042553191493","last_synced_commit":"660c754820bb0bd3092b7d1bb2cb3a5ad5057313"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crispgm%2Fgo-van","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crispgm%2Fgo-van/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crispgm%2Fgo-van/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crispgm%2Fgo-van/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/crispgm","download_url":"https://codeload.github.com/crispgm/go-van/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249085437,"owners_count":21210267,"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":["deploy-tool","sync-files"],"created_at":"2024-10-01T13:49:42.536Z","updated_at":"2025-04-15T14:06:24.421Z","avatar_url":"https://github.com/crispgm.png","language":"Go","funding_links":["https://www.buymeacoffee.com/crispgm"],"categories":[],"sub_categories":[],"readme":"# Caravan (go-van)\n\n[![ci](https://github.com/crispgm/go-van/actions/workflows/ci.yml/badge.svg)](https://github.com/crispgm/go-van/actions/workflows/ci.yml)\n![codecov](https://codecov.io/gh/crispgm/go-van/branch/master/graph/badge.svg)\n\nA simple project files watcher and deployer, which syncs dev files to remote machines at ease.\n\ngo-van is the Go implementation of [Caravan](https://github.com/crispgm/caravan).\n\n![Caravan in Civ5](/assets/civ-5-caravan.png)\n\nThis is the caravan in [Sid Meier's Civilization V](http://www.civilization5.com/), where the project name originally comes from.\n\n## Migrate from Ruby Caravan\n\nCompared to Ruby version of Caravan:\n\n- It highly depends on `caravan.yml`, which assumes that `caravan.yml` is already setup.\n- Only `rsync` is supported.\n- More powerful features (e.g. `extra_args` and `log_format`).\n\n## Installation\n\n```shell\ngo get -u github.com/crispgm/go-van\n```\n\n## Quick Start\n\n1. Init `caravan.yml`:\n\n   ```shell\n   $ go-van -init\n   Created caravan.yml in /path/to/project\n   ```\n\n2. Edit `caravan.yml`:\n\n   ```shell\n   # Open with your favorite editor, `vim` for example\n   $ vim caravan.yml\n   ```\n\n   Specify `src`, `dst`, and other configuration in `master` scope:\n\n   ```yaml\n   ---\n   master:\n     src: .\n     dst: user@target:/path/to/project\n     debug: false\n     deploy_mode: rsync\n     incremental: true\n     extra_args:\n       - \"--delete\"\n       - \"--exclude=.git\"\n     exclude:\n       - \".git\"\n   ```\n\n3. Start to watch:\n\n   ```shell\n   $ go-van\n   Reading configuration...\n   =\u003e debug: false\n   =\u003e once: false\n   =\u003e source: .\n   =\u003e destination: .\n   =\u003e deploy_mode: rsync\n   =\u003e incremental: true\n   =\u003e extra_args: [--delete]\n   =\u003e exclude: [.git .svn /node_modules]\n   Starting to watch...\n   ```\n\n4. When a file is changed, it syncs:\n\n   ```shell\n   [20:46:05] EVENT 0x41217e0 /Users/david/path/to/file.py\n   ```\n\n## Usage\n\nGenerate an empty `caravan.yml`:\n\n```shell\n$ go-van -init\nCreated caravan.yml in /path/to/project\n```\n\nRun with default:\n\n```shell\n# Default run, with `caravan.yml` and `master` spec\n$ go-van\n```\n\nAnd you may specify config file name and spec name:\n\n```shell\n# Special spec name\n$ go-van -spec my_spec\n# Specify config file name\n$ go-van -conf another_caravan.yml\n# And both\n$ go-van -conf another_caravan.yml -spec my_spec\n```\n\nDeploy once:\n\n```shell\n$ go-van -once\nReading configuration...\n=\u003e debug: false\n...\nDeploying at once and for once...\n```\n\n## Configuration\n\n### Debug\n\nShow debug outputs.\n\n### Deploy Mode\n\nOnly support rsync in `go-van`, compared to `caravan`.\n\n### Exclusion\n\nExclusion denotes exclude path for watching, not deploying. Hence, use git/svn in source path instead of destination path or checkout [Extra Arguments](#extra-arguments).\n\n### Extra Arguments\n\nExtra arguments will be passed to deployer (e.g. `rsync`) as arguments.\n\n#### Support Sync with Deletion\n\n```yaml\nmaster:\n  src: .\n  dst: /path/to/project\n  debug: false\n  deploy_mode: rsync\n  incremental: true\n  extra_args:\n    - \"--delete\"\n  exclude:\n    - \".git\"\n    - \".svn\"\n```\n\n#### Ignore `.git` Files\n\n```yaml\nextra_args:\n  - \"--exclude=.git\"\n```\n\n#### Log Format\n\nFormat:\n\n- `%t`: Time string, e.g. 16:25:01\n- `%T`: Timestamp\n- `%e`: Event type\n- `%p`: Path\n- `%f`: File name\n\n```yaml\nlog_format: \"[%t] EVENT \u003c%e\u003e %p\"\n```\n\n## Event Hooks (experimental)\n\nEvent hooks are designed to handle events of hooks, by which users may inject their scripts.\n\nThere are four hooks exposed, which are `OnInit` `OnChange` `OnDeploy` `OnError`.\n\ne.g., You may add `OnInit` in `caravan.yml`:\n\n```yaml\non_init:\n  - echo \"go-van is initializing\"\non_change:\n  - make\n```\n\n## License\n\nMIT License.\n\nCopyright (c) 2020 David Zhang.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrispgm%2Fgo-van","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcrispgm%2Fgo-van","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrispgm%2Fgo-van/lists"}