Deta CLI Reference
#
Summarydeta is a CLI for managing Deta Micros.
To install the CLI, check out Installing the CLI.
#
Commandsdeta login
- Trigger the login process for the Deta CLI.
deta version
- Print the Deta version
deta projects
- List Deta projects
deta new
- Create a new Deta Micro
deta deploy
- Deploy new code to a Deta micro
deta details
- Get detailed information about a Deta Micro
deta watch
- Auto-deploy local changes in real time to your Micro
deta auth
- Change auth settings for a Deta Micro (public access, api keys)
deta pull
- Pull the live code from a Deta Micro onto your local machine
deta clone
- Clone a Deta Micro onto your local machine
deta update
- Update a Deta Micro
deta visor
- Change the Visor settings for a Deta Micro
deta run
- Run a deta micro from the cli
deta cron
- Change cron settings for a Deta Micro
#
deta loginLogin to deta via the CLI. This is necessary before using any other commands.
#
Command#
Flags#
deta versionPrint the Deta version
#
Command#
Flags#
Version commands#
deta version upgradeUpgrade deta cli version
#
Command#
Flags#
Examples#
deta projectsList deta projects
#
Command#
Flags#
deta newdeta new
creates a new Micro(server) from the Deta cli
#
Command#
Flags#
Examples#
NotesThe
path
defaults to the current working directory if not provided.deta new
will first checkpath
for amain.py
orindex.js
file. If one is found,deta new
will bootstrap the Micro runtime based on the local file. Ifpath
is an empty directory, a runtime (with--node
or--python
) must be provided anddeta
will create a starter app inpath
.If
path
is not an empty directory and does not have an entrypoint file (eithermain.py
orindex.js
) aname
must be provided, under whichdeta
will create a micro with a starter app.
#
deta deployDeploy your local code (and dependencies) to your Deta Micro.
#
Command#
Flags#
Examples#
Notesdeta deploy
will ignore the following files and folders when deploying a micro:
- all files and folders with names starting with a
.
(both in unix and windows systems) - all files and folders with hidden attribute in windows systems
- vim swap files
node_modules
directory fornode
runtime__pycache__
directory forpython
runtime.pyc
and.rst
files forpython
runtimes
deta deploy
does not respect .gitignore
.
#
deta detailsGet detailed information about a specific Deta micro.
#
Command#
Flags#
deta watchAuto-deploy locally saved changes in real time to your Deta micro.
#
Command#
Flags#
deta authChange auth settings for a Deta Micro
#
Command#
Auth Commands#
Flags#
deta auth disableDisable Deta's Http Auth for a Deta Micro (this makes the HTTP endpoint publicly accesible).
#
Command#
Flags#
deta auth enableEnable Deta's Http Auth for a Deta Micro (a Micro's endpoint will require authenticated access or via a valid api key).
#
Command#
Flags#
deta auth create-api-keyCreate an API key for a Deta Micro
#
Command#
Flags#
Examples#
deta auth delete-api-keyDelete an API key for a Deta Micro
#
Command#
Flags#
Examples#
deta pullPull the latest deployed code of a Deta Micro to your local machine.
#
Command#
Flags#
Examples#
deta cloneClone a deta micro
#
Command#
Flags#
Examples#
deta updateUpdate a deta micro
#
CommandUpdate a Deta Micro's name or environment variables.
#
Flags#
Examples#
deta visorChange the Visor settings for a Deta Micro.
If Deta Visor is enabled, Deta will log all incoming requests to and responses from a Deta Micro, letting you inspect, edit, and replay these request / response pairs.
To access a Micro's visor, navigate to:
https://web.deta.sh/home/:username/:projectName/micros/:microName/visor
#
CommandChange visor settings for a deta micro
#
Visor Commands#
Flags#
deta visor openOpen Micro's visor page in the browser.
#
Command#
Flags#
deta visor enableEnable Visor for a Deta Micro
#
Command#
Flags#
deta visor disableDisable Visor for a deta micro
#
Command#
Flags#
deta runRun a Deta Micro from the cli
#
Command#
Flags#
Examples#
deta cronChange cron settings for a deta micro
#
Command#
Cron Commands#
Flags#
deta cron setSet deta micro to run on a schedule
#
Command#
Flags#
Examples#
deta cron removeRemove a schedule from a deta micro