Skip to content

feat: history command, --json mode, logger factory#3

Merged
FrancescoSaverioZuppichini merged 1 commit intomainfrom
feat/history-json-logger
Feb 13, 2026
Merged

feat: history command, --json mode, logger factory#3
FrancescoSaverioZuppichini merged 1 commit intomainfrom
feat/history-json-logger

Conversation

@FrancescoSaverioZuppichini
Copy link
Copy Markdown
Member

@FrancescoSaverioZuppichini FrancescoSaverioZuppichini commented Feb 13, 2026

Summary

  • History command: interactive browsing with arrow keys, select to view details, "Load more" infinite scroll, positional <request-id> lookup, --json for piping
  • --json on all commands: suppresses banner, spinners, and prompts — only raw JSON on stdout, safe to pipe to jq / > file
  • Logger factory (log.create(quiet)): configure once, use everywhere — replaces scattered json flag passing and the old standalone log.result()/log.error() exports
  • README restructured: per-command sections with Usage + Examples, JSON Mode section before commands, contributor docs pushed to bottom

Test plan

  • tsc --noEmit passes
  • bun test — 30/30 tests pass
  • bun run build — clean build
  • bun run lint — no errors
  • Manual: just-scrape credits --json | jq '.'
  • Manual: just-scrape history smartscraper (interactive)
  • Manual: just-scrape history smartscraper --json | jq '.'

🤖 Generated with Claude Code

- Add `history` command with interactive browsing (arrow keys, select to view, "Load more" pagination), positional request ID lookup, and --json output
- Add `--json` flag to every command for clean pipeable output (suppresses banner, spinners, prompts)
- Refactor log.ts to factory pattern: `log.create(quiet)` returns a configured logger object — no scattered json checks
- Add `resolveApiKey(quiet)` to suppress output in JSON mode
- Banner auto-suppresses when --json is in argv
- Add HistorySchema, HISTORY_SERVICES, history() SDK function
- Restructure README: per-command sections with Usage + Examples, JSON Mode up front, contributor docs at bottom

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@FrancescoSaverioZuppichini FrancescoSaverioZuppichini merged commit 4936422 into main Feb 13, 2026
3 checks passed
@VinciGit00 VinciGit00 deleted the feat/history-json-logger branch February 13, 2026 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant