Skip to content

ctxo install ​

Convenience wrapper that installs the official @ctxo/lang-* plugin packages for one or more languages. It auto-detects your project's package manager (pnpm, npm, yarn, bun) and runs the equivalent of <pm> add -D @ctxo/lang-typescript @ctxo/lang-go ... for you.

For a manual alternative to this command, see Installation.

When called with no arguments, ctxo install auto-detects languages used in the repo (via file extensions and common manifest files) and installs the plugins that are not yet present.

Synopsis ​

shell
npx ctxo install [languages...] [options]

Flags ​

FlagShortDefaultDescription
--yes-yfalseDo not prompt. Assume yes for all decisions
--global-gfalseInstall plugins globally rather than into the project's package.json
--dry-runfalsePrint the plan (manager, packages, command) and exit without running it
--pm <manager>autoForce a package manager. One of npm, pnpm, yarn, bun
--version <spec>latestPin plugins to a specific npm version or tag (for example 0.7.0-alpha.0 or next)
--forcefalseOverride the CI lockfile guard. Required when CI=true with a frozen lockfile

Supported languages ​

Pass one or more of:

typescript, javascript, go, csharp, python, java, kotlin, ruby, rust, php, swift.

Common aliases are accepted and normalized: ts, js, py, c#, cs, net, golang, kt, rb, rs.

Package manager detection ​

The manager is resolved in this order:

  1. --pm flag
  2. CTXO_PM environment variable
  3. packageManager field in the project's package.json
  4. Lockfile sniff (pnpm-lock.yaml, yarn.lock, bun.lockb, package-lock.json)
  5. Fallback to npm

Examples ​

shell
# Detect languages in the repo and install anything missing.
npx ctxo install
shell
# Install TypeScript and Go plugins, no prompts.
npx ctxo install typescript go --yes
shell
# Preview the plan without running the package manager.
npx ctxo install python --dry-run --pm pnpm
shell
# Pin to an npm dist-tag.
npx ctxo install typescript --version next --yes
shell
# Install globally (useful for ad-hoc CLI usage without a package.json).
npx ctxo install typescript --global

CI behavior ​

Frozen lockfiles

When CI=true or CI=1, ctxo install refuses to mutate dependencies to protect frozen lockfiles. Override with --force or switch to --global.

Exit codes ​

CodeMeaning
0Install succeeded, or nothing to do
1Unknown language, no package.json, blocked by CI guard, or manager failure
otherPropagated from the underlying package manager

See also ​

Released under the MIT License.