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

@hyperb1iss/q

v0.9.3

Published

The tiniest Claude Code CLI — ask, pipe, chat

Readme

q

The tiniest Claude Code CLI — ask, pipe, chat

npm License TypeScript Bun Claude ko-fi

One letter. Infinite answers.

Quick StartModesShell IntegrationConfigurationSessions


q is a minimal, elegant CLI for Claude. Ask your question, get back to work.

⚡ Quick Start

# Install
npm i -g @hyperb1iss/q

# Set your API key
export ANTHROPIC_API_KEY="sk-ant-..."

# Ask anything
q "how do I find large files in this directory"

That's it. You're running.

💎 Modes

| Mode | Trigger | What It Does | | --------------- | ------------------------- | -------------------------------------- | | Query | q "question" | Quick answer, streamed to terminal | | Pipe | cat file \| q "convert" | Transform piped content, raw output | | Interactive | q -i | TUI chat with full context | | Agent | q -x "task" | Execute with tools (read, write, bash) |

💬 Query Mode

The default. Ask a question, get an answer.

q "what does the -z flag do in bash test expressions"
q "write a regex to match email addresses"
q "explain this error" < error.log

🔀 Pipe Mode

A true Unix pipeline citizen. Pipe content in, get raw output back.

# Transform data formats
cat config.yaml | q "convert to json" > config.json

# Extract information
cat server.log | q "extract all IP addresses" | sort -u

# Analyze and chain
git diff | q "summarize" | q "translate to spanish"

Pipe mode features:

  • Raw output — no markdown, no code blocks, just content
  • Exit codes — 0 on success, 1 on failure
  • Read-only tools — can read local files for context
  • Silent — errors go to stderr, content to stdout

🖥️ Interactive Mode

Full TUI for back-and-forth conversations.

q -i                    # Start fresh
q -r last               # Resume last session
q -r abc123             # Resume specific session

🤖 Agent Mode

Let Claude execute tools to complete tasks.

# Read-only tools auto-approved (Read, Glob, Grep)
q -x "find all TODO comments in this project"

# Write tools prompt for approval (Bash, Write, Edit)
q -x "refactor this function to use async/await"

Tool approval shows risk level:

⚠ Bash [low]
  Runs a shell command
  $ ls -la src/

Allow? [y]es / [n]o / [a]lways:

🦋 Shell Integration

Source the shell integration for enhanced context:

# Add to ~/.zshrc, ~/.bashrc, or ~/.config/fish/config.fish
eval "$(q --shell-init zsh)"   # or bash, fish

This gives you:

| Command | What It Does | | ------- | --------------------------------------- | | qq | Quick query (or interactive if no args) | | qctx | Query with last command context | | qerr | Explain last error | | qx | Execute mode with tools | | qr | Resume last session | | Ctrl+Q | Quick query widget |

# With shell integration
$ make build
error: missing dependency...

$ qerr
# Automatically includes the failed command and error output

⚙️ Configuration

Create q.config.ts in your project or ~/.config/q/:

import { defineConfig } from '@hyperb1iss/q/config';

export default defineConfig({
  // Default model: 'sonnet' | 'opus' | 'haiku'
  model: 'sonnet',

  // Safety settings
  safety: {
    confirmDestructive: true,
    maxCostPerQuery: 0.5,
    maxInputSize: 100000,
    blockedCommands: ['rm -rf /', 'dd if='],
  },

  // Prompt aliases
  prompts: {
    explain: 'Explain this code in simple terms:',
    review: 'Review this code for bugs and improvements:',
  },
});

Or use environment variables:

export ANTHROPIC_API_KEY="sk-ant-..."  # Required
export Q_CONFIG="/path/to/config.ts"   # Optional

🧪 Sessions

q automatically saves conversations for later resume.

# List recent sessions
q --sessions

# Resume most recent
q -r last

# Resume by ID
q -r abc123def456

Sessions include message history, token usage, and cost tracking.

🪄 CLI Reference

q [query]              Ask a question
q -i, --interactive    TUI mode
q -x, --execute        Agent mode with tools
q -r, --resume <id>    Resume session (or "last")
q -m, --model <model>  Model: sonnet, opus, haiku
q -s, --stream         Stream output (default: true)
q -v, --verbose        Show token/cost stats
q -q, --quiet          Response only, no formatting
q --raw                No markdown formatting
q --color <mode>       Color: auto, always, never
q --sessions           List recent sessions
q --shell-init <shell> Output shell integration script

💜 Accessibility

q respects the NO_COLOR standard and provides explicit color control:

q --color never "question"     # Disable colors
NO_COLOR=1 q "question"        # Same effect

🛠️ Development

# Install dependencies
bun install

# Run in development
bun run dev

# Build
bun run build

# Run tests
bun test

# Type check
bun run typecheck

# Lint & format
bun run check

⚖️ License

MIT


Created by Stefanie Jane 🌠

If you find q useful, buy me a Monster Ultra Violet! ⚡️