Skip to main content

Configure

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/', // paste Resource URL from DevTools Resource Details
  cloudLevel: 'ALERT',
  debug: false,
});
Set resource to the exact Resource URL shown on the DevTools Resource Details page. That URL works for both owned resources and resources shared with you.

Disable cloud forwarding

alshival.configure({ cloudLevel: 'NONE' });
Accepted cloudLevel values: DEBUG, INFO, WARNING, ERROR, ALERT, NONE.

Logging

const alshival = require('@alshival.ai/alshival');

alshival.log.info('local logging flow');
alshival.log.warning('forwarded when cloudLevel <= WARNING');
alshival.log.error('forwarded when cloudLevel <= ERROR');
alshival.log.alert('high-priority incident');

MCP tool descriptors

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: 'Review deployment risks in my repos.',
  tools,
});

Compatibility aliases

The Node SDK also exports Python-style aliases for compatibility:
  • mcp_tool (alias of mcpTool)
  • github_mcp_tool (alias of githubMcpTool)