Skip to content

v0.3.0

Choose a tag to compare

@apstndb apstndb released this 08 Mar 20:05
· 25 commits to main since this release
bdf5106

New Features

  • --size-only flag for get and batch-get — print document sizes (bytes/lines) without content output, useful for checking sizes before reading into context
  • --key-only flag for create-api-key — print only the API key string for easy shell integration: export DEVELOPERKNOWLEDGE_API_KEY=$(dkcli create-api-key -p my-project --key-only)
  • Enriched create-api-key output — JSON/YAML output now includes full Key resource (restrictions, displayName, createTime, etc.); text output shows restricted API services; restrictions are logged to stderr
  • Document summary on get — stderr now shows document name, bytes, and lines on every get call

Improvements

  • Fix potential panic on empty document content (strings.HasSuffix replaces manual index check)
  • Decouple fetchSearchPage from global pageSize variable for better testability
  • Refactor outWriter to accept filename parameter, replace printFormatted/printText with explicit io.Writer threading
  • Add create-api-key help with Long description, examples, and gcloud escalation note
  • Update SKILL.md: document create-api-key, --frontmatter, --key-only, --size-only; improve error handling section with --key-only workflow
  • Add .gitignore entries for dkcli-workspace/ and skills-lock.json; remove stray --help/ directory

Tests

  • Add get_test.go — normalizeDocName, formatDocText, formatDocWithFrontmatter, document retrieval via httptest
  • Add search_test.go — fetchSearchPage with page token, page size, and API error handling
  • Add createapikey_test.go — resolveProjectID, quotaProjectTransport, extractAPITargets