Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .claude/skills/sync-cli-skill/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,8 @@ Documented (references/create.md):

Changes detected:
- BREAKING: --name (-n) option converted to positional argument <name>
Old syntax: npx base44 create -n my-app
New syntax: npx base44 create my-app
Old syntax: npx base44@latest create -n my-app
New syntax: npx base44@latest create my-app
```

#### Step 5c: Update Reference File
Expand All @@ -251,7 +251,7 @@ Update or create `references/{command-name}.md` with the following format:
## Syntax

```bash
npx base44 {command} [options]
npx base44@latest{command} [options]
```

## Options
Expand Down Expand Up @@ -321,8 +321,8 @@ After all updates, present a summary to the user:

### Breaking Changes (highlight prominently)
- `create`: `-n, --name` option converted to positional argument
- Old: `npx base44 create -n my-app`
- New: `npx base44 create my-app`
- Old: `npx base44@latest create -n my-app`
- New: `npx base44@latest create my-app`

### Option Changes
- `deploy --env`: now required (was optional)
Expand Down
60 changes: 31 additions & 29 deletions skills/base44-cli/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,22 @@ This skill activates on ANY mention of "base44" or when a `base44/` folder exist

NEVER call `base44` directly. The CLI is installed locally as a dev dependency and must be accessed via a package manager:

- `npx base44 <command>` (npm - recommended)
- `npx base44@latest <command>` (npm - recommended)
- `yarn base44 <command>` (yarn)
- `pnpm base44 <command>` (pnpm)

**IMPORTANT: Always use `@latest` with npx to ensure you're running the most recent version of the base44 CLI.**

WRONG: `base44 login`
RIGHT: `npx base44 login`
RIGHT: `npx base44@latest login`

## MANDATORY: Authentication Check at Session Start

**CRITICAL**: At the very start of every AI session when this skill is activated, you MUST:

1. **Check authentication status** by running:
```bash
npx base44 whoami
npx base44@latest whoami
```

2. **If the user is logged in** (command succeeds and shows an email):
Expand All @@ -49,7 +51,7 @@ RIGHT: `npx base44 login`
- **DO NOT proceed** with any CLI operations
- **Ask the user to login manually** by running:
```bash
npx base44 login
npx base44@latest login
```
- Wait for the user to confirm they have logged in before continuing

Expand All @@ -67,7 +69,7 @@ The Base44 CLI provides command-line tools for authentication, creating projects
- Directory is missing `base44/config.jsonc`
- User mentions: "create a new project", "initialize project", "setup a project", "start a new Base44 app"
- Deploying, pushing entities, or authenticating via CLI
- Working with CLI commands (`npx base44 ...`)
- Working with CLI commands (`npx base44@latest...`)

**Use base44-sdk when:**
- Building features in an **EXISTING** Base44 project
Expand Down Expand Up @@ -126,7 +128,7 @@ my-app/
- `base44/entities/*.jsonc` - Data model schemas (see Entity Schema section)
- `base44/functions/*/function.jsonc` - Function config and optional `automations` (CRON, simple triggers, entity hooks)
- `base44/agents/*.jsonc` - Agent configurations (optional)
- `base44/.types/types.d.ts` - Auto-generated TypeScript types for entities, functions, and agents (created by `npx base44 types generate`)
- `base44/.types/types.d.ts` - Auto-generated TypeScript types for entities, functions, and agents (created by `npx base44@latest types generate`)
- `base44/connectors/*.jsonc` - OAuth connector configurations (optional)
- `src/api/base44Client.js` - Pre-configured SDK client for frontend use

Expand Down Expand Up @@ -176,7 +178,7 @@ npm install --save-dev base44
Then run commands using `npx`:

```bash
npx base44 <command>
npx base44@latest <command>
```

**Note:** All commands in this documentation use `npx base44`. You can also use `yarn base44`, or `pnpm base44` if preferred.
Expand Down Expand Up @@ -386,27 +388,27 @@ For full schemas and examples, see [automations.md](references/automations.md).

2. Authenticate with Base44:
```bash
npx base44 login
npx base44@latest login
```

3. Create a new project (ALWAYS provide name and `--path` flag):
```bash
npx base44 create my-app -p .
npx base44@latest create my-app -p .
```

4. Build and deploy everything:
```bash
npm run build
npx base44 deploy -y
npx base44@latest deploy -y
```

Or deploy individual resources:
- `npx base44 entities push` - Push entities only
- `npx base44 functions deploy` - Deploy functions only
- `npx base44 agents push` - Push agents only
- `npx base44 connectors pull` - Pull connectors from Base44
- `npx base44 connectors push` - Push connectors only
- `npx base44 site deploy -y` - Deploy site only
- `npx base44@latest entities push` - Push entities only
- `npx base44@latest functions deploy` - Deploy functions only
- `npx base44@latest agents push` - Push agents only
- `npx base44@latest connectors pull` - Pull connectors from Base44
- `npx base44@latest connectors push` - Push connectors only
- `npx base44@latest site deploy -y` - Deploy site only

## Common Workflows

Expand All @@ -422,54 +424,54 @@ Failure to follow the create.md instructions will result in broken project scaff
### Linking an Existing Project
```bash
# If you have base44/config.jsonc but no .app.jsonc
npx base44 link --create --name my-app
npx base44@latest link --create --name my-app
```

### Deploying All Changes
```bash
# Generate types (optional, for TypeScript projects)
npx base44 types generate
npx base44@latest types generate

# Build your project first
npm run build

# Deploy everything (entities, functions, and site)
npx base44 deploy -y
npx base44@latest deploy -y
```

### Generating TypeScript Types
```bash
# Generate types from entities, functions, and agents
npx base44 types generate
npx base44@latest types generate
```

This creates `base44/.types/types.d.ts` with typed registries for the `@base44/sdk` module. Run this after changing entities, functions, or agents to keep your types in sync. No authentication required.

### Deploying Individual Resources
```bash
# Push only entities
npx base44 entities push
npx base44@latest entities push

# Deploy only functions
npx base44 functions deploy
npx base44@latest functions deploy

# Push only agents
npx base44 agents push
npx base44@latest agents push

# Pull connectors from Base44
npx base44 connectors pull
npx base44@latest connectors pull

# Push only connectors
npx base44 connectors push
npx base44@latest connectors push

# Deploy only site
npx base44 site deploy -y
npx base44@latest site deploy -y
```

### Opening the Dashboard
```bash
# Open app dashboard in browser
npx base44 dashboard
npx base44@latest dashboard
```

## Authentication
Expand All @@ -480,7 +482,7 @@ Most commands require authentication. If you're not logged in, the CLI will auto

| Error | Solution |
| --------------------------- | ----------------------------------------------------------------------------------- |
| Not authenticated | Run `npx base44 login` first |
| Not authenticated | Run `npx base44@latest login` first |
| No entities found | Ensure entities exist in `base44/entities/` directory |
| Entity not recognized | Ensure file uses kebab-case naming (e.g., `team-member.jsonc` not `TeamMember.jsonc`) |
| No functions found | Ensure functions exist in `base44/functions/` with valid `function.jsonc` configs |
Expand All @@ -489,7 +491,7 @@ Most commands require authentication. If you're not logged in, the CLI will auto
| No connectors found | Ensure connectors exist in `base44/connectors/` directory with valid `.jsonc` configs |
| Invalid connector type | Connector `type` must be one of the supported services (googlecalendar, slack, etc.) |
| Duplicate connector type | Each connector type can only be defined once per project |
| Connector authorization timeout | Re-run `npx base44 connectors push` and complete the OAuth flow in your browser |
| Connector authorization timeout | Re-run `npx base44@latest connectors push` and complete the OAuth flow in your browser |
| No site configuration found | Check that `site.outputDirectory` is configured in project config |
| Site deployment fails | Ensure you ran `npm run build` first and the build succeeded |
| Update available message | If prompted to update, run `npm install -g base44@latest` (or use npx for local installs) |
6 changes: 3 additions & 3 deletions skills/base44-cli/references/agents-pull.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Pull AI agent configurations from Base44 to local files. Agents are conversation
## Syntax

```bash
npx base44 agents pull
npx base44@latest agents pull
```

## Authentication
Expand All @@ -27,7 +27,7 @@ npx base44 agents pull
## Output

```bash
$ npx base44 agents pull
$ npx base44@latest agents pull

Fetching agents from Base44...
✓ Agents fetched successfully
Expand All @@ -54,7 +54,7 @@ The pull operation synchronizes remote agents to your local files:

If no agents exist on Base44:
```bash
$ npx base44 agents pull
$ npx base44@latest agents pull
No agents found on Base44
```

Expand Down
8 changes: 4 additions & 4 deletions skills/base44-cli/references/agents-push.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Push local AI agent configurations to Base44. Agents are conversational AI assis
## Syntax

```bash
npx base44 agents push
npx base44@latest agents push
```

## Authentication
Expand All @@ -28,7 +28,7 @@ npx base44 agents push
## Output

```bash
$ npx base44 agents push
$ npx base44@latest agents push

Found 2 agents to push
Pushing agents to Base44...
Expand All @@ -54,13 +54,13 @@ The push operation synchronizes your local agents with Base44:

If no agents are found in your project:
```bash
$ npx base44 agents push
$ npx base44@latest agents push
No local agents found - this will delete all remote agents
```

If an agent has an invalid name:
```bash
$ npx base44 agents push
$ npx base44@latest agents push
Error: Agent name must be lowercase alphanumeric with underscores
```

Expand Down
8 changes: 4 additions & 4 deletions skills/base44-cli/references/auth-login.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Authenticate with Base44 using device code flow.
## Syntax

```bash
npx base44 login
npx base44@latest login
```

## Authentication
Expand All @@ -27,7 +27,7 @@ The login command uses OAuth 2.0 device code flow for authentication:
## Interactive Flow

```bash
$ npx base44 login
$ npx base44@latest login

Please visit: https://auth.base44.com/device
Enter code: ABCD-EFGH
Expand All @@ -44,8 +44,8 @@ Logged in as: user@example.com
- Tokens include expiration timestamps
- The session persists across CLI sessions
- Other commands will automatically use your stored credentials
- Use `npx base44 logout` to clear your session
- Use `npx base44 whoami` to check your current authentication status
- Use `npx base44@latest logout` to clear your session
- Use `npx base44@latest whoami` to check your current authentication status

## Notes

Expand Down
6 changes: 3 additions & 3 deletions skills/base44-cli/references/auth-logout.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Logout from current device and clear stored authentication data.
## Syntax

```bash
npx base44 logout
npx base44@latest logout
```

## Authentication
Expand All @@ -21,12 +21,12 @@ npx base44 logout
## Output

```bash
$ npx base44 logout
$ npx base44@latest logout
Logged out successfully
```

## Notes

- You can logout even if you're not currently logged in (no error)
- After logout, you'll need to run `npx base44 login` again to use authenticated commands
- After logout, you'll need to run `npx base44@latest login` again to use authenticated commands
- This only affects the current device; your Base44 account remains active
4 changes: 2 additions & 2 deletions skills/base44-cli/references/auth-whoami.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Display the currently authenticated user.
## Syntax

```bash
npx base44 whoami
npx base44@latest whoami
```

## Authentication
Expand All @@ -20,7 +20,7 @@ npx base44 whoami
## Output

```bash
$ npx base44 whoami
$ npx base44@latest whoami
Logged in as: user@example.com
```

Expand Down
6 changes: 3 additions & 3 deletions skills/base44-cli/references/automations.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Function Automations

Automations are triggers attached to backend functions. They cause a function to run automatically on a schedule (CRON, simple interval, or one-time) or when entity data changes (create, update, delete). Automations are defined in the `automations` array inside each function's `function.jsonc` and are deployed together with the function via `npx base44 functions deploy`.
Automations are triggers attached to backend functions. They cause a function to run automatically on a schedule (CRON, simple interval, or one-time) or when entity data changes (create, update, delete). Automations are defined in the `automations` array inside each function's `function.jsonc` and are deployed together with the function via `npx base44@latest functions deploy`.

## Overview

Expand Down Expand Up @@ -326,7 +326,7 @@ Deno.serve(async (req) => {
Automations are deployed with their function. There is no separate automation deploy command.

```bash
npx base44 functions deploy
npx base44@latest functions deploy
```

This deploys all functions in `base44/functions/` and their `automations` arrays. For more on deployment, see [functions-deploy.md](functions-deploy.md).
Expand All @@ -340,4 +340,4 @@ This deploys all functions in `base44/functions/` and their `automations` arrays
| Assuming `base44.auth.me()` is the user who triggered the entity change | Use `data` / `old_data` (e.g. `created_by`, `updated_by`) if you need who did the action | In automations, `auth.me()` is the user who **created the automation**. The triggering user is not available. |
| `schedule_type: "cron"` without `cron_expression` | Always set `cron_expression` for cron | Cron schedules require a valid cron expression |
| Putting automations in a separate file | Put `automations` inside `function.jsonc` | Automations are part of the function config |
| Expecting a separate `base44 automations deploy` | Use `npx base44 functions deploy` | Automations deploy with the function |
| Expecting a separate `base44 automations deploy` | Use `npx base44@latest functions deploy` | Automations deploy with the function |
4 changes: 2 additions & 2 deletions skills/base44-cli/references/connectors-create.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,15 +122,15 @@ Note: Notion uses a page-based access model where users select which pages to sh
After creating connector files, push them to Base44:

```bash
npx base44 connectors push
npx base44@latest connectors push
```

This will prompt you to authorize each new connector in your browser. See [connectors-push.md](connectors-push.md) for details.

To pull existing connectors from Base44 to local files:

```bash
npx base44 connectors pull
npx base44@latest connectors pull
```

See [connectors-pull.md](connectors-pull.md) for details.
Loading
Loading