Skip to content

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.

License

Notifications You must be signed in to change notification settings

awslabs/clencli

Photo by Felipe Dias on Unsplash

Photo by Felipe Dias on Unsplash

GitHub issuesGitHub forksGitHub starsGitHub licenseTwitter

Cloud Engineer CLI ( clencli )

A CLI built to assist Cloud Engineers.

Table of Contents


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 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, please read more here.

Installing


Expand

Download the latest version released 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 - Cobra is both a library for creating powerful modern CLI applications as well as a program to generate applications and command files.
  • viper - Viper is a complete configuration solution for Go applications including 12-Factor apps.
  • twelve-factor-app - The Twelve-Factor App
  • 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 - The most powerful photo engine in the world.
  • placeholder - The Free Image Placeholder Service Favoured By Designers
  • pirate-ipsum - The best Lorem Ipsum Generator in all the sea
  • recordit - Record Fast Screencasts
  • ttystudio - A terminal-to-gif recorder minus the headaches.
  • gihub-super-linter - GitHub Super Linter
  • github-actions - GitHub Actions
  • gitignore.io - Create useful .gitignore files for your project

License


This project is licensed under the Apache License 2.0.

For more information please read LICENSE.

Copyright


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

About

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.

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published