JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 5
  • Score
    100M100P100Q54265F
  • License SEE LICENSE IN LICENSE

AI-powered coding assistant CLI

Package Exports

  • bioscode

Readme

Bioscode

AI-powered coding assistant CLI.

Installation

npm install -g bioscode

Requirements: Bun runtime

Usage

# Interactive mode
bioscode

# With initial message
bioscode "explain this codebase"

# Continue last session
bioscode -c

# Use specific model
bioscode -m anthropic/claude-sonnet-4-20250514

# Start HTTP server for VS Code extension
bioscode --port 50123

Commands

bioscode              Start interactive TUI
bioscode auth         Manage API credentials
bioscode config       Show configuration

Options

Option Description
-d, --debug Enable debug mode
-s, --session Continue specific session
-c, --continue Continue most recent session
-m, --model Model to use (provider/model)
--port <number> Start HTTP server on specified port (for VS Code extension)

VS Code Extension Communication

When started with --port, Bioscode runs an HTTP server for communication with the VS Code extension.

Architecture: HTTP + SSE

  • HTTP REST API: For requests (prompts, sessions, auth, permissions)
  • SSE (Server-Sent Events): For real-time streaming responses

API Endpoints

Endpoint Method Description
/health GET Health check
/events GET SSE stream for real-time events
/api/sessions GET List all sessions
/api/sessions POST Create a new session
/api/sessions/:id/messages GET Get messages for a session
/api/prompt POST Send a prompt to the LLM
/api/cancel POST Cancel active generation
/api/permission POST Respond to permission requests
/api/auth/status GET Check authentication status
/api/auth/providers GET List available LLM providers
/api/auth/credentials POST Save API key credential

SSE Events

The /events endpoint streams the following event types:

Event Description
heartbeat Keep-alive ping
message.start LLM generation started
message.delta Text content chunk
reasoning.delta Reasoning/thinking content chunk
message.complete LLM generation finished
tool.start Tool execution started
tool.complete Tool execution finished
permission.request Permission required for tool
session.updated Session metadata changed

Example: Connecting to SSE

const eventSource = new EventSource('http://localhost:50123/events');

eventSource.addEventListener('message.delta', (e) => {
  const data = JSON.parse(e.data);
  console.log('Content:', data.content);
});

eventSource.addEventListener('tool.start', (e) => {
  const data = JSON.parse(e.data);
  console.log('Tool:', data.toolName);
});

Publishing to npm

Prerequisites

  1. npm account with publish access
  2. Logged in: npm login
  3. Bun installed

Steps to Publish a New Version

1. Update Version

# Patch (0.1.0 -> 0.1.1)
npm version patch

# Minor (0.1.0 -> 0.2.0)
npm version minor

# Major (0.1.0 -> 1.0.0)
npm version major

2. Build & Verify

# Build (compiles + obfuscates)
bun run build

# Verify CLI works
bun ./dist/index.js --help

3. Preview Package Contents (IMPORTANT)

Always verify before publishing:

# List files that will be included
npm pack --dry-run

# Or create and inspect the tarball
npm pack
tar -tzf bioscode-*.tgz

Checklist - Verify these are NOT included:

  • src/ directory (source code)
  • test/ directory
  • *.ts files (except *.d.ts)
  • build.ts
  • tsconfig*.json
  • bun.lockb
  • .env or credentials

Checklist - Verify these ARE included:

  • dist/index.js (obfuscated)
  • dist/**/*.d.ts (type declarations)
  • LICENSE
  • NOTICE
  • package.json

4. Verify Obfuscation

# Check that code is obfuscated (should show hexadecimal variables)
head -c 500 dist/index.js

Expected output should look like:

var _0x12a874=_0x45ea;(function(_0x68ac43,_0x53f9ec){...

NOT readable code like:

import { something } from "./module"

5. Publish

# Publish to npm
npm publish --access public

# Or dry-run first
npm publish --access public --dry-run

6. Verify Published Package

# Check on npm
npm info bioscode

# Test installation
npm install -g bioscode
bioscode --version

Rollback (if needed)

# Unpublish within 72 hours
npm unpublish bioscode@0.1.1

# Deprecate (after 72 hours)
npm deprecate bioscode@0.1.1 "Critical bug, use 0.1.2"

Features

  • 🤖 Multi-LLM Support: Works with Anthropic Claude, OpenAI GPT, Google Gemini, and Groq
  • 🔐 Granular Permissions: Fine-grained control over file operations and command execution
  • 💬 Interactive Sessions: Save and resume conversations
  • ⚙️ Configurable: Hierarchical configuration system with JSONC support
  • 🔧 Extensible Tools: Read, write, edit files, execute commands, search code
  • 🎨 Terminal UI: Beautiful interactive interface built with Ink
  • 📡 VS Code Integration: HTTP + SSE server for VS Code extension

Development

# Run in dev mode
bun run dev

# Run tests
bun test

# Type check
bun run typecheck

Configuration

Create a bioscode.jsonc file in your project root or ~/.config/bioscode/bioscode.jsonc globally:

{
  "model": "claude-sonnet-4",
  "permission": {
    "edit": "ask",      // Always ask before editing files
    "bash": "auto"      // Execute commands automatically
  }
}

Configuration Options

Option Description Values
model Default LLM model claude-sonnet-4, gpt-4, gemini-pro, etc.
permission.edit Permission for editing files ask, auto, deny
permission.write Permission for creating files ask, auto, deny
permission.bash Permission for shell commands ask, auto, deny

License

Proprietary - See LICENSE for details.

Copyright (c) 2025 Carlos Alexis Gomez Ruiz. All rights reserved.