Typix LogoTypix
Getting Started

CLI

Manage Typix extensions from your terminal with the Typix CLI

The Typix CLI (@typix-editor/cli) is the fastest way to manage extensions in your project. Instead of looking up package names, running installs manually, or diagnosing config issues yourself — the CLI handles it all in a single command.

Installation

npx @typix-editor/cli <command>
pnpm add -g @typix-editor/cli
npm install -g @typix-editor/cli
yarn global add @typix-editor/cli
bun add -g @typix-editor/cli

The CLI automatically detects your package manager (pnpm, npm, yarn, or bun) by scanning for lockfiles — starting from your current directory and walking up to the project root. You never need to specify it manually.


Commands overview

CommandDescription
typix initSet up a typix.json config in your project
typix addAdd one or more extensions
typix upgradeUpgrade installed extensions to their latest versions
typix removeRemove extensions from your project
typix listShow all available extensions
typix doctorDiagnose common issues in your Typix project
typix envPrint environment and installed package info

init

Initializes Typix in your project by creating a typix.json config file. Run this once when setting up a new project.

typix init

You will be prompted for:

PromptDefaultDescription
Component output directorycomponents/typixWhere generated component files will be placed
Use TypeScript?yesEnables .tsx output
Use Tailwind CSS?yesAdds Tailwind class names to generated components
Package managerauto-detectedWhich package manager to use for installs

The result is a typix.json at your project root:

typix.json
{
  "componentDir": "components/typix",
  "typescript": true,
  "tailwind": true,
  "packageManager": "pnpm"
}

If a typix.json already exists, the CLI will ask before overwriting it.


add

Installs one or more extensions into your project. The CLI resolves the correct package name automatically — you only need to use the short extension name.

typix add [extensions...] [--all]

Interactive mode — run with no arguments to get a searchable multi-select picker:

typix add

Install specific extensions — pass one or more names directly:

typix add link floating-link short-cuts

Install everything — add every available extension at once:

typix add --all

Options

FlagDescription
-a, --allInstall all available extensions

Extension names are short identifiers (e.g. link, mention), not the full npm package names. Run typix list to see all valid names.


upgrade

Upgrades installed Typix extensions to their latest published versions.

typix upgrade [extensions...] [--all]

Interactive mode — shows only your currently installed extensions:

typix upgrade

Upgrade specific extensions:

typix upgrade link mention

Upgrade all installed extensions at once:

typix upgrade --all

Options

FlagDescription
-a, --allUpgrade all installed extensions

Only extensions that are already installed in your project will appear in interactive mode. Extensions not found in your package.json are skipped with a warning.


remove

Uninstalls Typix extensions from your project and removes them from package.json.

typix remove [extensions...] [--all]

Interactive mode — pick from your installed extensions:

typix remove

Remove specific extensions:

typix remove collapsible drag-drop-paste

Remove everything — uninstalls all installed Typix extensions:

typix remove --all

Options

FlagDescription
-a, --allRemove all installed extensions (requires confirmation)

All removal operations require a confirmation prompt before any packages are uninstalled. The --all flag asks for an explicit yes before proceeding.


list

Prints a formatted table of every available extension — name, package, and description.

typix list

Example output:

Available extensions:

  Name                    Package                                         Description
  ────────────────────────────────────────────────────────────────────────────────────────────────────
  auto-complete           @typix-editor/extension-auto-complete           Autocomplete suggestions as you type
  auto-link               @typix-editor/extension-auto-link               Automatically detect and convert URLs to links
  code-highlight-prism    @typix-editor/extension-code-highlight-prism    Syntax highlighting with Prism.js
  ...

doctor

Runs a health check on your project and reports any issues it finds.

typix doctor

The following checks are performed:

CheckWhat it verifies
typix.json configConfig file exists in the project root
package.jsonA package.json is readable from the working directory
@typix-editor/reactThe core Typix package is installed
lexical peer dependencyThe required lexical peer dep is present
Extension validityAll installed @typix-editor/extension-* packages are known extensions

Example output when everything is healthy:

Running Typix diagnostics...

  ✔ typix.json config found
  ✔ package.json found
  ✔ @typix-editor/react is installed
  ✔ lexical peer dependency is installed
  ✔ All installed extensions are valid

✔ All checks passed. Your Typix project looks healthy!

When issues are found, each failing check includes a fix hint:

  ✖ lexical peer dependency is installed
    → Run pnpm add lexical to install the required peer dependency.

Run typix doctor whenever something feels off — missing config, broken installs, or peer dependency warnings. It's a fast first step before digging deeper.


env

Prints system information and a list of all currently installed Typix extensions with their resolved versions. Useful for bug reports and debugging.

typix env

Example output:

Typix Environment Info

  System
  OS:                    Windows_NT 10.0.26200 (x64)
  Node.js:               v22.0.0
  Package Manager:       pnpm 10.24.0
  Working Dir:           /your/project

  Installed Typix Extensions
  link                   @typix-editor/extension-link       ^3.0.0
  mention                @typix-editor/extension-mention    ^3.0.0
  short-cuts             @typix-editor/extension-short-cuts ^3.0.0

Available extensions

NamePackageDescription
auto-complete@typix-editor/extension-auto-completeAutocomplete suggestions as you type
auto-link@typix-editor/extension-auto-linkAutomatically detect and convert URLs to links
code-highlight-prism@typix-editor/extension-code-highlight-prismSyntax highlighting with Prism.js
code-highlight-shiki@typix-editor/extension-code-highlight-shikiSyntax highlighting with Shiki
collapsible@typix-editor/extension-collapsibleCollapsible/accordion content blocks
context-menu@typix-editor/extension-context-menuCustom right-click context menu
drag-drop-paste@typix-editor/extension-drag-drop-pasteHandle drag, drop, and paste events
draggable-block@typix-editor/extension-draggable-blockDrag and drop reordering of editor blocks
floating-link@typix-editor/extension-floating-linkFloating link editor toolbar
keywords@typix-editor/extension-keywordsKeyword highlighting and detection
link@typix-editor/extension-linkLink nodes and commands
max-length@typix-editor/extension-max-lengthEnforce maximum content length
mention@typix-editor/extension-mention@mention functionality with flexible configuration
short-cuts@typix-editor/extension-short-cutsKeyboard shortcuts for editor actions
speech-to-text@typix-editor/extension-speech-to-textVoice input via speech recognition
tab-focus@typix-editor/extension-tab-focusTab key focus management

On this page