Skip to content

Sopamo/via

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Manage your local dev environments with ease




Installation

OSX (arm, brew)

brew tap sopamo/via https://github.com/sopamo/via
brew install sopamo/via/via
# Create an alias if you want to access via with v
echo "alias v=via" >> ~/.bash_aliases
source ~/.bash_aliases

Linux (x86_64, snap)

# Coming soon, waiting for approval
snap install via-cli --classic
# Create an alias if you want to access via with v
echo "alias v=via-cli" >> ~/.bash_aliases
source ~/.bash_aliases

ArchLinux (x86_64, AUR)

yay via-cli-bin 
# Create an alias if you want to access via with v
echo "alias v=via-cli" >> ~/.bash_aliases
source ~/.bash_aliases

Project setup

Create your first project configuration file by running v init my-project and follow the instructions.

You can then run v my-project start to start your project. Of course, you can rename the my-project.yaml file to match your project's name.

Project configuration

Minimal configuration

services:
  database:
      path: /Users/username/project/app
      actions:
        start: docker-compose up -d
        stop: docker-compose down

You always have to specify the start and stop actions.

When running the start action, all other projects will be stopped automatically.

Adding custom actions

services:
  app:
    actions:
      bash: docker-compose exec app bash

You can run individual actions like this:

v my-project app bash



Via development setup

First, follow the project setup instructions. Then, to run the project locally, install deno.

To run the code directly, run:

deno run --allow-read --allow-run --allow-env --allow-write ./src/via.ts [project] [service] [action]

To build the binary, run:

deno compile --allow-read --allow-run --allow-env --allow-write ./src/via.ts

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published