docs/docs/en/nocobase-cli/index.md
If this is your first time using this CLI, you don’t need to memorize all the commands at the beginning. Use nb init --ui to install an application first, and then continue looking at the rest according to the scenario.
In NocoBase CLI, subsequent operations do not revolve around "a certain directory" or "a certain port" by default, but around env.
You can think of env as "a set of application connection and running information remembered by the CLI". As long as it has been saved successfully, many subsequent commands can be used directly:
nb init to install a new application and save it as envnb env add to connect an existing application to the CLInb app start, nb app logs, nb app upgradenb backupnb app autostart, nb proxy to continue to supplement the production environment capabilitiesKeep this in mind first, and the subsequent documents will be much smoother.
If you're not sure where to start, it's usually easiest to follow this path:
nb init once.The first three steps cover most usage scenarios.
| I want... | Where to look |
|---|---|
| There is no application yet and you want to install a new NocoBase and save it as a CLI env | Install using CLI |
| You already have a running NocoBase and want to bring it under CLI management | Install using CLI |
| Gradually migrate old installation methods to CLI | Migrate from old installation methods to CLI |
| See which envs are saved locally, switch the current env, and check the status | Multiple environment management |
| Start, stop, restart the application, view logs, or continue the upgrade | Manage Application |
| Make a backup before upgrading, migrating or batch changing data, and then restore it when necessary | Backup and restore |
| First confirm the key environment variables required to run the application | Application environment variables |
| Install third-party plug-ins | Third-party plug-in installation and upgrade |
| Let the application enter the production environment: automatic startup, stable external access, reverse proxy | Overview of production environment deployment |
This set of quick start documents is more about "what do I want to do now". If you already know which command you want to run and only want the full parameters, go straight to NocoBase CLI Command Reference.
The default suggestions are:
This makes it easier to get started than reading the complete command tree at first glance.