diff --git a/CLI_VERSION b/CLI_VERSION index 5bc7386..5664e32 100644 --- a/CLI_VERSION +++ b/CLI_VERSION @@ -1 +1 @@ -v0.0.46 +v0.0.48 diff --git a/skills/base44-cli/SKILL.md b/skills/base44-cli/SKILL.md index b5a75ec..13e8a24 100644 --- a/skills/base44-cli/SKILL.md +++ b/skills/base44-cli/SKILL.md @@ -350,6 +350,28 @@ Automations are triggers defined in the `automations` array inside `function.jso For full schemas and examples, see [automations.md](references/automations.md). +### Auth Config Management + +Manage app authentication settings (hidden from `--help` output but fully functional). The auth config controls which login methods are enabled for your app. Auth config is also deployed as part of `base44 deploy`. + +| Command | Description | Reference | +|---------|-------------|-----------| +| `base44 auth pull` | Pull auth config from Base44 to local file | [auth-pull.md](references/auth-pull.md) | +| `base44 auth push` | Push local auth config to Base44 | [auth-push.md](references/auth-push.md) | +| `base44 auth password-login ` | Enable or disable username & password authentication | [auth-password-login.md](references/auth-password-login.md) | + +**Workflow:** +```bash +# Pull current auth config from Base44 +npx base44 auth pull + +# Enable or disable password login locally +npx base44 auth password-login enable + +# Push changes back to Base44 +npx base44 auth push -y +``` + ### Secrets Management Manage project secrets (environment variables stored securely in Base44). These commands are hidden from `--help` output but are fully functional. @@ -486,7 +508,7 @@ npx base44 site deploy -y ### Opening the Dashboard ```bash # Open app dashboard in browser -npx base44 dashboard +npx base44 dashboard open ``` ## Authentication diff --git a/skills/base44-cli/references/auth-password-login.md b/skills/base44-cli/references/auth-password-login.md new file mode 100644 index 0000000..10b2ccd --- /dev/null +++ b/skills/base44-cli/references/auth-password-login.md @@ -0,0 +1,46 @@ +# base44 auth password-login + +Enable or disable username & password authentication in the local auth config. + +## Syntax + +```bash +npx base44 auth password-login +``` + +## Arguments + +| Argument | Description | Required | +|----------|-------------|----------| +| `` | Whether to enable or disable password authentication | Yes | + +## What It Does + +1. Reads the local auth config from `base44/auth/` (uses default config if none exists) +2. Sets `enableUsernamePassword` to `true` (enable) or `false` (disable) +3. Writes the updated config back to the local file +4. Reminds you to push the change with `base44 auth push` or `base44 deploy` + +## Examples + +```bash +# Enable password authentication +npx base44 auth password-login enable + +# Disable password authentication +npx base44 auth password-login disable +``` + +## Notes + +- **Hidden command**: Not shown in `--help` output but fully functional. +- This command only modifies the **local** auth config file. Run `base44 auth push` or `base44 deploy` to apply the change to Base44. +- **Warning**: Disabling password auth when it is the only login method will leave no login methods enabled — all users will be locked out. The CLI will warn you in this case. + +## Related Commands + +| Command | Description | +|---------|-------------| +| `base44 auth pull` | Pull auth config from Base44 to local file | +| `base44 auth push` | Push local auth config to Base44 | +| `base44 deploy` | Deploy all resources including auth config | diff --git a/skills/base44-cli/references/auth-pull.md b/skills/base44-cli/references/auth-pull.md new file mode 100644 index 0000000..bfee844 --- /dev/null +++ b/skills/base44-cli/references/auth-pull.md @@ -0,0 +1,40 @@ +# base44 auth pull + +Pull auth config from Base44 to a local file. + +## Syntax + +```bash +npx base44 auth pull +``` + +## What It Does + +1. Fetches the current auth configuration from Base44 +2. Writes it to the local auth config file in `base44/auth/` (overwriting the local file) + +## Options + +None. + +## Examples + +```bash +# Pull auth config from Base44 +npx base44 auth pull +``` + +## Notes + +- **Hidden command**: Not shown in `--help` output but fully functional. +- The auth config is written to the `authDir` defined in your `base44/config.jsonc` (defaults to `base44/auth/`). +- This overwrites any local auth config file — useful to reset local changes back to the remote state. +- After pulling, use `base44 auth push` or `base44 deploy` to push any local edits back to Base44. + +## Related Commands + +| Command | Description | +|---------|-------------| +| `base44 auth push` | Push local auth config to Base44 | +| `base44 auth password-login` | Enable or disable username & password authentication | +| `base44 deploy` | Deploy all resources including auth config | diff --git a/skills/base44-cli/references/auth-push.md b/skills/base44-cli/references/auth-push.md new file mode 100644 index 0000000..ba7b7bb --- /dev/null +++ b/skills/base44-cli/references/auth-push.md @@ -0,0 +1,55 @@ +# base44 auth push + +Push local auth config to Base44. + +## Syntax + +```bash +npx base44 auth push [options] +``` + +## Options + +| Option | Description | Required | +|--------|-------------|----------| +| `-y, --yes` | Skip confirmation prompt | No | + +## What It Does + +1. Reads the local auth config file from `base44/auth/` +2. Validates that there is at least one login method enabled (warns if not) +3. Prompts for confirmation (unless `-y` is provided) +4. Pushes the auth config to Base44 + +## Examples + +```bash +# Push with confirmation prompt +npx base44 auth push + +# Push without confirmation (non-interactive / CI) +npx base44 auth push -y +``` + +## Non-Interactive Mode + +In non-interactive mode (e.g., CI/CD), `--yes` is required: + +```bash +npx base44 auth push -y +``` + +## Notes + +- **Hidden command**: Not shown in `--help` output but fully functional. +- If no local auth config is found, the command exits early and suggests running `base44 auth pull` first. +- **Warning**: Pushing a config with no login methods enabled will lock out all users. The CLI will warn you before pushing in this case. +- Auth config is also pushed as part of `base44 deploy`. + +## Related Commands + +| Command | Description | +|---------|-------------| +| `base44 auth pull` | Pull auth config from Base44 to local file | +| `base44 auth password-login` | Enable or disable username & password authentication | +| `base44 deploy` | Deploy all resources including auth config | diff --git a/skills/base44-cli/references/deploy.md b/skills/base44-cli/references/deploy.md index c7fc925..ed9c42a 100644 --- a/skills/base44-cli/references/deploy.md +++ b/skills/base44-cli/references/deploy.md @@ -22,7 +22,8 @@ The command automatically detects and deploys: 2. **Functions** - All functions in `base44/functions/` 3. **Agents** - All agent configurations in `base44/agents/` 4. **Connectors** - All connector configurations in `base44/connectors/` -5. **Site** - Built files from `site.outputDirectory` (if configured) +5. **Auth config** - Auth configuration from `base44/auth/` (if present) +6. **Site** - Built files from `site.outputDirectory` (if configured) ## Examples @@ -57,6 +58,7 @@ npx base44 deploy -y - Deploys functions - Pushes agent configurations - Pushes connector configurations + - Pushes auth config (if present) - Uploads site files 6. Handles OAuth authorization for any new connectors that require it 7. Displays the dashboard URL and app URL (if site was deployed)