CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-google--gemini-cli-core

Gemini CLI Core - Core functionality library for the open-source AI agent that brings the power of Gemini directly into your terminal.

Overall
score

87%

Evaluation87%

1.01x

Agent success when using this tile

Overview
Eval results
Files

task.mdevals/scenario-2/

AI Automation Utility

Build a command-line utility that executes AI prompts in non-interactive mode and processes responses programmatically for automation workflows.

Requirements

Your utility should accept a text prompt as input and interact with an AI assistant in a scriptable, non-interactive manner. The utility must:

  1. Accept a prompt via command-line arguments
  2. Execute the prompt in non-interactive mode (no user interaction required)
  3. Return structured JSON output containing the AI response and session metadata
  4. Support error handling for invalid inputs

Example usage:

node automation.js "What is 2+2?"

Should output JSON with the response:

{
  "session_id": "...",
  "response": "2+2 equals 4.",
  "stats": {...}
}

Test Cases

  • Given the prompt "What is 5+3?", the output is valid JSON containing a response field with the answer @test
  • Given the prompt "List two fruits", the output is valid JSON containing a response field with at least two fruit names @test
  • Given an empty string as a prompt, the utility exits with a non-zero status code @test

Implementation

@generates

API

/**
 * Executes an AI prompt in non-interactive mode
 * @param {string} prompt - The prompt to execute
 * @returns {Promise<{session_id: string, response: string, stats: object}>} Structured response with session data
 * @throws {Error} If the prompt is invalid or execution fails
 */
async function executePrompt(prompt) {
  // IMPLEMENTATION HERE
}

module.exports = { executePrompt };

Dependencies { .dependencies }

@google/gemini-cli { .dependency }

Provides AI agent CLI functionality for executing prompts in non-interactive mode with structured JSON output.

@satisfied-by

Install with Tessl CLI

npx tessl i tessl/npm-google--gemini-cli-core

tile.json