<commit_before><h1 class="doc-title">Cloud 66 Toolbelt</h1>
<p class="lead">Cloud 66 Toolbelt is a simple command-line tool for the awesome Cloud 66 customers. It allows you to deploy, modify settings and retrieve the current status of your Cloud 66 stacks, and much more!</p>

## Installation {: class=divider-title}

You can install the Cloud 66 Toolbelt using [RubyGems](http://rubygems.org/):
<p>
<kbd>$ gem install c66</kbd>
</p>

## Help {: class=divider-title}

With c66 installed, you can display the help with one of the following instructions:
<p>
<kbd>$ c66 help</kbd>
</p>
	
or

<p>
<kbd>$ c66</kbd>
</p>

or for a specific command:

<p>
<kbd>$ c66 help &lt;command&gt;</kbd>
</p>

## Initialize the Toolbelt {: class=divider-title}

Firstly, to use the Toolbelt, you will need to initiate it using:

<p>
<kbd>$ c66 init</kbd>
</p>
	
Then visit the URL given once authorized, copy and paste the `authorization code` into the command-line interface.
You need to sign in and allow the Cloud 66 Toolbelt application to use your account to access to the authorization code.

**Note**: This is a one-off task.

## List the Stacks {: class=divider-title}

You can list all your stacks using:

<p>
<kbd>$ c66 list</kbd>
</p>

## Deploy a Stack {: class=divider-title}

Deploy a stack using the command `deploy` with a stack UID (Unique Identifer):

<p>
<kbd>$ c66 deploy --stack &lt;stack_UID&gt;</kbd>
</p>
	
or

<p>
<kbd>$ c66 deploy -s &lt;stack_UID&gt;</kbd>
</p>
	
You can retrieve the UID of a stack using the `list` command.
Through the Cloud 66 interface, click on your stack, then click on the cog and select the stack information view to retrieve the UID:
![stack_uid](http://cdn.cloud66.com.s3.amazonaws.com/images/Toolbelt/exemple_stack_uid.PNG)

There is a command to save a default stack UID:

<p>
<kbd>$ c66 save --stack &lt;stack_UID&gt;</kbd>
</p>
	
or

<p>
<kbd>$ c66 save -s &lt;stack_UID&gt;</kbd>
</p>

**Note:** The stack is saved in your current folder (.cloud66/stack.json) and only one default stack will be saved per folder.

When your stack UID is saved, you are able to use other commands without specify the stack UID.
For instance, it allows you to deploy a stack without putting the stack UID every time:

<p>
<kbd>$ c66 deploy</kbd>
</p>
	
you can use a short-cut for this command:

<p>
<kbd>$ c66 d</kbd>
</p>

You can save multiple stack UID by giving an alias to a specific stack:

<p>
<kbd>$ c66 save --stack &lt;stack_UID&gt; --alias &lt;stack_alias&gt;</kbd>
</p>

Then you can use commands and specific a stack's alias, like so:

<p>
<kbd>$ c66 deploy -s &lt;stack_alias&gt;</kbd>
</p>

## Settings of a Stack {: class=divider-title}

It is possible to retrieve the settings of a specified stack and to easily modify them:

To display the settings:

<p>
<kbd>$ c66 settings --stack &lt;stack_UID&gt;</kbd>
</p>
	
or

<p>
<kbd>$ c66 settings -s &lt;stack_UID&gt;</kbd>
</p>
	
If a default stack UID is saved:

<p>
<kbd>$ c66 settings</kbd>
</p>
	
To modify a setting:

<p>
<kbd>$ c66 set --stack &lt;stack_UID&gt; --setting_name &lt;setting_name&gt; --value &lt;value&gt;</kbd>
</p>
	
or

<p>
<kbd>$ c66 set -s &lt;stack_UID&gt; -n &lt;setting_name&gt; -v &lt;value&gt;</kbd>
</p>
	
If a default stack UID is saved:

<p>
<kbd>$ c66 set --setting_name &lt;setting_name&gt; --value &lt;value&gt;</kbd>
</p>
	
or

<p>
<kbd>$ c66 set -n &lt;setting_name&gt; -v &lt;value&gt;</kbd>
</p>

## Lease an IP address (version &ge; 0.1.91){: class=divider-title}

You can allow an IP address to connect temporarily to the specific stack through ssh (22):

<p>
<kbd>$ c66 lease --stack &lt;stack_UID&gt; --ip-address &lt;ip_address&gt; --time-to-open &lt;time_to_open&gt;</kbd>
</p>

or

<p>
<kbd>$ c66 lease -s &lt;stack_UID&gt; -i &lt;ip_address&gt; -t &lt;time_to_open&gt;</kbd>
</p>

Options *ip-address* and *time-to-open* are optional.
By default:

- *ip-address* : your IP address
- *time-to-open* : 20 minutes

To allow your own IP address to connect temporarily to the specific stack:

<p>
<kbd>$ c66 lease --stack &lt;stack_UID&gt;</kbd>
</p>

If a default stack UID is saved:

<p>
<kbd>$ c66 lease</kbd>
</p>

## Information of your toolbelt settings {: class=divider-title}

At any time, you can see your toolbelt settings, it includes the version of the toolbelt but also some information about your saved stacks:
 
<p>
<kbd>$ c66 info</kbd>
</p>

## Contributing {: class=divider-title}<commit_msg>Finish readme<commit_after><h1 class="doc-title">Cloud 66 Toolbelt</h1>
<p class="lead">Cloud 66 Toolbelt is a simple command-line tool for the awesome Cloud 66 customers. It allows you to deploy, modify settings and retrieve the current status of your Cloud 66 stacks, and much more!</p>

## Installation

You can install the Cloud 66 Toolbelt using [RubyGems](http://rubygems.org/):
<p>
<kbd>$ gem install c66</kbd>
</p>

## Help

With c66 installed, you can display the help with one of the following instructions:
<p>
<kbd>$ c66 help</kbd>
</p>
	
or

<p>
<kbd>$ c66</kbd>
</p>

or for a specific command:

<p>
<kbd>$ c66 help &lt;command&gt;</kbd>
</p>

## Initialize the Toolbelt

Firstly, to use the Toolbelt, you will need to initiate it using:

<p>
<kbd>$ c66 init</kbd>
</p>
	
Then visit the URL given once authorized, copy and paste the `authorization code` into the command-line interface.
You need to sign in and allow the Cloud 66 Toolbelt application to use your account to access to the authorization code.

**Note**: This is a one-off task.

## List the Stacks

You can list all your stacks using:

<p>
<kbd>$ c66 list</kbd>
</p>

## Deploy a Stack

Deploy a stack using the command `deploy` with a stack UID (Unique Identifer):

<p>
<kbd>$ c66 deploy --stack &lt;stack_UID&gt;</kbd>
</p>
	
or

<p>
<kbd>$ c66 deploy -s &lt;stack_UID&gt;</kbd>
</p>
	
You can retrieve the UID of a stack using the `list` command.
Through the Cloud 66 interface, click on your stack, then click on the cog and select the stack information view to retrieve the UID:
![stack_uid](http://cdn.cloud66.com.s3.amazonaws.com/images/Toolbelt/exemple_stack_uid.PNG)

There is a command to save a default stack UID:

<p>
<kbd>$ c66 save --stack &lt;stack_UID&gt;</kbd>
</p>
	
or

<p>
<kbd>$ c66 save -s &lt;stack_UID&gt;</kbd>
</p>

**Note:** The stack is saved in your current folder (.cloud66/stack.json) and only one default stack will be saved per folder.

When your stack UID is saved, you are able to use other commands without specify the stack UID.
For instance, it allows you to deploy a stack without putting the stack UID every time:

<p>
<kbd>$ c66 deploy</kbd>
</p>
	
you can use a short-cut for this command:

<p>
<kbd>$ c66 d</kbd>
</p>

You can save multiple stack UID by giving an alias to a specific stack:

<p>
<kbd>$ c66 save --stack &lt;stack_UID&gt; --alias &lt;stack_alias&gt;</kbd>
</p>

Then you can use commands and specific a stack's alias, like so:

<p>
<kbd>$ c66 deploy -s &lt;stack_alias&gt;</kbd>
</p>

## Settings of a Stack

It is possible to retrieve the settings of a specified stack and to easily modify them:

To display the settings:

<p>
<kbd>$ c66 settings --stack &lt;stack_UID&gt;</kbd>
</p>
	
or

<p>
<kbd>$ c66 settings -s &lt;stack_UID&gt;</kbd>
</p>
	
If a default stack UID is saved:

<p>
<kbd>$ c66 settings</kbd>
</p>
	
To modify a setting:

<p>
<kbd>$ c66 set --stack &lt;stack_UID&gt; --setting_name &lt;setting_name&gt; --value &lt;value&gt;</kbd>
</p>
	
or

<p>
<kbd>$ c66 set -s &lt;stack_UID&gt; -n &lt;setting_name&gt; -v &lt;value&gt;</kbd>
</p>
	
If a default stack UID is saved:

<p>
<kbd>$ c66 set --setting_name &lt;setting_name&gt; --value &lt;value&gt;</kbd>
</p>
	
or

<p>
<kbd>$ c66 set -n &lt;setting_name&gt; -v &lt;value&gt;</kbd>
</p>

## Lease an IP address (version &ge; 0.1.91

You can allow an IP address to connect temporarily to the specific stack through ssh (22):

<p>
<kbd>$ c66 lease --stack &lt;stack_UID&gt; --ip-address &lt;ip_address&gt; --time-to-open &lt;time_to_open&gt;</kbd>
</p>

or

<p>
<kbd>$ c66 lease -s &lt;stack_UID&gt; -i &lt;ip_address&gt; -t &lt;time_to_open&gt;</kbd>
</p>

Options *ip-address* and *time-to-open* are optional.
By default:

- *ip-address* : your IP address
- *time-to-open* : 20 minutes

To allow your own IP address to connect temporarily to the specific stack:

<p>
<kbd>$ c66 lease --stack &lt;stack_UID&gt;</kbd>
</p>

If a default stack UID is saved:

<p>
<kbd>$ c66 lease</kbd>
</p>

## Information of your toolbelt settings

At any time, you can see your toolbelt settings, it includes the version of the toolbelt but also some information about your saved stacks:
 
<p>
<kbd>$ c66 info</kbd>
</p>

## Contributing
{'fraction_non_alphanumeric': 0.1432856483617905, 'fraction_numerical': 0.01915089986155976, 'mean_word_length': 4.08147713950762, 'pattern_counts': {'":': 0, '<': 219, '<?xml version=': 0, '>': 219, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3120488', 'n_tokens_mistral': 3433, 'n_tokens_neox': 3204, 'n_words': 1229}