Skip to content

valar/cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

159 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Valar CLI

This repository contains the command line interface for Valar.

Getting started

Install via Homebrew

brew install valar/tap/valar

Initial setup

valar config init

The interactive wizard will prompt for your API endpoint, token, and project. For non-interactive usage (e.g. in CI), pass all values as flags:

valar config init --token=[your-api-token] --project=[your-project]

Usage

By default, Valar uses the default valarconfig file in $HOME/.valar/config. If the VALARCONFIG environment variable does exist, valar uses an effective configuration that is the result of merging the files listed in the VALARCONFIG variable.

Configuration

Initialize configuration

valar config init [--token token] [--project project] [--url url] [--name name] [--force]

Dump the current configuration as YAML

valar config view

Add an API endpoint

valar config endpoint set [endpoint] --token=[api-token] --url=[endpoint-url]

List configured API endpoints

valar config endpoint

Remove an API endpoint

valar config endpoint remove [endpoint]

Add a configuration context

valar config context set [context] --project=[project] --endpoint=[endpoint]

List configured CLI contexts

valar config context

Set a context as the default one

valar config context use [context]

Remove a configuration context

valar config context remove [context]

Projects

Set up a new project [not implemented]

valar projects create [--public] [project-name]

Public projects can be invoked by any anonymous person.

Delete a project [not implemented]

valar projects delete [project-name]

Destroying a project deletes all services and configuration associated with it. Use with care.

Services

Create local configuration

valar service init --type=[constructor] [--project=[project-name]] [service]

Valar supports a variety of constructors. If you are looking for an up-to-date list, please refer to the official documentation.

Tip

Using the --project flag is optional, if it is not defined a value will be inferred from the default project set via the config command or the projects supplied by the API service.

Listing all services in the project

valar service list

Show the logs of the latest deployment

valar service logs [--follow] [--tail] [--skip n] [service]

Enable a service

valar service enable [--service service]

Disable a service

valar service disable [--service service]

Listing all deployments of a service

valar deployment list

Roll out a specific build

valar deployment create [buildid]

Reverse service to the previous deployment

valar deployment rollback [--delta 1]

Environment variables

Set a variable

valar env set [--build] [--secret] [key]=[value]

Delete a variable

valar env delete [--build] [key]

List variables

valar env [--build] [--format=(table|raw)]

Domains

List all domains attached to a project

valar domains

Add a domain to a project

valar domains add [domain]

Verify a domain

valar domains verify [domain]

Link a domain to a service

valar domains link [--insecure] [domain] ([service])

Caution

If --insecure is enabled, the default HTTP-to-HTTPS redirection handler will be disabled and any plaintext HTTP requests will be forwarded to your service.

Unlink a domain from a service

valar domains unlink [domain] ([service])

Remove a domain

valar domains delete [domain]

Builds

Pushing a new build

valar builds push [--no-deploy]

Listing all builds

valar builds list [prefix]

Listing all builds with the given prefix

valar builds list [prefix]

Inspecting a build

valar builds inspect [prefix]

Abort a specific build

valar builds abort [prefix]

Show logs from build

valar builds logs [--follow] [--raw] [optional buildid]

Watch the build and status until its completed

valar builds watch [optional buildid]

Show build status

valar builds status [--exit] [buildid]

Identity

Show the currently authenticated user

valar whoami

Permissions

View permissions

valar auth list

Allow someone to read/write/invoke/manage

valar auth allow [path] [user] [read | write | invoke | manage]

Forbid someone to read/write/invoke/manage

valar auth forbid [path] [user] [read | write | invoke | manage ]

Remove a previously added permission

valar auth clear [path] [user] [read | write | invoke | manage ]

Check someones permission to perform an action

valar auth check [path] [user] [read | write | invoke | manage]

Warning

In case of a public project, this means only the project owner has write, read and invoke access, while any person may invoke a service of the project.

Cron

View the scheduled invokes

valar cron list

Schedule a service invocation

valar cron set [name] [schedule] [--path path] [--data payload] [--service service] [--enabled|--disabled]

Remove a scheduled service invocation

valar cron delete [name] [--service service]

Trigger a cron invoke manually

valar cron trigger [name] [--service service]

Inspect the invocation history

valar cron inspect [name] [--service service]

About

command line interface for Valar

Topics

Resources

License

Stars

Watchers

Forks

Contributors 2

  •  
  •