A favicon of Comma

Comma

A Nix helper that runs software without installing it, for developers who need a command only once.

Screenshot of Comma websiteVisit Comma

Whenever a program lives somewhere in nixpkgs, Comma will find it there and run it, and the command for that is the program name with a comma in front. A line like , cowsay neato works without the package being added to your environment first.

Under the surface it wraps nix shell -c together with nix-index. The index has to come from somewhere: download the prebuilt database from the nix-index-database project, or enable Comma through that project's module, and keep the database up to date.

Installation follows the usual Nix paths. Adding comma to systemPackages in a NixOS configuration is the preferred route, while installing it into a Nix environment works but is discouraged. If the nix-index-database module enables Comma for you, do not add the package yourself as well.

  • Level 0: caching is off and every command is resolved from scratch.
  • Level 1: the derivation you picked for a command is remembered, so the same one comes back next time.
  • Level 2: the evaluated path is cached as well, the default, and repeat runs become far faster.

The level is chosen with a cache-level flag or the COMMA_CACHING variable. Caching a path also means you may not run the newest version of a command, especially when the garbage collector rarely runs, so step back to level 1 when freshness matters. Running under sudo needs the index variable preserved if the database sits outside its default location.

Categories:
Built with:
Share:
Details:
  • Stars


    1,757
  • Forks


    62
  • Last commit


    10 days ago
  • Repository age


    6 years
  • License


    MIT
  • Version


    2.4.2
  • Repository


    nix-community/comma

Auto-fetched from GitHub .

Ad

 

 
 
 
 

Open source alternatives similar to Comma:

 

 
 
  • Stars


  • Forks


  • Last commit


 

 
 
  • Stars


  • Forks


  • Last commit


 

 
 
  • Stars


  • Forks


  • Last commit