Skip to content

chore(legacy): archive AI-based CLI implementation#2

Merged
lzif merged 1 commit intomasterfrom
main
Dec 14, 2025
Merged

chore(legacy): archive AI-based CLI implementation#2
lzif merged 1 commit intomasterfrom
main

Conversation

@lzif
Copy link
Copy Markdown
Owner

@lzif lzif commented Dec 14, 2025

No description provided.

@lzif lzif merged commit b75c38d into master Dec 14, 2025
1 of 2 checks passed
@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello @lzif, 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 represents a significant architectural pivot for the project, moving away from its previous AI-powered CLI implementation. The core purpose is to archive the existing AI-centric codebase, making way for a new, deterministic CLI generator. This change impacts the project's dependencies, build process, and overall functionality, setting the stage for a new direction without AI features.

Highlights

  • AI-based CLI Archival: The entire AI-based CLI implementation has been archived by moving all related source files, configuration, and tests into a new legacy/ directory. This includes commands, utilities, types, and the main entry point.
  • Project Redirection and Version Bump: The project's focus has shifted away from AI, as reflected in the package.json description change from 'AI-powered CLI assistant' to 'Deterministic CLI generator... no AI.' The version has been bumped to 2.0.0, signifying a major breaking change.
  • Dependency and Build Process Streamlining: All AI-specific dependencies (e.g., @google/generative-ai, ora, git-diff) have been removed from package.json. A new .releaserc.json has been added to manage automated releases, and the build script in package.json has been updated to use ESM format exclusively.
  • Main Entry Point Update: The primary src/index.ts file has been replaced with a simple placeholder message, indicating that the new version of the CLI is currently 'work in progress' and effectively disabling the old AI-based functionality from the main branch.
Ignored Files
  • Ignored by pattern: .github/workflows/** (2)
    • .github/workflows/ci.yml
    • .github/workflows/release.yml
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.

@lzif lzif deleted the main branch December 14, 2025 11:20
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 archives the previous AI-based implementation and prepares for a new version. While this is a good architectural change, the current implementation has several critical issues. The archived legacy code is broken because essential service files are deleted instead of moved. There are also bugs within the legacy code, including a missing break statement and an unsafe non-null assertion that will cause runtime crashes. Furthermore, a hardcoded API key was found in one of the deleted files, which poses a significant security risk and should be revoked immediately.

I am having trouble creating individual review comments. Click here to see my feedback.

legacy/src/index.ts (37-38)

critical

The switch statement is missing a break for the bikin-project case. This will cause an unintended fall-through to the bikin-docs case, executing it as well. Each case in a switch statement should typically end with a break to prevent this.

    case "bikin-project":
      await bikinProject(prompt, config, filepath);
      break;

legacy/src/index.ts (84)

critical

Using the non-null assertion operator (!) on prompt is unsafe here and can lead to a runtime crash. Some commands (like jelasin) do not have a required prompt argument, meaning validateArgs can return undefined for it. Using ! on an undefined value will throw a TypeError. To fix this, you should provide a fallback value, like an empty string, to ensure executeCommand always receives a string.

        await executeCommand(cmd.name, prompt || "", config, filepath);

src/services/ai.ts (1-65)

critical

This file, along with other files in the src/services/ directory (file.ts, logger.ts, parser.ts), is being deleted. However, the code that was moved into the legacy/ directory still has dependencies on these service files. For example, legacy/src/commands/bikin.ts imports this ai.ts service. Deleting these files will break the entire legacy application. To properly archive the old implementation, these service files should be moved to legacy/src/services/ instead of being deleted.

src/services/ai.ts (39)

security-critical critical

A hardcoded API key is present in the source code. This is a significant security vulnerability. Secrets like API keys should never be committed to version control. They should be managed through environment variables or a secure secret management system. Although this file is being deleted in this PR, the key is now exposed in the Git history and must be considered compromised. Please revoke this key immediately to prevent any potential misuse.

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.

1 participant