About life, the universe and READ.me

"Talk is cheap. Show me the code" — Linus Torvalds

CLI Documentation

At CodePicnic we want to make it easy for you to interact with our CLI. Here you will find all the options available for managing your consoles from the command line.

Installation

OS X / macOS:

Download and run the OS X installer

Ubuntu:

Run this from your terminal

wget -O- https://tools.codepicnic.com/codepicnic-cli-ubuntu.sh | sh

Ubuntu (manual installation):

Run the following commands from your terminal

echo "deb http://apt.codepicnic.com/ stable main" | sudo tee /etc/apt/sources.list.d/codepicnic.list
wget -qO- http://apt.codepicnic.com/codepicnic.gpg  | sudo apt-key add -
sudo apt-get update
sudo apt-get -y install codepicnic
sudo apt-get -y install fuse

Configuration (set credentials)

Get your credentials (Client ID / Client Secret) from CodePicnic.com

REPL Mode

Run this from your terminal

  codepicnic

Then inside the repl type `configure`:

CodePicnic> configure

Example

Repl Mode Example Gif

CLI Mode

Run this from your terminal

codepicnic configure

Example

CLI Mode Example Gif

Commands

All commands run in CLI or REPL Mode. If you don't enter parameters, the program will ask for them. To use most of them you'll need a CONSOLE_ID, which can be found on the first column of codepicnic list output.

  • clear Clear screen in CLI mode.
  • configure Set your CodePicnic credentiales. You can change them anytime you want.
  • connect Connect to a console and start a Bash session inside it.
codepicnic connect CONSOLE_ID
  • copy Copy a file from/to a console:
codepicnic copy FILE_PATH CONSOLE_ID:[DESTINATION_FILE_PATH]

Or copy a file from a console:

codepicnic copy CONSOLE_ID:FILE_PATH DESTINATION_FILE_PATH
  • create Create and start a new console. It takes the following options:
    • --size value ( default: medium. Values: medium, large, xlarge ) Container Sizes, Limits may apply according your current subscription plan:
      1. medium (256MB RAM)
      2. large (512MB RAM)
      3. xlarge (1GB RAM).
    • --type value ( default: bash ) Stack type. Use codepicnic stacks to list all the available stacks.
    • --title value Pick a name for your console. Make it personal!
    • --hostname value Any name you'd like to be used as your console hostname.
    • --mode value ( default: draft. Values: public, draft ) The mode the console is currently in. Available modes: public, draft.
codepicnic create --type ruby
  • exit Exit the REPL.
  • help Shows a list of commands or help for one command.
  • list List your created consoles.
  • mount Mount console's /app filesystem in your local computer.
codepicnic mount CONSOLE_ID DESTINATION_PATH
  • restart restart a console
  • stacks List the available stacks
  • start start a console
codepicnic start CONSOLE_ID
  • stop stop a console
codepicnic stop CONSOLE_ID
  • unmount Unmount console's /app filesystem from your local computer.
codepicnic unmount CONSOLE_ID
⇡ Jump to top

Need to support anything else in particular?

Don't hesitate and let us know what you need