Coder Social home page Coder Social logo

cmon's Introduction

cmon

A command line tool to monitor for any changes in your C file and automatically recompile and execute it based on gcc. Be inspired by nodemon.

See how it works: https://cmon.clang.cool

Usage

cmon demo.c

Install

On Windows

  1. Click here to download cmon-setup.exe.
  2. Double click the cmon-setup.exe and finish the installation.
  3. Restart your PC
  4. Open Command Prompt and test the installation:
cmon -v

Tip: the installation directory is C:\Program Files (x86)\cmon.

On Linux

  1. Run this command to download cmon:
sudo curl -L "https://github.com/tsq/cmon/releases/download/v1.0.1/cmon" -o /usr/local/bin/cmon
  1. Apply executable permissions to the binary:
sudo chmod +x /usr/local/bin/cmon
  1. Test the installation:
cmon -v

On macOS

  1. Run this command to download cmon:
sudo curl -L "https://github.com/tsq/cmon/releases/download/v1.0.1/macos_cmon" -o /usr/local/bin/cmon
  1. Apply executable permissions to the binary:
sudo chmod +x /usr/local/bin/cmon
  1. Test the installation:
cmon -v

Tip: when you run the cmon command at first time, you maybe see an error dialog, the message is like this:

“cmon” cannot be opened because the developer cannot be verified.

to fix this problem, your should:

  1. go to System Preferences > Security & Privacy.
  2. click the Click the lock to make changes on the bottom then input your password or using Touch ID
  3. click Allow Anyway right of the warning message "cmon was blocked from use because it is not from an identified developer."

Why

This tool will made your C-Learning-Life happy.

before

gcc demo.c -o demo # compile
./demo             # execute
111                # show result
                   # change the demo.c
gcc demo.c -o demo # compile
./demo             # execute
222                # show result
                   # change the demo.c
gcc demo.c -o demo # compile
./demo             # execute
333                # show result
  
...  

now

cmon demo.c        # compile and execute it
111 
                   # change the demo.c
222                # show result
                   # change the demo.c
333                # show result

Pay attention

  1. The gcc need to be available on your machine.
  2. This tool just support gcc compiler no other compilers like clang.
  3. It just supports compiling a single c file.
  4. It doesn't support passing command-line arguments

cmon's People

Contributors

tsq avatar

Watchers

 avatar

cmon's Issues

support make project

cmon

when current project is a make project which contains the Makefile, the user just needs to input cmon

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.