# Flagsmith's new CLI is now generally available!

Canonical: https://brew.new/templates/flagsmith/flagsmiths-new-cli-is-now-generally-available

Brand: flagsmith.com
Category: newsletter

![Preview of Flagsmith's new CLI is now generally available!](https://cdn.brew.new/email-preview-772f32e1a3728d57-tracking_r57xeexx3th53e1nd894ez16jd8dt0k4-1788998215644.png)

## Email content

Articles App GitHub Our story

Hi there,

The new Flagsmith CLI is now generally available. It’s a full rebuild from the ground up, and it does a great deal more than the old one.

Start here:

curl -fsSL https://get.flagsmith.com | sh

flagsmith init

Or brew install Flagsmith/tap/flagsmith if you'd rather. npm, Docker, go install, and plain archives all work as well.

flagsmith init is the good bit. It handles login and writes a flagsmith.json you commit next to your code, recording which project and environment that repo belongs to. Everyone who clones it lands in the right place. No setup doc to follow, no more toggling the right flag in the wrong environment, and if your team juggles several projects, that alone is worth the install.

Then it gets out of your way. The Flagsmith CLI renders tables when you're reading, JSON when you're not (hello LLMs!), and a spec-compliant jq is compiled in the binary:

flagsmith flag list # readable

flagsmith flag list --json --jq '.[] | select(.enabled) | .name'

There is nothing extra to install on your machine or your CI image.

Which unlocks a little thing we're very proud of:

flagsmith evaluate checkout-v2 --test

Exits non-zero when a flag your release depends on is switched off. One line in your pipeline, and a misconfigured deploy is blocked before it ships.

And you don't have to store a key to do it. Set up an OIDC trust relationship, and your pipeline swaps its own identity for a short-lived token — no secrets in your repo. In GitHub Actions, that's the whole setup:

- uses: actions/checkout@v7

- uses: Flagsmith/setup-cli@v1

- run: flagsmith evaluate checkout-v2 --test

GitLab CI, CircleCI, Buildkite, Azure DevOps, and HCP Terraform work the same way. Revoke the trust relationship, and tokens already issued stop working immediately.

The new CLI now covers the whole surface: flags, features and multivariate variants, segments and their rules, environments, SDK keys, projects, organisations, plus flagsmith api for anything we haven't wrapped yet. It’s a single Go binary, no runtime, that also works against self-hosted with --api-url.

The old npm CLI did exactly one job: fetching flags at build time. It's now deprecated and no longer maintained. Nothing breaks today, but there's a short migration guide for when you're ready—and the new CLI covers the same job.

Docs: https://docs.flagsmith.com/integrating-with-flagsmith/CLI

Source: https://github.com/Flagsmith/flagsmith-cli

Have a go and tell me what's missing—replies come to me.

Asaph Kotzin

Head of Product, Flagsmith

5

4-1

skib

6

Flagsmith, 86-90 Paul St, London, United Kingdom EC2A 4NE

Manage preferences

[Open and remix this design](https://brew.new/templates/flagsmith/flagsmiths-new-cli-is-now-generally-available)

[Browse email designs](https://brew.new/browse/templates)
