CLI Overview
Introduction to the DeesseJS Command Line Interface
CLI Overview
The DeesseJS Command Line Interface (CLI) is a powerful tool that helps you create, develop, and manage your DeesseJS applications from the command line.
Installation
The CLI is available via npx without installation:
npx deessejs <command>For frequent use, install globally:
npm install -g @deessejs/cli
# Then use directly
deessejs <command>Available Commands
Project Commands
| Command | Description |
|---|---|
create | Create a new DeesseJS project |
init | Initialize DeesseJS in an existing project |
dev | Start the development server |
build | Build the application for production |
start | Start the production server |
Database Commands
| Command | Description |
|---|---|
db:push | Push schema changes to the database |
db:pull | Pull schema from the database |
db:migrate | Run database migrations |
db:seed | Seed the database with sample data |
db:studio | Open Prisma Studio (database browser) |
db:reset | Reset the database |
Plugin Commands
| Command | Description |
|---|---|
plugin:add | Add a plugin to your project |
plugin:remove | Remove a plugin |
plugin:list | List installed plugins |
Generation Commands
| Command | Description |
|---|---|
generate | Generate code (collections, components, etc.) |
g | Shorthand for generate |
Utility Commands
| Command | Description |
|---|---|
login | Login to your DeesseJS account |
logout | Logout from your account |
info | Display system information |
version | Show CLI version |
Quick Start
Create a New Project
npx deessejs create my-app
cd my-app
npm run devInitialize in Existing Project
npx deessejs initThis will:
- Create the
deesse.config.tsfile - Set up the database schema
- Create the admin dashboard structure
- Install required dependencies
Command Help
Get help for any command:
deessejs --help
deessejs <command> --help
deessejs <command> <subcommand> --helpGlobal Flags
These flags work with all commands:
| Flag | Description |
|---|---|
--help, -h | Show help |
--version, -v | Show version number |
--verbose | Enable verbose logging |
--debug | Enable debug mode |
--yes, -y | Skip confirmation prompts |
Configuration
The CLI can be configured via environment variables or a configuration file.
Environment Variables
# .env.local
DEESSEJS_API_URL=https://api.deessejs.com
DEESSEJS_TOKEN=your-token
DEESSEJS_TELEMETRY=disabledCLI Configuration File
# ~/.deessejsrc
{
"apiUrl": "https://api.deessejs.com",
"token": "your-token",
"telemetry": false,
"theme": "dark"
}Autocompletion
Enable shell autocompletion for the CLI:
# Bash
deessejs completion bash > ~/.deessejs-completion
echo "source ~/.deessejs-completion" >> ~/.bashrc
# Zsh
deessejs completion zsh > ~/.deessejs-completion
echo "source ~/.deessejs-completion" >> ~/.zshrc
# Fish
deessejs completion fish > ~/.config/fish/completions/deessejs.fishTelemetry
DeesseJS collects anonymous usage data to improve the CLI. You can disable telemetry:
# Disable telemetry
deessejs telemetry disable
# Enable telemetry
deessejs telemetry enable
# Check status
deessejs telemetry statusOr via environment variable:
DEESSEJS_TELEMETRY=disabled deessejs <command>Next Steps
- Explore CLI Commands in detail
- Learn about Project Creation
- Understand Database Management