Repository navigation
Viaalink CLI v4.0.0
Viaalink CLI 4.0 brings Viaalink CI/CD: a live terminal or VS Code on a GitHub Actions runner, published through your relay and started from your laptop with one command, plus temporary addresses for the services your job runs. Project state moves from .asd/ to .via/, Caddy now listens on this machine only, and no command puts a login into a URL any more. This is a major release: read Breaking changes / upgrading before you update.
New: Viaalink CI/CD
via ci installadds a short.github/workflows/terminal.ymlthat calls the Viaalink CI/CD Action (uses: viaalink/cicd@v2; workflows that still sayviaalink/ci-terminal@v2keep working). Installing the CLI on the runner, the login, publishing through the relay and cleanup all live in the Action, so fixes reach your repository without reinstalling the workflow.via cion its own lists its commands.via ci install --runs-on self-hosted,linux,x64runs the terminal on your own self-hosted runners. At a terminal,via ci installasks where the terminal runs and offers custom labels.via gh setupinstalls the workflow and stores its repository secrets for you, after asking (the relay key, its host key pins and the terminal passwordVIA_TERMINAL_PASSWORD). Values go togh secret seton stdin and are never printed.--relay <name>picks which enrolled relay's key to store; with several relays and no--relay, it asks.via gh terminalstarts a session: "Start terminal.yml in on (runner , terminal)? [Y/n]". It printsPublished: https://…/, how to sign in, andvia gh stop <run>, then returns.--watchkeeps following the run until it ends.--interface codeserveropens VS Code instead of a shell;--show-loginalso prints the address with the login in it.via gh terminalworks with the Action and with the CLI's ownterminal.yml, follows the run it started (not a colleague's), and reopens your running session instead of queueing a second one.- The version step offers the workflow's default (recommended), the latest release, the latest nightly, or a version you type.
via gh activelists running sessions;via gh runsshows terminal runs as a table;via gh stopstops a session.
New: project state in .via/
- The CLI keeps a project's local state in
.via/(.via/workspace/,.via/state/) and no longer writes.asd/into a project. - When it creates
.via/in a git repository, it adds.via/to the project's.gitignoreonce and says so, unless git already ignores it. CRLF line endings are kept. Outside a git repository, or in a repository at your home folder, no.gitignoreis touched.
Other additions
dial: 5175invia.yaml(and innet.manifest.yaml) meanslocalhost:5175.host:portkeeps working.- Databases: a service can declare
database: { engine: postgres, … }, andvia database startlists it in DbGate as a ready connection (no password stored).tunnelProtocol: tcpwithinspect: trueshows each Postgres connection's SQL in the network inspector; withpublic: truethe database gets a raw TCP port on your relay throughvia net apply --tunnel. Only the database's own login stands in front of that port, andvia net applysays so. via deps install --binary caddyinstalls Viaalink's own Caddy 2.11.7 build (DNS-01 providers, authentication and layer4 plugins) on Linux, macOS and Windows, x64 and arm64. Run it with--forceto switch an existing install.VIA_CADDY_BASE_URLtakes Caddy from your own folder or URL of builds, checked against itsSHA256SUMS.txt.- After
via net applychanges a service'senv:values in.env, it names each changed key and the service to restart. Values are not printed. via doctorhas an "App listeners" check, andvia diagnosechecks the relay, device key, DNS and SSH port that the relay client actually uses.
Changed
- Output leads with the address to share:
Published: https://…, thenLocal route: … (this machine only)andYour app: localhost:<port>, invia expose,via expose list,via files,via netandvia net urls.via net urlsmarks services that need a login. - The login in front of a
public: trueservice invia.yamlnow follows yourpreferences.expose_authchoice, asvia exposealready did. Terminals, code editors, database tools and Mailpit always keep their login. Change it withvia config set preferences.expose_auth always|sensitive-only|never. via read-envmasks passwords, secrets, tokens, keys and logins inside URLs;--show-secretsprints them.via read-env NAMEprints only that value.- A refused login shows a short page ("This address needs a login. Ask whoever shared it.") instead of a blank one.
- The default local host is
via.localhost(wasasd.localhost), and a service without its own path or host answers on/via/<service>(was/asde/<service>). See upgrading below.
Breaking changes / upgrading
via devinciis gone. Usevia ci(via ci install).- Project state moves from
.asd/to.via/. While services an earlier version started still run from.asd/(Caddy, and the services and tunnels in its registry), the CLI keeps using.asd/and names them. To move:via downvia env init(it showsWorkspace: .asd/workspace → .via/workspace)- Delete the old
.asd/folder; it is no longer used.
${{ macro.exposedOriginWithAuth() }}is removed. It wrotehttps://user:password@…into.env. Avia.yamlthat uses it now fails with "unknown macro expression". Use${{ macro.exposedOrigin() }}and pass the login separately, for examplecurl -u "$ASD_BASIC_AUTH_USERNAME:$ASD_BASIC_AUTH_PASSWORD" "$APP_URL".- Caddy listens on this machine only (127.0.0.1, and ::1 where available) instead of every network interface. Relay addresses keep working. To reach a project from other devices on your network, or from the internet when this machine is a server, set
network.caddy.lan_access: trueinvia.yaml; the change takes effect on the nextvia net applyorvia caddy start.
If you run your own Viaalink Relay that serves HTTPS through Caddy: setnetwork.caddy.lan_access: truein the Relay's config before it runs this CLI, or update the Relay to 1.40.5 or later. Otherwise its public HTTPS listens on loopback only. via gh stop <id>asks before stopping a run someone else started. Without a terminal it does not ask: it stops only your own runs, and for any other run prints "Not stopped: # …" and exits 1. It only cancels terminal sessions, never a CI or release run.- A
terminal.ymlfrom before 3.2 is refused ("This terminal.yml was installed by a CLI before 3.2; runvia gh setupto update it."). Runvia gh setupin the repository, let it replace the file, and commit it. - GitHub terminal secrets have new names. The workflow reads
VIA_TUNNEL_KEY,VIA_TUNNEL_KEY_ID,VIA_TUNNEL_HOST,VIA_TUNNEL_HOST_KEY_FINGERPRINTS, optionalVIA_TUNNEL_PORT, andVIA_TERMINAL_PASSWORD. The oldASD_TUNNEL_*secrets are not read. Runvia gh setupagain in each repository that uses the terminal workflow (it stores the new secrets), then delete the old ones withgh secret delete ASD_TUNNEL_KEY --repo <owner>/<repo>(and_KEY_ID,_HOST,_PORT).via gh terminalnames any missing secret. The terminal password is no longer a workflow input, and the default username is nowvia. via auth exportno longer prints the private key. Add--with-key, as ineval $(via auth export --with-key).- A
via.yamlservice without activation checks is only published when its app answers.via net apply --tunnelprobes itsdialand leaves it unpublished when nothing listens ("web: not published — app down: …"). Start the app first. project.tunnel.protocol: tcpis refused. It published the root service without its login. Give the service itselftunnelProtocol: tcpandpublic: true.- Local addresses: run
via net applyonce after upgrading. Oldasd.localhostand/asde/<service>bookmarks then redirect tovia.localhostand/via/<service>. Projects that setproject.domainkeep their host. via caddy sync-authwith onlyASD_BASIC_AUTH_PASSWORDin the environment now uses the login in.env. Set both username and password in the environment, or keep the login in.env.via diagnose --regionis removed (it did nothing).- Run
via net applyonce after upgrading to put back logins on services exposed with an earlier version (see Security).
Security
- No login goes into a URL the CLI writes to a file, prints, copies or opens:
via netmenus, the service menus (which now offer "Copy username" and "Copy password"),via net open, the registry andASD_TTYD_URLin.env. Restart the web terminal and code-server once (via ttyd stop && via ttyd start, the same forcodeserver) to rewrite an address an older version left. via net applyno longer removes the loginvia exposeput in front of a service's public address. Runvia net applyonce after upgrading.- The studio's files (
/asde/hub-config.json,/asde/hub-services.json,/asde/hub-services-public.json) and the dashboard need the studio login on every address, and no longer carry a login. If you published the studio (via terminal tunnel,via hub uporfeatures.hub_visibility), replace its login:cd ~/.local/share/via/projects/personal && via expose auth --rotate. - A service deleted from
via.yamlis no longer left public: the nextvia net applycloses its relay address and removes its routes. - A hub service id that is not lowercase letters, digits and hyphens is refused wherever it becomes a socket path.
- The terminal workflow masks the password in its URL-encoded forms, no longer echoes invalid inputs, refuses unusual usernames, and stops the published address as soon as a run is cancelled.
- The network inspector and DbGate say in their start output what they expose to anyone who can open them.
Fixes
CI/CD
- The login the laptop shows opens the terminal (no more 401), also for passwords with
",`,\or$. - Linux and macOS runners open the terminal instead of answering 502;
via expose ttyd <name>works right aftervia ttyd start. - The runner reaches relays that require host key pins, and no longer fails with
Version vX not foundfor a release that exists. - "0) ← Back" in the pickers goes back a step instead of cancelling; a yes/no question only takes
y/yes(or Enter where the default is yes). - Queued sessions say what they actually wait for;
via gh activereads "1 minute", not "1 minutes"; status polling backs off. via gh stopreports only cancels GitHub accepted and exits non-zero when one failed.- Windows runners get the CLI's install folder on PATH.
Network and services
via net apply --tunnelno longer creates a tunnel for an app that is not running, and--explainsays per service why it was or was not published.via expose listsays "App down" when only your app stopped, instead of blaming the relay client.via net remove,via net caddy removeandvia net expose stopnow do what they say and print one clear sentence.via net expose startfor a hub service prints the address it really answers on.via net, "Copy Credentials",via codeserverandvia mitmproxyfind a login kept only in.env.via caddy startno longer hangs when something connects to its ports during startup, and no longer ends silently when Caddy exits: it prints Caddy's error and exits 1. A slow start says which step it is in.- A Caddy shared by several projects keeps its pid file and log in one place, so it is not started twice.
- The network inspector no longer fails on machines where port 8080 is taken, and never reports a database as inspected when it is not.
${{ macro.exposedOrigin() }}keeps the relay's HTTPS port when it is not 443.project_rooton a service with neitherpathsnorhostnow serves/instead of failing.- A package
net.manifest.yamlthat does not load is reported with a warning.
Studio
- Ctrl+C on
via serve hubstops what that run started and names what keeps running.via hub downalso stops the studio's own Caddy. via serve hub,via expose authandvia terminal tunnelsay where the login is and what is published.- The web terminal shows up again in
via netand the studio's service list.
Update and install
via updatenow also updates the module files and the dashboard, puts everything back if a step fails, never installs an older release unless you name it (via update --version <version>), and skips unpublished releases.- The installers say why a release lookup failed (not found, rate limit, HTTP status, no connection) and clean up leftover folders safely.
- Nightly builds contain the same files as a release, including the relay client under the right name.
Other
- Device keys from
via relay addare written in OpenSSH format, so plainsshaccepts them. Older keys keep working; rotate one withvia relay rotate-keyto use it withssh. via env syncno longer rewrites your whole.env: comments, blank lines and key order stay.- A
.envcopied between Windows and Linux or macOS no longer sends the project to a stray folder named after a Windows path. Delete any leftoverC:\…folders by hand. via relay setwithout a terminal prints a plain list instead of cursor codes.via doctorno longer reports "ok" while a public service's app is down.- Copy actions say when nothing was copied.
- Usage lines, hints, messages and the studio's actions say
via. via schema automationshowsvia expose <port> [name]in its examples.
Install / update
Update an existing install:
via updatevia update replaces the CLI and its module files. To also update the bundled relay client and helpers, re-run the installer:
# Linux / macOS
curl -fsSL https://raw.githubusercontent.com/viaalink/cli/main/install.sh | bash# Windows
irm https://raw.githubusercontent.com/viaalink/cli/main/install.ps1 | iex