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

kraken-code-cli

v1.0.0

Published

Kraken Code — an AI coding agent CLI for JavaScript, TypeScript, and Python.

Readme

🐙 Kraken Code

An AI coding agent for your terminal — chat, generate, edit, explain, and refactor code in JavaScript, TypeScript, and Python.

Kraken Code is a modern command-line agent that connects to the Kraken AI proxy and gives you a beautiful, minimal interface to over 30 frontier models — without ever asking for an API key.


✨ Features

  • 💬 Interactive chat in your terminal with streaming responses
  • 🛠️ Rich tool set — read, write, patch, search, grep, move, delete, fetch URLs, run commands
  • 🧠 30+ models across OpenAI, Anthropic, Google, DeepSeek, xAI, Qwen, Kimi, Llama
  • 🎨 Beautiful UI — gradients, spinners, syntax highlighting, markdown rendering
  • 🔌 No API key required — points to the Kraken AI proxy out of the box
  • 📁 Project-aware — gitignore-aware file listing, attach files to context
  • Tool calling with automatic fallback for proxies that don't support it
  • 🧩 Clean architecture — separated commands, services, client, UI

📦 Installation

From source

git clone <your-repo-url> kraken-code
cd kraken-code
npm install
npm run build
npm link

Now kraken is available globally:

kraken --help

Local development

npm install
npm run dev -- chat

🚀 Quick start

# Start interactive chat
kraken

# Ask one question and exit
kraken ask "How do I write a TypeScript generic that constrains to objects?"

# Generate a new file
kraken generate src/utils/slugify.ts -p "create a slugify function with diacritics removal"

# Edit an existing file
kraken edit src/server.ts -p "add request logging middleware"

# Explain code
kraken explain src/core/agent.ts

# Get a code review
kraken review src/api/users.py

# Refactor a file
kraken refactor src/parser.js -p "convert to TypeScript with strict types"

# Browse and select models
kraken models
kraken models set

🧭 Commands

| Command | Description | |---|---| | kraken / kraken chat | Start the interactive chat REPL | | kraken ask <question> | One-shot question, prints answer and exits | | kraken generate <file> -p "..." | Generate a new file from a prompt | | kraken edit <file> -p "..." | Edit a file according to an instruction | | kraken explain <file> | Explain what a file does | | kraken review <file> | Get review suggestions for a file | | kraken refactor <file> -p "..." | Refactor a file with an instruction | | kraken models | List all available models | | kraken models set | Interactively pick the default model | | kraken config show | Show current configuration | | kraken config get <key> | Get a single config value | | kraken config set <key> <value> | Set a config value | | kraken config reset | Reset config to defaults | | kraken config path | Print the config file path |

Global flags

| Flag | Description | |---|---| | -m, --model <name> | Override model for this invocation | | -c, --cwd <path> | Working directory (defaults to current) | | --no-stream | Disable streaming | | --debug | Enable debug output | | -v, --version | Show version | | --help | Show help |

Slash commands inside chat

| Slash | Description | |---|---| | /help | Show available slash commands | | /model | Switch model mid-conversation | | /clear | Reset conversation history | | /files | List project files | | /add <file> | Attach a file to your next message | | /save <path> | Save the last response to a file | | /exit or /quit | Leave Kraken |


🤖 Available models

Kraken Code ships with the full Kraken AI gateway model catalogue:

OpenAIgateway-gpt-5, gateway-gpt-5-1, gateway-gpt-5-3, gateway-gpt-5-4, gateway-gpt-5-5, gateway-gpt-5-mini, gateway-gpt-5-nano, gateway-gpt-5-online, gateway-gpt-4o, gateway-gpt-4-1-mini, gateway-gpt-4-1-nano, gateway-o3, gateway-o3-mini, gateway-o4-mini

Anthropicgateway-claude-opus-4-7 (default), gateway-claude-opus-4-6, gateway-claude-opus-4-5, gateway-claude-opus-4-1, gateway-claude-sonnet-4, gateway-claude-sonnet-4-6

Googlegateway-gemini-3-1-pro, gateway-gemini-3-pro, gateway-gemini-2-5-pro, gateway-gemini-2-5-flash

DeepSeekgateway-deepseek-v4-pro, gateway-deepseek-v4-flash, gateway-deepseek-r1, gateway-deepseek-v3

