chid 0.1.6 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (69) hide show
  1. checksums.yaml +4 -4
  2. data/.ruby-gemset +1 -0
  3. data/.ruby-version +1 -0
  4. data/CHANGELOG.md +27 -0
  5. data/CONTRIBUTING.md +78 -0
  6. data/Gemfile.lock +34 -34
  7. data/README.md +135 -89
  8. data/bin/chid +2 -25
  9. data/chid.gemspec +0 -6
  10. data/lib/chid.rb +0 -66
  11. data/lib/chid/chid_config.rb +6 -83
  12. data/lib/chid/command.rb +1 -1
  13. data/lib/chid/commands/alias/create.rb +53 -0
  14. data/lib/chid/commands/config.rb +48 -0
  15. data/lib/chid/commands/currency/convert.rb +50 -0
  16. data/lib/chid/commands/currency/list.rb +34 -0
  17. data/lib/chid/commands/currency/now.rb +47 -0
  18. data/lib/chid/commands/gitflow/commit.rb +0 -1
  19. data/lib/chid/commands/github.rb +40 -0
  20. data/lib/chid/commands/init.rb +1 -2
  21. data/lib/chid/commands/install.rb +1 -0
  22. data/lib/chid/commands/installs/dotfile.rb +27 -11
  23. data/lib/chid/commands/installs/node.rb +5 -3
  24. data/lib/chid/commands/installs/postgres.rb +6 -3
  25. data/lib/chid/commands/installs/rvm.rb +9 -4
  26. data/lib/chid/commands/installs/vim.rb +69 -0
  27. data/lib/chid/commands/pr.rb +63 -0
  28. data/lib/chid/commands/tmux/open.rb +3 -2
  29. data/lib/chid/commands/workstation/create.rb +101 -0
  30. data/lib/chid/commands/workstation/destroy.rb +61 -0
  31. data/lib/chid/commands/workstation/open.rb +4 -4
  32. data/lib/chid/github_api.rb +9 -0
  33. data/lib/chid/version.rb +1 -1
  34. data/spec/lib/chid/commands/alias/create_spec.rb +55 -0
  35. data/spec/lib/chid/commands/init_spec.rb +4 -2
  36. data/spec/lib/chid/commands/pr_spec.rb +68 -0
  37. data/spec/lib/chid/commands/workstation/create_spec.rb +153 -0
  38. data/spec/support/.bashrc +7 -0
  39. data/spec/support/.chid.config +7 -0
  40. data/tasks/install/yadr_dotfiles.rake +1 -0
  41. data/tasks/run/postgres.rake +1 -0
  42. data/tasks/update/os.rake +1 -0
  43. metadata +21 -58
  44. data/#README.md# +0 -221
  45. data/Rakefile +0 -18
  46. data/lib/chid/yandex_translate_api.rb +0 -39
  47. data/tasks/chid/config.rake +0 -5
  48. data/tasks/chid/init.rake +0 -19
  49. data/tasks/chid/install.rake +0 -14
  50. data/tasks/chid/start.rake +0 -26
  51. data/tasks/chid/update.rake +0 -14
  52. data/tasks/currency/convert.rake +0 -9
  53. data/tasks/currency/current.rake +0 -11
  54. data/tasks/currency/list.rake +0 -10
  55. data/tasks/github.rake +0 -12
  56. data/tasks/help.rake +0 -178
  57. data/tasks/install/node.rake +0 -18
  58. data/tasks/install/postgres.rake +0 -18
  59. data/tasks/install/rvm.rake +0 -21
  60. data/tasks/news.rake +0 -11
  61. data/tasks/stack_overflow.rake +0 -20
  62. data/tasks/tmux/config_windows.rake +0 -8
  63. data/tasks/tmux/new_session.rake +0 -9
  64. data/tasks/translate/yandex_list.rake +0 -7
  65. data/tasks/translate/yandex_translate.rake +0 -8
  66. data/tasks/workstation/create.rake +0 -23
  67. data/tasks/workstation/destroy.rake +0 -14
  68. data/tasks/workstation/list.rake +0 -10
  69. data/tasks/workstation/open.rake +0 -29
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 51d240fb1dd06def3848504ae94b5b34c9966da3e808f5edb3977d84024c82b3
4
- data.tar.gz: 0c7216dbadcdd864ce6925af4c98f5f1dae0be145444a7e953c52c03b418bba2
3
+ metadata.gz: b4c0781e14ef22978392d80819ff7b1835bc5b7c8396e1d8f1a9ad36b296cb66
4
+ data.tar.gz: 836462ef8b68c6edda4c9c783f04caef9830dff476af59ea5072bbbf5f6a66a2
5
5
  SHA512:
