Registry / devops / deco-cli

deco-cli

JSON →
library0.29.0jsnpmunverified

Deco CLI v0.29.0 is the command-line interface for managing AI-native projects on decocms.com. It supports authentication, project scaffolding, local development with live preview via deco link, type generation, and deployment to Cloudflare Workers. The package is distributed as an npm package requiring Node.js >=24.0.0. It uses ESM-only exports and ships TypeScript declarations. Unlike generic CMS CLIs, it is tailored for the Deco platform with built-in MCP (Model Context Protocol) integration and self-hostable hosting features.

npm install deco-cli
INSTALL
IMPORT
SIG · DECO-CLI
D
deco-cli
devopsjavascriptv0.29.0
Install
—
Import
—
Disk
—
Pass rate
0/ 6
Env Coverage0 / 6
glibc
18–22
musl
18–22
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18–226 runs
build_error
glibc
node 18–226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
✓ import deco from 'deco-cli'
✗ const deco = require('deco-cli')
ESM-only since v0.29.0; no CommonJS support.
run
✓ import { run } from 'deco-cli'
✗ import run from 'deco-cli/run'
Named export for programmatic CLI execution.
login
✓ import { login } from 'deco-cli/commands'
✗ import { login } from 'deco-cli'
Commands are available in subpaths starting from v0.29.0.

Demonstrates programmatic authentication and running the deploy command using the deco-cli API.

import { run } from 'deco-cli'; import { login } from 'deco-cli/commands'; // Authenticate with a token process.env.DECO_CHAT_API_TOKEN = 'your-token-here'; await login(); // Or run the CLI programmatically await run(['deploy', '-w', 'my-workspace'], { cwd: process.cwd(), stdio: 'inherit' });
deco --version
Debug
Known issues
breakingESM-only: This package requires Node.js >=24.0.0 and does not support CommonJS require().
fix
Use import syntax and update Node.js to >=24.0.0.
affects: >=0.29.0
gotchaCommands are in subpaths: The main export only provides the CLI runner; individual commands must be imported from specific paths like 'deco-cli/commands'.
fix
Import commands from their respective subpaths, e.g., import { deploy } from 'deco-cli/commands'.
affects: >=0.29.0
deprecatedThe 'deco dev' command is experimental and may change or be removed in future versions.
fix
Use npm run dev instead for a stable development experience.
affects: >=0.29.0
gotchaAuthentication token must be set via environment variable DECO_CHAT_API_TOKEN; the login command also stores it locally but the env var takes precedence.
fix
Set process.env.DECO_CHAT_API_TOKEN if you need to override the stored token.
affects: >=0.29.0
breakingNode.js version requirement: Node.js >=24.0.0 is strictly enforced; older versions will produce import errors.
fix
Update Node.js to the latest LTS or version 24+.
affects: >=0.29.0
Errors
Common errors & fixes
Error [ERR_REQUIRE_ESM]: require() of ES Module from CommonJS not supported.
Using require('deco-cli') in a CommonJS file.
fix
Use import syntax: import deco from 'deco-cli'
Error: Cannot find module 'deco-cli/commands'
The import path is incorrect or the version does not have commands in subpaths.
fix
Install version >=0.29.0 and use correct subpath imports.
Error: login is not a function
Importing login directly from 'deco-cli' instead of 'deco-cli/commands'.
fix
Use import { login } from 'deco-cli/commands'
Error: The engine 'node' is incompatible with this module.
Node.js version is below 24.0.0.
fix
Upgrade Node.js to version >=24.0.0.
Upgrade
Version history
0.29.0latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
19 hits · last 30 days
node
14
OpenAI (training)
1
Resources
deco-cli — npm install deco-cli · libregistry