Giter VIP home page Giter VIP logo

dotcloud-cli's Introduction

DotCloud CLI

This is a beta version of the new DotCloud command line interface.

What's New

This version of CLI is designed to work with the application directory linked to the remote dotcloud application.

This allows you to avoid typing the same application names multiple times, and reduce the possiblity of making typos and overwrite wrong applications by repeating the command line history.

# New CLI 
> dotcloud2 push
> dotcloud2 info
> dotcloud2 ssh www

# Old CLI
> dotcloud push myapp .
> dotcloud info myapp
> dotcloud ssh myapp.www

The command line executable is installed as dotcloud2 so that you can keep using the existing version of the dotcloud command.

Setup

First, you have to configure your CLI to work as a DotCloud REST API consumer.

> dotcloud2 setup
Dotcloud Username: your-user-name
Password: **********

You're asked to provide your username and password for DotCloud, to register the new CLI client as a DotCloud REST API consumer. You can also use email, instead of your username.

The CLI won't save this credentials locally - instead, it will save the OAuth2 access token in the local disk. Once the setup is complete, you can run the check command to see if everything is configured correctly.

> dotloud2 check
--> Checking the authentication status
OK: Client is authenticated as <your-username>

If this fails, try removing the directory ~/.dotcloud2 and start over from the setup.

Working with your application

> cd ~/dev
> mkdir myapp
> (write some code)

Create

Once you've done writing your awesome application, run the create command:

> dotcloud2 create myapp
--> Creating a new application called "myapp"
Application "myapp" created.
Connect the current directory to "myapp"? [Yn]: y
--> Connecting with the application "myapp"
--> Connected.

As you see, the CLI asks you if you want to connect the current working directory to the remote application. This allows you to omit typing the application name from now on.

Running commands

To push the code to the DotCloud platform, simply type:

> dotcloud2 push

and it will upload the code from the current directory to the application. You can see the currently connected application by typing:

> dotcloud2 app
myapp

You can see the list of commands by running dotcloud2 -h.

If you typed n when asked to connect the current directory, the CLI can't find the application name for the commands. You can specify the application name in such case, using the --application (or -A for short) option:

> dotcloud2 -A myapp info

You can also use this option when you want to run commands against the application that you don't have the working directory for.

Connect

Similarly, if you already have a working directory and a dotcloud remote application and want to connect them together, instead of creating a new application, run the connect command:

> cd ~/dev/myapp
> dotcloud2 connect myapp

It will create your working directory with the (existing) dotcloud application myapp.

dotcloud-cli's People

Contributors

miyagawa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.