Skip to content

feat: session-first auth, ft admin login, empty-CSV headers, update notice (v0.7.0)#21

Merged
lu-ochenty merged 1 commit into
mainfrom
feat/cli-issues-17-20-update-notify
Jul 2, 2026
Merged

feat: session-first auth, ft admin login, empty-CSV headers, update notice (v0.7.0)#21
lu-ochenty merged 1 commit into
mainfrom
feat/cli-issues-17-20-update-notify

Conversation

@LucasLeguizamo

Copy link
Copy Markdown
Contributor

Resolves the client-fixable open issues in one branch (contract already exposes everything needed; no golden-rule violation).

Changes

Plus: update notification

ft prints a one-line ⚠ Update available on stderr when a newer @freeticket/cli is on npm — checked at most once/day (cached in ~/.freeticket), interactive TTY only, never on --json/pipes/CI, opt out with FT_NO_UPDATE_CHECK=1. This is how a stale global install learns to upgrade; npx …@latest users already run the newest.

Verification

  • pnpm typecheck ✓ · pnpm lint ✓ · pnpm test ✓ (9 tests) · pnpm build
  • Smoke: ft admin --help shows login/logout/config; ft -v → 0.7.0; update notice silent in non-TTY.

Closes #17
Closes #18
Closes #19
Closes #20

🤖 Generated with Claude Code

…otice (v0.7.0)

Resolves the client-fixable freeticket-cli issues in one pass:

- #17 Auth wording is "session"/credential on the normal path (logged-out
  error, 401 hint, `ft logout`, `ft config`). `--key`/`FT_API_KEY` stay,
  framed as CI/headless only — so an agent never reads "No API key" as an
  invitation to ask for or invent a key.
- #18 Empty `--csv` lists keep their header row when columns are known, so a
  zero-result export still carries its schema. Covered by output.test.ts.
- #19 Documented the real contract: `--json` = data array, `--raw` =
  { data, page } envelope. Aligned README + CHANGELOG (and skill separately).
- #20 `ft admin login --session <token>` (validated against GET /api/admin/me
  before saving), `ft admin logout`, `ft admin config` — no more hand-exporting
  FT_ADMIN_SESSION each session.

Plus a soft update notice: `ft` prints "update available" on stderr when a
newer @freeticket/cli is on npm — cached once/day, interactive TTY only, never
on --json/pipes/CI, opt out with FT_NO_UPDATE_CHECK=1. This is how a stale
install learns to upgrade (npx @latest users already get newest).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@lu-ochenty lu-ochenty merged commit 04f1239 into main Jul 2, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment