CLI Reference

Complete reference for the AuthCore command-line interface (v3.3.3+).

authcore init

Initialize AuthCore in your project with main, full, or standard mode.

Basic Usage

Terminal

Options

--template-mode

Choose between main, full, or standard mode.

  • main: AuthCore becomes your primary source code (components become @/components, hooks become @/hooks)
  • full: Copies all source code to your project (components, hooks, server utils)
  • standard: Imports components from package (default)
--migrate

Run database migrations automatically after setup.

--with-api

Specify which router to use: app, pages, or none.

bash
--seed-admin

Create a demo admin user after database setup.

--theme

Copy AuthCore's Tailwind theme configuration to your project.

--auth-provider

Choose authentication provider: nextauth or better-auth.

bash
--dry-run

Preview changes without creating any files. Useful for testing.

Examples

Common Usage

authcore check-updates

Check for available updates to AuthCore.

Terminal

What it shows:

  • Current version vs latest available version
  • Update type (major, minor, patch)
  • Breaking changes warnings
  • List of files you've customized
  • Changelog information

Example Output

bash

authcore diff

Compare your local files with template originals.

Basic Usage

Terminal

What it shows:

  • Files you've modified
  • Line-by-line differences
  • Statistics (additions/deletions/modifications)
  • Git diff format for easy reading

Example Output

bash

authcore verify

Verify that your AuthCore setup is working correctly.

Terminal

Tests performed:

  • Database connection
  • API route availability
  • Authentication endpoints
  • Environment variables
  • Prisma schema validation

authcore rollback

Rollback changes made by the CLI (requires manifest).

Terminal

Warning: This will delete all files created by the CLI. Make sure you have a backup!

authcore --version

Show the installed AuthCore CLI version.

Terminal

authcore --help

Show help information for all commands.

Terminal

Troubleshooting

Command not found

If npx authcore doesn't work:

bash

Manifest not found

If diff or rollback can't find the manifest:

  • Make sure you ran init first
  • Check that .authcore/manifest.json exists
  • Run from the same directory where you ran init

Import errors after full template mode

Make sure your tsconfig.json has path aliases configured:

tsconfig.json