canaveral

command module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 25, 2020 License: MIT Imports: 22 Imported by: 0

README

Canaveral

Go

Contents

Introduction

Launch your new projects seamlessly. Canaveral automates all your project setup away.

We wanted to have a project manager that was fast, intuitive, and actually useful. So we made Canaveral.

Canaveral is a Command Line Interface (CLI) tool that can add, remove, and view your projects. It is a tool built by developers for developers. Don't worry about where your projects are located, how they are organized, what their names are, or how to set them up. Canaveral does that for you.

The Name

Cape Canaveral Air Force Station is one of two main launch sites for U.S. space missions. It is used primarily for launching spacecraft into equatorial orbits (as opposed to the Vanderberg Air Force Station in California, for polar orbits). This tool is designed to help you launch all your projects without having to worry about the slow, mundane early stages of setting up. Hence we chose the spaceship-launch naming theme.

While both sites are important, Canaveral just sounded cooler than Vanderberg.

Getting Started

Dependencies
npm

Canaveral uses npm to install useful dependencies for you. To ensure that Canaveral works properly, please make sure you have npm installed: Node.js Download

Github

If you want to use Canaveral's Github features, you will need a github account, as well as a personal access token. Find out how to get a personal access token here.

VSCode

Canaveral has support for opening projects in VSCode. To enable this, you will need to make sure you can run the code command from the command line. Mac OS users will need to install this through VSCode if they have not already. Instructions can be found here.

Installation

WARNING: The CLI is still in development, and has yet to be packaged properly. If you want to jump in early, follow the instructions below. Otherwise, stay posted for the next stable release.

There are two ways to install Canaveral.

Go build

First, you need to have Go installed. If you don't, follow the instructions here.

Be sure that your GOPATH is configured correctly, so you are able to execute go binaries.

Then, go get Canaveral and install it:

$ go get github.com/jchengjr77/canaveral
$ go install github.com/jchengjr77/canaveral

This should have put an executable named canaveral into the folder $GOPATH/bin. If Canaveral isn't working, check that folder to see if the executable really exists.

Download Executable

In the Canaveral Releases section, you will find all current releases of Canaveral. We suggest you grab the latest one: v0.6.0

Select the correct package for your computer system and download it. See release notes for guidance. After you download and unzip Canaveral, you will be left with a single executable. You need to add it to your $PATH.

Add the following line to your shell's config file (.bashrc, .zshrc for bash and zsh respectively). NOTE: Windows users must add to their PATH a different way. See link to instructions below.

$ export PATH=$PATH:$HOME/path/to/canaveral

Here are some helpful links related to adding to $PATH:

For Mac

For Linux

For Windows 10 (Important)

Basic Usage

For a full list of commands, please refer to canaveral -h.
For help on a specific command, please refer to canaveral [command name] -h.

The most basic function of canaveral is viewing all your projects:

$ canaveral

This command may tell you to "specify a workspace." To specify a workspace:

$ canaveral space /path/to/your/workspace
What is a workspace?

Your canaveral workspace is the place where you will put all your projects. A workspace is a path to a folder of your choosing. Every time you use canaveral, you will be interacting with projects in your workspace. You can specify your workspace to be anywhere you want. For instance, JJ's workspace is /Users/[omitted]/Documents/Personal/projects. Note that workspace paths should from root (/).

NOTE: Though it is not necessary, we recommend you add a script or alias to help you quickly navigate to your selected workspace. While developing canaveral, this simple little tool save us a lot of headache from navigation. An alias would look something like this: (more information on zsh aliases here)

// inside your .zshrc or .bashrc
alias gotoprojs="cd ~/path/to/canaveral/workspace"

After you specify your workspace, running canaveral should show a list of projects in your workspace. At this point, it may be the case that your workspace is empty. Lets launch a new project!

$ canaveral launch coolproject

Congratulations! You have launched your first canaveral project, named coolproject. However, coolproject has nothing in it.

For most people, a blank project like coolproject is not very useful. How about we remove a project, in this case coolproject, and create a new React project!

$ canaveral remove coolproject
... (confirm project deletion) ...
$ canaveral launch -type react coolreactproject

Now we have a new react project called coolreactproject! If you did not previously have a tool called create-react-app installed, Canaveral took care of that installation for you. Let's take a look at what our new project contains by opening our project in VSCode. (Note: this requires you to have VSCode as well as the VSCode Command installed).

$ canaveral code coolreactproject

This should open a new VSCode window showing your new project coolreactproject.

Additionally, Canaveral can make a new Github repo for you! First, make sure you add your git credentials:

$ canaveral addgithub
... (prompt for username and personal auth token) ...

Again, for guidance on how to get a personal auth token from github, follow this link.

To view your git credentials:

$ canaveral printgithub

At any point in time, if you wish to remove your git credentials, you can do so using:

$ canaveral removegithub

Lets try to get canaveral to initialize a new project and repo! This time, let's create a node project:

$ canaveral launch --gitinit --type node coolproject2

Now, your project coolproject2 is git enabled! You start by adding your own remote repository, staging changes and pushing commits, and all that other good git stuff.

Project Types

Canaveral should be usable for all developers. Creating projects, looking at all your projects, and removing projects are universal features that anybody can use. These are fundamental features to Canaveral.

Furthermore, if you use one of the following technologies, you're in luck. More features for you! (This list will most likely expand, so keep an eye out).

Troubleshooting

For fixing common problems, please refer to this list of steps:

  • Make sure all dependencies are installed properly. See dependencies section
  • Refer to canaveral's built in help for reference. Type canaveral --help
  • For help on a specific command, such as launch, type canaveral launch -help
  • If there are any other bugs, please contact either JJ Cheng or Sean Prendi. You may be able to help identify and patch an important aspect of Canaveral!

Contributing

Since we want Canaveral to be for all developers, contributions are super welcome! Whether you fix a bug, provide user feedback, create a big feature PR, or make our documentation prettier, the help is deeply appreciated.

Contributors are especially welcome to add support for new technologies. The more diversity Canaveral receives, the more useful the tool is for everybody. If you are comfortable with a certain technology that isn't on the current list, please reach out!

For all contribution inquiries, please email JJ Cheng.

License

See the LICENSE file for license rights and limitations (MIT).

Credits

Creators:

JJ Cheng - github - jjcheng.me

Sean Prendi - github - seanprendi.me

Documentation

Overview

Package main contains API for Canaveral CLI. See README.md for more documentation

Directories

Path Synopsis
Package finder contains: - functionality for opening canaveral project in finder // ? NOTE: this feature is targeted at macOS users
Package finder contains: - functionality for opening canaveral project in finder // ? NOTE: this feature is targeted at macOS users
Package lib contains testing functions for canaveral includes: - capture output (from stdout) - redirect stdout - reset stdout
Package lib contains testing functions for canaveral includes: - capture output (from stdout) - redirect stdout - reset stdout
Package nativestore implementation taken from https://flowerinthenight.com/blog/2017/10/30/nativestore
Package nativestore implementation taken from https://flowerinthenight.com/blog/2017/10/30/nativestore
Package vscodesupport contains: - functionality for opening canaveral projects in vscode
Package vscodesupport contains: - functionality for opening canaveral projects in vscode

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL