{"id":22400257,"url":"https://github.com/rlay-project/rlay-utils","last_synced_at":"2025-03-27T00:17:56.512Z","repository":{"id":50815443,"uuid":"151968081","full_name":"rlay-project/rlay-utils","owner":"rlay-project","description":"Utilities to interact with Rlay Ontologies","archived":false,"fork":false,"pushed_at":"2021-05-28T20:54:51.000Z","size":1643,"stargazers_count":2,"open_issues_count":49,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-18T05:52:17.693Z","etag":null,"topics":["cli","javascript","library","rlay"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rlay-project.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-10-07T17:39:41.000Z","updated_at":"2021-05-28T22:14:27.000Z","dependencies_parsed_at":"2022-09-24T20:21:00.035Z","dependency_job_id":null,"html_url":"https://github.com/rlay-project/rlay-utils","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rlay-project%2Frlay-utils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rlay-project%2Frlay-utils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rlay-project%2Frlay-utils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rlay-project%2Frlay-utils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rlay-project","download_url":"https://codeload.github.com/rlay-project/rlay-utils/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245755682,"owners_count":20667027,"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":["cli","javascript","library","rlay"],"created_at":"2024-12-05T08:12:17.847Z","updated_at":"2025-03-27T00:17:56.488Z","avatar_url":"https://github.com/rlay-project.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rlay Utils\n\nProvides a helpful CLI interface for common tasks such as seeding the schema and generating the application rlay-client ORM.\n\nSee here for the [documentation for the Rlay Client Library](./rlay-client-lib).\n\n## Install\n\n```\nnpm install --g @rlay/utils\n```\n\n## Usage\n\nThe typical flow is to first call `rlay-seed` to submit the schema and create the CIDs for the schema entities such as `Class`, `Annotation`, `DataProperty`, `ObjectProperty` and so on. Afterwards `rlay-generate` uses that output file to instantiate the custom rlay client from that schema via `rlay-client-lib`.\n\n## Commands\n\nRlay Utils exposes the following commands:\n\n### `rlay-seed`\n\n\n### `rlay-dump`\n\n\n### `rlay-generate`\n\n`rlay-generate` takes two inputs, (1) the output of `rlay-seed` stored as a `.json` and (2) the path to the seed file which served as input for the `rlay-seed` command. It then generates a `.js` file as output that exports the instantiated custom rlay client with the seeded schema.\n\nThe input and output information can be controlled via the following options:\n\n- **`--seed-file-output`**: path to the file that contains the output of the rlay-seed command. Default: `./generated/seed.json`\n- **`--seed-file`**: path to the file that served as input for the rlay-seed command. Default: `./seed.js`\n- **`--output`**: path to the file where the generated rlay client should be written to. Default: `./generated/rlay-client/index.js`\n\n#### Usage\n\nYou can then `require` the generated file in your application. Example:\n\n```javascript\nconst defaultClient = require('./generated/rlay-client'); // for the default client\nconst { getClient } = require('./generated/rlay-client'); // for configuring your own custom client\n\nconst customClient = getClient({ ...config });\n// calling getClient({ ...config }) anywhere else in your code with the same config will always return the same instance.\n// You can create as many custom clients as you like\n```\n\nExample of a `{ ...config }`:\n\n```javascript\n{\n  address: '0xc02345a911471fd46c47c4d3c2e5c85f5ae93d13',\n  backend: 'myneo4j',\n  RpcUrl: 'http://localhost:8546',\n  storeLimit: 50,\n  readLimit: 50\n}\n```\n\n### `rlay-sync-redis-search`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frlay-project%2Frlay-utils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frlay-project%2Frlay-utils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frlay-project%2Frlay-utils/lists"}