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-8/

CLI Configuration Manager

Build a command-line configuration manager that supports multiple command-line flags and built-in slash commands for managing application settings interactively.

Requirements

Your configuration manager should:

  1. Command-line flags: Support the following flags when starting the application:

    • --config <path> or -c <path>: Load configuration from a specific file path (default: config.json)
    • --format <format> or -f <format>: Set output format (json or text, default: text)
    • --help or -h: Display help information and exit
  2. Interactive mode with slash commands: After processing flags, enter an interactive mode that accepts the following slash commands:

    • /help: Display available slash commands
    • /get <key>: Retrieve and display a configuration value
    • /set <key> <value>: Set a configuration value
    • /list: List all configuration keys and values
    • /quit: Exit the interactive mode
  3. Configuration persistence: Load configuration from the specified JSON file on startup

  4. Output formatting: When displaying configuration data, respect the --format flag

Test Cases

  • When launched with --help, it displays usage information including all available flags and exits @test
  • When launched with --config custom.json, it loads configuration from custom.json instead of the default @test
  • The /help command displays all available slash commands @test
  • The /set theme dark command stores "dark" as the value for key "theme" @test
  • The /get theme command retrieves and displays the previously set value "dark" @test
  • When --format json is set, the /list command outputs configuration as JSON @test

Implementation

@generates

API

/**
 * Parse command-line arguments and return configuration options
 */
export function parseArgs(args: string[]): CliOptions;

/**
 * Start the interactive CLI mode
 */
export function startInteractive(options: CliOptions): Promise<void>;

/**
 * Process a slash command in interactive mode
 */
export function processCommand(command: string, config: ConfigStore, format: 'json' | 'text'): string;

/**
 * Load configuration from file
 */
export function loadConfig(path: string): ConfigStore;

interface CliOptions {
  configPath: string;
  format: 'json' | 'text';
  showHelp: boolean;
}

interface ConfigStore {
  [key: string]: string;
}

Dependencies { .dependencies }

commander { .dependency }

Provides command-line argument parsing and flag handling.

@satisfied-by

Install with Tessl CLI

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

tile.json