โ ๏ธ Beta Release: This package is currently in beta. APIs may change before the stable release.
A powerful debugging and monitoring tool for Hono applications, inspired by Laravel Telescope. Monitor HTTP requests, exceptions, logs, and database queries with a beautiful web dashboard.
๐ Try it live! No installation needed. Test all features on our hosted example:
API Base URL:
https://hono-telescope-9lvpv.ondigitalocean.app
Currently Available:
Planned Features (Roadmap):
# Using npm
npm install hono-telescope
# Using yarn
yarn add hono-telescope
# Using pnpm
pnpm add hono-telescope
# Using bun
bun add hono-telescope
import { Hono } from 'hono';
import { setupTelescope } from 'hono-telescope';
const app = new Hono();
// Setup Telescope with default configuration
setupTelescope(app);
// Your routes
app.get('/', (c) => {
console.log('Home page accessed');
return c.json({ message: 'Hello World!' });
});
export default app;
Visit http://localhost:3000/telescope to access the dashboard.
๐ Complete Example: See src/example/index.ts for a full working example with all Telescope features including database query monitoring, multiple HTTP clients (fetch + Axios), and error handling.
Visit the live dashboard and test these endpoints:
API Base: https://hono-telescope-9lvpv.ondigitalocean.app
Run all endpoints at once with our test script:
# Download and run the test script
bash <(curl -s https://raw.githubusercontent.com/jubstaaa/hono-telescope/main/src/example/test-all-endpoints.sh)
Or if you have the repo cloned locally:
bash src/example/test-all-endpoints.sh
This will automatically test all endpoints and populate the Telescope dashboard with data! โจ
Users Management
# Get all users
curl https://hono-telescope-9lvpv.ondigitalocean.app/api/users
# Create a new user
curl -X POST https://hono-telescope-9lvpv.ondigitalocean.app/api/users \
-H "Content-Type: application/json" \
-d '{"name": "John Doe", "email": "john@example.com", "username": "johndoe"}'
# Get user by ID
curl https://hono-telescope-9lvpv.ondigitalocean.app/api/users/1
# Update user
curl -X PUT https://hono-telescope-9lvpv.ondigitalocean.app/api/users/1 \
-H "Content-Type: application/json" \
-d '{"name": "Jane Doe", "username": "janedoe"}'
# Delete user
curl -X DELETE https://hono-telescope-9lvpv.ondigitalocean.app/api/users/1
Database Operations (SQLite with Bun)
# Trigger database query
curl https://hono-telescope-9lvpv.ondigitalocean.app/api/health/db
External Requests (HTTP Interceptor)
# Trigger outgoing HTTP request (tested with Axios)
curl https://hono-telescope-9lvpv.ondigitalocean.app/api/external/request
Error Handling (Exception Tracking)
# Trigger an error
curl https://hono-telescope-9lvpv.ondigitalocean.app/api/error
Logging (Log Monitoring)
# Trigger log entries
curl https://hono-telescope-9lvpv.ondigitalocean.app/api/logs
After making requests, visit the Telescope Dashboard to see:
import { setupTelescope } from 'hono-telescope';
setupTelescope(app, {
enabled: true, // Enable/disable Telescope
path: '/telescope', // Dashboard path
max_entries: 1000, // Maximum entries to store
ignored_paths: ['/health'], // Paths to ignore
watchers: {
requests: true, // Monitor HTTP requests
exceptions: true, // Monitor exceptions
logs: true, // Monitor logs
queries: true, // Monitor database queries
},
});
Hono Telescope automatically intercepts and monitors queries from:
Queries are automatically captured with:
First, install dependencies:
bun install
Then build the project for the first time:
bun run build
Hono Telescope requires three separate processes running simultaneously for full development experience. Open three terminal windows:
Terminal 1 - TypeScript Compilation (Watch Mode)
bun run dev
This watches for TypeScript changes and compiles them to JavaScript.
Terminal 2 - Example Application
bun run dev:example
This starts the example Hono application with hot reload at http://localhost:3000
http://localhost:3000/api/...