xAIgateway-grok-4, gateway-grok-3

Alibabagateway-qwen-3-max, gateway-qwen-qwq-32b

Moonshotgateway-kimi-k2

Metagateway-llama-3-3-70b


⚙️ Configuration

Configuration lives at the platform-appropriate user config directory (run kraken config path to see it).

Default settings

| Key | Default | Description | |---|---|---| | endpoint | https://krakenai.onrender.com/v1 | Proxy base URL | | defaultModel | gateway-claude-opus-4-7 | Default model | | stream | true | Stream responses | | autoApproveWrites | false | Skip write confirmations | | autoApproveShell | false | Allow run_command tool to auto-execute | | maxContextFiles | 20 | Max files in project context | | maxContextBytes | 200000 | Max total context bytes | | timeoutMs | 120000 | HTTP timeout | | retries | 3 | Retry attempts on network/5xx errors | | theme | ocean | Color theme |

Examples

# Change the default model
kraken config set defaultModel gateway-gpt-5

# Point at a different proxy (e.g., self-hosted)
kraken config set endpoint https://my-proxy.example.com/v1

# Enable auto-approve for file writes (use with care)
kraken config set autoApproveWrites true

# Reset everything
kraken config reset

💡 Example workflows

Chat with a file attached

$ kraken
you › /add src/server.ts
✓ Attached src/server.ts (1842 chars)
you › Add error handling to the /users endpoint

Kraken will read the attached file, propose changes, and either render them as Markdown or call the write_file tool to update the file (with a diff + confirmation).

Generate a Python module

kraken generate scripts/csv_to_parquet.py \
  -p "convert a CSV file to a Parquet file using pyarrow, with CLI args via argparse"

Refactor JavaScript to TypeScript

kraken refactor src/legacy.js \
  -p "rewrite in strict TypeScript with proper types and ESM imports"

Code review

kraken review src/api/users.py

🧰 Built-in tools

The agent has access to the following tools. Each tool call is rendered in a colored box in the terminal so you can see exactly what the model is doing.

| Tool | Description | |---|---| | read_file(path) | Read a single file | | read_many_files(paths) | Read multiple files in one call | | list_files(directory?) | List project files (gitignore-aware) | | write_file(path, content) | Create/overwrite a file with diff + confirm | | apply_patch(path, search, replace) | Surgical search/replace edit | | search_files(pattern, glob?) | Regex search across files | | grep(query, glob?) | Find files containing a literal string | | create_directory(path) | Create a directory | | delete_file(path) | Delete a file (asks confirmation) | | move_file(from, to) | Move or rename a file | | fetch_url(url) | HTTP GET a URL | | run_command(cmd) | Run a shell command (off by default) |


🏗️ Architecture

src/
├── index.ts            # entry point
├── cli.ts              # Commander setup
├── commands/           # one file per command
├── core/
│   ├── agent.ts        # message + tool loop
│   ├── client.ts       # HTTP client (stream + non-stream)
│   ├── tools.ts        # tool definitions and handlers
│   ├── prompts.ts      # system + task prompts
│   └── context.ts      # project context building
├── config/             # defaults, model catalogue, persistent store
├── ui/                 # theme, banner, logger, spinner, markdown, diff, box
├── fs/                 # safe file reader, writer (diff + confirm), project walker
├── types/              # API + config types
└── utils/              # errors, language detection, token estimation

The Agent maintains the message history and runs a loop:

  1. Send messages (+ tool definitions) to the proxy
  2. If the model returns native tool_calls, execute them and feed results back
  3. If the proxy doesn't support tool calling, fall back to parsing JSON action blocks from the assistant text
  4. Stop when the model produces a final text reply

🛡️ Safety

  • No API key required — auth is handled by the proxy
  • Write confirmations — every file write shows a unified diff and prompts before applying
  • Path safety — all reads/writes are constrained to the working directory
  • Shell off by defaultrun_command requires explicit per-invocation confirmation unless autoApproveShell is enabled

🛣️ Roadmap

  • Multi-file refactors with patch planning
  • Project memory (persistent context across sessions)
  • Plugins / custom tools
  • Cost & token telemetry
  • Workspace-level .kraken.json config

📄 License

MIT © Kraken AI