SDKs (Python + Node.js)
Cloud logging, MCP integrations, frontend tooling, and SSH workflows for production DevTools teams.
SDK Reference (Python + Node.js + curl)
Production Ready
Use the SDK for structured cloud logging and MCP tool-spec generation. Both SDKs support
ALERT, and both can disable cloud forwarding explicitly with NONE.
Use curl when you want direct HTTP control. For both SDK and curl, copy the Resource Details
Resource URL into ALSHIVAL_RESOURCE (owned or shared).
pip install git+https://github.com/Alshival-Ai/alshival.git@main
npm install @alshival.ai/alshival
Configuration
ALSHIVAL_USERNAME=your_username
ALSHIVAL_API_KEY=your_api_key
ALSHIVAL_RESOURCE=https://alshival.dev/u/resource_owner_username/resources/resource_uuid/
ALSHIVAL_CLOUD_LEVEL=INFO
ALSHIVAL_DEBUG=false
import alshival
alshival.configure(
username='your_username',
api_key='your_api_key',
resource='https://alshival.dev/u/resource_owner_username/resources/resource_uuid/',
cloud_level='ALERT',
debug=False,
)
# Disable cloud forwarding explicitly:
# alshival.configure(cloud_level='NONE')
const alshival = require('@alshival.ai/alshival');
alshival.configure({
username: 'your_username',
apiKey: 'your_api_key',
resource: 'https://alshival.dev/u/resource_owner_username/resources/resource_uuid/',
cloudLevel: 'ALERT',
debug: false,
});
// Disable cloud forwarding explicitly:
// alshival.configure({ cloudLevel: 'NONE' });
Cloud forwarding threshold values: DEBUG, INFO, WARNING, ERROR,
ALERT, NONE. Disable forwarding with NONE.
Log Shipping (Python / Node.js / curl)
import logging
import alshival
logging.basicConfig(level=logging.INFO)
alshival.configure(cloud_level='WARNING')
alshival.log.info('local only')
alshival.log.warning('local + cloud', extra={'service': 'api'})
alshival.log.alert('on-call alert', extra={'severity': 'high'})
const alshival = require('@alshival.ai/alshival');
alshival.configure({ cloudLevel: 'WARNING' });
alshival.log.info('local only');
alshival.log.warning('local + cloud', { extra: { service: 'api' } });
alshival.log.alert('on-call alert', { extra: { severity: 'high' } });
curl -X POST \
-H "Content-Type: application/json" \
-H "X-API-Key: $ALSHIVAL_API_KEY" \
-d '{
"logs": [
{
"level": "alert",
"message": "database latency threshold exceeded",
"ts": "2026-02-20T00:00:00+00:00",
"extra": {"service": "postgres", "p95_ms": 822}
}
]
}' \
"${ALSHIVAL_RESOURCE%/}/logs/"
MCP Tool Specs From SDK
Both SDKs expose helper builders that return OpenAI Responses-compatible MCP tool objects.
import alshival
from openai import OpenAI
client = OpenAI()
tools = [
alshival.mcp,
alshival.mcp.github,
]
response = client.responses.create(
model='gpt-5.2',
input='Summarize the latest issues in my repo.',
tools=tools,
)
const OpenAI = require('openai');
const alshival = require('@alshival.ai/alshival');
const client = new OpenAI();
const tools = [
alshival.mcp,
alshival.mcp.github,
];
const response = await client.responses.create({
model: 'gpt-5.2',
input: 'Summarize the latest issues in my repo.',
tools,
});
curl -sS https://mcp.alshival.ai/mcp/ \
-H "Content-Type: application/json" \
-H "X-API-Key: $ALSHIVAL_API_KEY" \
-H "X-User-Username: $ALSHIVAL_USERNAME" \
-d '{"jsonrpc":"2.0","id":"1","method":"tools/list","params":{}}'
curl -sS https://mcp.alshival.ai/github/ \
-H "Content-Type: application/json" \
-H "X-API-Key: $ALSHIVAL_API_KEY" \
-H "X-User-Username: $ALSHIVAL_USERNAME" \
-d '{"jsonrpc":"2.0","id":"1","method":"tools/list","params":{}}'
Set ALSHIVAL_API_KEY and ALSHIVAL_USERNAME (or ALSHIVAL_EMAIL) in env first.
Use github-mcp after linking your GitHub account in DevTools.