base44 link
Links an existing local Base44 project to a Base44 app in the cloud. Use this when you have a base44/config.jsonc but haven't connected it to a Base44 app yet.
Critical: When to Use Link vs Create
| Scenario | Command |
|---|---|
Starting fresh, no base44/ folder |
npx base44 create |
Have base44/config.jsonc but no .app.jsonc |
npx base44 link |
Project already linked (has .app.jsonc) |
Already done, use deploy |
Syntax
npx base44 link [options]Options
| Option | Description | Required |
|---|---|---|
-c, --create |
Create a new project (skip selection prompt) | No |
-n, --name <name> |
Project name (required when --create is used) |
With --create |
-d, --description <description> |
Project description | No |
-w, --workspace <id> |
Workspace (organization) ID to create the app in when using --create (defaults to your personal workspace) |
No |
--app-id <id> |
App ID to link to an existing project (global flag, skips selection prompt) | No |
Non-Interactive Mode
For CI/CD or agent use:
Create a new project:
npx base44 link --create --name my-appLink to an existing app:
npx base44 link --app-id <app-id>WRONG: npx base44 link --create (missing --name)
WRONG: npx base44 link --create --app-id <id> (cannot use both)
RIGHT: npx base44 link --create --name my-app
RIGHT: npx base44 link --app-id <id>
Examples
# Interactive mode - prompts for project details
npx base44 link
# Non-interactive - create and link in one step
npx base44 link --create --name my-app
# With description
npx base44 link --create --name my-app --description "My awesome app"
# Link to a specific existing project by ID
npx base44 link --app-id abc123
# Create and link into a specific workspace (organization)
npx base44 link --create --name my-app --workspace 507f1f77bcf86cd799439011What It Does
- Finds the
base44/config.jsoncin the current directory (or parent directories) - Verifies no
.app.jsoncexists (project not already linked) - Either:
- Creates a new Base44 app in the cloud (with
--create), OR - Links to an existing app (with
--app-idor interactive selection)
- Creates a new Base44 app in the cloud (with
- Writes the app ID to
base44/.app.jsonc
The interactive selection (and --app-id) lists all of your existing Base44 apps, including ones originally built in the Base44 editor — not just apps previously created via the CLI.
Requirements
- Must have
base44/config.jsoncin the project - Must NOT have
base44/.app.jsonc(usedeployif already linked) - Must be authenticated (run
npx base44 loginfirst)
Notes
- After linking, you can deploy resources with
npx base44 deploy - The
.app.jsoncfile should be git-ignored (contains your app ID)