Documentation moved! The Cask documentation moved to http://cask.readthedocs.org. This documentation is kept for historical purposes and not updated anymore. Please consult the current documentation.

Usage


Start off by creating a file called Cask in the project root. Use the init command to create a Cask-file automatically, containing boilerplate code.

$ cask init [--dev]

(Use --dev if the project is for package development)

If you are using Cask for your Emacs configuration, add this to your .emacs file:

(require 'cask "~/.cask/cask.el")
(cask-initialize)

To install all dependencies, run:

$ cask [install]

This will create a directory called .cask, containing all dependencies.

The commands below execute using the emacs binary. To specify a custom Emacs, use the EMACS environment variable, for example:

$ EMACS="$(evm bin emacs-24.1)" cask command

Commands & Options

Cask's commands and options are briefly described below. For full documentation, use cask help.

Commands


exec

Execute command with correct PATH (see path) and EMACSLOADPATH (see load-path) set up.

$ cask exec echo foo
$ cask exec ecukes --script --reporter gangsta
$ cask exec ert-runner --pattern performance

help, --help, -h

Show Cask usage information.

$ cask help
$ cask -h
$ cask --help
$ cask --help command

info

Show information about the project, such as name, description and version.

$ cask info

init

Create new Cask-file. If the project is for package development, use the --dev option.

$ cask init       # For Emacs configuration
$ cask init --dev # For package development

install

This is the default command, which installs all runtime and development dependencies specified in the Cask-file.

$ cask
$ cask install

list

List all runtime and development dependencies.

$ cask list

load-path

Print EMACSLOADPATH-friendly string with path to all dependencies to this project.

The exec command includes the output of this command automatically. This means that if the command executed is an Emacs process, there's no hassle with the load-path, just require the dependencies.

$ cask load-path

outdated

Show list of all outdated dependencies. That is dependencies that have a more recent version available for installation.

$ cask outdated

package

Create a -pkg.el file (see http://www.gnu.org/software/emacs/manual/html_node/elisp/Multi_002dfile-Packages.html#Multi_002dfile-Packages).

$ cask package

package-directory

Print path to package directory, that is the path to the directory where all dependencies are installed (.cask/EMACS-VERSION/elpa).

$ cask package-directory

path

Print PATH and prepend path to all directories called bin in this projects dependencies.

For example if this project depends on ecukes, this command will include .cask/EMACS-VERSION/elpa/ecukes-VERSION/bin.

$ cask path

update

Update all dependencies.

$ cask update

upgrade-cask

Upgrade Cask and all its dependencies.

$ cask upgrade-cask

version

Print version of this package.

$ cask version

files

Print list of package files.

$ cask files

build

Byte compile all package files. The .elc files are placed in the same directory as the source file.

$ cask build

clean-elc

Remove byte compiled files generated from the build command.

$ cask clean-elc

link

Handle package links.

$ cask link list                 # List all links
$ cask link ecukes ~/Code/ecukes # Create link to local Ecukes
$ cask link delete ecukes        # Delete Ecukes link

package

Build a package (.el or .tar) and place in the dist (or specified) directory.

$ cask package
$ cask package /path/to/dist

Options


--proxy

Set Emacs proxy for HTTP and HTTPS.

$ cask --proxy "localhost:8888"

--http-proxy

Set Emacs proxy for HTTP.

$ cask --http-proxy "localhost:8888"

--https-proxy

Set Emacs proxy for HTTPS.

$ cask --https-proxy "localhost:8888"

--no-proxy

Set Emacs "no-proxy".

$ cask --no-proxy "work\\.com"

--version

Print Cask's version.

$ cask --version

--dev

Perform action in development mode. This option does only take affect for some commands. See resp. command for that information.

$ cask --dev

--debug

Enable debug information.

$ cask --debug

--path

Change default directory to path before executing command.

$ cask --path /path/to

--verbose

Cask tries to hide as much output as possible by default. With this option, all output will show.

$ cask install --verbose