A few years ago, I came across a very interesting project by Joseph Scott, called PressFS; it exposed WordPress posts as plain text files on your filesystem. This allowed you to use all your favorite command-line tools to manipulate these posts, including editing their content in your favorite text editor.
With WP-CLI 0.9.0-beta A pre-release of software that is given out to a large group of users to trial under real conditions. Beta versions have gone through alpha testing in-house and are generally fairly close in look, feel and function to the final product; however, design changes often occur as part of the process., you can do the same thing:
wp post edit 123
Once you run that command, your $EDITOR
will open up, pre-filled with the content of the post with ID 123. After you’ve made your changes and quit the editor, WP-CLI WP-CLI is the Command Line Interface for WordPress, used to do administrative and development tasks in a programmatic way. The project page is http://wp-cli.org/ https://make.wordpress.org/cli/ will update the post in the database.
Credit goes to goldenapples for implementing it.