bioscode
v0.1.20
Published
AI-powered coding assistant CLI
Downloads
1,405
Readme
Bioscode
AI-powered coding assistant CLI.
Installation
npm install -g bioscodeRequirements: 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 50123Commands
bioscode Start interactive TUI
bioscode auth Manage API credentials
bioscode config Show configurationOptions
| 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
PorterCode uses a unified publish workflow that handles both GitHub Releases (standalone executables) and npm publishing.
Prerequisites
- GitHub CLI:
ghinstalled and authenticated (gh auth login) - npm account: With publish access and 2FA enabled
- Bun: Runtime installed
Quick Publish (Recommended)
# Publish everywhere (GitHub Releases + npm)
bun run publish --version 0.1.11
# Preview without publishing
bun run publish --version 0.1.11 --dry-runPublish Options
| Command | Description |
|---------|-------------|
| bun run publish --version X.Y.Z | Publish to GitHub Releases and npm |
| bun run publish --version X.Y.Z --github | Only GitHub Releases (standalone executables) |
| bun run publish --version X.Y.Z --npm | Only npm registry |
| bun run publish --version X.Y.Z --dry-run | Preview changes without publishing |
What Gets Published
GitHub Releases (--github)
Standalone executables uploaded to bioscode-releases:
| Platform | File |
|----------|------|
| Windows x64 | bios-windows-x64.exe |
| Linux x64 | bios-linux-x64 |
| macOS Intel | bios-macos-x64 |
| macOS Apple Silicon | bios-macos-arm64 |
Plus install scripts: install-windows.bat, install.sh
npm Registry (--npm)
Obfuscated JavaScript package:
dist/index.js- Compiled and obfuscated codedist/**/*.d.ts- Type declarationsLICENSE,NOTICE,package.json
Source code (src/) is NOT published to npm.
Publish Workflow Steps
The unified publish command performs these steps:
- [1/4] Update version - Updates
package.jsonwith the new version - [2/4] Build executables - Compiles standalone binaries for all platforms (GitHub only)
- [3/4] GitHub Release - Creates release and uploads executables
- [4/4] npm Publish - Runs
npm login(for OTP) then publishes
Manual Publishing (Advanced)
If you need more control, use individual scripts:
# Build standalone executables only
bun run build-all-platforms.ts
# Upload to GitHub Releases only
bun run release.ts
bun run release.ts --draft # Create as draft
# Build npm package only
bun run buildVerify Published Package
# Check npm
npm info bioscode
# Test installation
npm install -g bioscode
bioscode --version
# Check GitHub release
gh release view v0.1.11 --repo Lupy-AI/bioscode-releasesRollback (if needed)
# npm: Unpublish within 72 hours
npm unpublish [email protected]
# npm: Deprecate (after 72 hours)
npm deprecate [email protected] "Critical bug, use 0.1.12"
# GitHub: Delete release
gh release delete v0.1.11 --repo Lupy-AI/bioscode-releases --yesFeatures
- 🤖 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 typecheckConfiguration
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.
