Jump to content
marcus

wireshell - an extendable ProcessWire command line interface

Recommended Posts

Currently it's not easy for me to find the time to properly prepare a Virtual Windows10 machine with PHP/composer in order to reproduce. Are there any other Window users out there that can?

I assume you are using wireshell 1.0.2?

Share this post


Link to post
Share on other sites
18 minutes ago, netcarver said:

@Mike Rockett Have the permissions changed on the containing directory such that there is no longer any write permission?

I'm on Windows, so there aren't any. If there were, the zip file would not have been written to the directory anyway. The issue seems to be with deleting the temp file, which causes the rename function to return false, which is when the IOException is thrown.

  • Like 1

Share this post


Link to post
Share on other sites

Hello

I am on windows 10 and I am having the same problem like Mike Rockett,  [Symfony\Component\Filesystem\Exception\IOException] Cannot rename ... 

Share this post


Link to post
Share on other sites

@justb3a or @marcus, maybe a dump question, but when I want to upgrade an existing wire core installation with the latest dev-version, do I need to pass a sha-key to the command?

Share this post


Link to post
Share on other sites

Yes. For version 3.0.106 this would be

$ wireshell upgrade --sha 643c9d3a87ddd8d579c4879c2382a9170466344b

 

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites

Thanks for the clarification, now I know that I haven't overseen something. 🙂

But wouldn't it be better to have an alias for the lates-dev version, something like:

$ wireshell upgrade --latestdev

Otherwise I have to look up every time, (sometimes multiple times a week), for the latest dev sha-key and copy paste it into my CLI.

For example: As you can see, only one hour later than your post, the sha key to the latest dev has changed to: 637f81579e121af8ab4c4a12e21227b36ae0cd8a

  • Like 2

Share this post


Link to post
Share on other sites
On 6/20/2018 at 7:11 PM, horst said:

But wouldn't it be better to have an alias for the lates-dev version, something like:


$ wireshell upgrade --latestdev

Otherwise I have to look up every time, (sometimes multiple times a week), for the latest dev sha-key and copy paste it into my CLI.

For example: As you can see, only one hour later than your post, the sha key to the latest dev has changed to: 637f81579e121af8ab4c4a12e21227b36ae0cd8a

Bump! @marcus, any chance to get an alias for upgrading to the latest dev?

Share this post


Link to post
Share on other sites

Won't find the time to implement this anytime soon, sorry. Everybody feel free to submit a PR regarding this and maybe ping core contributor @justb3a regarding release

  • Like 2

Share this post


Link to post
Share on other sites
On 10/29/2018 at 7:15 PM, horst said:

Bump! @marcus, any chance to get an alias for upgrading to the latest dev?

Just in case, I use those alias to install or upgrade my installs :

# ProcessWire Wireshell bash alias
# grab and install the latest ProcessWire development version from the latest commit
alias pwnew='wireshell new --sha=`git ls-remote https://github.com/processwire/processwire refs/heads/dev | cut -f1`'
# upgrade to the latest ProcessWire development version from the latest commit
alias pwup='wireshell upgrade --sha=`git ls-remote https://github.com/processwire/processwire refs/heads/dev | cut -f1`'

https://gist.github.com/flydev-fr/addcf54fa8348de20115d3c1314ddb3d

  • Like 4

Share this post


Link to post
Share on other sites

Hi everyone, wireshell currently conflicts with newer versions of symfony/console – to workaround this, you cam use cgr to install wireshell.

$ composer global require consolidation/cgr

Make sure to add the correct bin directory to your PATH:

PATH="$(composer config -g home)/vendor/bin:$PATH"

Then add wireshell:

$ cgr wireshell/wireshell

Reload the console, voila – wireshell again.

  • Like 4

Share this post


Link to post
Share on other sites

hi,

as you might noticed I'm no longer active in the field of PHP and ProcessWire. I tried to continue supporting my modules and wireshell but it turned out that it just doesn't work well if you don't work with it yourself anymore.
I would be very happy if someone would be interested in taking over and developing this further.
Just write me a message. 😀 😊

  • Like 11
  • Thanks 2

Share this post


Link to post
Share on other sites
On 10/13/2019 at 12:07 PM, justb3a said:

I'm no longer active in the field of PHP and ProcessWire

😢

@justb3a Good luck on your (new) way and many, many thanks for all your contributions !! 😄 ❤️ 👍

  • Like 9

Share this post


Link to post
Share on other sites
On 9/6/2019 at 12:08 AM, Noel Boss said:

Hi everyone, wireshell currently conflicts with newer versions of symfony/console – to workaround this, you cam use cgr to install wireshell.

Thanks!

Anyone interesting in taking this project over? Given tools like this are part and parcel of a good developer experience these days I feel it is important to keep this project active to attract new devs.

I would happily contrib to setting up new docs. Just been mucking around with vuepress, makes docs a cinch.

  • Like 4

Share this post


Link to post
Share on other sites

Also think getting it at least installable with composer, if not packaged as phar file would help for now.

  • Like 1

Share this post


Link to post
Share on other sites

Hi, @bernhard! The most important part for me is being able to install PW from the cli (maybe from a shell script) to automate the initial and subsequent configuration testing (implemented with RockMigrations, of course)) So basically the same need as you tried to solve with the kickstart.

  • Like 1

Share this post


Link to post
Share on other sites

Hi @bernhard ! Pretty much the same use as @Ivan Gretsky. I also use the backup functionality when making batch migrations of data along multiple installations or just when I want to do it quickly from cli. 

Share this post


Link to post
Share on other sites

Hi @bernhard,

Nice work! I'm currently working on something very similiar. Focus would be also mainly triggering the install process via CLI to automate the setup process of new projects.

Further on I want to add the possibility to add Fields and Repeater Matrix Content Types via CLI.

Share this post


Link to post
Share on other sites
18 minutes ago, joshua said:

Further on I want to add the possibility to add Fields and Repeater Matrix Content Types via CLI.

That's simply bootstrapping PW in a command, then loading rockmigrations and doing

$rm->createField(...);

 

  • Like 4

Share this post


Link to post
Share on other sites

That's right! Currently I'm doing this with a pretty custom python script, which runs updates directly in the database. But RockMigrations seems to be a better solution - solid as a "rock" 😉 and easy to handle. Thanks!

 

Share this post


Link to post
Share on other sites

Well. Solid as rock might not be exactly true 😇 There are some parts that do not always work as expected (install other languages, do modules->refresh(), ...). But most of it works great and I think it's the best tool that we have at the moment. 🙂 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By SwimToWin
      As an admin I want to use the API to ask if a page is published - using the $page->isPublished() method - so that I know it's published - as opposed to unpublished or trashed pages. That includes hidden pages.
      This method will correspond to Settings -> Status when editing pages:

      (Published is also mentioned explicitly where the edit page says "Published on [?]".)
      I would expect the API - and specifically the $page->hasStatus() method - to ask if a page has status published.
      But as I can see, it's only possible to ask for exceptions such as isUnpublished() and isHidden().
      <?php // This fails with "Fatal Error: Uncaught Error: Undefined class constant 'statusPublished'" if($page->hasStatus(Page::statusPublished)) { echo 1; } ?> PS: My current use case is that I want to count number of published vs. unpublished pages. I can only do that by getting all pages (include=all), then subtract any unpublished pages.
    • By ngrmm
      My clients wants a modal to show up on every page. But when a user clicks inside the modal -> a session-cookie is set and the modal gets a class.
      // user clicks on modal button $('.modal_button').click(function(){ // 1. set PW session cookie // 2. toggle class $('.modal').toggleClass('off'); }); I know how to set a cookie on page-load via PW-API. But the click on the modal button does not force a page-load. So i have to set the cookie through javascript. Is there a way to do that?
    • By VeiJari
      Hello,
      I'm trying to create a page via api and populate values to it. I can populate everything except user pages to a page reference array.
      Code: 
      $dataUsers = $data->project->users; foreach($dataUsers as $dataUser) { $newProject->projectUsers->add(wire()->pages->find('template=user, id=' . $dataUser->id)); } I'm receiving my data via JSON.
      Is there something I'm missing?
      Thanks for help
    • By VeiJari
      Hi, this is the first we are trying to make a page that has only one type of user that has access to every page. 
      The other users should only have a given access to specific pages, not to the whole template.
      My structure
      -Field -Organisation -Project -Report I want that the "measurer" role only has access to "project x" and it's children, but no view access to every project, organisation or field. I've tried to do this with https://modules.processwire.com/modules/page-edit-per-user/ but it still needs a view access to the whole tree to see the "project x" page. Or is there something I haven't figured out?
      Maybe I have to make it via the API: a select field in the "organisation" template where the admins could add the users and then I use hook to update the privileges?
      Have you done something like this and how did you accomplish it?
      Any help would be appreciated.
       
    • By cosmicsafari
      Hi all,
      Before I go potentially wasting time trying to achieve the impossible.
      Can anyone confirm if its possible to have a Page Reference field on a modules config page?
      I'm wanting to essentially just output a list of select able pages based on the a given selector (likely by template at this stage), wherein the select is the pages that the module should apply to etc. I was thinking a simple checkbox list would suffice is asmSelect isn't available.
      Essentially have it display the same way a Page Reference field would display on a template, where you can easily select a bunch of them.
      public function getInputfields() { $inputfields = parent::getInputfields(); $f = $this->modules->get('InputfieldPage'); $f->attr('name', 'testSelect'); $f->setAttribute('multiple', 'checkboxes'); $f->setAttribute('findPagesSelector', 'template=development'); $f->label = 'Test'; $inputfields->add($f); return $inputfields; } Figured something akin to the above would work but can't seem to get rid of this warning on the modules config screen though.

×
×
  • Create New...