feat: session-first auth, ft admin login, empty-CSV headers, update notice (v0.7.0)#21
Merged
Merged
Conversation
…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 reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves the client-fixable open issues in one branch (contract already exposes everything needed; no golden-rule violation).
Changes
ft logout,ft config).--key/FT_API_KEYstay, framed as CI/headless only — so an agent never reads "No API key" as a cue to ask for or invent one.--csvlists keep their header row when columns are known, so a zero-result export still carries its schema. Covered byoutput.test.ts.--jsonon lists = data array,--raw={ data, page }envelope. Fixed the misleading 0.5.0 changelog entry and README flag table.ft admin login --session <token>(validated againstGET /api/admin/mebefore it's stored),ft admin logout,ft admin config. No more hand-exportingFT_ADMIN_SESSIONeach session (still supported for CI).Plus: update notification
ftprints a one-line⚠ Update availableon stderr when a newer@freeticket/cliis on npm — checked at most once/day (cached in~/.freeticket), interactive TTY only, never on--json/pipes/CI, opt out withFT_NO_UPDATE_CHECK=1. This is how a stale global install learns to upgrade;npx …@latestusers already run the newest.Verification
pnpm typecheck✓ ·pnpm lint✓ ·pnpm test✓ (9 tests) ·pnpm build✓ft admin --helpshows 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