6
- metadata.gz: 2ffb3e40667b8f5de2e2b2a2bb1bd57c24e82000154c1f7f6e21ed82992c8ae42f8f8eb91031e6fcd5489c71434b8e29db919fe5c6410031728ee82e6969fff9
7
- data.tar.gz: 8bbe3027b673200f8a697040ee0978b183970e27052d659e71b4be213a977ca58146777a63e9fe6bafed101a24073ade3e4bce9415d82fe7d2aad608cd4bf181
6
+ metadata.gz: aeaedc1bb901c77c9d3650e4dc180511f1f277eb932e41f46cfeffee4917c053f0bd6c8270b7c7607941d7e6f4c1967ff5ac499d01b6f3079bba5c0a9078500a
7
+ data.tar.gz: '0307939c58378866fdb7fec4431af85023ff06281929cba8ab5f354db36fe11612a9be20d4bdba693b191e98131a573ec63ad1fb957b8b96fc7de784a12b915e'
@@ -0,0 +1 @@
1
+ chid
@@ -0,0 +1 @@
1
+ 2.6.5
@@ -1,3 +1,30 @@
1
+ ### 0.2.2
2
+
3
+ * Update:
4
+ - Install Commands
5
+ - Replace old dotfiles for Chid files config ofr zsh, vimrc and tmux
6
+
7
+ ### 0.2.1
8
+
9
+ * Update:
10
+ - Way to get correctly the ChidConfig instance for Tmux and Workstation Commands
11
+
12
+ ### 0.2.0
13
+
14
+ * Add:
15
+ - Chid config Command
16
+ - Chid currency Commands
17
+ - Chid github Command
18
+
19
+ * Remove:
20
+ - All unecessary rake tasks
21
+ - Translate feature
22
+
23
+ ### 0.1.6.1
24
+
25
+ * Update:
26
+ - Chid tmux and workstation Commands to be used for ruby versions 2.5+
27
+
1
28
  ### 0.1.6
2
29
 
3
30
  * Update:
@@ -0,0 +1,78 @@
1
+ # Contrinuting to Chid
2
+
3
+ ## How run chid gem locally
4
+ `$ ruby -Ilib bin/chid [COMMAND]`
5
+
6
+ ## Adding a new Command
7
+
8
+ ### When the command has no sub-command
9
+ An example of no sub-command is the `chid news` command.
10
+
11
+ This command is straightforward, execute the `news` command.
12
+ ### When the command has sub-command
13
+ An example of no sub-command is the `chid workstation` command.
14
+
15
+ For this command we have the following sub-commands:
16
+ - `create`
17
+ - `destroy`
18
+ - `list`
19
+ - `open`
20
+
21
+ A usage for it is `chid workstation open`
22
+
23
+ #### Structure
24
+ As we need many sub-commands, is necessary create a new module (folder) inside the `./lib/chid/commands/` folder.
25
+
26
+ For example we want to add `currency` with follwing commands:
27
+ - `current`
28
+ - `convert`
29
+ - `list`
30
+
31
+ The first thing is create the folder with those sub-commands:
32
+ - `./lib/chid/commands/currency/current.rb`
33
+ - `./lib/chid/commands/currency/convert.rb`
34
+ - `./lib/chid/commands/currency/list.rb`
35
+
36
+ **Class structure**:
37
+
38
+ This initial structure must exists to follow the command pattern to work on chid. The structure will be automatically added on helper command, when the user calls for example `chid currency now -h`
39
+
40
+ ```ruby
41
+ # ./lib/chid/commands/currency/current.rb
42
+
43
+ module Chid
44
+ module Commands
45
+ module Currency
46
+ class Now < Command
47
+
48
+ command :'currency current' # COMMAND_NAME
49
+
50
+ self.summary = 'Summary of your new Command'
51
+ self.description = <<-DESC
52
+
53
+ Usage:
54
+
55
+ $ chid currency now
56
+
57
+ SOME_DESCRIPTION_OF_THE_COMMAND
58
+
59
+
60
+ Options: # These are not required, only if your command demands for options.
61
+
62
+ -to TEXT_TO_EXPLAIN
63
+ -from TEXT_TO_EXPLAIN
64
+
65
+ DESC
66
+ self.arguments = ['-to', '-from']
67
+
68
+
69
+ # This method will be executed automatically
70
+ # To access all given arguments, you have available the attr_reader :options to get
71
+ def run
72
+ end
73
+
74
+ end
75
+ end
76
+ end
77
+ end
78
+ ```
@@ -1,47 +1,45 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- chid (0.1.4.pre.beta)
5
- easy_translate
4
+ chid (0.2.1)
6
5
  http
