When Neon is connected to a repository, every task gets its own Postgres branch forked from a base branch you pick. The agent can run migrations, seed data, and exercise destructive queries without touching shared environments.Documentation Index
Fetch the complete documentation index at: https://docs.niteshift.dev/llms.txt
Use this file to discover all available pages before exploring further.
Setup
Open Settings → Repositories → [repository] → Database. Paste a project-scoped Neon API key (starts withnapi_), verify it, then configure:
- Parent branch: the Neon branch new task branches fork from. Defaults to your project’s primary
branch (typically
main). - Environment variable: name of the env var the connection string is injected as. Defaults to
DATABASE_URL. - TTL (days): how long Neon keeps the branch around. Default 30.
- Delete on task archival: drop the branch when the task is archived (e.g. after PR merge). Default on.
Branch lifecycle
When a task starts, Niteshift creates a fresh Neon branch forked from the parent branch and injects the connection string into the environment under your chosen variable name. Yourniteshift-setup.sh can read the connection string and run migrations against the new branch before
the agent starts work:
If a long-running task outlives its branch’s TTL, the next run forks a new branch from the parent.
Raise the TTL if you need the same branch to persist longer.