npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@ketoy/ketoy

v0.1.0

Published

AI-powered CLI for Ketoy — scaffold, write, migrate, diagnose, and build .ktx bundles for Android. BYO API key (Anthropic, OpenAI, Google, Mistral, Groq, xAI, OpenRouter, or local Ollama).

Readme

ketoy

AI-powered command-line agent for Ketoy — scaffold a Ketoy-enabled Android project, write @KetoyComposable screens, migrate existing Compose UI to .ktx bytecode bundles, diagnose compiler-plugin errors, and build / inspect bundles.

Powered by the Vercel AI SDK — bring your own API key from Anthropic, OpenAI, Google Gemini, Mistral, Groq, xAI, OpenRouter, or local Ollama. Source code never leaves your machine except as part of explicit prompts you send to the provider you chose.

npm install -g @ketoy/ketoy
ketoy auth anthropic     # paste your API key (never logged, stored 0600 in ~/.ketoy-cli)
ketoy init               # add Ketoy to your Android project (surgical edits)
ketoy chat               # open an AI session in the project root

The npm package is @ketoy/ketoy (the unscoped ketoy name is blocked by npm's similarity heuristic against unrelated existing packages). The installed binary is still ketoy.


Commands

ketoy init [--install-screen | --no-install-screen] [--hilt | --no-hilt] [-y] [--dry-run]
ketoy chat [prompt...]                                    # interactive agent
ketoy migrate <file>...                                   # AI-driven per-file Compose → KBC migration
ketoy doctor [task]                                       # run a Gradle task and diagnose any errors
ketoy build [--variant bundle|debug|release]              # `./gradlew :app:ketoyBundle --rerun-tasks`
ketoy analyze <path.ktx> [--manifest] [--strings] [--json]
ketoy config list|get|set
ketoy auth [provider] [--remove] [--list]
ketoy version

Every command runs in the current working directory. ketoy init only writes files when invoked from an Android project root (one containing settings.gradle.kts and app/build.gradle.kts).

Provider setup

ketoy auth anthropic              # set ANTHROPIC API key
ketoy auth openai                 # OpenAI
ketoy auth google                 # Google Gemini
ketoy auth mistral
ketoy auth groq
ketoy auth xai
ketoy auth openrouter             # one key, 200+ models
ketoy auth ollama                 # local — no API key, just a base URL
ketoy auth --list                 # see what's configured (redacted)

Then pick a default model:

ketoy config set model anthropic:claude-sonnet-4-5
ketoy config set model openai:gpt-4o
ketoy config set model google:gemini-2.0-flash-exp
ketoy config set model openrouter:meta-llama/llama-3.1-405b-instruct

Or override per-command with --model <provider>:<name>.

Credentials are stored at ~/.ketoy-cli/config.json (mode 0600). The CLI refuses to print them — ketoy config get apiKeys is intentionally blocked. Use ketoy auth --list for a redacted view.

Safety guarantees

  • No file is rewritten in full. Edits to build.gradle.kts, AndroidManifest.xml, MainActivity.kt, and Application classes are surgical — single-line additions or block appends at well-identified anchors. Existing dependencies, signing configs, themes, ProGuard rules are never touched.
  • Diff-and-confirm on every edit touching a high-risk file. The agent's edit_file tool always shows a unified diff and prompts before applying.
  • Idempotent — re-running ketoy init on an already-configured project is a no-op.
  • Allowlisted bash with hard refusal of compound commands for auto-approval. cat && rm -rf / looks like cat to a naive checker; the CLI refuses to auto-approve any command containing shell metacharacters (;, &&, ||, |, backticks, $(…), redirects).
  • No telemetry. No analytics, no usage reporting, no remote logging. The CLI talks directly to the provider you configured.

What ketoy init does

  1. Detects: namespace, applicationId, minSdk, Hilt usage, existing Application class, existing MainActivity.
  2. Hilt opt-in — non-Hilt setup is the default. If you opt in to Hilt, init aborts with a pointer to ketoy chat, where the agent handles Hilt configuration against your existing modules.
  3. KetoyScreen install opt-in--install-screen (default for fresh AS projects) wraps MainActivity's setContent body with KetoyScreen { /* native fallback */ } inside your app theme. --no-install-screen leaves MainActivity.kt untouched and prints a manual integration snippet.
  4. Plans a list of surgical edits + new file creations; shows the plan, asks to confirm.
  5. Applies the non-Hilt setup:
    • Inserts id("dev.ketoy.compiler") version "0.3.4-alpha" into app/build.gradle.kts's plugins block
    • Appends // Ketoy 0.3.4-alpha dependencies (BOM + runtime + annotations + capabilities-core + capabilities-navigation + adapters-material3)
    • Appends the ketoy { exportFromAppModule = true; bundleId = "main"; bundleVariant = "release"; … } block
    • Sets android:name=".MyApplication" on <application> in AndroidManifest.xml (only if no existing Application class)
    • Creates MyApplication.kt with the full bootstrap: KetoyConfig (sig verification, font / drawable / icon resolvers), CapabilityRegistry, KetoyRuntime, registerGeneratedAdapters / registerGeneratedConstructors, KetoyBundleLoader
    • Creates / surgically wraps MainActivity.kt<YourAppTheme> { CompositionLocalProvider(LocalKetoyRuntime / LocalKetoyBundleLoader) { KetoyScreen(entryPoint = "HelloKetoyScreen") { /* native fallback */ } } }
    • Creates HelloKetoyScreen.kt (sample @KetoyEntryPoint @KetoyComposable)
    • Creates app/ketoy-capabilities.json (empty)
    • Appends **/keys/*-private.key to .gitignore
  6. Saves project state to .ketoy/state.json so future commands know the layout.

Then: ./gradlew :app:assembleDebug, install, and you have a real KBC bundle running inside your APK.

Alpha-period version pinning

Ketoy 0.3.x's compiler plugin is built against a specific Kotlin / AGP / Compose BOM combination. ketoy init pins your gradle/libs.versions.toml to the required versions (Kotlin 2.0.21, AGP 8.13.2, Compose BOM 2024.10.00, plus matched AndroidX libs). These pins are temporary — ADR-0004 (Ketoy ships its own embedded Kotlin compiler) removes them.

Requirements

  • Node.js ≥ 20 (top-level await + modern fetch)
  • Android Gradle Plugin 8.x + Kotlin 2.0.21 + JDK 17 (auto-pinned during ketoy init)
  • minSdk ≥ 26

License

Apache 2.0 — see LICENSE.