Skip to main content
The Feathers CLI can be installed globally or used directly with npx. We recommend using npx to always use the latest version.

Prerequisites

Before installing the Feathers CLI, ensure you have:

Installation methods

1

Use with npx (recommended)

Run the CLI directly without installing:
npx @feathersjs/cli --help
This ensures you always use the latest version of the CLI.
2

Or install as dev dependency

Install in your project:
npm install @feathersjs/cli --save-dev
Then run with:
npx feathers --help
3

Or install globally (optional)

Install globally to use the feathers command anywhere:
npm install -g @feathersjs/cli
Then run directly:
feathers --help

Verify installation

Check that the CLI is working:
npx @feathersjs/cli --version
You should see the version number (currently 5.0.41).

Getting started with the CLI

Once installed, you can start generating code:
1

View available commands

npx feathers --help
This shows all available commands and generators.
2

Generate a new application

npx feathers generate app
The CLI will prompt you to configure your application:
  • Application name
  • Project description
  • Framework (Express or Koa)
  • Database type
  • Schema format
  • Authentication options
3

Generate a service

Navigate to your app directory and generate a service:
cd my-app
npx feathers generate service
You’ll be prompted for:
  • Service name
  • Service path
  • Database adapter
  • Schema definition

Using the shorthand

The CLI provides a convenient shorthand for generators:
# Instead of typing 'generate' every time
npx feathers generate service

# Use the shorthand 'g'
npx feathers g service

Command-line options

Skip interactive prompts by providing options:
npx feathers generate app --name my-app
Use --help with any command to see available options:
npx feathers generate service --help

Troubleshooting

Node version error

If you see an error about Node version, ensure you’re running Node.js 14 or higher:
node --version
Upgrade Node.js if needed from nodejs.org.

Permission errors (global install)

If you encounter permission errors with global installation:

Command not found

If feathers command is not found:
  • Use npx @feathersjs/cli instead
  • Or ensure the global installation directory is in your PATH
  • Or install as a local dev dependency and use npx feathers

Next steps

CLI Overview

Learn about available generators

Generate application

Create your first Feathers app

Generate service

Add a service to your application

Configuration

Configure your Feathers application

Build docs developers (and LLMs) love