-
Notifications
You must be signed in to change notification settings - Fork 2
Configuration
Valter Silva edited this page May 14, 2021
·
7 revisions
You can customize the structure of your projects by defining their structures on configurations.yaml
.
You can use the configure
command:
clencli configure
using config file: <user configdir>/clencli/configurations.yaml
logging level: error
logging path: clencli/log.json
Would you like to update credentials? [false]:
Would you like to update configurations? [false]: true
> Configurations
>> Profile: default
>>> Name [default]:
>>> Description [managed by clencli]:
>>> Configuration
>>>> Name:
Would you like to setup Unsplash configuration? [false]:
Skipping Unplash configuration ...
Would you like to setup a customized initialization? [false]: true
>>>> Initialization
>>>>> File
>>>>>> Path:
>>>>>> Source: https://raw.githubusercontent.com/awslabs/clencli/master/LICENSE
>>>>>> Destination: LICENSE
>>>>>> State: file
To create a folder:
Would you like to setup a new file? [false]: true
>>>>> File
>>>>>> Path: documents
>>>>>> Source:
>>>>>> Destination:
>>>>>> State: directory
These inputs would result in the following configuration:
profiles:
- name: default
description: managed by clencli
configurations:
- initialization:
files:
- src: https://raw.githubusercontent.com/awslabs/clencli/master/LICENSE
dest: LICENSE
state: file
- path: documents
state: directory
You can create different types of structures, for example:
// to create nested directories
- path: a/b/c/d/e/f/g/h
state: directory
// to copy a local file
- src: /tmp/CODE_OF_CONDUCT.md
dest: CODE_OF_CONDUCT.md
- Register as a developer at unsplash
- Create a new application as
demo
Provide your Access key
and Secret key
to clencli
via configure
command:
clencli configure
using config file: <user configdir>/clencli/configurations.yaml
logging level: error
logging path: clencli/log.json
Would you like to setup credentials? [false]: true
> Credentials
>> Profile: default
>>>> Credential
>>>>> Name:
>>>>> Provider: unsplash
>>>>> Access Key []: <unsplash access key>
>>>>> Secret Key []: <unsplash secret key>
>>>>> Session Token []:
Would you like to setup another credential? [false]:
Would you like to update configurations? [false]:
Now you can download random photos by querying unsplash:
clencli unsplash --query=brazil --size=small
Once you are happy with your result, you can run clencli render template
to use the last photo downloaded into your README.md as a banner.