Skip to content

Terminal Tools - a helper for running local command line scripts

License

Notifications You must be signed in to change notification settings

titledk/ttools-core

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Terminal Tools

by Title Web Solutions / Anselm Christophersen

Terminal Tools is a menu based set of easy-to-use command line scripts for working on
Web Development- and other projects. You can apply it anywhere you need a light weight, configurable menu for your bash scripts. Terminal Tools is easy to extend (through modules) and amend (through configuration) - both through global project settings, and environment specific settings (e.g. Live/Test/Dev servers), all done through one yml configuration file.

Main menu

Installation

In order to best get up and running with a full feature set, you should be using a module collection, like these:

You can also install only the core like this:

git submodule add git://github.com/titledk/ttools-core.git ttools/core;./ttools/core/_install.sh;

That will install a basic configuration file for you.

Update to latest version

For versions as of March 2016, just launch ./tt, and press U. Taht'll update all installed terminal tools modules to the latest version.
Alternatively, and on older versions, run ./ttools/core/local/upgrade.sh.

Remember to commit changes.

Modules

Modules should go next to core inside of the ttools directory in your repo, and should be added as git submodules. To update all modules, including core to latest version, run ./ttools/core/local/upgrade.sh.

Configuration example

A standard config will be set up for you on install. Here's an example of how this might look:

Projectname: "My Project"
Environments:
	Live:
		Host: "myserver.com"
		Sshuser: "myuser"
		Repodir: "/var/git-repos/mysite"
		Sshport: ""
		Composerpath: ""
		PhpPath: ""
	Test:
	#here goes data for a test server
	Dev:
	#here goes data for dev server - you can add as many servers as you want

#this is the menu - you can configure it exactly like you like
Menu:
	Item1:
		Title: SSH Live Site
		Command: "ttools-core/local/ssh.sh Live"
	Item2:
		Title: My specific command
		Command: "my-scripts/my-specific-command.sh"

Local overrides

Sometimes it would be beneficial to be able to override config.yml locally.
This can be done by placing a config_local.yml next to your config.yml.
Make sure to add this file to your .gitignore - this way each developer can set his/her own settings here.

Example:

Environments:
  Staging:
    Sshuser: "myuser"
    Repodir: "/var/www/webroot/"
Menu:
  Heading2:
    Item3:
      Title: My custom command
      Command: "my-custom-command.sh"

How To Use

Terminal Tools will be installed in your repository root.
Once installed, run ./tt, and you'll be presented with a list of options.

The ttools-core module contains the very basics - libraries, menu, and a means to easily ssh into your specific servers.
Everything else can be added via modules.

Trouble Shooting

Perl warnings, e.g. perl: warning: Setting locale failed.

If you're on OSX, following this answer, add the following to your .profile:

export LC_CTYPE=en_US.UTF-8
export LC_ALL=en_US.UTF-8

Roadmap/Ideas/Plans

Future plans with the module are many. You can find them here: https://github.com/titledk/ttools-core/issues.

If there's anything specific you'd like to be done (fast), post a bounty on it! We support bounties using Bountysource.

Alternatives

Terminal Tools tries to be a light weight, configurable menu for your bash scripts, and is so far mainly used for supporting PHP based web development, but that's not the only possible use case.

Alternatives to Terminal Tools are:

If you know of other alternatives, please let us know!

About

Terminal Tools - a helper for running local command line scripts

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages