Руководство по установке для ИИ агентов
Эта страница — руководство по установке и инициализации NocoBase CLI для ИИ агентов (например, Claude Code, Codex, Cursor, Copilot и т. д.).
Если вы человек, обратитесь к разделу Быстрый старт.
Step 1: Check Prerequisites
Confirm the user has the following dependencies installed:
- Node.js >= 22 (run
node -vto check) - Yarn 1.x (run
yarn -vto check). If not installed, install vianpm install -g yarn - Git (run
git --versionto check). If not installed, install from the Git website - Docker (if the user needs to install NocoBase via Docker). Run
docker -vto check; if not installed and the user needs Docker, guide them to install from the Docker website, otherwise skip.
If the prerequisites are not met, tell the user they need to install the missing dependencies first, provide installation links and brief guidance. After confirming all prerequisites are met, proceed to the next step to install CLI.
Step 2: Install CLI
If the user already has NocoBase CLI installed (run nb --version to check), proceed to the next step. If not, run the following command to install:
Run nb --version to confirm successful installation.
Step 3: Run the Initialization Command
⚠️ IMPORTANT: You MUST run the exact command below. Do NOT modify, replace, or omit the --ui flag. Do NOT attempt to "speed things up" by using non-interactive mode or assembling parameters yourself — --ui is the only correct way to initialize.
This command launches a browser-based visual wizard where the user completes all configuration (including installation method, database, admin account, etc.). Your responsibilities as an AI Agent are:
- Only run
nb init --ui— do not append any additional parameters - Tell the user the browser will automatically open a local configuration page where they need to complete the setup
- If the browser cannot open automatically (e.g., due to sandbox permission restrictions), provide the URL from the command output to the user so they can manually copy it into their browser
- Wait for the user to confirm the configuration is complete before proceeding to the next step. This command has a default timeout of 30 minutes; do not re-run this command before it times out.
Step 4: Verify Results
Confirm the output shows the configured environment and its running status. Then remind the user to open the running NocoBase instance URL and log in with the configured account and password.
Step 5: Complete
Tell the user the installation is complete. CLI configuration is stored in the global directory (default ~/.nocobase/), so the AI Agent can access it from any directory — no need to enter a specific working directory.

