Skip to main content

cacamacs — a small terminal text editor with Emacs key bindings

Project description

ccm — cacamacs

A small terminal text editor with Emacs key bindings, built on the gtcaca libcaca TUI toolkit and its editor widget. It shows off the widget's colourization, folding, annotations, autocompletion, search/replace and a VSCode-style language-extension model.

ccm [file | directory] [language-configuration.json]
  • A file opens in the editor.
  • A directory opens the file browser (also C-x d).
  • An optional explicit language-configuration.json forces that config.

It also has a diagram mode (M-x diagram): a drag-and-drop canvas for ASCII diagrams. Pick a shape from the pane on the left — box, rounded, diamond, circle, ellipse, cloud, cylinder, hexagon, actor or free text — drop it on the canvas with the mouse or the keyboard, link any two by clicking one then the other, rub out single characters with the eraser. Leaving drops the finished art into your document at the cursor — plain characters, saved with C-x C-s like anything else.

                         +-------+              .-----------.
     O                  /         \             |'---------'|
    /|\        +------>+   ok?     +----------->|   store   |
    / \   -----+        \         /             |           |
   user                  +-------+              '-----------'

See docs/README-cacamacs.md for the full key-binding reference and feature tour.

History. ccm started life as apps/cacamacs inside the gtcaca repo, where a copy remains as a worked example of building an app on the toolkit. Active development now happens here, against gtcaca as an ordinary external dependency.

Install with pip

Prebuilt binaries are published to PyPI for macOS (Apple Silicon), Linux (x86_64) and Windows (x86_64) — no compiler or Homebrew needed:

pip install cacamacs
ccm            # or: cacamacs

PyPI is used purely as a binary channel (as ruff/cmake/ninja do): the wheel carries the compiled ccm and the libgtcaca/libcaca/oniguruma libraries it needs, made relocatable, plus the sample language extensions so syntax highlighting works out of the box. See packaging/ for how the per-platform wheels are built (packaging/build.shpackaging/wheel.py, wired up in .github/workflows/release.yml, which publishes on a v* tag).

Building

ccm consumes gtcaca like any third party would: install gtcaca first, then build ccm against it. gtcaca ships a gtcaca.pc, so pkg-config finds it.

# 1. install gtcaca (any one of these):
brew install stricaud/tap/gtcaca         # Homebrew tap
#   …or from a gtcaca checkout:  cmake -S . -B build && cmake --build build && sudo cmake --install build

# 2. build ccm
cmake -S . -B build
cmake --build build

# 3. run it
./run.sh              # builds if needed, then runs build/ccm
./run.sh path/to/file

Requirements: a C compiler, CMake ≥ 3.20, pkg-config, and an installed gtcaca (which pulls in libcaca).

Installing

sudo cmake --install build        # → /usr/local/bin/ccm, share/ccm/ccm-theme.example

Self-contained macOS package

scripts/package-macos.sh builds a .pkg that bundles libgtcaca and libcaca alongside ccm (rewritten to @rpath), so the installed editor needs neither Homebrew nor a system gtcaca:

scripts/package-macos.sh          # → ccm-<version>.pkg

Its postinstall seeds ~/.ccm/theme from the bundled sample (never clobbering an existing one).

Configuration

  • Colour theme — copy docs/ccm-theme.example to ~/.ccm/theme. Comments in the file explain every key.
  • Editor config — copy examples/config.json to ~/.cacamacs/config.json for tab size, indent, per-language overrides.
  • Language extensions — the VSCode-style grammar/config bundles under examples/extensions/ drive syntax colourization.

Layout

src/            editor sources (cacamacs.c, ui.c, edit.c, search.c, …)
                diagram.c / diagram_model.c — M-x diagram (mode / document)
docs/           feature docs + the colour-theme sample
examples/       config sample and language extensions
packaging/      cross-platform bundles + pip wheels (build.sh → wheel.py)
scripts/        macOS packaging
CMakeLists.txt  standalone build (finds gtcaca via pkg-config)
run.sh          build-and-run helper

License

Released into the public domain under the Unlicense — do whatever you want with it.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

cacamacs-0.0.7-py3-none-win_amd64.whl (1.2 MB view details)

Uploaded Python 3Windows x86-64

cacamacs-0.0.7-py3-none-manylinux_2_35_x86_64.whl (1.9 MB view details)

Uploaded Python 3manylinux: glibc 2.35+ x86-64

cacamacs-0.0.7-py3-none-macosx_14_0_arm64.whl (675.9 kB view details)

Uploaded Python 3macOS 14.0+ ARM64

File details

Details for the file cacamacs-0.0.7-py3-none-win_amd64.whl.

File metadata

  • Download URL: cacamacs-0.0.7-py3-none-win_amd64.whl
  • Upload date:
  • Size: 1.2 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for cacamacs-0.0.7-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 db2edda454d9643a15cb5fd6ac5a2f25c738528fa9fa924e6d36170fb1b03bf5
MD5 ad6c7b6556f586041b7e37439ca6ebc5
BLAKE2b-256 0b5ad9a5a7461acf6ec947eee65f8a8e328dc532d72e738ada4b5ad8d5564872

See more details on using hashes here.

Provenance

The following attestation bundles were made for cacamacs-0.0.7-py3-none-win_amd64.whl:

Publisher: release.yml on stricaud/ccm

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cacamacs-0.0.7-py3-none-manylinux_2_35_x86_64.whl.

File metadata

File hashes

Hashes for cacamacs-0.0.7-py3-none-manylinux_2_35_x86_64.whl
Algorithm Hash digest
SHA256 a722c35e1ae0858acb562445ca863b55a7178a819fe3325c7b5493c4f8fa5ad8
MD5 26e7b5cf876d76d674af052780bdfede
BLAKE2b-256 a0892b424623cb603ad5cf617bdaca274c27913e8eec413bf175d28c346030cc

See more details on using hashes here.

Provenance

The following attestation bundles were made for cacamacs-0.0.7-py3-none-manylinux_2_35_x86_64.whl:

Publisher: release.yml on stricaud/ccm

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cacamacs-0.0.7-py3-none-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for cacamacs-0.0.7-py3-none-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 2d9b68a2c1be5ad3084c460c7627b49c1dbb2db57d97eb3be216b5f57945eb4b
MD5 45b4313b9fa0a23f3ebbf8e252e43bf4
BLAKE2b-256 f0fe1ee96622a9455f85fd53eb559bcad8c8c23e3e7a228e2a41acd490ea5ab3

See more details on using hashes here.

Provenance

The following attestation bundles were made for cacamacs-0.0.7-py3-none-macosx_14_0_arm64.whl:

Publisher: release.yml on stricaud/ccm

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page