AstroX is a command-line interface (CLI) tool designed to streamline the development process of AstroX projects. It provides a range of features and functionalities to enhance productivity, automate repetitive tasks, and enforce best practices for code quality.
The AstroX CLI supports various command-line arguments to customize its behavior and configuration:
Command list:
--help [print this help]
--sync-git-hooks [copy git_hooks folder contents to .git/hooks]
--remove-git-hooks [remove hooks from .git/hooks folder]
--build [build production bundle for frontend and backend]
--serve [start the production server with the frontend build]
--test [run the tests]
--create-toml [create a new Astrox.toml file]
--interactive [start the interactive mode]
--system-checks [run the system checks]
| Argument | Value | Type | Description | Example |
|---|---|---|---|---|
| --host | localhost or ip address | String | Set the host for the project | --host=0.0.0.0 |
| --port | 5412 | Number | Set the port for the project | --port=5412 |
| --env | prod/dev | String | Set the environment for the project | --env=prod/dev |
| --cors_url | domain.com | String | Set the CORS origin URL for the backend server | --cors_url=astrox.spaceout.pl |
| --cookie_domain | domain.com | String (Optional) | Set the cookie domain for session management | --cookie_domain=spaceout.pl |
| --astro-port | 2343 | Number | Set the port for the Astro server | --astro-port=2343 |
| --prod-astro-build | true/false | Boolean | Build just the rust backend, switch the astro.build for --env=prod --build | --prod-astro-build=true/false |
The AstroX CLI includes pre-defined Git hooks that promote code quality and enhance development workflows.
These hooks provide:
With Astrox.toml file you can configure both frontend and backend variable in one place.
host = "localhost"
port = 8080
env = "dev" astro_port = 5431
prod_astro_build = true
[public_keys]
public_api_url ="https://localhost:8000/api"
[public keys] will be copied over to frontend env file, before the build, for easy localhost / prod switchero