CLI
The GOX CLI allows you to create projects, run the server, manage customer dependencies and frameworks, inspect the module graph and run tests.
The commands are run from the terminal by gox. The operations that act on an application must start within its project structure.
The installation and synchronization of packages is developed together in Dependencies. The consultation of direct and transitive dependencies is documented in list.
Use
gox <command> [options] | Command | Description |
|---|---|
| createproject | It creates a GOX project. |
| run | Collect and run the server. |
| get | Add a dependency. |
| remove | It eliminates a dependency. |
| install | Install the declared dependencies. |
| tidy | Synchronize the Go modules. |
| list | It shows the project dependencies. |
| client | Manages customer frameworks. |
| graph | Show the dependency graph. |
| test | Run tests and benchmarks. |
Help
The general aid can be consulted in these two ways:
gox help
gox --h Working directory
GOX uses the current directory as a starting point. The commands that need to know the project detect its root before carrying out the operation.
createproject uses the current directory as the destination of the new project. Other commands, such as client, manage the project files directly from the directory in which they are run.
Errors
An unknown command, an invalid option or an unallowed combination of arguments ends with an error and an output code other than zero.
The aid does not run the command or modify the project.
Best practices
- Run the project commands from its root.
- See the general help when you need to review the available commands.
- Check the changes produced in configuration files and modules.
- It uses only documented options for the installed version.
- Run the tests after changing dependencies or frameworks.