CLI
The autonnel command-line tool: scaffold a project, create an admin, and reset passwords.
There are two entry points, and which one you use depends on how you run Autonnel.
Inside a source checkout, the autonnel bin runs against that project’s .env and database:
npx autonnel admin:create <email> <password> Create (or grant) a full-access admin user
npx autonnel password:reset <email> Reset a user's password (auto-generated)
npx autonnel authorize Authorize this machine against the marketplace
npx autonnel orders List purchased plugins and template packs
npx autonnel install <item> Download and install a purchased pack
npx autonnel --version / --help
Run these from inside the project directory, after npm install and npm run db:push.
In a Docker deployment there is no project directory, so call the same CLI inside the running container:
docker compose exec app node dist/cli/index.js admin:create you@example.com 'a-strong-password'
docker compose exec app node dist/cli/index.js password:reset you@example.com
npm create autonnel@latest - clone the repository
npm create autonnel@latest my-funnel
This clones github.com/autonnel/autonnel into my-funnel, removes the git history and renames the package. It is not an interactive wizard and it does not write a .env for you: copy .env.example to .env and set DATABASE_URL yourself.
Use it when you intend to modify Autonnel itself, or want to deploy to Cloudflare Workers. To simply run Autonnel, use the Docker path.
admin:create — provision an admin
npx autonnel admin:create admin@example.com 'a-strong-password'
Creates a full-access admin user without going through the /setup wizard. Use it for CI provisioning, headless installs, or to recover access. Running it before the first browser visit skips the wizard’s account-creation step entirely.
Behavior:
- Identity is the email address. Autonnel keys accounts on a globally-unique email, so the command takes
<email> <password>— there is no separate username. - Idempotent. If the email already exists, the command does not error or duplicate the account — it grants the admin role to that existing user instead. The output tells you which happened (
Created admin user …vsGranted admin to existing admin user …). - Always admin. Unlike self-registration, this never requires an invitation token and always assigns a full-access Admin role, creating that role on first use if it does not exist yet.
- Password rules. The password must be at least 8 characters.
This is the fastest way to fix a “Registration requires an invitation token” wall on an install whose user table was cleared but still has leftover membership rows: just create an admin directly.
password:reset — rotate a forgotten password
npx autonnel password:reset admin@example.com
Generates a new random password for an existing user, writes the new credential, and revokes every active session for that user (they are logged out everywhere and must sign in again).
Password reset for admin@example.com (id=…)
New password: 7Kd2pQ9mXr4Lb1Vn
All sessions for this user have been revoked (3); they must log in again.
The new password is printed to stdout once — copy it and hand it to the user over a secure channel. There is no recovery if you lose it; just run the command again to mint another one. If no user matches the email, the command exits non-zero with User not found: <email>.
How the identity model affects the CLI
Autonnel separates the global account (email + credential, unique across the whole install) from per-workspace membership (which roles a user holds in a given tenant). The CLI operates on the default tenant:
admin:createensures both the account and an admin membership exist.password:resetrotates the global credential, so it affects every workspace the account belongs to.- On a brand-new install, the
/setupwizard creates the first admin account; everyone after that needs an invitation from Settings → Users (open registration is disabled).admin:createis the non-interactive equivalent of that first-user bootstrap.
Related
- Installation — scaffold, configure, and deploy
- Quick start — first funnel end-to-end
- Permissions — roles, invitations, and feature access