Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
783 views1 page

Strapi Cheat Sheet: Install Run Command Line Interface

Strapi provides a command line interface (CLI) to scaffold and manage projects. Key commands include creating a new project, building the admin panel, running and developing apps, and generating APIs, controllers, models, policies, and services. Strapi also supports plugins, collection and single content types, components, dynamic zones, and third party authentication.

Uploaded by

KaioDuarte
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
783 views1 page

Strapi Cheat Sheet: Install Run Command Line Interface

Strapi provides a command line interface (CLI) to scaffold and manage projects. Key commands include creating a new project, building the admin panel, running and developing apps, and generating APIs, controllers, models, policies, and services. Strapi also supports plugins, collection and single content types, components, dynamic zones, and third party authentication.

Uploaded by

KaioDuarte
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Strapi Cheat Sheet

Install Run Command Line Interface


Install Strapi

 Start your project

Strapi comes with a full featured Command Line Interface


(CLI) which lets you scaffold and manage your project in
yarn create strapi-app my-project
yarn develop
seconds. All commands below are called as options to the
or
 or
 base strapi command. 


npx create-strapi-app my-project


 npm run develop





Run strapi <command> --help

for more information on a particular command.


Use the --quickstart option to quickly Your Strapi server will listen on
install Strapi with SQLite database

 http://localhost:1337
new
Create a Strapi project

build
Build your admin panel

start
Run a Strapi app (no autoReload)

develop | dev
Run a Strapi app (autoReload)

install
Install a Strapi plugin

uninstall
Uninstall a Strapi plugin

Key Concepts generate:api


Generate a basic API

generate:controller
Generate a controller for an API

Collection types: Collection types lets you define the structure of you content. It contains generate:model
Generate a model for an API

multiple fields like Text, RichText, Number, JSON, Media etc...


generate:policy
Generate a policy for an API

Single types: Facilitates content management. Handy to manage content like a homepage, generate:service
Generate a service for an API


an About us page, or any other type of content that is not part of a collection.
generate:plugin
Generate a basic plugin

watch-admin
Starts the admin dev server

Components: Component field let your create a relation between your Collection Type and a config:dump
Dumps configurations

Component structure.
config:restore
Restores a configuration dump

Dynamic zones: Dynamic Zone field let you create flexible space to content based on a version Output your version of Strapi

component list.
console
Open the Strapi console

Plugins: A plugin is like a small independent sub-application. It has its own business logic help

Output the help


with dedicated models, controllers, services, middlewares or hooks.

Good to know: No collection-types edition in production / Possibility to add a 3rd party auth
provider / No current tools for migrating or deploying your data changes between different
environments / Normal users can not be given access to the admin panel

You might also like