{"id":19732252,"url":"https://github.com/lifeomic/cli","last_synced_at":"2025-04-30T02:32:03.729Z","repository":{"id":30960542,"uuid":"126504665","full_name":"lifeomic/cli","owner":"lifeomic","description":"A CLI app that provides functionality around the LifeOmic platform. ","archived":false,"fork":false,"pushed_at":"2024-09-12T00:00:40.000Z","size":2157,"stargazers_count":20,"open_issues_count":2,"forks_count":21,"subscribers_count":22,"default_branch":"master","last_synced_at":"2024-09-12T09:10:45.218Z","etag":null,"topics":["cli","javascript","node","team-clinical-intelligence"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/lifeomic.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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-03-23T15:31:05.000Z","updated_at":"2024-09-12T00:00:42.000Z","dependencies_parsed_at":"2024-01-11T06:57:27.572Z","dependency_job_id":"826cf66a-a062-467c-82e9-70a9f76d1dce","html_url":"https://github.com/lifeomic/cli","commit_stats":null,"previous_names":[],"tags_count":136,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lifeomic%2Fcli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lifeomic%2Fcli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lifeomic%2Fcli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lifeomic%2Fcli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lifeomic","download_url":"https://codeload.github.com/lifeomic/cli/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224194756,"owners_count":17271519,"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","node","team-clinical-intelligence"],"created_at":"2024-11-12T00:25:26.648Z","updated_at":"2024-11-12T00:25:27.361Z","avatar_url":"https://github.com/lifeomic.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CLI\n\nThis [command line interface][CLI] provides functionality offered by\n[LifeOmic](https://lifeomic.com)'s Precision Health Cloud APIs inside an\ninteractive terminal or in a scripted environment.\n\n![CLI Demo](https://raw.githubusercontent.com/lifeomic/cli/master/cli-demo.svg?sanitize=true)\n\n1. [Project Status](#project-status)\n1. [Getting Started](#getting-started)\n    1. [Dependencies](#dependencies)\n    1. [Installation](#installation)\n    1. [Configuration](#configuration)\n    1. [Authentication](#authentication)\n        1. [API Keys](#api-keys)\n        1. [SSO](#sso)\n1. [Usage](#usage)\n1. [Contributing](#contributing)\n    1. [Getting the Source](#getting-the-source)\n    1. [Running Tests](#running-tests)\n    1. [Release Process](#release-process)\n    1. [Versioning](#versioning)\n1. [License](#license)\n1. [Authors](#authors)\n1. [Acknowledgements](#acknowledgements)\n\n## Project Status\n\n[![License](https://img.shields.io/badge/license-MIT-blue.svg?style=for-the-badge)](https://opensource.org/licenses/MIT)\n![Downloads](https://img.shields.io/npm/dw/@lifeomic/cli?style=for-the-badge)\n![Version](https://img.shields.io/npm/v/@lifeomic/cli?style=for-the-badge)\n[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=for-the-badge)](https://github.com/lifeomic/cli)\n\n**[Back to top](#table-of-contents)**\n\n## Getting Started\n\n### Dependencies\n\n* [node](https://nodejs.org) version \u003e= 12.0.0\n\n### Installation\n\nInstall via `npm` or `yarn`:\n\n```bash\nnpm install -g @lifeomic/cli\n\nyarn global add @lifeomic/cli\n```\n\nor you can download and install the binary from the [latest\nrelease](https://github.com/lifeomic/cli/releases).\n\n### Configuration\n\nRun `lo setup` to configure the default environment and account you wish to use.\nYou can later override the default account using the `-a` option for commands.\n\n### Authentication\n\nUse `lo auth` to obtain access credentials when using username / password\nauthentication.  A browser will be opened and you can enter your credentials in\nthe LifeOmic login view.\n\nYou can also use the client credentials grant flow for obtaining access tokens.\nTo do this, create a custom authentication client\n[here](https://apps.us.lifeomic.com/phc/account/accounts/clients) and be sure to\nselect the `Client credentials` flow under the `Allowed OAuth Flows` section.\nRun `lo setup` again and choose `Y` to use a custom authentication client and\nenter the client ID and secret and then choose `Y` again to use client\ncredentials for authentication. Note that for this option, you do not need to\nrun `lo auth` as username and password credentials are not used for this\ncredentials grant.\n\nYou can also provide an API key or access and refresh tokens in\nthe `PHC_ACCESS_TOKEN` and `PHC_REFRESH_TOKEN` environment variables. With these\nset, you can bypass using `lo auth`.\n\n#### API Keys\n\nTo use an API key for authentication, follow the\n[Set Up API Keys](https://phc.docs.lifeomic.com/user-guides/account-info/api-keys)\ninstructions to create the key. You can also use the command `lo api-keys-create`.\nBe sure to capture the value of the API key when it is created as you will not\nbe able to retrieve the value after the first attempt. Run `lo setup` and choose\n'Y' to use an API key and provide the API key value.\n\n#### SSO\n\nIf you wish to use SSO, then you need to create a custom authentication client\n[here](https://apps.us.lifeomic.com/phc/account/accounts/clients) and configure\nyour SAML 2.0 identity provider.  For the callback URL on the authentication\nclient, be sure to add `http://localhost:8787`.  Then run `lo setup` again and\nchoose 'Y' to use a custom authentication client and provide the client ID and\nsecret (if a private client was created).  When running `lo auth` again, a\nbrowser should open and be redirected to the identity provider being used for\nSSO.\n\n## Usage\n\n```bash\nlo \u003ccommand\u003e [options]\n```\n\n`lo` offers many commands and those can be displayed by using the `-h / --help`\ncommand line option.  For example:\n\n```bash\n❯ lo --help\n\n  Usage: lo \u003ccommand\u003e [options]\n\n  Options:\n\n    -V, --version  output the version number\n    -h, --help     output usage information\n\n  Commands:\n\n    accounts [options]                 List accounts\n    accounts-get [options] \u003caccount\u003e   Fetch an account\n    ...\n    \u003c/abbreviated\u003e\n```\n\nGet help for a specific command:\n\n```bash\n❯ lo \u003ccommand\u003e --help\n\n❯ lo tasks --help\n\n  Usage: tasks [options] \u003cdatasetId\u003e\n\n  List tasks\n\n  Options:\n\n    -a, --account \u003caccount\u003e            Override the default LifeOmic account\n    --json                             Print output as JSON\n    --prefix \u003cprefix\u003e                  Filter tasks where the name begins with a prefix\n    --state \u003cstate\u003e                    Filter tasks by state\n    --view \u003cview\u003e                      Specify MINIMAL to just get task state\n    --page-size \u003cpageSize\u003e             Number of items to return (default: 25)\n    --next-page-token \u003cnextPageToken\u003e  Next page token\n    -h, --help                         output usage information\n```\n\n[cli]: https://en.wikipedia.org/wiki/Command-line_interface \"Command-line interface\"\n\n**[Back to top](#table-of-contents)**\n\n## Contributing\n\nWe encourage public contributions! Please review [CONTRIBUTING.md](CONTRIBUTING.md) and [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md) for details on our code of conduct and development process.\n\n### Getting the Source\n\nThis project is [hosted on GitHub](https://github.com/lifeomic/cli). You can clone this project directly using this command:\n\n```bash\ngit clone git@github.com:lifeomic/cli.git\n```\n\n### Running Tests\n\nRun tests with `npm` or `yarn`:\n\n```bash\nnpm test\n\nyarn test\n```\n\n### Release Process\n\n[Releases](https://github.com/lifeomic/cli/releases) are created by making a PR, incrementing the version in `package.json`, merging the PR,\nand then finally tagging master with a tag like `v4.5.3`.\n\nPackages for each release are published to [npm](https://www.npmjs.com/package/@lifeomic/cli). See [CHANGELOG.md](CHANGELOG.md) for release notes.\n\n### Versioning\n\nThis project uses [Semantic Versioning](http://semver.org/).\n\n**[Back to top](#table-of-contents)**\n\n## License\n\nThis project is licensed under the MIT License - see [LICENSE](LICENSE) file for details.\n\n**[Back to top](#table-of-contents)**\n\n## Authors\n\nSee the list of [contributors](https://github.com/lifeomic/cli/contributors) who participate in this project.\n\n**[Back to top](#table-of-contents)**\n\n## Acknowledgements\n\nThis project is built with the following:\n\n* [axios](https://github.com/axios/axios) - Promise based HTTP client for the browser and node.js\n* [yargs](https://github.com/yargs/yargs) - CLI argument parser\n* [configstore](https://github.com/yeoman/configstore) - Easily load and persist config without having to think about where and how\n* [ava](https://github.com/avajs/ava) - Testing framework\n\n**[Back to top](#table-of-contents)**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flifeomic%2Fcli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flifeomic%2Fcli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flifeomic%2Fcli/lists"}