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/clinpm install -g @typix-editor/cliyarn global add @typix-editor/clibun add -g @typix-editor/cliThe 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
| Command | Description |
|---|---|
typix init | Set up a typix.json config in your project |
typix add | Add one or more extensions |
typix upgrade | Upgrade installed extensions to their latest versions |
typix remove | Remove extensions from your project |
typix list | Show all available extensions |
typix doctor | Diagnose common issues in your Typix project |
typix env | Print 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 initYou will be prompted for:
| Prompt | Default | Description |
|---|---|---|
| Component output directory | components/typix | Where generated component files will be placed |
| Use TypeScript? | yes | Enables .tsx output |
| Use Tailwind CSS? | yes | Adds Tailwind class names to generated components |
| Package manager | auto-detected | Which package manager to use for installs |
The result is a typix.json at your project root:
{
"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 addInstall specific extensions — pass one or more names directly:
typix add link floating-link short-cutsInstall everything — add every available extension at once:
typix add --allOptions
| Flag | Description |
|---|---|
-a, --all | Install 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 upgradeUpgrade specific extensions:
typix upgrade link mentionUpgrade all installed extensions at once:
typix upgrade --allOptions
| Flag | Description |
|---|---|
-a, --all | Upgrade 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 removeRemove specific extensions:
typix remove collapsible drag-drop-pasteRemove everything — uninstalls all installed Typix extensions:
typix remove --allOptions
| Flag | Description |
|---|---|
-a, --all | Remove 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 listExample 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 doctorThe following checks are performed:
| Check | What it verifies |
|---|---|
typix.json config | Config file exists in the project root |
package.json | A package.json is readable from the working directory |
@typix-editor/react | The core Typix package is installed |
lexical peer dependency | The required lexical peer dep is present |
| Extension validity | All 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 envExample 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.0Available 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 |
code-highlight-shiki | @typix-editor/extension-code-highlight-shiki | Syntax highlighting with Shiki |
collapsible | @typix-editor/extension-collapsible | Collapsible/accordion content blocks |
context-menu | @typix-editor/extension-context-menu | Custom right-click context menu |
drag-drop-paste | @typix-editor/extension-drag-drop-paste | Handle drag, drop, and paste events |
draggable-block | @typix-editor/extension-draggable-block | Drag and drop reordering of editor blocks |
floating-link | @typix-editor/extension-floating-link | Floating link editor toolbar |
keywords | @typix-editor/extension-keywords | Keyword highlighting and detection |
link | @typix-editor/extension-link | Link nodes and commands |
max-length | @typix-editor/extension-max-length | Enforce maximum content length |
mention | @typix-editor/extension-mention | @mention functionality with flexible configuration |
short-cuts | @typix-editor/extension-short-cuts | Keyboard shortcuts for editor actions |
speech-to-text | @typix-editor/extension-speech-to-text | Voice input via speech recognition |
tab-focus | @typix-editor/extension-tab-focus | Tab key focus management |