{"id":19944298,"url":"https://github.com/taskforcesh/nandu-cli","last_synced_at":"2025-05-03T16:30:55.991Z","repository":{"id":57307740,"uuid":"427057389","full_name":"taskforcesh/nandu-cli","owner":"taskforcesh","description":"Nandu CLI - Open NPM Registry","archived":false,"fork":false,"pushed_at":"2022-01-12T07:07:45.000Z","size":225,"stargazers_count":4,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-11-03T18:35:01.747Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/taskforcesh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-11-11T15:50:48.000Z","updated_at":"2022-03-14T07:34:48.000Z","dependencies_parsed_at":"2022-09-17T21:54:58.811Z","dependency_job_id":null,"html_url":"https://github.com/taskforcesh/nandu-cli","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taskforcesh%2Fnandu-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taskforcesh%2Fnandu-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taskforcesh%2Fnandu-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taskforcesh%2Fnandu-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/taskforcesh","download_url":"https://codeload.github.com/taskforcesh/nandu-cli/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224366447,"owners_count":17299346,"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":[],"created_at":"2024-11-13T00:19:53.544Z","updated_at":"2024-11-13T00:19:54.195Z","avatar_url":"https://github.com/taskforcesh.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n![nandu](https://github.com/taskforcesh/nandu/blob/assets/nandu.png?raw=true)\n\n# Nandu CLI\n\nNandu Open NPM Registry CLI\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/nandu-cli.svg)](https://npmjs.org/package/nandu-cli)\n[![Downloads/week](https://img.shields.io/npm/dw/nandu-cli.svg)](https://npmjs.org/package/nandu-cli)\n[![License](https://img.shields.io/npm/l/nandu-cli.svg)](https://github.com/taskforcesh/nandu-cli/blob/master/package.json)\n\n\u003c!-- toc --\u003e\n* [Nandu CLI](#nandu-cli)\n* [Quick Start](#quick-start)\n* [Usage](#usage)\n* [Commands](#commands)\n\u003c!-- tocstop --\u003e\n\n# Quick Start\n\nIn order to quickly get a working Nandu NPM registry you can follow this steps and recommendations.\n\nNandu uses env variables for configuring all its settings, inclusive the ROOT user credentials. The root\nuser is the one that can bootstrap the service, by creating new users and so on. Also the root user\nhas godlike permissions, therefore it is important to only use it for bootstrapping, and the first thing to\ndo is to create a new user and give it \"admin\" permissions.\n\nWhen you start Nandu for the first time it will create such root user that you can then use to interact with the\nregistry. \n\n```bash\n$ nandu start\nNandu is running on port 4567.\n```\n\nYou will get a lot of debug logs unless you set ```NODE_ENV``` to ```production```.\n\nBy default Nandu will use Sqlite for storing the registry metadata, and the database file will be\nstored at ```./storage/db/nandu.db```. You can change this setting with the ```NANDU_SEQUELIZE_URI``` env\nvariable.\n\nThe next step is to create an authentication token for the root user, you need to use the nandu cli for this as well,\n\n```bash\n$ nandu token:create root\nusername: root\npassword: ******\n\nNew token created for user root {\n  id: 'ad4ac909-2cea-40ba-be4e-03ec4fbb57bf',\n  token: 'c0463461-23fb-4642-a927-820b0d71ffb8',\n  readonly: false,\n  created: '2021-11-11T08:09:47.532Z'\n}\n```\n\nYou can create tokens on behalf of other users if the user you use for creating the tokens has the correct permissions.\n\n\n\n\n\n# Usage\n\n\u003c!-- usage --\u003e\n```sh-session\n$ npm install -g nandu-cli\n$ nandu COMMAND\nrunning command...\n$ nandu (-v|--version|version)\nnandu-cli/1.2.3 linux-x64 node-v14.18.2\n$ nandu --help [COMMAND]\nUSAGE\n  $ nandu COMMAND\n...\n```\n\u003c!-- usagestop --\u003e\n\n# Commands\n\n\u003c!-- commands --\u003e\n* [`nandu help [COMMAND]`](#nandu-help-command)\n* [`nandu start`](#nandu-start)\n* [`nandu token`](#nandu-token)\n* [`nandu token:create USER`](#nandu-tokencreate-user)\n* [`nandu token:ls USER`](#nandu-tokenls-user)\n* [`nandu user`](#nandu-user)\n* [`nandu user:add USER`](#nandu-useradd-user)\n\n## `nandu help [COMMAND]`\n\ndisplay help for nandu\n\n```\nUSAGE\n  $ nandu help [COMMAND]\n\nARGUMENTS\n  COMMAND  command to show help for\n\nOPTIONS\n  --all  see all commands in CLI\n```\n\n_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v3.2.5/src/commands/help.ts)_\n\n## `nandu start`\n\nStarts Nandu Open NPM Server\n\n```\nUSAGE\n  $ nandu start\n\nOPTIONS\n  -f, --force\n  -h, --help       show CLI help\n  -p, --port=port  [default: 4567] listen to port\n\nEXAMPLE\n  $ nandu start -p 4567\n```\n\n_See code: [src/commands/start.ts](https://github.com/taskforcesh/nandu-cli/blob/v1.2.3/src/commands/start.ts)_\n\n## `nandu token`\n\nManage NPM Registry tokens\n\n```\nUSAGE\n  $ nandu token\n\nEXAMPLE\n  $ nandu token:create myuser\n```\n\n_See code: [src/commands/token/index.ts](https://github.com/taskforcesh/nandu-cli/blob/v1.2.3/src/commands/token/index.ts)_\n\n## `nandu token:create USER`\n\ncreate a new token for given user\n\n```\nUSAGE\n  $ nandu token:create USER\n\nOPTIONS\n  -h, --help                       show CLI help\n  --cidr-whitelist=cidr-whitelist  comma separated list of whitelisted cidrs\n  --readonly                       generate a readonly token\n  --registry=registry              (required) URI pointing to your Nandu NPM Registry\n  --token=token                    Token to be used for authentication, uses NPM_TOKEN env variable if unspecified\n\nEXAMPLE\n  $ nandu start -p 4567\n```\n\n_See code: [src/commands/token/create.ts](https://github.com/taskforcesh/nandu-cli/blob/v1.2.3/src/commands/token/create.ts)_\n\n## `nandu token:ls USER`\n\nlist tokens for given user\n\n```\nUSAGE\n  $ nandu token:ls USER\n\nOPTIONS\n  -h, --help           show CLI help\n  --registry=registry  (required) URI pointing to your Nandu NPM Registry\n  --token=token        Token to be used for authentication, uses NPM_TOKEN env variable if unspecified\n\nEXAMPLE\n  $ nandu start -p 4567\n```\n\n_See code: [src/commands/token/ls.ts](https://github.com/taskforcesh/nandu-cli/blob/v1.2.3/src/commands/token/ls.ts)_\n\n## `nandu user`\n\nManage NPM Registry users\n\n```\nUSAGE\n  $ nandu user\n\nEXAMPLE\n  $ nandu user:add myuser\n```\n\n_See code: [src/commands/user/index.ts](https://github.com/taskforcesh/nandu-cli/blob/v1.2.3/src/commands/user/index.ts)_\n\n## `nandu user:add USER`\n\nadd or update a new token for given user\n\n```\nUSAGE\n  $ nandu user:add USER\n\nOPTIONS\n  -h, --help           show CLI help\n  --registry=registry  (required) URI pointing to your Nandu NPM Registry\n  --token=token        Token to be used for authentication, uses NPM_TOKEN env variable if unspecified\n\nEXAMPLE\n  $ nandu user:add myuser\n```\n\n_See code: [src/commands/user/add.ts](https://github.com/taskforcesh/nandu-cli/blob/v1.2.3/src/commands/user/add.ts)_\n\u003c!-- commandsstop --\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaskforcesh%2Fnandu-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftaskforcesh%2Fnandu-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaskforcesh%2Fnandu-cli/lists"}