CS50 CLI

CS50 CLI is a Docker image with which you can (easily!) mount a directory within a container running Ubuntu 14.04.[1] (We use it to work on CS50’s own apps in a standard, contained environment, without having to install apps' dependencies on our own Macs and PCs.) It provides a command-line environment similar, but not identical to, a terminal window on CS50 IDE; see Notes for differences.

cli50 is a command-line script that facilitates using CS50 CLI (so that you needn’t type long command lines).

Installation

Assuming you already have Bash, Docker Engine, and Python installed, you can install cli50 (on Linux, Mac OS, and Windows) as follows.

pip install cli50

Usage

You can mount your current working directory within CS50 CLI as follows.[2]

cli50

You can mount some other directory within CS50 CLI as follows, where /path/to/directory is that directory’s absolute path.[3]

cli50 /path/to/directory

Notes

CS50 CLI differs from a terminal window in CS50 IDE in, at least, the following ways.[4]

CS50 CLI CS50 IDE

Clang

3.8

3.6

Node.js

7.6.0

0.10

PHP

7.1

5.5

Python

3.6.0

3.4

Ruby

2.4.0

2.1


1. Once CS50 IDE migrates from Ubuntu 14.04 LTS to Ubuntu 16.04 will CS50 Server be migrated as well.
2. Without cli50 installed, you’d instead have to execute docker run --interactive --publish-all --rm --tty --volume "$PWD":/root --workdir /root cs50/cli!
3. Without cli50 installed, you’d instead have to execute docker run --interactive --publish-all --rm --tty --volume /path/to/directory:/root --workdir /root cs50/cli!
4. CS50 IDE will eventually be updated to bring it in parity.

results matching ""

    No results matching ""