Baike.dev
All toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
C

comma

> 编程语言
Open source

Comma runs software without installing it. [maintainers=@Artturin,@burke,@DavHau]

1.7K stars0 likes0 views
WebsiteGitHub

About

Comma runs software without installing it. [maintainers=@Artturin,@burke,@DavHau]

comma

Comma runs software without installing it.

Basically it just wraps together nix shell -c and nix-index. You stick a , in front of a command to run it from whatever location it happens to occupy in nixpkgs without really thinking about it.

Installation

comma is in nixpkgs so you can install it just like any other package.

Either add comma to systemPackages in your NixOS configuration (PREFERRED)

environment.systemPackages = with pkgs; [ comma ];

Or install it in your nix environment. (DISCOURAGED)

nix-env -f '<nixpkgs>' -iA comma

Get the required nix-index database from

nix-index-database ad-hoc-download section Remember to keep it up to date

Alternatively you may use programs.nix-index-database.comma.enable in the module from nix-index-database, in that case do not add comma to systemPackages yourself.

Usage

, cowsay neato

Cache

Comma supports caching both the choices (i.e., once you select a derivation for a command, it will always return the same derivation) and paths (i.e., once the path is evaluated by Nix, we will always return the same path until it is GC'd). You can control those options by using --cache-level flag or COMMA_CACHING environment variable:

  • 0: completely disables caching
  • 1: only cache choices
  • 2 (default): also caches paths

Cache for path is the default since it makes subsequent usage of a command much faster:

…

However, it also means you may not run the most up-to-date version of a command, specially if you don't run Nix's garbage collector often. If this is an issue for you, set COMMA_CACHING=1.

Prebuilt index

https://github.com/nix-community/nix-index-database

Running with Sudo

If your nix-index isn't at the default location then you will need to pass the NIX_INDEX_DATABASE variable.

sudo --preserve-env=NIX_INDEX_DATABASE , hello

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Rustnixnixos

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言