# README
This repository contains the command line interface for Valar.
Getting started
Install via Homebrew
brew install valar/tap/valar
Initial setup
# Add the Valar API endpoint
valar config endpoint add default --token=[your-api-token] --url=https://api.valar.dev/v2
# Add a new project context
valar config context add default --project=[your-project] --endpoint=default
# Set the configured context as the default one
valar config context use default
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
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 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.
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.
Deploying a service
valar push [--skip-deploy]
Listing all services in the project
valar list
Show the logs of the latest deployment
valar logs [--follow] [--tail] [--skip n] [service]
Listing all deployments of a service
valar deploys
Roll out a specific build
valar deploys create [buildid]
Reverse service to the previous deployment
valar deploys rollback [--delta 1]
Enable a service [not implemented]
valar enable [service]
Disable a service [not implemented]
valar disable [service]
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])
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
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]
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]
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]