Web field Plate 88 Route §88
Plate 88

The command-line tool

No port, no HTML, no browser. Arguments in, exit code out, and a --help that does not lie.

cli takes command definitions and runs them. foreman reads a Procfile and supervises processes, which is how atlas dev runs a server and a bundler under one Ctrl-C.

Atlas's own CLI is built this way, so the surface you are using to scaffold is the surface you are building on.

What you are carrying

@atlas/cli

Commands, flags, arg parsing, Foreman, scaffolding.

@atlas/config

Environment and defaults, typed.

@atlas/request

For the API it almost certainly calls.

Start it

bun add @wess/atlas

What it looks like

bin/tool.tsts
import { cli, command, flag } from "@atlas/cli"

cli("tool", [
  command("deploy", {
    flags: {
      env: flag("e", { type: "string", default: "staging" }),
      dry: flag("d", { type: "boolean", default: false }),
    },
    run: async ({ flags, args }) => {
      if (flags.dry) return console.log(`would deploy ${args[0]} to ${flags.env}`)
      await deploy(args[0], flags.env)
    },
  }),
])

Read next

@wess/atlas/cli @wess/atlas/config
Type to search guides and package references.