Jump to content

wireshell - an extendable ProcessWire command line interface


marcus

Recommended Posts

Safari. Of course. This browser is such a catastrophe. Will check soon!

Regarding patterns: Seems to be an issue which container is focused on scroll event; either body (lighter grey) or the navigation (darker grey).

Edited by marcus
Link to comment
Share on other sites

First, let me thank Marcus for wireshell.

I have installed on both linux and windows machines, and I'm seeing a small glitch in windows.  The little checkmark by superuser role in a user list doesn't display properly in windows but does on linux.  How would I find out the keycode for the checkmark?   When I look in the src for UserListCommand, I just see a non-printable box in windows, but see the checkbox in linux.

My windows environment is using xampp and git-bash shell.  I see the same garbage characters on w7 or w10, and in the dos command window, git-bash, or the xampp shell.

tia,

Link to comment
Share on other sites

Well, I know more about utf-8 and windows now.  I figured out its a utf-8 heavy check mark code e2 9c 94 (thank you, vim)

My google research hints it may be a windows/unicode/command line problem, apparently there are issues with the command line and unicode.

I'm not going to worry about this minor glitch any longer.

Link to comment
Share on other sites

  • 2 months later...

wireshell 0.5.1 
 
Changelog

  • Adds log:tail command including filters --limit=, --text=, --from=, --to=
  • Adds log:list command
  • Improves new command, support for site profiles (path/to/profile.zip OR one of beginner, blank, classic, default, languages), autocompletion for timezone
  • Adds field:list command including filters --all, --template=, --type=
  • Adds list field:types command
  • Extends field:create command, allow custom field types
  • Extends new command: adds ability to specify version of ProcessWire --dev, --devns, --sha=
  • Extends upgrade command: adds ability to specify version of ProcessWire --dev, --devns, --sha=
  • Removes unnecessary empty state checks
  • Removes command aliases for better list overview #36
  • Fixes wrong iso format
  • Improves changelog format
  • Adds field commands field:delete and field:tag
  • Adds tag option for field:create command
  • Extends user:create command, ask for password and email address
  • Extends backup:db command, add option --target

... and there is a brand new documentation! If you use the develop branch, there is another documentation branch.
Furthermore all the documentation files are inside the repository, everybody can easily edit them. It's written in markdown and uses a post commit hook to build the documentation. 

  • Like 10
Link to comment
Share on other sites

  • 1 month later...

That's probably a include path or permission issue within your operating system rather than an issue of wireshell. Composer does use a specific folder to install global packages and this does need to be included in your users path variable and you need to have permission to execute files in that folder.

  • Like 2
Link to comment
Share on other sites

  • 4 weeks later...
  • 3 weeks later...

I managed to install wireshell via composer, but am stuck trying to run "new" command. I am getting this:

post-2275-0-10646500-1456146757_thumb.pn

What can it be?

Edit: Could not find any documentation or examples of "new" command other than inline help. Is there any?

Edited by Ivan Gretsky
Link to comment
Share on other sites

Could you please try: 

❯ curl -I https://raw.githubusercontent.com/ryancramerdesign/ProcessWire/master/wire/core/ProcessWire.php

What does this return? The error message occurs, if this curl request returns a state not equal to 200.

Edit: This error message contains now more detailed information, there will be also an option `-v` to increase the verbosity of messages  (coming soon):

 [RuntimeException]
 Error loading sha `xxx`, curl request failed (status code: XXX).
 Try `curl -I https://raw.githubusercontent.com/ryancramerdesign/ProcessWire/xxx/wire/core/ProcessWire.php`
 This should return `HTTP/x.x 200 OK`.
Edited by justb3a
  • Like 1
Link to comment
Share on other sites

I am on windows so no CLI cURL available. Could this be the problem? I have it through php extension though.

Should I install cURL to check the connection?

Edit:

I used git bash, which has in-built cURL and ran

curl -I https://raw.githubusercontent.com/ryancramerdesign/ProcessWire/master/wire/core/ProcessWire.php

as you suggested. I got 200 OK status.

Running

wireshell new

there still returns the same error.

Edited by Ivan Gretsky
Link to comment
Share on other sites

Here's what I did to install wireshell on windows 10 and xampp

* Download composer-setup.exe and install it.  Identify \utl\xampp\php\php.exe* composer global require wireshell/wireshell* Add %USERPROFILE\AppData\Roaming\Composer\vendor\bin to user PATH (in system properties, environment variables)* Run wireshell.
  • Like 1
Link to comment
Share on other sites

Could you please check whether the php curl extension is enabled? It seems that it comes with xampp but isn't enabled by default (I don't use xampp so this is just a guess). 

Have a look at your php.ini, uncomment the following line:

;extension=php_curl.dll

Restart your Apache server and check your phpinfo() to see whether curl has been properly enabled or not.

  • Like 1
Link to comment
Share on other sites

1) Thanks for trying to solve my problem!

As I wrote, I got php_curl enabled. It is listed in phpinfo() output.

I am able to execute another commands like wireshell status or wireshell t:l on my local PW 2.x installations.

2) I get error

Error:  Call to undefined function Wireshell\Helpers\wire() (line 69 of C:\Composer\vendor\wireshell\wireshell\src\Helpers\PwConnector.php)

trying to run those command on PW 3.0.8. I do not know, if it is known, so decided to mention it.

Link to comment
Share on other sites

One more idea. Maybe it's a SSL certificate problem. Could you try to copy this cert to such a location (you need to adapt the path): /Applications/AMPPS/extra/etc/openssl/certs/cacert.pem.

Then update php.ini and restart Apache:

[curl]
; A default value for the CURLOPT_CAINFO option. This is required to be an
; absolute path.
curl.cainfo="/Applications/AMPPS/extra/etc/openssl/certs/cacert.pem"
openssl.cafile="/Applications/AMPPS/extra/etc/openssl/certs/cacert.pem"

Found on stackoverflow.

I extended the error message again, added curl_error() output. Could you please pull the develop branch, test again and paste the error message?

  • Like 1
Link to comment
Share on other sites

Thank you very much, Bea! The develop version of the script does show the more verbose message

[RuntimeException]
Error loading sha `master`, curl request failed (status code: 0, url: https://raw.githubusercontent.com/ryancramerdesign/ProcessWire/master/wire/core/ProcessWire.php).
cURL error: SSL certificate problem: unable to get local issuer certificate

...and your solution does fix the problem like a charm)

Not sure what it all means though :). Need to research all that SSL thing.

Link to comment
Share on other sites

New version 0.6.0 brings an improved new command and a  brand new module:upgrade command. I've been missing this for a very long time and finally I managed to implement it. 

 
Check if module upgrades are available.
$ wireshell module:upgrade --check

An upgrade is available for:
  - FlagPages: 0.0.8 -> 0.2.3
  - ImageExtra: 0.0.1 -> 0.0.3

Download and upgrade existing module.

$ wireshell module:upgrade ImageExtra

An upgrade for ImageExtra is available: 0.0.3
Downloading module ImageExtra...
  840.40 KB/840.40 KB ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓  100%

 Preparing module...

 Module ImageExtra downloaded successfully.

Module `ImageExtra` was updated successfully.
Edited by Pete
Links removed as website no longer active
  • Like 6
Link to comment
Share on other sites

  • 1 month later...

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
×
×
  • Create New...