Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upBuild a new CLI console #1614
Build a new CLI console #1614
Conversation
|
A small overview of the new CLI
|
|
Looking good so far. Are you doing only the base or you'll try to build the commands too? |
|
@WoLfulus I don't know, should I ? The commands are in a separate branch but I could make a single big pull request. |
|
I asked just to know if there's more coming or if this PR was intended to be a boilerplate for a new CLI. |
|
Lets keep everything CI related in one PR, so we can merge / release it at once. We can move it into a new branch on this repo and go from there, or keep pushing to this PR. Doesn't change much |
|
Ok I'll push the rest of my work in this PR. |
|
It's still a WIP since I didn't write all the commands. But some commands needs a bit more attention, I hopped I could move any of the old command logic to dedicated files so it can be reused somewhere else. |
|
@jooola that would be ideal, but a pretty big undertaking in the current codebase. I think we should focus on getting the IO of the CLI optimized now, and restructure where the code is located when we're moving to Laravel as a whole too |
|
|
@rijkvanzanten @bjgajjar feel free to push on this branch. |
|
@jooola - Thanks for the quick fix. But it seems like I'm missing something. Can you please help me to figure out the below error? It occurs in PHP |
|
@bjgajjar It might be a Symfony Console version mismatch. We upgraded phinx to match the latest version of this Component, you might still use the old one. Have you tried with a fresh vendor folder ? If that doesn't work I'll need more infos. |
|
Yes - I tried with a fresh vendor folder too [ Removing the Still getting the same error. |
|
I'll need more information, let's not hijack this thread, we can continue debugging this on Slack or another ticket. |
|
I started to implement some of the commands, the easy ones. I might have overlooked some things, I tried only to keep the code clean and I trust the InstallerUtils/Service to do the required checks. This feels like a huge change now and I wonder how you folks feel about this PR ? |

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.


This PR is the work initiated by the issue #1613. It is the first step for the creation of a complete and easily maintainable CLI tool for the directus api project.
Before merging, we need to fix few things :
Were can I get the application name, description and version. It shouldn't be hardcoded.
Should we make only one entry point for the CLI ? We could either build a fresh new CLI with a second entry point (
directus-nextor else), or mix the 2 CLI.If we need to mix both CLI Console, I suggest to first run the old commands, and if the command isn't found, run the new one and let it handle the usage display (this just came out of my mind without more thinking).
A deprecated notice will also be required I think.
Another idea would be to make only alias commands with the old syntax that trigger the new command.
@directus/team