7
- rake
8
6
  tty-prompt
9
7
 
10
8
  GEM
11
9
  remote: https://rubygems.org/
12
10
  specs:
13
- addressable (2.5.1)
14
- public_suffix (~> 2.0, >= 2.0.2)
11
+ addressable (2.7.0)
12
+ public_suffix (>= 2.0.2, < 5.0)
15
13
  coderay (1.1.1)
16
14
  diff-lcs (1.3)
17
- domain_name (0.5.20170404)
15
+ domain_name (0.5.20190701)
18
16
  unf (>= 0.0.5, < 1.0.0)
19
- easy_translate (0.5.0)
20
- json
21
- thread
22
- thread_safe
23
- equatable (0.5.0)
24
- http (2.2.2)
17
+ equatable (0.6.1)
18
+ ffi (1.13.1)
19
+ ffi-compiler (1.0.1)
20
+ ffi (>= 1.0.0)
21
+ rake
22
+ http (4.4.1)
25
23
  addressable (~> 2.3)
26
24
  http-cookie (~> 1.0)
27
- http-form_data (~> 1.0.1)
28
- http_parser.rb (~> 0.6.0)
25
+ http-form_data (~> 2.2)
26
+ http-parser (~> 1.2.0)
29
27
  http-cookie (1.0.3)
30
28
  domain_name (~> 0.5)
31
- http-form_data (1.0.3)
32
- http_parser.rb (0.6.0)
33
- json (2.1.0)
29
+ http-form_data (2.3.0)
30
+ http-parser (1.2.1)
31
+ ffi-compiler (>= 1.0, < 2.0)
34
32
  method_source (0.8.2)
35
- necromancer (0.4.0)
36
- pastel (0.7.1)
37
- equatable (~> 0.5.0)
38
- tty-color (~> 0.4.0)
33
+ necromancer (0.5.1)
34
+ pastel (0.7.4)
35
+ equatable (~> 0.6)
36
+ tty-color (~> 0.5)
39
37
  pry (0.10.4)
40
38
  coderay (~> 1.1.0)
41
39
  method_source (~> 0.8.1)
42
40
  slop (~> 3.4)
43
- public_suffix (2.0.5)
44
- rake (12.0.0)
41
+ public_suffix (4.0.5)
42
+ rake (13.0.1)
45
43
  rspec (3.6.0)
46
44
  rspec-core (~> 3.6.0)
47
45
  rspec-expectations (~> 3.6.0)
@@ -56,19 +54,21 @@ GEM
56
54
  rspec-support (~> 3.6.0)
57
55
  rspec-support (3.6.0)
58
56
  slop (3.6.0)
59
- thread (0.2.2)
60
- thread_safe (0.3.6)
61
- tty-color (0.4.2)
62
- tty-cursor (0.4.0)
63
- tty-prompt (0.12.0)
64
- necromancer (~> 0.4.0)
57
+ tty-color (0.5.1)
58
+ tty-cursor (0.7.1)
59
+ tty-prompt (0.21.0)
60
+ necromancer (~> 0.5.0)
65
61
  pastel (~> 0.7.0)
