Skip to content

Feat/cli improvements#25

Merged
MarvelNwachukwu merged 5 commits intomainfrom
feat/cli-improvements
Feb 19, 2026
Merged

Feat/cli improvements#25
MarvelNwachukwu merged 5 commits intomainfrom
feat/cli-improvements

Conversation

@MarvelNwachukwu
Copy link
Copy Markdown
Contributor

@MarvelNwachukwu MarvelNwachukwu commented Feb 19, 2026

This pull request focuses on enhancing the ADK Claw CLI with new commands for interacting with the agent, managing configuration, and running health checks. It also includes some codebase refactoring to improve maintainability and remove unused code. The new CLI commands provide a more user-friendly way to interact with the ADK Claw agent and manage its configuration.

Highlights
CLI Enhancements: This PR introduces new CLI commands for interacting with the ADK Claw agent, including a chat interface, configuration management, and health checks.
Configuration Management: The config command allows users to view and update the ADK Claw configuration, including the AI model, API key, and Telegram bot token.
Health Checks: The doctor command runs health checks on the ADK Claw configuration, verifying the existence of required files, the validity of the configuration, and the reachability of external APIs.
Codebase Refactoring: This PR refactors the codebase to improve maintainability and remove unused code, such as the SessionManager service.

MarvelNwachukwu and others added 4 commits February 19, 2026 12:19
SessionManager.ts was deleted but its entry remained in CODEBASE.md.
Also corrected CLAUDE.md: memory starter files (facts.md etc.) do not
exist as templates — ADK MemoryService creates them automatically.
Removed outdated Known Issues entry about memoryTools.ts.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Delete buildSystemPromptWithSkills() — skill prompt building is done
  inline in agent.ts; function was unused
- Refactor addInstalledSkill/removeInstalledSkill to use updateConfig()
  instead of manual readFileSync/JSON.parse/writeFileSync blocks
- Replace hardcoded test prompt in src/index.ts with a brief message
  directing users to `adk-claw chat` or `adk-claw start`

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Moves the model list out of init.ts into src/lib/models.ts so the
upcoming config command can reuse it without duplication.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- chat: interactive terminal loop with /help, /new, /exit slash commands
- config show: prints current config with secrets masked (last 4 chars)
- config set model|api-key|bot-token: interactive update via prompts
- doctor: 11 health checks (config, workspace, API key formats, Telegram
  and OpenRouter connectivity); exits 1 on critical failures
