Skip to content
Luna
Esc
↑↓navigate↵open⌘Jpreview
On this page

luna projects

List, make and delete an organisation's projects, and choose the one a folder uses.

luna projects lists and makes an organisation’s projects, and points a folder at one.

luna projects create notes

Reference

luna projects <COMMAND>

luna project is the same command. Every subcommand takes these options.

Option Type Default Does
--org <ORG> text LUNA_ORG, then the folder’s project’s, then the one luna orgs use chose The organisation, by name.
--token <TOKEN> text LUNA_TOKEN, then your login An API token or account key to act with.

luna projects list

Prints the organisation’s projects you can see. A * marks the one this folder uses.

luna projects list [OPTIONS]
Option Type Default Does
--json flag Off Prints the answer as JSON.

luna projects create

Makes a project with its production environment. The folder then uses it: its .env.local names the project.

luna projects create [OPTIONS] <NAME>
Option Type Default Does
<NAME> text Required The project’s name.
--dir <DIR> path . The app’s folder.
--json flag Off Prints the answer as JSON.

luna projects use

Points the folder at a project you already have. Choose an environment next, with luna env use.

luna projects use [OPTIONS] <NAME>
Option Type Default Does
<NAME> text Required The project, by name or as organisation/project.
--dir <DIR> path . The app’s folder.

luna projects delete

Deletes a project with every environment in it. It asks first.

luna projects delete [OPTIONS] <NAME>
Option Type Default Does
<NAME> text Required The project, by name or as organisation/project.
--dir <DIR> path . The app’s folder.
--yes flag Off Deletes without asking.

Good to know

  • The folder’s env file is the nearest .env.local or .env from --dir up, stopping at the repository’s root. A new one is written as .env.local.
  • When a folder moves to another project, its env file drops the old environment, URL and key.
  • When you delete the project this folder uses, its env file drops the project and environment too.
  • create needs the projects:write scope, which owners, admins and developers hold. delete needs projects:delete, which only owners and admins hold. An API token needs to reach the whole organisation for either.
  • A name that is taken in the organisation is refused.
  • Without a terminal to ask at, delete stops with exit code 6 unless you pass --yes.

Examples

Start a project in this folder

luna projects create notes

Use a project from another organisation

luna projects use globex/storefront

Delete a project in a script

luna projects delete notes --yes

Was this page helpful?