🍺 BREW Explorer

← all formulae

c

brew install c v0.15.1 MIT

Compile and execute C "scripts" in one go

18
30-day installs · #7123
65
90-day · #6618
495
365-day · #5143
2.2k
★ GitHub stars · updated 8mo ago

GitHub topics

c clang cli compiler cpp gcc script tcc

Links

Raw metadata
{
  "aliases": [],
  "alternatives": [],
  "build_dependencies": [],
  "categories": [],
  "caveats": null,
  "conflicts_with": [],
  "dependencies": [],
  "deprecated": 0,
  "deprecation_reason": null,
  "desc": "Compile and execute C \"scripts\" in one go",
  "disable_reason": null,
  "disabled": 0,
  "enrichment_fetched_at": "2026-06-20T23:36:03+00:00",
  "first_seen": "2026-06-20T23:34:18+00:00",
  "full_name": "c",
  "github_default_branch": "master",
  "github_last_commit_at": "2025-12-05T02:58:15Z",
  "github_readme_excerpt": "# c\n\n\u003c!--\n[![Build Status](https://travis-ci.org/ryanmjacobs/c.svg)](https://travis-ci.org/ryanmjacobs/c)\n--\u003e\n\n\u003e \"There isn\u0027t much that\u0027s special about C. That\u0027s one of the reasons why it\u0027s\nfast.\"\n\nI love C for its raw speed (although it does have its drawbacks). We should\nall write more C.\n\nWith this shell script, you can compile and execute C \"scripts\" in one go!\n\n(Oh yeah, and it works for C++ too.)\n\n![GIF Demo](http://i.imgur.com/aWnG03r.gif)\n\nHere\u0027s a simple example:\n```c\n#include \u003cstdio.h\u003e\n\nint main(void) {\n    printf(\"Hello World!\\n\");\n    return 0;\n}\n```\n\nRun it by typing:\n```bash\n$ c hello.c\nHello World!\n```\n\nOr, call it from the shebang!\n```c\n#!/usr/bin/c\n#include \u003cstdio.h\u003e\n\nint main(void) {\n    printf(\"Hello World!\\n\");\n    return 0;\n}\n```\n```bash\n$ chmod +x hello.c\n$ ./hello.c\nHello World!\n```\n\n## Hooked? Here\u0027s how to install it:\nUse a package manager? [Check here](https://github.com/ryanmjacobs/c#packages).\n\nFor the entire system:\n```bash\n$ wget https://raw.githubusercontent.com/ryanmjacobs/c/master/c\n$ sudo install -m 755 c /usr/bin/c\n\n# Or... for systems that prefer /usr/local/bin (e.g. macOS)\n$ sudo install -m 755 c /usr/local/bin/c\n```\n\nFor your local user only:\n```bash\n$ wget https://raw.githubusercontent.com/ryanmjacobs/c/master/c\n$ sudo install -Dm 755 c ~/.bin/c\n$ echo \u0027PATH=$PATH:$HOME/.bin\u0027 \u003e\u003e ~/.bashrc\n```\n\nNote: if you install it somewhere other than `/usr/bin/c`, then your shebang\nwill be different. For example it may be something more similar to\n`#!/home/ryan/.bin/c`.\n\n## Okay, how do I use it?\nc will use whatever `$CC` is set to. You can change this with:\n```bash\n$ export CC=clang\n$ export CC=tcc\n$ # etc...\n```\n## CLI\n### Multiple Files - CLI\nAnything you want passed to the compiler, put in quotes as the first argument.\nWhether they\u0027re flags (`-Wall`, `-O2`, etc.) or file names (`file.c`,\n`main.c`, etc.).\n\n```bash\n$ c \"main.c other.c\" arg1 arg2\n$ c \"main.c other.c -O3 -Wall -lncurses\" arg1 arg2\n```\n### Single File - CLI\nWith only one fil",
  "github_repo": "ryanmjacobs/c",
  "github_stars": 2177,
  "github_topics": [
    "c",
    "clang",
    "cli",
    "compiler",
    "cpp",
    "gcc",
    "script",
    "tcc"
  ],
  "homepage": "https://github.com/ryanmjacobs/c",
  "homepage_og_description": null,
  "homepage_og_image": null,
  "homepage_title": null,
  "installs_30d": 18,
  "installs_365d": 495,
  "installs_90d": 65,
  "keg_only": 0,
  "keg_only_reason": null,
  "last_seen": "2026-06-20T23:34:18+00:00",
  "license": "MIT",
  "llm_generated_at": null,
  "llm_model": null,
  "name": "c",
  "oldnames": [],
  "one_liner": null,
  "optional_dependencies": [],
  "rank_30d": 7123,
  "rank_365d": 5143,
  "rank_90d": 6618,
  "raw_hash": "719bd9a2fa68e08d",
  "recommended_dependencies": [],
  "revision": 0,
  "ruby_source_path": "Formula/c/c.rb",
  "tap": "homebrew/core",
  "test_dependencies": [],
  "uses_from_macos": [],
  "version_head": "HEAD",
  "version_stable": "0.15.1",
  "versioned_formulae": [],
  "why_use_this": null
}