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
Options
--template-modeChoose 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)
--migrateRun database migrations automatically after setup.
--with-apiSpecify which router to use: app, pages, or none.
--seed-adminCreate a demo admin user after database setup.
--themeCopy AuthCore's Tailwind theme configuration to your project.
--auth-providerChoose authentication provider: nextauth or better-auth.
--dry-runPreview changes without creating any files. Useful for testing.
Examples
authcore check-updates
Check for available updates to AuthCore.
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
authcore diff
Compare your local files with template originals.
Basic Usage
What it shows:
- Files you've modified
- Line-by-line differences
- Statistics (additions/deletions/modifications)
- Git diff format for easy reading
Example Output
authcore verify
Verify that your AuthCore setup is working correctly.
Tests performed:
- Database connection
- API route availability
- Authentication endpoints
- Environment variables
- Prisma schema validation
authcore rollback
Rollback changes made by the CLI (requires manifest).
Warning: This will delete all files created by the CLI. Make sure you have a backup!
authcore --version
Show the installed AuthCore CLI version.
authcore --help
Show help information for all commands.
Troubleshooting
Command not found
If npx authcore doesn't work:
Manifest not found
If diff or rollback can't find the manifest:
- Make sure you ran
initfirst - Check that
.authcore/manifest.jsonexists - Run from the same directory where you ran
init
Import errors after full template mode
Make sure your tsconfig.json has path aliases configured: