Argos from the shell

The argos command brings every page of the Argos console to the shell: the same checks, the same messages, with JSON output for scripts and agents.

The argos command brings every page of the Argos console to the shell: the same checks, the same messages, with JSON output for scripts and agents.

How it works

argos is the web console of EDON Argos ported to the shell. The console is the reference: each command ports one of its pages — the tree follows the console’s menu, System, Firewall, Network and Logs — and runs that page’s own loader or action on the appliance, as root. What a page validates, refuses or warns about, the command validates, refuses and warns about, with the page’s own words, in the shell’s language. Nothing is decided by the command itself.

The command talks to the console through its socket, /run/argos/cli.sock, in a directory only root can enter: nothing secret travels, and whoever reaches the socket is root. Run it as root, or with sudo.

Commands

argos <section> <page> <verb> [arguments] [options]. A page’s records are listed, shown, added, changed and deleted with list, show, add, set and delete; a list inside a record (a zone’s services, a scope’s reservations) is a group of its own, its items named by their number; a settings block is a group with show and set; a page’s button is a verb named after it. set changes only what its options name: the rest of the record is posted as the page’s form holds it, so set with no option saves the record unchanged. add starts from the page’s form for a new record, so an option left out takes what that form holds: the help names it (default: on). An option without a value is a switch: –enabled turns it on, –no-enabled or –enabled=off turns it off. A page’s group with no verb lists its records, or shows the page when it has none to list: argos firewall zones is argos firewall zones list, argos logs firewall is argos logs firewall show, and argos logs ip 192.0.2.7 looks the address up.

argos <group> –help lists a group’s commands, argos <group> <command> –help a command’s options; the help, like the console’s messages, follows LANG (or –lang).

Saving and applying the firewall

A change is saved at once, but what the firewall runs changes only when it is applied, as in the console’s header: after a change the command says when the firewall holds changes it does not run yet. argos firewall apply loads them and keeps the previous ruleset: unless the apply is confirmed within 60 seconds, the previous ruleset comes back by itself — the guard against cutting yourself off. On a terminal the command asks for the confirmation; elsewhere it leaves the window open for argos firewall confirm or cancel. –confirm confirms at once and gives the guard up: use it only where losing the connection you work on does not matter.

Secrets

A password, a pre-shared key or any other secret never goes on the command line, where every local user can read it: an option that takes one takes its source instead — - reads it from stdin, @path from a file, ask on the terminal without echo. A literal value is refused.

Scripts and AI agents

–json prints the page’s data, or the page’s answer to an action, as one JSON document on stdout and nothing else there; notes and warnings go to stderr. The exit status says how it went (see EXIT STATUS). Commands that delete or power off ask first; without a terminal they need –yes. Commands marked read-only change nothing and can run anywhere. A page the command tree does not cover yet is still reachable with argos raw get and argos raw post, by the page’s own names.

The sections

  • argos system — The appliance: status, services, power, settings, users, diagnostics
  • argos firewall — The firewall: apply and confirm, overview, zones, publications, reverse proxies, inspection, threat intelligence, decoys, applications
  • argos network — The network: interfaces, gateways, VLANs, routing, QoS, DNS, DHCP, VPN, IPsec
  • argos logs — The logs: events, TLS clients, behavioural protection, DNS protection, firewall, system

Examples

# The zones and how they are set
argos firewall zones list
# A dmz on eth2, then 443 open to the firewall
argos firewall zones add dmz --interfaces eth2 --inbound-policy drop
argos firewall zones services add dmz --protocol tcp --ports 443
# Apply, with the confirmation within 60 seconds
argos firewall apply
# The same list as JSON, for a script
argos --json firewall zones list

Exit status

  • 0 — Done.
  • 1 — Failed: the page could not do it, or the console answered an error.
  • 2 — Usage: an unknown command or option, a missing argument, a value of the wrong kind.
  • 3 — Refused by the page: the fields it names are wrong (the messages say why).
  • 4 — Not found: no record by that name.
  • 5 — Unauthorized: not root (the console’s socket is root’s).
  • 6 — Declined: not confirmed (no –yes without a terminal, a no, no answer in time).
  • 7 — The console does not answer: is argos.service running?

The full command reference is on the page Argos CLI, and on the appliance in man argos.

LET’S TALK INFRASTRUCTURE

Control starts with a conversation.

Tell us about your infrastructure. Let’s start with what you actually need.

Talk to an engineer