- Update splash screen with the three new commands
- Fix Docs URL (was same as GitHub; now points to #readme anchor)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello @MarvelNwachukwu, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request focuses on enhancing the ADK Claw CLI with new commands for interacting with the agent, managing configuration, and running health checks. It also includes some codebase refactoring to improve maintainability and remove unused code. The new CLI commands provide a more user-friendly way to interact with the ADK Claw agent and manage its configuration.

Highlights

  • CLI Enhancements: This PR introduces new CLI commands for interacting with the ADK Claw agent, including a chat interface, configuration management, and health checks.
  • Configuration Management: The config command allows users to view and update the ADK Claw configuration, including the AI model, API key, and Telegram bot token.
  • Health Checks: The doctor command runs health checks on the ADK Claw configuration, verifying the existence of required files, the validity of the configuration, and the reachability of external APIs.
  • Codebase Refactoring: This PR refactors the codebase to improve maintainability and remove unused code, such as the SessionManager service.
Changelog
  • CLAUDE.md
    • Removed memory file templates from the file structure description.
    • Updated the description of the init process to reflect the creation of empty memory/ and skills/ directories.
    • Removed the 'Memory tools in src/tools/memoryTools.ts has uncommitted changes' item from the Known Issues section.
  • CODEBASE.md
    • Removed the SessionManager service description.
    • Updated the list of files in src/services/TelegramService.ts to remove SessionManager.ts.
  • src/agents/config/agent.config.ts
    • Removed the buildSystemPromptWithSkills function and the import of buildSkillsPrompt.
  • src/cli/chat.ts
    • Added a new CLI command for interactive terminal chat with the agent.
  • src/cli/config.ts
    • Added a new CLI command for viewing and updating configuration.
  • src/cli/doctor.ts
    • Added a new CLI command for running health checks on ADK Claw configuration.
  • src/cli/index.ts
    • Added new CLI commands to the main CLI entry point.
    • Added a splash screen with the ADK Claw logo and available commands.
  • src/cli/init.ts
    • Imported OPENROUTER_MODELS from ../lib/models.js.
  • src/config/index.ts
    • Imported updateConfig from ../lib/configWriter.js.
    • Replaced direct config file manipulation with the updateConfig function in addInstalledSkill and removeInstalledSkill.
  • src/index.ts
    • Removed the main function and replaced it with a simple message to use adk-claw chat or adk-claw start.
  • src/lib/models.ts
    • Added a shared OpenRouter model list used by init and config commands.
Activity
  • New CLI commands added: chat, config, and doctor.
  • SessionManager service removed.
  • Configuration management improved with new CLI commands.
  • Health checks added to verify ADK Claw configuration.
  • Codebase refactored for better maintainability.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request significantly enhances the CLI by introducing chat, config, and doctor commands, which greatly improve the project's usability and manageability. The refactoring to centralize configuration logic and model definitions is also a welcome improvement for maintainability. I've identified a critical issue regarding a missing import that would cause a runtime crash, along with several suggestions to improve code quality and consistency, including adjusting the severity of two critical health checks. Please also note that the printHelp function in src/cli/index.ts should be updated to include the new commands, though this was outside the changed lines of the diff.

const args = process.argv.slice(2);
const command = args[0];

const LOGO = `
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

The LOGO and printSplash function use pc from picocolors and a VERSION constant, but they are not imported or defined in this file. This will cause a ReferenceError at runtime.

Please add the necessary imports at the top of the file, for example:

import pc from 'picocolors';
// And the import for VERSION if it's not globally available.

check(
"Telegram API reachable",
json.ok === true,
false,
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

The health check for Telegram API reachability is marked as non-critical. Since the agent cannot function without being able to communicate with Telegram, this should be considered a critical failure.

Suggested change
false,
true,

check(
"OpenRouter API reachable",
res.ok,
false,
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

Similar to the Telegram check, the agent's ability to reach the OpenRouter API is essential for its core functionality. This check should be marked as critical.

Suggested change
false,
true,

Comment on lines +18 to +41
function printSplash() {
console.log(LOGO);
console.log();
console.log(
pc.dim(" Personal AI assistant with memory, Telegram & skills."),
);
console.log();
console.log(pc.dim(` v${VERSION}`));
console.log();
console.log(` ${pc.magenta("init")} Create a new ADK Claw project`);
console.log(` ${pc.magenta("start")} Start the AI agent`);
console.log(
` ${pc.magenta("chat")} Chat with the agent in your terminal`,
);
console.log(` ${pc.magenta("config")} View and update configuration`);
console.log(` ${pc.magenta("doctor")} Run health checks`);
console.log(` ${pc.magenta("skill")} Manage agent skills`);
console.log(` ${pc.magenta("service")} Manage the systemd user service`);
console.log(` ${pc.magenta("pairing")} Manage Telegram user pairing`);
console.log();
console.log(pc.dim(` Docs: https://github.com/IQAIcom/adk-claw#readme`));
console.log(pc.dim(` GitHub: https://github.com/IQAIcom/adk-claw`));
console.log();
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The printSplash function is defined but never called. It provides a great overview of the available commands and seems intended as the default view when the CLI is run without arguments. Consider calling this function from main() when no command is provided to improve the user's first experience.

Comment on lines +13 to +16
if (!existsSync(CONFIG_PATH)) {
p.log.error("ADK Claw is not initialized. Run 'adk-claw init' first.");
process.exit(1);
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This logic to check for the existence of config.json is repeated in several of the new CLI command files (e.g., chat.ts, config.ts). To improve maintainability and reduce duplication, consider extracting this into a shared utility function.

For example, you could create a function ensureConfigExists() in a shared utility file:

// in a shared lib/cli-utils.ts file
import { existsSync } from 'node:fs';
import { join } from 'node:path';
import * as p from '@clack/prompts';

export function ensureConfigExists() {
  const CONFIG_PATH = join(process.cwd(), '.adk-claw', 'config.json');
  if (!existsSync(CONFIG_PATH)) {
    p.log.error("ADK Claw is not initialized. Run 'adk-claw init' first.");
    process.exit(1);
  }
}

Then you can just call ensureConfigExists() at the start of each command function that requires it.

@MarvelNwachukwu MarvelNwachukwu merged commit a6c556e into main Feb 19, 2026
1 check failed
@MarvelNwachukwu MarvelNwachukwu linked an issue Feb 23, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement branded welcome banner for bare adk-claw command

1 participant