@ory-cms/cli
v0.1.3
Published
OryCMS command-line interface — initialise, configure, migrate, and seed OryCMS in any Next.js project
Maintainers
Readme
@ory-cms/cli
Official command-line interface for OryCMS — the headless CMS built for Next.js.
Features
init— scaffold OryCMS into an existing Next.js App Router project with an interactive setup wizardplugin— install, uninstall, update, enable, disable, and list OryCMS pluginsconfig— initialise and inspect yourorycms.config.tsfile- Supports PostgreSQL, Neon, Supabase, MySQL, MariaDB, MongoDB, SQLite, and Firebase
- Detects your package manager (npm / pnpm / yarn / bun) automatically
Requirements
- Node.js >= 18
- A Next.js project using the App Router
@ory-cms/coreinstalled in your project (see below)
Installation
npm install -g @ory-cms/cliOr run directly without installing:
npx @ory-cms/cli initImportant:
@ory-cms/cliis the scaffolding and management tool. It does not include the OryCMS runtime. Your project also needs@ory-cms/coreand@ory-cms/nextto function. Install them before or immediately after runningorycms init:npm install @ory-cms/core @ory-cms/next
Quick Start
Inside an existing Next.js project:
# 1. Install the runtime packages first
npm install @ory-cms/core @ory-cms/next
# 2. Run the CLI wizard
npx @ory-cms/cli initThe wizard will:
- Detect your Next.js version and App Router
- Prompt for database provider and connection string
- Generate
orycms.config.ts, admin route,.env.example, and updatetsconfig.json - Print the exact
npm installcommand for any additional dependencies (db drivers, auth, plugins)
Commands
orycms init
Initialise OryCMS in an existing Next.js App Router project.
orycms init [--cwd <path>]| Option | Description |
|--------|-------------|
| --cwd <path> | Target directory (defaults to process.cwd()) |
orycms plugin
Manage OryCMS plugins.
orycms plugin install <package>
orycms plugin uninstall <package>
orycms plugin update <package>
orycms plugin list
orycms plugin enable <name>
orycms plugin disable <name>orycms config
Manage OryCMS configuration.
orycms config show # Print resolved config
orycms config init # Re-generate orycms.config.tsExamples
# Initialise in current directory
orycms init
# Initialise in a specific directory
orycms init --cwd ./my-nextjs-app
# Install a plugin
orycms plugin install @ory-cms/plugin-seo
# View current config
orycms config showLinks
- GitHub: https://github.com/orynticlabs/orycms
- Documentation: https://github.com/orynticlabs/orycms#readme
- Issues: https://github.com/orynticlabs/orycms/issues
- npm: https://www.npmjs.com/package/@ory-cms/cli
