Command-line tool
Coduva 0.3.0 adds the coduva command. You do not need to switch to the window to add a project, change the PHP version or open the site.
Making it available
- In terminals Coduva opens (the Terminal button on the project screen),
coduvaalways works. - To use it in every terminal, turn on Use in every terminal under Settings › Command-line tool. Coduva adds the command's folder to your user PATH; no administrator rights are needed. The change takes effect in newly opened terminals.
Commands
Without a project name, the project of the current folder is used; this also works in subfolders.
| Command | What it does |
|---|---|
coduva link [name] | Adds the current folder as a project. Without a name, one is derived from the folder name. |
coduva link --https --php 8.3 | Adds the project with HTTPS and PHP 8.3. |
coduva link --proxy 3000 | Adds the folder as a proxy project; requests are forwarded to localhost:3000. |
coduva unlink [name] | Removes the project. Files and the database are kept. |
coduva list | Lists projects with type, PHP version and address. |
coduva open [name] | Opens the project in the browser. --url only prints the address. |
coduva php | Shows the project's PHP version. |
coduva php 8.4 | Changes the project's PHP version. Typing 8.4 is enough; the installed full version is found. |
coduva php default | Returns the project to the default PHP version. |
coduva https on / off | Turns HTTPS on or off for the project. |
coduva status | Shows the status and ports of Nginx and MariaDB. |
coduva start / stop / restart [all|nginx|mariadb] | Starts, stops or restarts services. |
coduva help | Shows all commands. |
To work with a project in another folder, add --project name: coduva php 8.3 --project magaza.
Example
bat
cd C:\Sites\magaza
coduva link --https
coduva php 8.3
coduva openThings to know
- The command uses the same settings as the open Coduva window; the window shows changes within a few seconds.
linkandunlinkchange thehostsfile, so Windows may ask once for administrator approval.- Output is in Turkish or English, depending on Coduva's interface language.
- The exit code is
0on success and1on error; you can use it in scripts.