{"id":18498596,"url":"https://github.com/nayracoop/nayra-cli","last_synced_at":"2025-05-14T05:24:44.866Z","repository":{"id":42296603,"uuid":"238740767","full_name":"nayracoop/nayra-cli","owner":"nayracoop","description":"CLI utils for the Nayra CMS API","archived":false,"fork":false,"pushed_at":"2023-01-24T01:19:27.000Z","size":614,"stargazers_count":3,"open_issues_count":12,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-12-25T17:43:09.522Z","etag":null,"topics":["boilerplate","cli","rest-api"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nayracoop.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}},"created_at":"2020-02-06T17:05:50.000Z","updated_at":"2020-05-12T20:46:25.000Z","dependencies_parsed_at":"2023-01-31T14:45:39.523Z","dependency_job_id":null,"html_url":"https://github.com/nayracoop/nayra-cli","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nayracoop%2Fnayra-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nayracoop%2Fnayra-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nayracoop%2Fnayra-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nayracoop%2Fnayra-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nayracoop","download_url":"https://codeload.github.com/nayracoop/nayra-cli/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239217105,"owners_count":19601593,"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":["boilerplate","cli","rest-api"],"created_at":"2024-11-06T13:41:33.730Z","updated_at":"2025-02-17T00:45:18.614Z","avatar_url":"https://github.com/nayracoop.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nayra-cli\n\nCommand line tool for boilerplating commonly-used code structures.\n\n\u003cimg src=\"https://img.shields.io/badge/license-GPL--3-brightgreen\" alt=\"license GNU General Public License v3.0\"\u003e\u003cimg src=\"https://img.shields.io/badge/release-0.0.0-orange\" alt=\"release version 0.0.0\"\u003e\n\n :sparkles: **This project doesn't have any published versions yet** :sparkles:\n\nCurrently **```nayra-cli```** has scripts for creating from scratch a ready-to-use REST API folder structure with admin user, and adding resources to it. You can see the base API code in [nayra-cms-api](https://github.com/nayracoop/nayra-cms-api)\n\n## Installation\n\nClone repo, run \n**`npm install`**\nto install dependencies and then\n**`npm link`** \nto access all nayra-cli scripts globally.\n\n## Pre-requirements\n\nTo run the API project created with this tool, you must have Node v^8.16.0 and MongoDB v^3.4.20 installed globally on your computer. \n\n## Usage\n\n### Creating a new API project\n :zap:To create a new API folder structure inside root directory run\n**`nayra-cli init-api`**\nand provide information about project to be created.\n\n :zap:Inside created directory, create a **`.env`** file copying **`.env-example`** replacing the information with your environment information and JWT secret key.\n \n :zap: Run **`npm install`** and then\n**`npm run migrations`**\nso a super-admin user is created onto DB with provided username and password.\n\n :zap:Then run\n**`npm run dev`**\nto start the API in dev environment! That's it! You can login with the username and password provided on init.\n\n### Creating new resources on the project\n :zap:To create new resources inside API (with model, endpoints and tests), run\n**`nayra-cli add-resource`** and provide information about new entity's name and model's fields names and types. \nThe new resource's folder gets created in the /api folder, with model, basic controller, endpoints and tests. Also routes are registered in the routes index. You can start creating and managing new resources with your user account logged in right away! \n\n\n## Contributing\nPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.\n\nPlease make sure to update tests as appropriate.\n\n## License\n[GPL-3.0] GNU General Public License v3.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnayracoop%2Fnayra-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnayracoop%2Fnayra-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnayracoop%2Fnayra-cli/lists"}