{"id":32166050,"url":"https://github.com/skunkwerks/bowie","last_synced_at":"2026-02-18T22:01:58.238Z","repository":{"id":57480548,"uuid":"149188014","full_name":"skunkwerks/bowie","owner":"skunkwerks","description":"Bowie knows all about Changes [pre-alpha eats your children]","archived":false,"fork":false,"pushed_at":"2025-03-18T01:15:34.000Z","size":33,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-21T15:03:15.075Z","etag":null,"topics":["couchdb","elixir"],"latest_commit_sha":null,"homepage":"","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/skunkwerks.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}},"created_at":"2018-09-17T21:05:54.000Z","updated_at":"2025-03-18T01:15:37.000Z","dependencies_parsed_at":"2025-03-18T02:26:27.206Z","dependency_job_id":"784f5274-0cc9-43c8-8c9c-7848e5236f6b","html_url":"https://github.com/skunkwerks/bowie","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/skunkwerks/bowie","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skunkwerks%2Fbowie","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skunkwerks%2Fbowie/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skunkwerks%2Fbowie/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skunkwerks%2Fbowie/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/skunkwerks","download_url":"https://codeload.github.com/skunkwerks/bowie/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skunkwerks%2Fbowie/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29596329,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-18T20:59:56.587Z","status":"ssl_error","status_checked_at":"2026-02-18T20:58:41.434Z","response_time":162,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["couchdb","elixir"],"created_at":"2025-10-21T15:02:11.963Z","updated_at":"2026-02-18T22:01:58.233Z","avatar_url":"https://github.com/skunkwerks.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bowie\n\nBowie is an [Apache v2] GenServer-based module that listens to your\nCouchDB Changes feed, based off the amazing [ibrowse] and [icouch]\nlibraries.\n\n[ibrowse]: http://hex.pm/packages/ibrowse\n[icouch]: http://hex.pm/packages/icouch\n[Apache v2]: https://apache.org/licenses/LICENSE-2.0.html\n\n## Features\n\n- [x] OTP friendly GenServer\n- [x] transparently handles network connectivity failures\n- [x] include fully parsed document bodies, or not\n- [x] jump-start from a given `sequence token` instead of the beginning of\n    time\n- [x] provides overrideable handler\n- [ ] inline code documentation\n\n## Usage\n\nWhile Bowie can be used directly, in the iex console, it is designed to drop\ninto a typical OTP Supervisor tree and receive a stream of changes from it's\nlinked ibrowse worker.\n\nThere is one overrideable function, `handle_changes/1` which receives an\nICouch-parsed document as a message, upon every notified change.\n\nWhen your worker is initialised, the well-known CouchDB changes feed\nparameters are supported:\n\n- `include_docs: true` to include the entire JSON-parsed document\n- `since: \u003cseq\u003e`, the sequence token of the database to start streaming from\n\nNote that in all cases, you will need to handle attachments yourself, using\nICouch's excellent functionality, it makes no sense to stream potentially\nMB or GB of attachment data.\n\nLet's make an example Bowie Changes worker:\n\n```elixir\ncouch = \"http://admin:passwd@127.0.0.1:5984/\"\ndb = Bowie.db(couch, \"_users\")\nflags = [include_docs: true]\nargs = [db, flags]\nworkers = [%{id: My.Worker, start: {Bowie, :start_link, args}}]\noptions = [strategy: :one_for_one, name: My.Supervisor]\nSupervisor.start_link( workers, options )\n\n...\n\n19:13:22.072 [debug] Received changes for: [\"_design/_auth\"]\nElixir.Bowie: %{\n  \"changes\" =\u003e [\n    %{\n      \"rev\" =\u003e \"1-753ae0157a8b1a22339f3c0ef4f1bf19\"\n    }\n  ],\n  \"doc\" =\u003e %ICouch.Document{\n    id: \"_design/_auth\",\n    rev: \"1-753ae0157a8b1a22339f3c0ef4f1bf19\",\n    fields: %{\n      \"_id\" =\u003e \"_design/_auth\",\n      \"_rev\" =\u003e \"1-753ae0157a8b1a22339f3c0ef4f1bf19\",\n      \"language\" =\u003e \"javascript\",\n      ...\n```\n\n## Installation\n\nIf [available in Hex](https://hex.pm/docs/publish), the package can be installed\nby adding `bowie` to your list of dependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [\n    {:bowie, \"~\u003e 0.10.0\"}\n  ]\nend\n```\n\n## [Apache v2] license\n\nCopyright 2018-2038, SkunkWerks, GmbH\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskunkwerks%2Fbowie","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fskunkwerks%2Fbowie","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskunkwerks%2Fbowie/lists"}