Skip to main content
A Niteshift environment is described by files committed to your repository under .niteshift/. When a task starts, Niteshift checks out your repository and any other repositories it needs. Then it runs your setup and brings up your declared services automatically. The .niteshift directory may contain these files: The settings.yaml file is the only required file, though it only needs to contain a version: 1 entry to be valid. The agent may add additional helpers as needed (scripts, container definitions) under .niteshift/files/.

Configuring an environment

You don’t write these files by hand. From Settings → Environments → [environment], click Set up with agent. A task works out how to install, run, and verify your project. It tests the setup and then opens a PR committing the .niteshift/ files. Nothing changes for other tasks until you merge it. To change the configuration later, ask the agent in any task: agents know how to edit and verify .niteshift/ files, and the change arrives as a PR. The settings section also shows the committed files on any branch, with two shortcuts:
  • Edit with agent starts a task pre-prompted to change the configuration.
  • Test in a sandbox provisions an environment from the selected branch and reports whether its committed configuration boots cleanly, so you can validate a configuration PR before merging it.

Environment variables

Secrets stay out of the repository. Configure them at Settings → Environments → [environment], in two scopes:
  • Setup script scope: sourced while .niteshift/setup and .niteshift/resume run.
  • Agent scope: available to the agent process and its terminal.
Services receive only what their manifest declares: reference a stored variable by name with a secret entry in services.yaml. Values are encrypted at rest and never shown back in plaintext after save.

Previews and tunnels

Each service that declares a port gets a secure URL:
These URLs are scoped to your organization and require an authenticated Niteshift session to view. The preview panel opens the first declared port. For an endpoint an external system must reach without Niteshift authentication (a webhook provider, for example), declare a tunnel.

Classic setup

Environments configured before .niteshift/ became the default use the classic Niteshift setup script: a single niteshift-setup.sh stored in Niteshift settings. It keeps working, and nothing forces a migration. For classic environments, settings shows a Migrate to Config v2 action that starts a task to translate the existing setup into committed .niteshift/ files and open a PR; the environment switches over once a .niteshift/ directory lands on the default branch.

Going deeper