Skip to main content
The newly CLI lets you pull your project’s backend code, deploy it, and manage logs, secrets, and the database from your terminal.
The CLI works with Liquid Backend projects. Run newly stack to check if a project is supported.

Install

npm i -g @newly/cli
Requires Node ≥ 20.

Quick start

newly login              # authenticate in the browser
newly pull <project-id>  # download project code + link this directory
# edit code…
newly deploy             # deploy to dev
newly deploy --env prod  # ship to prod

Auth

newly login          # opens a browser, stores a session token in ~/.newly/credentials
newly login --manual # paste the credential instead of using the browser callback
newly logout         # delete stored credentials
Re-run newly login when a command reports your session has expired.

Project linking

Commands target the project linked to the current directory, so you don’t pass --project every time.
  • newly pull <project-id> and newly create link automatically.
  • newly link <project-id> links a directory without downloading code.
  • Pass --project <id> to any command to override the link.

Dev vs prod deploys

SourceNotes
newly deploy (dev)Your local codeFast inner loop. Ephemeral — overwritten the next time the project is built on the Newly platform. Not a rollback target.
newly deploy --env prodProject code at HEADRuns server-side, ignores local edits. Push your changes into the project first.
newly deploy --env prod deploys the project’s committed code, not your local files. Push your changes into the project before deploying to prod.
Prod actions prompt for confirmation. Pass --yes to skip it in scripts.

Commands

newly pull [project-id]

Download the project code into the current directory and link it.
OptionDescription
--branch <name>Pull a specific branch (default: the project’s active branch).
--forceOverwrite a non-empty directory (discards local changes).

newly create [name]

Create a new backend-only project here, scaffold backend/, and link the directory. Provisions the dev backend by default. Run in a directory with no backend/ and no existing link.
OptionDescription
--no-provisionCreate without provisioning.
Link the current directory to a project without downloading code.

newly status

Show dev and prod status, service URLs, deployed SHA, and last error. Accepts --project <id>.

newly stack

Show which backend stack the project uses and whether it’s CLI-deployable. Accepts --project <id>.

newly up

Provision the backend (if needed) and deploy.
OptionDefaultDescription
--env <dev|prod>devTarget environment.
--region <region>us-central1GCP region for dev provisioning.
--project <id>linked dirTarget project.
--yesSkip the prod confirmation prompt.

newly deploy

Deploy the backend.
OptionDefaultDescription
--env <dev|prod>devTarget environment.
--project <id>linked dirTarget project.
--yesSkip the prod confirmation prompt.

newly logs

Tail backend service logs. Dev only.
OptionDefaultDescription
--service <api|auth>apiService to tail.
-n, --lines <n>200Number of lines.
--since <duration>Relative window, e.g. 30s, 5m, 2h.
--start <iso> / --end <iso>Absolute window (ISO 8601).
--project <id>linked dirTarget project.

newly secrets list

List the secret keys set for a service (names only). Dev only. Accepts --service <api|auth> (default api) and --project <id>.

newly secrets set <key> <value>

Set a backend secret. Dev only. Redeploy to apply. Accepts --service <api|auth> (default api) and --project <id>.

newly db url

Print a readonly Postgres URL for the backend database. Dev only. Accepts --project <id>.

Files

PathPurpose
~/.newly/credentialsSession token (mode 600). Override the directory with NEWLY_HOME.
.newly/project.jsonPer-directory project link.