Skip to content

Quick Start

This guide gets you running cjsh, a POSIX-based interactive shell with integrated modern features, as quickly as possible.

Prerequisites

  • A C compiler and C++ compiler (for example GCC or clang)
  • CMake 3.25 or newer
  • Ninja (the configured CMake presets use the Ninja generator)

cjsh vendors its line editor dependency (cjsh-isocline) in this repository, so you do not need to install a separate shell framework or plugin stack.

Installation

cjsh can be downloaded or built in multiple different ways.

As a package

cjsh is available through multiple package managers:

Homebrew (macOS/Linux)

    brew tap CadenFinley/tap
    brew install cjsh

Arch Linux (AUR)

    # Using yay
    yay -S cjsh

    # Using paru
    paru -S cjsh

    # Or manually
    git clone https://aur.archlinux.org/cjsh.git
    cd cjsh
    makepkg -si

Hopefully more package managers to come as cjsh gets bigger.

Manual building and installation

cjsh is super easy to download and install. Everything is hosted on the github repo at: https://github.com/CadenFinley/CJsShell

The master branch holds the most recent commits and may not always be stable and may have breaking changes with no backwards compatibility. For the most stable release, stick to using the latest tagged release from the public GitHub releases.

cjsh is still in active, rapid development so even the latest release can still have breaking changes with no backwards compatibilities, although they will always be noted in the release if they exist.

    # First clone the repo
    git clone https://github.com/CadenFinley/CJsShell && cd CJsShell

    # Configure a Release build (outputs to ./build/release)
    cmake --preset release

    # Compile using all available cores
    cmake --build --preset release --parallel

After building, the cjsh executable will be in build/release/. You can run it directly with ./build/release/cjsh

Build info

By default the commands above produce an optimized Release build.

  • Use cmake --preset debug to build with sanitizers and full debug info.
  • Use cmake --preset minimal for the ultra-small binary profile.
  • Additional presets are available: relwithdebinfo and minsizerel.
  • List all presets with cmake --list-presets.
  • cmake --build --preset release --target clean removes the build artifacts for the release preset.
  • Disable compile database emission with -DCJSH_GENERATE_COMPILE_COMMANDS=OFF if your tooling does not need it.
  • Install the binary anywhere with cmake --install build/release --config Release --prefix ~/.local (adjust the prefix as desired).
  • Export CJSH_STRIP_BINARY=0 before configuring to keep symbols in non-Debug builds.

As before, git revision information is embedded automatically; use CJSH_GIT_HASH_OVERRIDE if you need to pin a custom value.


Next Steps

Now that you have cjsh installed, run cjsh --help to review invocation flags, type help inside the shell for the built-in quick reference, and check out What You Need to Know to learn about all the powerful features available out of the box and how to configure them to suit your workflow.