postleaf icon indicating copy to clipboard operation
postleaf copied to clipboard

Postleaf CLI

Open lukewatts opened this issue 7 years ago • 5 comments

It would be nice to have a feature similar to Laravel, Symfony, Doctrine, Grav CMS etc. where a user can run commands from the console to perform the following tasks:

Init

postleaf init Run gulp build and setup db and files/folders required before startup and perhaps walk a user through prompts to set the .env variables. Like Yeoman.

This would also be a good way to auto generate the random hash, similar to how Laravel does it on install.

Package manager

postleaf theme <theme-name> Install themes e.g. postleaf theme empower

Backup

postleaf backup Backup/zip the following directories cache, data, themes, uploads

lukewatts avatar Apr 28 '17 17:04 lukewatts

I agree. Init and backups are great examples. What other functions would be useful from the command line?

  • [ ] Initialize the app and database (i.e. first run)
  • [ ] Create a backup
  • [ ] Restore from backup
  • [ ] Clear cache
  • [ ] Updates
  • [ ] Import tool for other platforms

claviska avatar Apr 28 '17 17:04 claviska

Backup/restore would be good. Clear cache also. And a search perhaps to show available themes. Also update to update postleaf

lukewatts avatar Apr 28 '17 19:04 lukewatts

Updated the list. Eventually themes will be installed/removed directly from the admin panel. Any advantage to having it in the CLI?

claviska avatar Apr 28 '17 19:04 claviska

Simpler to automate. Could install Postleaf with the preferred theme with a shell script/Docker/Vagrant/Chef etc

lukewatts avatar Apr 28 '17 20:04 lukewatts

What about a tool / command to migrate the posts from another CMS into Postleaf? Maybe only one tool (for the most used CMS, Wordpress for e.x.) as a base and then other contributors can create more tools based on that. Now I'm using Hugo (static .md files) in my site and I'm trying to figure it out how can I migrate all posts into Postleaf 😀

juan-manuel-alberro avatar Apr 29 '17 15:04 juan-manuel-alberro