The Deskofy CLI is a command-line tool for creating, running, building, and managing Deskofy projects. It provides a set of commands and options to simplify development workflows.
Global Options
Option | Alias | Description |
---|
--version | -v | Display the Deskofy CLI version |
--help | -h | Show help information for commands |
Available Commands
create
Description: Initializes a new Deskofy project in the current directory.
Usage:
Options: None
Example:
run
Description: Runs a Deskofy project using the specified configuration file.
Usage:
deskofy run
# or
deskofy run path/to/deskofy.config.json5
Positional Arguments:
Name | Description | Type | Default |
---|
project-config-file | Path to the project configuration file | string | deskofy.config.json5 |
Example:
deskofy run
# or
deskofy run ./myproject/deskofy.config.json5
build
Description: Builds a Deskofy project for a specified target platform.
Usage:
deskofy build --config deskofy.config.json5 --target <target>
Options:
Option | Description | Type | Required | Default |
---|
--config | Path to the project configuration file | string | Yes | deskofy.config.json5 |
--target | Output format for the build | string | Yes | - |
Target Validation: The --target
must match the current operating system:
Platform | Supported Targets |
---|
linux | deb , rpm , app-image , flatpak , snap |
windows | msi , msi-wrapped , exe |
mac | dmg |
Example:
deskofy build --target deb
deskofy build --config ./myconfig.json5 --target snap
If an unsupported target is specified for the current platform, Deskofy will display an error and exit.
fmt
Description: Automatically formats all source code in the project.
Usage:
lint
Description: Runs a linter to check code style and potential issues.
Usage:
types
Description: Validates TypeScript types across the project.
Usage:
Error Handling & Help
- Strict Mode: Unknown commands or invalid arguments trigger errors.
- Command Suggestions: If a typo is detected, the CLI suggests correct commands.
- Default Behavior: Running
deskofy
without a command prints a default help message.