This is an in-development version. Grow with us! πŸŽ‰

CLI

Introduction

The Fustak CLI provides various commands to initialize, configure, and manage your Fustak project. Here's an overview of the available commands and their usage.

Init

Installs the default template in the current directory.

Usage:

fustak init

Template

Installs a template from a Git repository into the current directory.

Usage:

fustak template <SOURCE_URL> [BRANCH] [PATH]

Arguments:

  • βˆ’ <​SOURCE_URL>: URL to the source of the template.
  • βˆ’ [BRANCH] (optional): Branch to clone (default: main).
  • βˆ’ [PATH] (optional): Destination to clone the repository into (default: current directory).

Example:

fustak template https://github.com/username-on-github/template.git

Register

Registers as a user.

Usage:

fustak register

It will prompt you for the following information:

  • βˆ’ Email
  • βˆ’ Password

Token

Returns the public or private tokens.

Usage:

fustak token [SERVICE]

Arguments:

  • βˆ’ [SERVICE] (optional): Service to get the public API token (default: none).

Example:

fustak token

This command prints the private token and saves it in the .fustak/.token file.

Or:

fustak token counter-service

This command prints the public token of the counter service.

URL

Returns the URL of your project.

Usage:

fustak url

Deploy

Deploys the project to the server.

Usage:

fustak deploy [MIGRATION]

Arguments:

  • βˆ’ [MIGRATION] (optional): The migration to deploy (default: none).

Example:

fustak deploy

Or:

fustak deploy 20210101_create_users_table_up.db

Migrations

Deploys the migrations to the server.

Usage:

fustak migrations <PATH>

Arguments:

  • βˆ’ <​PATH>: The path to the migration file.

Example:

fustak migrations 20210101_create_users_table_up.db

Pages

Deploys the pages to the server.

Usage:

fustak pages [PATH]

Arguments:

  • βˆ’ [PATH] (optional): The path to the page file (default: pages_folder).

Example:

fustak pages

Or:

fustak pages src/pages/index/index.page.toml

Assets

Deploys the assets to the server.

Usage:

fustak assets [PATH]

Arguments:

  • βˆ’ [PATH] (optional): The path to the asset file or folder (default: assets_folder).

Example:

fustak assets

Or:

fustak assets dist/pages

Shell

Opens a SQLite shell to manage the remote database locally.

Usage:

fustak shell

It saves the command history in the .fustak/.history file.

Branch

Creates and deletes branches, lists branches, and executes other commands within a branch context.

A branch is used to create different environments than the main environment, providing independent workspaces.

Usage:

fustak branch <COMMAND>

Commands:

  • βˆ’ create: Create a branch.
  • βˆ’ current: Retrieve the current branch name.
  • βˆ’ delete: Delete a branch.
  • βˆ’ list: List all branches.
  • βˆ’ token: Get the token

of a branch.

  • βˆ’ url: Get the URL of a branch.
  • βˆ’ help: Print help for this command or specific subcommands.

Create a Branch

Usage:

fustak branch create <BRANCH_NAME>

Arguments:

  • βˆ’ <​BRANCH_NAME>: The name of the branch to create.

Example:

fustak branch create new-branch

Delete a Branch

Usage:

fustak branch delete <BRANCH_NAME>

Arguments:

  • βˆ’ <​BRANCH_NAME>: The name of the branch to delete.

Example:

fustak branch delete new-branch

List Branches

Usage:

fustak branch list

This command prints the list of created branches.

Current Branch Name

Usage:

fustak branch current

This command prints the name of the current branch. The current branch name is stored in the .fustak/.token file.

The Fustak CLI provides essential commands to initialize your project, manage templates, register users, deploy code and assets, and work with branches. Use these commands to streamline your development workflow with Fustak.