CodeIgniter Forums
CLI Apps with Codeigniter? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: Choosing CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=8)
+--- Thread: CLI Apps with Codeigniter? (/showthread.php?tid=90877)



CLI Apps with Codeigniter? - namankumar80510 - 05-16-2024

Hi there!
I love CodeIgniter and it is often my first choice of framework.
But here is the thing: I want to create a powerful PHP-based static Site Generator.

I have a few options including Laravel Zero (Not the Laravel framework), Symfony Console component (not the framework), MiniCLI framework, or start from scratch.

But I have been wondering, CodeIgniter comes with the spark file and lets you generate commands that can be executed in the command line.

While that will serve the purpose, the issue is that I can't seem to find the way to set the application name/desc or the commands to show when running "php spark" in the command line.

Is there any way around it or should I skip the idea of using codeigniter for this one?


RE: CLI Apps with Codeigniter? - ozornick - 05-16-2024

Should I set the name/desc dynamically?
https://codeigniter.com/user_guide/cli/cli_commands.html#creating-new-commands

You can manually add information about the team. Is it possible to try Reflection for dynamic options, or is it not about that?


RE: CLI Apps with Codeigniter? - kenjis - 05-16-2024

It seems we cannot replace the default `list` command even if we create a new command with $name = 'list' in app/Commands/.
Is this a bug?


RE: CLI Apps with Codeigniter? - ozornick - 05-16-2024

I'm without a PC. I can't check

When I created a command in the system, it appears in the list


RE: CLI Apps with Codeigniter? - kenjis - 06-17-2024

I sent PR https://github.com/codeigniter4/CodeIgniter4/pull/8898