/APIs & SDKs/Setup and context/claim

Neon CLI command: claim

new

Create and claim a temporary Neon project without an account

The claim command creates a temporary Neon project when there is no Neon account yet. neon claimable is an alias. The CLI stores an identity assertion on the machine, writes provisioned variables to .env (or .env.local), and later opens a claim URL so a human can take the project into their organization.

If neon claim is not a command, or neon claim --help does not list create, install the latest CLI (npm i -g neon@latest) or use the HTTP flow in Claimable Neon.

Do not pass --api-key or --profile. Those are refused. neon auth and neon init need a Neon account; use this command instead when there is none.

Start in the browser at neon.com/claimable-neon, or give an agent auth.md.

Subcommands: accept, create, delete, list, status

neon claim create

Creates a temporary project and saves its identity assertion. Postgres is always requested. Pass --service for Data API, Managed Better Auth, or other services. If a neon.ts file is present, declared services are requested automatically.

neon claim create [options]
OptionDescriptionTypeDefaultRequired
--configPath to neon.ts. Defaults to walking up from the current directorystringNo
--env-pullWrite the provisioned DATABASE_URL and service URLs to a dotenv filebooleantrueNo
--fileTarget dotenv file. Defaults to an existing .env, otherwise .env.localstringNo
--serviceServices to request for the claimable project: postgres, auth, data-api, functions, object-storage, ai-gateway. Repeat the flag or comma-separate. Postgres is always included. Services unavailable before claim are recorded and reported.arrayNo
neon claim create --env-pull
neon claim create \
  --service data-api \
  --service auth \
  --env-pull

--env-pull is on by default. It writes provisioned vars to an existing .env, otherwise .env.local, and gitignores that file. If .env or .env.local already has a DATABASE_URL (or other Neon-managed keys), pass --file <path> or --no-env-pull.

After create, regular Neon CLI commands use the saved assertion. Explicit Neon account credentials take precedence when you pass them.

neon claim status

Shows a claimable project's lifecycle and claim status. Pass a project ID from neon claim list, or omit it to use the project linked in the current directory.

neon claim status [project-id] [options]
neon claim status

neon claim accept

Creates a claim code and opens the URL where a human signs in and takes the project. --open is on by default. --no-open prints the URL.

neon claim accept [project-id] [options]
OptionDescriptionTypeDefaultRequired
--openOpen the verification URL in a browserbooleantrueNo
neon claim accept --no-open

Opening the URL does not freeze access. Continuing to Neon from that URL starts the transfer and rotates DATABASE_URL before the console org picker.

neon claim list

Lists claimable projects saved on this machine.

neon claim list [options]
neon claim list

neon claim delete

Permanently deletes an unclaimed project, or drops a local record that can no longer reach the service. Pass a project ID from neon claim list, or omit it to use the linked project. Pass --yes to skip the confirmation prompt.

neon claim delete [project-id] [options]
OptionDescriptionTypeDefaultRequired
--yes, -ySkip the confirmation promptbooleanfalseNo
neon claim delete --yes
Was this page helpful?
Edit on GitHub

On this page

Copy neon init command