An open API service indexing awesome lists of open source software.

https://github.com/awslabs/clencli

CLENCLI enables you to quickly and predictably create, change, and improve your cloud projects. It is an open source tool that simplifies common tasks that many Cloud engineers have to perform on a daily basis by creating and maintaining the code structure and its documentation always up-to-date.
https://github.com/awslabs/clencli

aws cloud cloudformation terraform

Last synced: 5 months ago
JSON representation

CLENCLI enables you to quickly and predictably create, change, and improve your cloud projects. It is an open source tool that simplifies common tasks that many Cloud engineers have to perform on a daily basis by creating and maintaining the code structure and its documentation always up-to-date.

Awesome Lists containing this project

README

          

![Photo by [Felipe Dias](https://unsplash.com/fdiascreator) on [Unsplash](https://unsplash.com)](clencli/logo.jpeg)

> Photo by [Felipe Dias](https://unsplash.com/fdiascreator) on [Unsplash](https://unsplash.com)

[![GitHub issues](https://img.shields.io/github/issues/awslabs/clencli)](https://github.com/awslabs/clencli/issues)[![GitHub forks](https://img.shields.io/github/forks/awslabs/clencli)](https://github.com/awslabs/clencli/network)[![GitHub stars](https://img.shields.io/github/stars/awslabs/clencli)](https://github.com/awslabs/clencli/stargazers)[![GitHub license](https://img.shields.io/github/license/awslabs/clencli)](https://github.com/awslabs/clencli/blob/master/LICENSE)[![Twitter](https://img.shields.io/twitter/url?style=social&url=https%3A%2F%2Fgithub.com%2Fawslabs%2Fclencli)](https://twitter.com/intent/tweet?text=Wow:&url=https%3A%2F%2Fgithub.com%2Fawslabs%2Fclencli)

# Cloud Engineer CLI ( clencli )

A CLI built to assist Cloud Engineers.

## Table of Contents
---

- [Usage](#usage)

- [Installing](#installing)

- [Acknowledgments](#acknowledgments)
- [Contributors](#contributors)
- [References](#references)
- [License](#license)
- [Copyright](#copyright)

## Usage
---

Expand

In a polyglot world where a team can choose it's programming language, often this flexibility can spill into chaos as every repo looks different.
CLENCLI solves this issue by giving developers a quick and easy way to create a standardised repo structure and easily rendering documentation via a YAML file.

### Create a new project
```
$ clencli init project --project-name foo
$ tree -a moon/
foo/
├── clencli
│   ├── readme.tmpl
│   └── readme.yaml
└── .gitignore
```

### Create a new CloudFormation project
```
$ clencli init project --project-name foo --project-type cloudformation
$ tree -a sun/
foo/
├── clencli
│   ├── hld.tmpl
│   ├── hld.yaml
│   ├── readme.tmpl
│   └── readme.yaml
├── environments
│   ├── dev
│   └── prod
├── .gitignore
├── skeleton.json
└── skeleton.yaml
```

### Create a new Terraform project
```
$ clencli init project --project-name foo --project-type terraform
$ tree -a foo/
foo/
├── clencli
│   ├── hld.tmpl
│   ├── hld.yaml
│   ├── readme.tmpl
│   └── readme.yaml
├── environments
│   ├── dev.tf
│   └── prod.tf
├── .gitignore
├── LICENSE
├── main.tf
├── Makefile
├── outputs.tf
└── variables.tf
```

## Render a template
```
$ clencli init project --project-name foo
foo was successfully initialized as a basic project
$ cd foo/
$ clencli render template
Template readme.tmpl rendered as README.md
```

The `README.md` you are reading right now was generated and it's maintained by `CLENCLI` itself.
Please check [readme.yaml](clencli/readme.yaml) for more details.

## Download a .gitignore for your project
```
$ clencli gitignore --input="terraform,visualstudiocode"
.gitignore created successfully
$ less .gitignore

# Created by https://www.toptal.com/developers/gitignore/api/terraform,visualstudiocode
# Edit at https://www.toptal.com/developers/gitignore?templates=terraform,visualstudiocode

### Terraform ###
# Local .terraform directories
**/.terraform/*

# .tfstate files
*.tfstate
*.tfstate.*

# Crash log files
crash.log

# Ignore any .tfvars files that are generated automatically for each Terraform run. Most
# .tfvars files are managed as part of configuration and so should be included in
# version control.
#
# example.tfvars

# Ignore override files as they are usually used to override resources locally and so
# are not checked in
override.tf
override.tf.json
*_override.tf
*_override.tf.json

# Include override files you do wish to add to version control using negated pattern
# !example_override.tf

# Include tfplan files to ignore the plan output of command: terraform plan -out=tfplan
# example: *tfplan*

### VisualStudioCode ###
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
*.code-workspace

### VisualStudioCode Patch ###
# Ignore all local history of files
.history
.ionide

# End of https://www.toptal.com/developers/gitignore/api/terraform,visualstudiocode

```
Additionally, you can also *customize the initialization* of your projects (scaffolding) and download photos for your projects from [unsplash](https://unsplash.com), please read more [here](https://github.com/awslabs/clencli/wiki/Configuration).

## Installing
---

Expand

Download the latest version [released](https://github.com/awslabs/clencli/releases) according to your platform and execute it directly. I recommend placing the binary into your `$PATH`, so it's easily accessible.

## Commands
```
The Cloud Engineer CLI

Usage:
clencli [command]

Available Commands:
configure Configures CLENCLI global settings
gitignore Download .gitignore based on the given input
help Help about any command
init Initialize a project
render Render a template
unsplash Downloads random photos from Unsplash.com
version Displays the version of CLENCLI and all installed plugins

Flags:
-h, --help help for clencli
--log Enable or disable logs (can be found at ./clencli/log.json). Log outputs will be redirected default output if disabled. (default true)
--log-file-path string Log file path. Requires log=true, ignored otherwise. (default "clencli/log.json")
-p, --profile string Use a specific profile from your credentials and configurations file. (default "default")
-v, --verbosity string Valid log level:panic,fatal,error,warn,info,debug,trace). (default "error")

Use "clencli [command] --help" for more information about a command.
```

## Contributors
---

Expand

| Name | Email | Role |
|:------------:|:--------------------:|:---------------:|
| Silva, Valter | valterh@amazon.com | AWS Professional Services - Cloud Architect |

## Acknowledgments
---

Expand

Gratitude for assistance:
* Sia, William - AWS Professional Service - Senior Cloud Architect
* Dhingra, Prashit - AWS Professional Service - Cloud Architect

## References
---

Expand

* [cobra](https://github.com/spf13/cobra) - Cobra is both a library for creating powerful modern CLI applications as well as a program to generate applications and command files.
* [viper](https://github.com/spf13/viper) - Viper is a complete configuration solution for Go applications including 12-Factor apps.
* [twelve-factor-app](https://12factor.net) - The Twelve-Factor App
* [gomplate](https://github.com/hairyhenderson/gomplate) - gomplate is a template renderer which supports a growing list of datasources, such as JSON (including EJSON - encrypted JSON), YAML, AWS EC2 metadata, BoltDB, Hashicorp Consul and Hashicorp Vault secrets.
* [unsplash](https://unsplash.com) - The most powerful photo engine in the world.
* [placeholder](https://placeholder.com) - The Free Image Placeholder Service Favoured By Designers
* [pirate-ipsum](https://pirateipsum.me) - The best Lorem Ipsum Generator in all the sea
* [recordit](https://recordit.co) - Record Fast Screencasts
* [ttystudio](https://github.com/chjj/ttystudio) - A terminal-to-gif recorder minus the headaches.
* [gihub-super-linter](https://github.com/github/super-linter) - GitHub Super Linter
* [github-actions](https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/introduction-to-github-actions) - GitHub Actions
* [gitignore.io](https://www.toptal.com/developers/gitignore) - Create useful .gitignore files for your project

## License
---
This project is licensed under the Apache License 2.0.

For more information please read [LICENSE](LICENSE).

## Copyright
---
```
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
```