{"id":19947371,"url":"https://github.com/firstbatchxyz/dria-cli","last_synced_at":"2025-08-01T17:37:43.353Z","repository":{"id":222650164,"uuid":"753462154","full_name":"firstbatchxyz/dria-cli","owner":"firstbatchxyz","description":"A command-line tool to interact with Dria knowledge.","archived":false,"fork":false,"pushed_at":"2024-03-03T19:48:28.000Z","size":133,"stargazers_count":9,"open_issues_count":3,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-03T17:44:02.693Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://dria.co/","language":"TypeScript","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/firstbatchxyz.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,"zenodo":null}},"created_at":"2024-02-06T07:00:58.000Z","updated_at":"2025-01-10T12:41:19.000Z","dependencies_parsed_at":"2025-05-03T17:34:03.003Z","dependency_job_id":"2ed7764d-ce1d-4c15-8374-93527caf117e","html_url":"https://github.com/firstbatchxyz/dria-cli","commit_stats":null,"previous_names":["firstbatchxyz/dria-cli"],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/firstbatchxyz/dria-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firstbatchxyz%2Fdria-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firstbatchxyz%2Fdria-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firstbatchxyz%2Fdria-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firstbatchxyz%2Fdria-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/firstbatchxyz","download_url":"https://codeload.github.com/firstbatchxyz/dria-cli/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firstbatchxyz%2Fdria-cli/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268268874,"owners_count":24223139,"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","status":"online","status_checked_at":"2025-08-01T02:00:08.611Z","response_time":67,"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":[],"created_at":"2024-11-13T00:35:48.032Z","updated_at":"2025-08-01T17:37:43.324Z","avatar_url":"https://github.com/firstbatchxyz.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/firstbatchxyz/dria-js-client/master/logo.svg\" alt=\"logo\" width=\"142\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ch1 align=\"center\"\u003e\n    Dria CLI\n  \u003c/h1\u003e\n  \u003cp align=\"center\"\u003e\n    \u003ci\u003eDria CLI is a command-line tool that can be used to interact with Dria locally.\u003c/i\u003e\n  \u003c/p\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://opensource.org/licenses/MIT\" target=\"_blank\"\u003e\n        \u003cimg alt=\"License: MIT\" src=\"https://img.shields.io/badge/license-MIT-7CB9E8.svg\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://www.npmjs.com/package/dria-cli\" target=\"_blank\"\u003e\n        \u003cimg alt=\"NPM\" src=\"https://img.shields.io/npm/v/dria-cli?logo=npm\u0026color=CB3837\"\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\n## Installation\n\nDria CLI requires NodeJS (\u003e= 18.0.0) \u0026 Docker to be installed on your machine, and is available on NPM. It can be installed to your system with:\n\n```sh\nnpm i -g dria-cli\n```\n\n## Usage\n\nYou can see available commands with `dria help`, which outputs:\n\n```sh\ndria \u003ccommand\u003e\n\nCommands:\n  dria pull [contract]          Pull a knowledge to your local machine.\n  dria serve [contract]         Serve a local knowledge.\n  dria clear [contract]         Clear local knowledge.\n  dria fetch \u003ctxid\u003e             Fetch an existing index on Arweave.\n  dria extract \u003czip-path\u003e       Extract a compressed knowledge.\n  dria set-contract \u003ccontract\u003e  Set default contract.\n  dria config                   Show default configurations.\n  dria list                     List all local knowledge.\n  dria stop                     Stop serving knowledge.\n\nOptions:\n      --help     Show help                                           [boolean]\n      --version  Show version number                                 [boolean]\n  -v, --verbose  Show extra information             [boolean] [default: false]\n```\n\n\u003e [!WARNING]\n\u003e\n\u003e If you are using Docker with `sudo` only, you must use the Dria CLI with `sudo` as well, since it needs access\n\u003e to Docker in the background. Otherwise, the CLI will not be able to detect your Docker engine.\n\u003e See more [here](https://docs.docker.com/engine/install/linux-postinstall/#manage-docker-as-a-non-root-user).\n\n### Pull Knowledge\n\nA Dria knowledge is stored on blockchain, and we can pull that knowledge to our local machine with the `pull` command:\n\n```sh\ndria pull \u003ccontract\u003e\ndria pull # use configured contract\n```\n\n### Serve Knowledge\n\nAfter [pulling](#pull-knowledge) a knowledge, you can serve the HNSW index over it with:\n\n```sh\ndria serve \u003ccontract\u003e\ndria serve # use configured contract\n```\n\n### Stop Serving\n\nThe [served](#serve-knowledge) HNSW index runs in the background, and you can stop it anytime with:\n\n```sh\ndria stop\n```\n\n### Fetch Knowledge\n\nYou can download an existing HNSW index that lives in RocksDB and is zipped \u0026 uploaded to Arweave, which is much a faster option than `dria pull` command for an existing index.\n\n```sh\ndria fetch \u003ctxid\u003e\n```\n\nNote that the argument here is not the knowledge ID (i.e. the corresponding Arweave contract txID); instead, it is the transaction ID of the bundling transaction where the RocksDB folder was zipped \u0026 uploaded to Arweave.\n\n### Extract Knowledge\n\nThe previously mentioned [fetch](#fetch-knowledge) command downloads a zip file from Arweave \u0026 extracts it. However, in some cases you might have the knowledge on another platform that is easier to access compared to downloading from Arweave, especially if internet connection is an issue. For such cases, we have the extract command which simply unzips the compressed knowledge under Dria's data directory.\n\n```sh\ndria extract \u003czip-path\u003e\n```\n\n### Configurations\n\nYou can set the default contract with `set-contract` command. When a contract is set by default, `[contract]` can be omitted such that the CLI will use the default one. To see the defaults:\n\n```sh\n# view configurations\ndria config\n\n# change contract\ndria set-contract \u003ccontract\u003e\n```\n\n### List Knowledge\n\nYou can print out the list of contracts [pulled](#pull-knowledge) or [fetched](#fetch-knowledge) so far, along with their last modification date, with the command:\n\n```sh\ndria list\n```\n\n\u003e [!NOTE]\n\u003e\n\u003e If a knowledge has new data inserted to it, you will have to pull it again to catch up.\n\n### Remove Knowledge\n\nTo clear up some space by deleting a knowledge, use:\n\n```sh\ndria clear \u003ccontract\u003e\ndria clear # use configured contract\n```\n\n## Setup\n\nTo setup the repository locally, first you must clone it:\n\n```sh\ngit clone https://github.com/firstbatchxyz/dria-cli.git\ncd dria-cli\n```\n\nThen, install packages with:\n\n```sh\nyarn install\n```\n\nYou can run the CLI as if you are calling `npx dria` with the following command:\n\n```sh\nyarn dria\n```\n\n## Styling\n\nYou can lint \u0026 check formatting with:\n\n```sh\nyarn lint\nyarn format\n```\n\n## License\n\nSee [LICENSE](./LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffirstbatchxyz%2Fdria-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffirstbatchxyz%2Fdria-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffirstbatchxyz%2Fdria-cli/lists"}