Run cmd mods add with an npm package, GitHub repository or local path to install a Command Code mod. Leave off -g to add it to one project; use -g to make it available across your projects. Mods run code on your machine, so install only ones you trust.
Install the CLI first
Command Code needs Node.js 22 or newer. It will not start on Node 20. The package name is command-code.
npm i -g command-code@latestcmd --versioncmd loginThe examples below use cmd, the short command on macOS, Linux and WSL. On native Windows, use the documented cmdc alias, or call command-code directly. Do not substitute cmdc in other environments.
From npm
A source with no slash is an npm package. A @scope/name is npm too. The npm: prefix is optional. Pin a version with @ if you do not want a later cmd mods update to move you.
This installs the token metrics mod for your user account. It writes to ~/.commandcode/settings.json and loads in every project:
cmd mods add npm:commandcode-token-metrics -gYou can also install an npm package by its bare name without the npm: prefix. This completion-bell mod is Windows-only, so check compatibility before adding it:
cmd mods add cmd-mod-completion-bellYou can install a scoped npm package without the npm: prefix. Add @version to pin it; this example uses version 1.5.0:
cmd mods add npm:@mdeloughry/cmd-threadlinecmd mods add @mdeloughry/cmd-threadline@1.5.0Leave off -g and the source goes into .commandcode/settings.json in the project. Project mods load only after you trust that workspace. User mods load even in a folder you have not trusted. Add -g when the mod is for you, not for teammates who clone the repo.
From GitHub
For a GitHub repository, use owner/repo shorthand. Command Code fetches the mod directly, so there is no need to clone it first. This project is not on npm:
cmd mods add PabloJustDevelops/skill-hub-modAdd -g for user scope:
cmd mods add -g mdeloughry/cmd-threadlineTo pin a GitHub mod, append @ and an existing tag or ref, such as owner/repo@v1. Check that the ref exists before using it. A git: prefix lets you install from another Git host. If the same mod is installed at both project and user scope, the project entry takes priority; Command Code treats GitHub shorthand and the matching repository URL as the same mod.
From a folder, or once, without installing
A local path is referenced in place. Nothing is copied into the registry.
cmd mods add ./tools/local-modcmd mods add -g ./local-modTo try a single file before you add it, point --mod at it. That flag is repeatable, loads ahead of installed mods, and wins a name clash. It lasts for that process.
cmd --mod ./your-mod.tsYou can also place a single .ts mod file in ~/.commandcode/mods/ for your account or <project>/.commandcode/mods/ for one project. The HUD project’s separate installer patches the CLI so status text can wrap; it is not a normal cmd mods add install:
npx @hu9osaez/commandcode-hudSee it, update it, remove it
Installed files live under .commandcode/mods/.registry/, split by npm and git. Do not edit that folder. The origin line in the list tells you where a mod came from. Built-ins stay off that list. A package that is configured but missing is a warning, not a silent skip, and startup will not fetch it for you.
cmd mods listcmd mods updatecmd mods remove commandcode-token-metricsremove accepts the source or the name cmd mods list prints. Package installs run npm with --ignore-scripts. Mods are loaded as TypeScript, so a lifecycle script is not required, and Command Code does not run one. There is still no sandbox. Install packages you trust.
Mods load once per process. After an install or an edit, type /reload in the session. That restarts Command Code and imports every mod again. cmd mods disable <name> turns one off without deleting it. cmd mods enable <name> turns it back on. Add -g to write the user settings file. A disable in any settings file wins, including .commandcode/settings.local.json, which no command will rewrite for you.
If a mod does not appear in cmd mods list, check the error shown there. Common causes include an import error, a missing default export, a failing factory or a duplicate name.
- SourceCommand Code mods docs
- SourceCommand Code quickstart
- Sourcecommand-code on npm
- Sourceskill-hub-mod
- Sourcecmd-mod-completion-bell
- Sourcecommandcode-hud














