Skip to content

CLI Overview

The club CLI is a Dart command-line tool for interacting with a club server. It handles authentication, dart pub integration, and publishing.

Installation

The fastest path on Linux and macOS:

Terminal window
curl -fsSL https://club.birju.dev/install.sh | bash

Windows users, air-gapped environments, and anyone who wants to pin a specific version: see the full Installation guide, which covers the install script, manual archive downloads, and building from source.

Verify:

Terminal window
club --version

Command Tree

club
├── login <server-url> Authenticate via browser OAuth (default), --no-browser, or --key
├── logout [--server <url>] [--all] Remove stored credentials
├── setup [--env-var <NAME>] Register the stored token with dart pub
├── publish Publish a package (native flow; resolves server automatically)
└── config Show or change default server
├── show Alias for: club config
└── set-server <url> Set default server URL

Token management (creating, listing, and revoking personal access tokens) and all administrative actions are done from the web UI — they are not exposed as CLI subcommands. See Administration for how to drive admin workflows via the web UI or the HTTP API.

Global Options

OptionDescription
--helpShow help for a command
--version, -vShow the CLI version

Environment variables

VariableDescription
CLUB_TOKENBearer token override. Shadows stored credentials — useful in CI.
NO_COLORDisable ANSI colors (honours no-color.org).
TERM=dumbDisable ANSI colors.

Quick Start

Terminal window
# 1. Log in to your club server
club login https://club.example.com
# 2. Configure dart pub to use your server
club setup
# 3. Publish a package
cd my_package/
club publish

How the CLI Works Internally

The club CLI uses the club_api client SDK for all server communication. It does not make raw HTTP calls. This means:

  • All HTTP logic is centralized in the club_api package
  • Bug fixes in the SDK benefit both the CLI and any custom tooling
  • The CLI and your scripts share the same client code