{"id":15065652,"url":"https://github.com/saiforceone/dirt-cli","last_synced_at":"2025-04-10T13:32:35.180Z","repository":{"id":120710270,"uuid":"599362036","full_name":"saiforceone/dirt-cli","owner":"saiforceone","description":"A NodeJs-based CLI Utility for scaffolding D.I.R.T stack projects where DIRT = Django, InertiaJs, Reactive UI (React/Vue) \u0026 Tailwind CSS.","archived":false,"fork":false,"pushed_at":"2023-08-06T15:51:41.000Z","size":365,"stargazers_count":5,"open_issues_count":8,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-24T12:11:26.881Z","etag":null,"topics":["cli","django","inertia-django","inertiajs","nodejs","react","reactjs","tailwindcss","vitejs","vue3"],"latest_commit_sha":null,"homepage":"https://dirt-stack.vercel.app/","language":"TypeScript","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/saiforceone.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}},"created_at":"2023-02-09T01:14:28.000Z","updated_at":"2023-09-13T14:44:01.000Z","dependencies_parsed_at":"2024-10-13T01:21:43.965Z","dependency_job_id":null,"html_url":"https://github.com/saiforceone/dirt-cli","commit_stats":{"total_commits":89,"total_committers":4,"mean_commits":22.25,"dds":0.0898876404494382,"last_synced_commit":"16dfb049f81ce11ccfd8680f6f9b64db2532cc7c"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saiforceone%2Fdirt-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saiforceone%2Fdirt-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saiforceone%2Fdirt-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saiforceone%2Fdirt-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/saiforceone","download_url":"https://codeload.github.com/saiforceone/dirt-cli/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248225707,"owners_count":21068078,"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","django","inertia-django","inertiajs","nodejs","react","reactjs","tailwindcss","vitejs","vue3"],"created_at":"2024-09-25T00:44:13.223Z","updated_at":"2025-04-10T13:32:35.124Z","avatar_url":"https://github.com/saiforceone.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"```\n______ ___________ _____   _____  _     _____ \n|  _  \\_   _| ___ \\_   _| /  __ \\| |   |_   _|\n| | | | | | | |_/ / | |   | /  \\/| |     | |  \n| | | | | | |    /  | |   | |    | |     | |  \n| |/ / _| |_| |\\ \\  | |   | \\__/\\| |_____| |_ \n|___/  \\___/\\_| \\_| \\_/    \\____/\\_____/\\___/ \n```\n# D.I.R.T Stack CLI / D.I.R.T CLI (Beta)\n__Note:__ This is a work-in-progress and will be updated with more useful information\n\nOfficial CLI Utility for the D.I.R.T stack\n\nWelcome to a nicer way to scaffold Django projects utilizing InertiaJs, Reactive UI (React/Vue/Svelte soon) \u0026 Tailwind CSS.\n\n## Requirements\nThe DIRT CLI has the following requirements before it can be used. For a smoother experience, make sure the requirements below are working correctly.\n* [Python 3.8+](https://www.python.org/)\n* [NodeJs 16.x](https://nodejs.org/en)\n* [Pipenv](https://pipenv.pypa.io/en/latest/) \n\n## Things to keep in mind\n* This is an early version of the CLI\n* New features will be added\n* This CLI has been tested on __MacOS__, __Linux (Ubuntu)__ and now, __Windows__.\n* There are bugs\n\n## Creating a DIRT Stack Application\n\nThe DIRT-CLI makes it very easy to create a project harnessing the power of Django, InertiaJS, React/Vue and Tailwind CSS.\n\n```shell\n# Run the command using NPX (this may change in the future)\nnpx @saiforceone/dirt-cli@latest\n```\nand answer the prompts. For an example, see below\n\n```shell\n? What should we call this project? testproj\n? Select a frontend framework / library react\n? Would you like to use StorybookJS? No\n? Would you like to have git initialized? No\n? Show verbose logs? No\n```\n\nOnce the scaffolding of your project is complete, navigate to the directory and run the following\n```shell\n# activate pipenv's shell\npipenv shell\n\n# run the project\nnpm run dirt-dev\n\n# open the web app in browser: http://127.0.0.1:8000\n```\n\nIf you opted to use the StoryBook option, you may run it from the project directory using\n```shell\nnpm run storybook\n```\n\n## Creating Controllers (Django Apps within a D.I.R.T Stack project)\n\nA controller in this context is defined as a Django app within the project and the associated InertiaJS View files\n\n### Creating a controller\n\nTo create a controller, the following command will need to be used. \nThis command does not need to the virtual environment to be active for it to work.\n\n```shell\n# Controller create command\n@saiforceone/dirt-cli create-controller \u003ccontroller_name\u003e\n\n# or (the create-app alias may be used)\n@saiforceone/dirt-cli create-app \u003ccontroller_name\u003e\n```\n\nWhen the command runs, the necessary files will be created. Once that is done, you will need to update your project's main `urls.py` file as follows (see the example below)\n* Import the `include` function from `django.urls`\n* Copy and paste the path in the list of `urlpatterns` \n\n```shell\n### Example output assuming \u003ccontroller_name\u003e is 'demoapp'\n D.I.R.T CLI Controller Created\n\n Update your main urls.py file as follows\n\n 1. Import the include function from django.urls\n\n from django.urls import path, include\n\n 2. Add this entry to urlpatterns\n\n path('demoapp/', include('demoapp.urls')),\n\n 3. Navigate to the newly-created controller\n\n http://127.0.0.1:8000/demoapp/\n```\n\n#### Technical Stuff\nWhen the `create-controller` command is run, the following processes take place:\n* A Django application is created within the project matching the name specified. \n* The corresponding InertiaJS View is then created `[project_root]/dirt_fe_[react|vue]/src/pages/[controller_name]/Index.[tsx|vue]`\n\n### Known issues\n\n#### Failed to scaffold project\nCurrently, the scaffolding process may fail at the initial step of creating the Django project. If that happens, delete the generated project folder, the corresponding virtual environment and then rerun the CLI.\n\nTypically, virtual environments will be located in somewhere like: `~/.local/share/virtualenvs` for Posix system or `.virtualenvs` for Windows.\n\n#### Hidden Django dev server output: \nCurrently, some Django development server output is hidden when using `npm run dirt-dev` on __Windows__. The workaround is to run Django normally in it's own terminal (`pipenv shell` must be activated) and then the frontend in another terminal using `npm run dirt-fe`. Workaround: set the environment variable `PYTHONUNBUFFERED=1`. ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaiforceone%2Fdirt-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsaiforceone%2Fdirt-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaiforceone%2Fdirt-cli/lists"}