66
- tty-cursor (~> 0.4.0)
67
- wisper (~> 1.6.1)
62
+ tty-reader (~> 0.7.0)
63
+ tty-reader (0.7.0)
64
+ tty-cursor (~> 0.7)
65
+ tty-screen (~> 0.7)
66
+ wisper (~> 2.0.0)
67
+ tty-screen (0.8.0)
68
68
  unf (0.1.4)
69
69
  unf_ext
70
- unf_ext (0.0.7.4)
71
- wisper (1.6.1)
70
+ unf_ext (0.0.7.7)
71
+ wisper (2.0.1)
72
72
 
73
73
  PLATFORMS
74
74
  ruby
@@ -79,4 +79,4 @@ DEPENDENCIES
79
79
  rspec
80
80
 
81
81
  BUNDLED WITH
82
- 1.15.2
82
+ 2.1.4
data/README.md CHANGED
@@ -1,166 +1,215 @@
1
1
  # Chid
2
- Chid is an assistant to help your day-to-day life. It can be used in some
2
+ Chid is an assistant to help your day-to-day life. It can be used in some
3
3
  installations, news, configurations, workstations and more.
4
4
 
5
- ![](http://g.recordit.co/pKS2oKCUuU.gif)
5
+ ![](https://user-images.githubusercontent.com/47482049/67632355-199ecb80-f89a-11e9-879e-32a0987108ca.gif)
6
6
 
7
7
  ## Installation
8
8
 
9
- To get started follow those steps:
10
-
11
- 1- Clone the project:
9
+ ### Via Gem
12
10
 
13
11
  ```bash
14
- git clone https://github.com/rachidcalazans/chid.git
12
+ $ gem install chid
15
13
  ```
16
14
 
17
- 2- Install the dependcy if you do not have already installed:
15
+ #### Initialize the chid config file
18
16
 
19
17
  ```bash
20
- $ gem install bundler
21
- $ bundle install
18
+ $ chid init
22
19
  ```
23
20
 
24
- 3- Inside the folder project run:
25
-
26
- ```bash
27
- $ rake init
28
- ```
21
+ Creates a .chid.config file on root directory if none `~/.chid.config` file exists.
29
22
 
30
- **Note:** Chid will automatically install a *.chid.config* file and create an
31
- alias on your **.bashrc** or **.zshrc** (if you have zsh installed). After the
32
- installation **Chid** will give you the *bash command* to reload your **sources**
33
- file.
23
+ To access that file will be created in `~/.chid.config`
34
24
 
35
25
  ## Upgrading
36
26
 
37
27
  To update the chid is easy.
38
28
 
39
29
  ```bash
40
- $ chid update
30
+ $ gem update chid
41
31
  ```
42
32
 
43
33
  ## Usage
44
34
 
45
- **Chid** is an app based on **Rake Tasks**. You are available to use all features
46
- as rake tasks or run as a **terminal app**:
35
+ **Chid** is an gem app based on **Commands**. You are available to use all features running on **terminal**:
47
36
 
48
- **Note:** All tasks are available for **osx** and **linux**. The *chid* will automatically
37
+ To see all commands and how to use on Terminal, run:
38
+
39
+ `$ chid -h`
40
+
41
+ **Note:** All Commands are available for **osx** and **linux**. The *chid* will automatically
49
42
  knows how run the specific **comand** for each plataform.
50
43
 
51
44
  All features are listed bellow:
52
45
 
53
- #### Install chid configuration
46
+ ### Install chid configuration
54
47
 
55
48
  * `$ chid init` - Will install all necessary confiuration.
56
49
 
57
- #### Start the app
50
+ ### Chid configuration
51
+
52
+ * `$ chid config` - Open the **.chid.config** file using any source you want. By default is **vim**.
53
+ * `$ chid config -editor vim`
54
+
55
+ ### Feature Commands
58
56
 
59
- * `$ chid` - To start the **chid** terminal app
57
+ - [Git Commit](#git-commit)
58
+ - [Install apps](#install-apps)
59
+ - [Run apps](#run)
60
+ - [currency](#currency)
61
+ - [News](#news)
62
+ - [Search on StackOverflow](#search-on-stackOverflow)
63
+ - [Search GitHub repositories](#search-gitHub-repositories)
64
+ - [Workstations](#workstations)
65
+ - [Tmux](#tmux)
66
+ - [Configure and customize your workstations](#configure-workstation)
67
+
68
+ ### <a name="git-commit"></a> Git Commit
60
69
 
61
- **Note:** To run the commands listed bellow you must started the chid app.
70
+ Create a commits in based on gitFlow pattern.
62
71
 
63
- #### Help
72
+ * `$ chid commit` - Start the process of commiting
73
+ * `$ chid commit -h` - To see all options you can use as shortcut
64
74
 
65
- * `help` or `:h` - Show all tasks available
75
+ #### An easy way to create commits following simple steps:
66
76
 
67
- #### Quit
77
+ **First**:
78
+ Choose your commit type in this options (add,Remove, Update, Refactor, Fix)
68
79
 
69
- * `:q` or `quit` or `bye` or `exit` - Will finish the **chid** app
80
+ **Second**:
81
+ Type your commit title, a brief description of your changes
70
82
 
71
- #### Currency
83
+ **Third**:
84
+ Add your description lines, describing exactly what you did
72
85
 
73
- * `current` - Get the current conversion for USD to BRL amount
74
- * `currency list` - Show all types of currencies available to convert
75
- * `convert [amount] [type_from] to [type_to]` - You can convert an amount between
76
- types. Eg.: **convert 10 USD to BRL**
86
+ Thats it! Your commit will be created and pushed like this sample:
77
87
 
78
- #### Install apps
88
+ ```YAML
89
+ feature/#123 Add specific file needed to app
90
+
91
+ - specific file have now this line
92
+ - this is the description line two
93
+
94
+ Signed-off-by: "YourName" "yourEmail@mail.com"
95
+ ```
79
96
 
80
- **Note:** All install tasks, chid will always ask if you really want to install it. Also
97
+ ### <a name="install-apps"></a> Install apps
98
+
99
+ **Note:** All install tasks, chid will always ask if you really want to install it. Also
81
100
  will install the dependencies if necessary.
82
101
 
83
- * `install dotfiles` - Install [YADR Dotfiles](https://github.com/skwp/dotfiles)
84
- * `install node` - Install Node
85
- * `install postgres` - Install Postgres
86
- * `install rvm` - Install stable RVM version
102
+ * `$ chid install dotfiles` - Install my own dotfiles for vim, zsh and tmux
103
+ * `$ chid install node` - Install Node
104
+ * `$ chid install postgres` - Install Postgres
105
+ * `$ chid install rvm` - Install stable RVM version
106
+ * `$ chid install vim and/or gvim` - Install Vim
87
107
 
88
- #### Run
108
+ ### <a name="run"></a> Run
89
109
 
90
110
  * `run postgres` - Run the postgresql if you already have installed.
91
111
 
92
- #### Update
112
+ ### <a name="currency"></a> Currency
93
113
 
94
- * `update os` or `update` - Will update the linux os. For osx is not available
114
+ * `$ chid currency now` - Get the now converstion. Default -from USD -to BRL
115
+ * `$ chid currency list` - All list of available Source to use on `now` and `convert commands`
116
+ * `$ chid currency convert -amount [amount]` - You can convert an amount between types. Default -to BRL, -from USD
95
117
 
96
- #### News
118
+ ### <a name="news"></a> News
97
119
 
98
- * `news` - Will show all news from some sites. BBC news, CNN, Espn,
120
+ * `$ chid news` - Will show all news from some sites. BBC news, CNN, Espn,
99
121
  Mashable, Google, Techcrunch, Reddit
100
122
 
101
- #### Translate
102
-
103
- * `t [TEXT]` or `t [TEXT] [FROM] to [TO]` - Will translate the given text. By
104
- default the **from** is **en** and **to** is **pt**
123
+ ### <a name="search-on-stackOverflow"></a> Search on StackOverflow
105
124
 
106
- Example:
107
- `t hello world` or `t hello world en to pt`
108
-
109
- #### Search on StackOverflow
110
125
 
111
126
  A simple search in StackOverflow
112
127
 
113
- * `stack [TEXT_TO_SEACH]` - Will search on StackOverflow all results for that
128
+ * `$ chid stack -search [TEXT_TO_SEACH]` - Will search on StackOverflow all results for that
114
129
  text.
115
130
 
116
- * `stack` - Will ask what you want to search on StackOverflow all results for that
117
-
118
- <p align="left">
119
- <img src="etc/img/stack.png" alt="stack sample" />
120
- </p>
131
+ ![stackchid](https://user-images.githubusercontent.com/47482049/67722187-5c62bf80-f9d0-11e9-9921-86d2b548cc97.gif)
121
132
 
122
- #### Search GitHub repositories
133
+ ### <a name="search-gitHub-repositories"></a> Search GitHub repositories
123
134
 
124
135
  A simple search for repository name
125
136
 
126
- * `github [SEARCH_EXPRESSION]` - Show results for expression paginated every 10
137
+ * `$ chid github -name [SEARCH_EXPRESSION]` - Show results for expression paginated every 10
127
138
 
128
- #### Workstations
139
+ ### <a name="workstations"></a> Workstations
129
140
 
130
141
  Workstations are a way to make it easy for you to open a set of applications by
131
142
  simple commands.
132
143
 
133
144
  The set of configurations are saved on **.chid.config** file.
134
145
 
135
- **Note:** All commands bellow is possible run with prefix: `workstation [command]`
136
- or `work [command]`.
146
+ **Note:** All commands bellow is possible run with prefix: `$ chid workstation [command]`
137
147
 
138
- * `work list` - List all workstations
139
- * `work create` - Create a new workstation. Chid will ask for a name to set the
148
+ * `$ chid workstation list` - List all workstations
149
+ * `$ chid workstation create` - Create a new workstation. Chid will ask for a name to set the
140
150
  new workstation and after that will list all **applications** available on your
141
151
  system to chosse witch one you wanna add
142
- * `work destroy` - Chid will ask which workstation you want to destroy and chid
152
+ * `$ chid workstation destroy` - Chid will ask which workstation you want to destroy and chid
143
153
  will destroy it after choose
144
- * `work open` - Open a specific workstation. Chid will list all workstations to
154
+ * `$ chid workstation open` - Open a specific workstation. Chid will list all workstations to
145
155
  choose one of them to open all applications
146
- * `work open [workstation_name]` - Open a specific workstation without choose
147
- from a list. Eg.: `work open base` - It will open all applications inside the
156
+ * `$ chid workstation open -name [workstation_name]` - Open a specific workstation without choose
157
+ from a list. Eg.: `$ chid workstation open -name base` - It will open all applications inside the
148
158
  **base** workstation
149
159
 
150
- ![](http://g.recordit.co/WFqNuxORRd.gif)
160
+ ![workstationchid](https://user-images.githubusercontent.com/47482049/67722314-b794b200-f9d0-11e9-81cd-1e7b0b27bedf.gif)
151
161
 
152
- **Note:** For linux users the **work create** is not working. You need create
162
+ **Note:** For linux users the `$chid workstation create` is not working. You need create
153
163
  manually (editing the .chid.config file). Will be explained how on
154
164
  **How configure and customize your workstations** topic
155
165
 
156
- #### Chid configuration
166
+ ### <a name="tmux"></a> Tmux
157
167
 
158
- * `chid config` or `config` - Open the **.chid.config** file
168
+ If you use Tmux as I do for development, this is a nice Command Feature!
159
169
 
160
- ## How configure and customize your workstations
170
+ This feature is based on some templates you will create on `~/.chid.config` file to open easily all your Dev Env
161
171
 
162
- The chid configuration file is installed on **~/.chid.config**. You can open: `$ chid
163
- chid_config`
172
+ This Feature have **2** commands, `list` and `open`
173
+
174
+ * `$ chid tmux list` - List all existent tmux template
175
+ * `$ chid tmux create` - Open a specific tmux template
176
+
177
+ #### An example of Template you will add on **~/.chid.config**:
178
+
179
+ ```YAML
180
+ ---
181
+ :chid:
182
+ :workstations: {}
183
+ :tmux_templates:
184
+ :NAME_YOUR_PROJECT:
185
+ - tmux new -s $$template_name$$ -n app -d;
186
+ - tmux send-keys -t $$template_name$$ 'cd DIRECTORY_PROJECT_PATH'
187
+ C-m;
188
+ - tmux send-keys -t $$template_name$$ 'vim' C-m C-m;
189
+ - tmux new-window -n tests -t $$template_name$$;
190
+ - tmux send-keys -t $$template_name$$ 'cd DIRECTORY_PROJECT_PATH'
191
+ C-m;
192
+ - tmux new-window -n server -t $$template_name$$;
193
+ - tmux send-keys -t $$template_name$$ 'cd DIRECTORY_PROJECT_PATH'
194
+ C-m;
195
+ - tmux attach -t $$template_name$$;
196
+ ```
197
+
198
+ The example above each line is a tmux command. You can do what you need. In this case we have only two variables to replace:
199
+ - NAME_YOUR_PROJECT -> the name which will appear on `tmux list`
200
+ - DIRECTORY_PROJECT_PATH -> the full path of the your directory project. Ex.: `~/Workspaces/ruby-workspace/chid/`
201
+
202
+ The commands above means those steps:
203
+ 1- Create a new Tmux session with `app` name for the first tab or Find an existent one and Open it
204
+ 2- Open the folder project on the tmux tab `app`
205
+ 3- Open a new tab called `vim` and open the vim on the folder project
206
+ 4- Open a new tab called `server` and go to the folder project
207
+
208
+ **base** workstation
209
+
210
+ ## <a name="configure-workstation"></a> How configure and customize your workstations
211
+
212
+ The chid configuration file is installed on **~/.chid.config**. You can open: `$ chid config`
164
213
 
165
214
  Chid config is a **YAML** file.
166
215
 
@@ -171,8 +220,8 @@ The initial chid config file will be like:
171
220
  ```YAML
172
221
  ---
173
222
  :chid:
174
- :chid_path: "[CHID_FOLDER_PROJECT_PATH]"
175
223
  :workstations: {}
224
+ :tmux_templates: {}
176
225
  ```
177
226
 
178
227
  #### Base configuration
@@ -182,20 +231,19 @@ To add a new *workstation* you can edit like:
182
231
  ```YAML
183
232
  ---
184
233
  :chid:
185
- :chid_path: "[CHID_FOLDER_PROJECT_PATH]"
186
234
  :workstations:
187
235
  :base: # Workstation Name
188
236
  - iTerm #Application Name
189
237
  - Safari
190
238
  - Slack
239
+ :tmux_templates: {}
191
240
  ```
241
+ ![configchid](https://user-images.githubusercontent.com/47482049/67722353-d2672680-f9d0-11e9-8c52-8dad5d2ad22f.gif)
192
242
 
193
243
  After edit you can open the **base** workstation running:
194
244
 
195
- * `$ chid workstation:open['base']` - As rake task
196
- * `work open base` - With the **chid** app running
197
-
198
- ![](http://g.recordit.co/VqTjUsQ9fy.gif)
245
+ * `$ chid workstation open -name base`
246
+ * `$ chid workstation open -n base`
199
247
 
200
248
  #### Advance configuration
201
249
 
@@ -208,14 +256,12 @@ Is possible you can customize some options with each Application when will open
208
256
  ```YAML
209
257
  ---
210
258
  :chid:
211
- :chid_path: "[CHID_FOLDER_PROJECT_PATH]"
212
259
  :workstations:
213
260
  :base: # Workstation Name
214
- - iTerm ~/Workspaces/rake-workspace/chid/ & rake tmux_config # Will open
215
- # in a specific folder and will run some Rake Task
261
+ - iTerm ~/Workspaces/rake-workspace/chid/ & rspec # Will open
262
+ # in a specific folder and will run the rspec (run all tests)
216
263
  - Safari https://github.com/rachidcalazans/chid # Will open the Safari
217
264
  # in a specific URL
265
+ :tmux_templates: {}
218
266
  ```
219
267
 
220
- ![](http://g.recordit.co/40rFYBBR1t.gif)
221
-