https://github.com/sixlive/dev-cli
https://github.com/sixlive/dev-cli
Last synced: 11 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/sixlive/dev-cli
- Owner: sixlive
- Created: 2021-12-16T14:50:26.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-01-01T16:29:43.000Z (about 4 years ago)
- Last Synced: 2025-01-13T10:13:57.371Z (12 months ago)
- Language: PHP
- Size: 5.68 MB
- Stars: 3
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
```
██████ ███████ ██ ██ ██████ ██ ██
██ ██ ██ ██ ██ ██ ██ ██
██ ██ █████ ██ ██ ██ ██ ██
██ ██ ██ ██ ██ ██ ██ ██
██████ ███████ ████ ██████ ███████ ██
```
A configurable development environment CLI.
## Installation
Head on over to [releases](https://github.com/sixlive/dev-cli/releases) page and snage a built copy of `dev-cli`. You'll need to make it executable `chmod +x dev-cli` as well.
On your first run you'll want to create the configuration directory with the default config.
```bash
./dev-cli install
```
## Usage
```bash
dev-cli list
```
## Configurations
### Configuration Directory
```bash
$HOME/.config/dev-cli
```
### Example Configuration
Environment configurations can live in a single or multiple files in within the
configuration directory.
```php
// $HOME/.config/dev-cli/default.php
env('default', function () {
$this->action('start', function () {
$this->description('Start the default dev env');
$this->task('Valet', 'valet start');
$this->task('Open DBngin', 'open /Applications/DBngin.app');
});
$this->action('stop', function () {
$this->description('Stop the default dev env');
$this->task('Valet', 'valet stop');
$this->task('Open DBngin', 'open /Applications/DBngin.app');
});
});
```
```php
// $HOME/.config/dev-cli/example.php
env('example', function () {
$this->action('start', function () {
$this->description('Start the default dev env');
$this->task('Valet', 'valet start');
$this->task('Open DBngin', 'open /Applications/DBngin.app');
});
$this->action('stop', function () {
$this->description('Stop the default dev env');
$this->task('Valet', 'valet stop');
$this->task('Open DBngin', 'open /Applications/DBngin.app');
});
});
```
**NOTE**: the `default` env will hoist all actions to top level commands. e.g.
`dev-cli start` vs `dev-cli example:start`.
```bash
USAGE: dev [options] [arguments]
completion Dump the shell completion script
install install dev-cli
self-update Allows to self-update a build application
start Start the default dev env
stop Stop the default dev env
example:start Start the default dev env
example:stop Stop the default dev env
```
## Development
### Build
```bash
./dev-cli app:build
or
./dev-cli app:build --build-version="v1.0.0"
```