csl_cli 1.5.0 → 1.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +55 -15
- data/lib/csl_cli/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 570a55c301091df6b229ba176d13051325a25fbb
|
4
|
+
data.tar.gz: c1c671e0cfbc4a710daa31e3c52a6990327f0eb0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4595fbe1fa10ea8dbb4aee6273a049a5266a47956c6b6909ec7e62ec496a92798718736d7ec828ad713217c6d11c7e2c86ae28bbfe757211bc67909ec58414c4
|
7
|
+
data.tar.gz: 1b28b6da4794045122cc6f60b034abec69d75210124f4af73b83c4c0ddb0581e6c33c46900d21421ef3fafa46684df847d01a17dc7bc7c7fe8e97408966dfcae
|
data/README.md
CHANGED
@@ -1,28 +1,69 @@
|
|
1
1
|
# CslCli
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
TODO: Delete this and the text above, and describe your gem
|
3
|
+
This gem is the command line interface for the context switch logger (https://github.com/brtz/csl-app).
|
6
4
|
|
7
5
|
## Installation
|
8
6
|
|
9
|
-
|
7
|
+
If you wish to install this cli to your system run:
|
8
|
+
|
9
|
+
$ gem install csl_cli
|
10
10
|
|
11
|
-
|
12
|
-
gem 'csl_cli'
|
13
|
-
```
|
11
|
+
It is also available as a container: https://hub.docker.com/r/brtz/csl-cli/
|
14
12
|
|
15
|
-
|
13
|
+
## Usage
|
16
14
|
|
17
|
-
|
15
|
+
#### Configuration
|
18
16
|
|
19
|
-
|
17
|
+
The cli relies on a few settings. They can be provided as environment variables
|
18
|
+
or within a config file (~/.csv_config.json).
|
20
19
|
|
21
|
-
|
20
|
+
Example .csv_config.json:
|
22
21
|
|
23
|
-
|
22
|
+
{
|
23
|
+
"email": "yourEmail",
|
24
|
+
"password": "yourPassword",
|
25
|
+
"app_url": "http://yourappurl:port"
|
26
|
+
}
|
27
|
+
|
28
|
+
Please make sure to chmod 0600 the config file, so only your user can read it.
|
29
|
+
|
30
|
+
If a config cannot be loaded, cslcli is going to fall back to these environment variables:
|
31
|
+
|
32
|
+
CSL_CLI_EMAIL
|
33
|
+
CSL_CLI_PASSWORD
|
34
|
+
CSL_CLI_APP_URL
|
35
|
+
|
36
|
+
To run this gem as a container:
|
37
|
+
|
38
|
+
docker run -it --rm --name cslcli -v "./localfolder:/root" brtz/csl-cli csl help
|
39
|
+
|
40
|
+
You can also drop the volume and pass the environment variables into the container (-e).
|
41
|
+
|
42
|
+
#### Commands
|
43
|
+
|
44
|
+
$ csl --help
|
45
|
+
Commands:
|
46
|
+
csl help [COMMAND] # Describe available commands or one specific command
|
47
|
+
csl list # lists your context switches
|
48
|
+
csl login # Log in at csl app using environmet variables (csl_cli_email, csl_cli_password, csl_cli_app_url)
|
49
|
+
csl logout # removes the token from disk
|
50
|
+
csl switch NOTE # creates a context switch with NOTE
|
51
|
+
|
52
|
+
The first step is to log in. This is done by calling:
|
53
|
+
|
54
|
+
csl login
|
55
|
+
|
56
|
+
It will store the received token within ~/.csv_token. Once you are logged in, you can
|
57
|
+
create new context switches:
|
58
|
+
|
59
|
+
csl switch "my first context switch"
|
60
|
+
|
61
|
+
If done right, you can now list them with:
|
62
|
+
|
63
|
+
csl list
|
64
|
+
|
65
|
+
Please check csl help [COMMAND] for further options (like format on list command).
|
24
66
|
|
25
|
-
TODO: Write usage instructions here
|
26
67
|
|
27
68
|
## Development
|
28
69
|
|
@@ -32,10 +73,9 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
32
73
|
|
33
74
|
## Contributing
|
34
75
|
|
35
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
76
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/brtz/csl-cli.
|
36
77
|
|
37
78
|
|
38
79
|
## License
|
39
80
|
|
40
81
|
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
41
|
-
|
data/lib/csl_cli/version.rb
CHANGED