noidea

command module
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 3, 2025 License: MIT Imports: 1 Imported by: 0

README ΒΆ

🧠 noidea

Smart Git Assistant with AI-powered commits and sassy feedback

noidea banner

Go Version Made with noidea

Intelligent commit suggestions with a side of sass.
Be productive while being judged by a Moai.

Features β€’ Installation β€’ Usage β€’ Configuration β€’ Documentation β€’ Contributing

noidea is a lightweight Git extension that enhances your workflow with AI-powered features:

βœ… Smart Commit Message Suggestions - Get professional, conventional commit messages based on your staged changes
βœ… Git Commit Analysis - Receive insights about your commit patterns and code quality
βœ… Fun Feedback - Enjoy entertaining responses from a judgmental Moai after each commit

Every git commit becomes both more productive and more entertaining. Whether you need help crafting the perfect commit message or just want to be roasted for your 3 AM code, noidea has you covered.

Setup is quick and personalized with our interactive installation script that guides you through choosing your AI provider, default personality, and other preferences.

noidea in action

πŸ—Ώ What It Does

After every git commit, you'll see something like:

───────────────────────────────────────────────────
πŸ—Ώ  (ΰ² _ΰ² ) Your commit message was 'fix final final pls real'
"You've entered the 2AM hotfix arc. A legendary time."
───────────────────────────────────────────────────

Whether your code is clean or cursed, the Moai sees all.

And before committing, get AI-powered suggestions:

───────────────────────────────────────────────────
🧠 Analyzing staged changes and 10 recent commits
Generating professional commit message suggestion...
───────────────────────────────────────────────────
✨ Suggested commit message:
feat(user-auth): implement password reset functionality with email verification
───────────────────────────────────────────────────
πŸ‘€ See noidea in action

Commit Message Suggestions

Commit message suggestions

Post-Commit Moai Feedback

Moai feedback

Weekly Summary Analysis

Weekly summary

πŸš€ Getting Started

Installation Options

Choose one of these methods to install noidea:

1. Using the Installation Script (Recommended)
# Clone the repository
git clone https://github.com/AccursedGalaxy/noidea.git
cd noidea

# Run the installer (might need sudo)
./install.sh
# Or specify a custom location
./install.sh ~/bin

The installation script provides an interactive setup experience where you can configure:

  • AI provider selection (xAI, OpenAI, DeepSeek)
  • Default personality choice
  • Moai face selection mode
  • And other preferences

This is the recommended method as it ensures all components are properly configured.

2. One-Line Quick Installation
# Install to /usr/local/bin (may require sudo)
curl -sSL https://raw.githubusercontent.com/AccursedGalaxy/noidea/main/quickinstall.sh | bash

# Or with sudo for system-wide installation
curl -sSL https://raw.githubusercontent.com/AccursedGalaxy/noidea/main/quickinstall.sh | sudo bash
3. Using Make
# Clone the repository
git clone https://github.com/AccursedGalaxy/noidea.git
cd noidea

# Install to /usr/local/bin (default)
sudo make install
# Or specify a custom prefix
make install PREFIX=~/.local
4. Manual Installation
# Clone the repository
git clone https://github.com/AccursedGalaxy/noidea.git
cd noidea

# Build the binary
go build -o noidea

# Move it to a directory in your PATH
sudo cp noidea /usr/local/bin/
5. Pre-built Binaries (Coming Soon)

We'll soon provide pre-built binaries for various platforms on our releases page.

Setting Up In Your Repository

Once noidea is installed, you can set it up in any Git repository:

# Navigate to your repository
cd /path/to/your/repo

# Initialize noidea (sets up Git hooks)
noidea init

This adds a post-commit hook to show the Moai judgments after each commit.

For commit message suggestions, enable them during initialization or run:

# Enable commit suggestions
git config noidea.suggest true

Now, when you commit, noidea will suggest a message for you!

πŸ“‹ Features

noidea features overview
Post-Commit Feedback

Get immediate feedback after each commit with the Moai:

───────────────────────────────────────────────────
πŸ—Ώ  (ΰ² _ΰ² )  This is definitely the final fix
"You've typed 'final fix' 17 times today. I'm not judging. (I am.)"
───────────────────────────────────────────────────

Options:

  • --ai - Use AI to generate feedback (default: use config setting)
  • --diff - Include the diff in AI context for better analysis
  • --personality <n> - Personality to use for feedback
  • --history - Include recent commit history for context
  • --list-personalities - List available personalities

Example:

# Get AI-powered feedback with recent history context
noidea moai --ai --history
Weekly Summaries

Generate insightful summaries of your Git activity:

noidea summary

Options:

  • --days <N> - Analyze the last N days (default: 7)
  • --personality <n> - Use a specific personality for insights
  • --export <format> - Export to text, markdown, or HTML
  • --stats-only - Show only statistics without AI insights
  • --ai - Include AI insights (default: use config)

Example:

# Generate a 30-day summary with AI insights and export as markdown
noidea summary --days 30 --ai --export markdown
On-Demand Feedback

Get targeted analysis of specific commits with powerful filtering:

noidea feedback

Options:

  • --count <N> - Analyze last N commits (default: 5)
  • --author <n> - Filter by commit author
  • --branch <n> - Filter by specific branch
  • --files <list> - Filter by files touched (comma-separated)
  • --diff - Include diff context for deeper analysis
  • --personality <n> - Use a specific personality
  • --export <format> - Export to text, markdown, or HTML

Examples:

# Basic feedback on last 3 commits
noidea feedback --count 3

# Analyze commits affecting specific files
noidea feedback --files "src/main.go,pkg/utils"

# Analyze commits from a specific author
noidea feedback --author "Your Name"

# Use a supportive personality with diff context
noidea feedback --personality supportive_mentor --diff

# Export your feedback to share with the team
noidea feedback --export markdown
Commit Message Suggestions

Get AI-powered commit message suggestions based on your staged changes:

noidea suggest

Options:

  • --history <N> - Number of recent commits to analyze for context (default: 10)
  • --full-diff - Include full diff instead of summary
  • --interactive - Interactive mode to approve/reject suggestions
  • --file <path> - Path to commit message file (for hooks)

Note: Commit suggestions always use a professional conventional commit format, regardless of any personality settings used elsewhere in the tool.

Git Hook Integration:

  • Automatically suggests commit messages during the commit process
  • Easily enable with the included script:
    ./scripts/install-hooks.sh
    
    This installs the prepare-commit-msg hook and sets up your Git config with interactive prompts

Examples:

# Get a suggestion for your staged changes
noidea suggest

# Interactive mode to approve, regenerate, or edit suggestions
noidea suggest --interactive

# Consider more context from previous commits
noidea suggest --history 20

# Include the full diff for more detailed analysis
noidea suggest --full-diff

🧠 AI Integration

noidea supports AI-powered feedback using LLM providers that offer OpenAI-compatible APIs:

xAI

xAI (Grok)

OpenAI

OpenAI

DeepSeek

DeepSeek (coming soon)

To enable AI integration:

  1. Set your API key in an environment variable:

    # For xAI
    export XAI_API_KEY=your_api_key_here
    
    # For OpenAI
    export OPENAI_API_KEY=your_api_key_here
    
  2. Or create a .env file in your project directory or in ~/.noidea/.env

    XAI_API_KEY=your_api_key_here
    
  3. Run with the --ai flag or enable it permanently:

    # Run with the flag
    noidea moai --ai
    
    # Enable permanently 
    export NOIDEA_LLM_ENABLED=true
    
  4. Configure your model (optional):

    export NOIDEA_MODEL=grok-2-1212
    

πŸ€– AI Personalities

noidea supports multiple AI personalities to provide different types of feedback:

😈 Snarky Code Reviewer

A sarcastic, witty code reviewer that doesn't hold back

πŸ€— Supportive Mentor

Encouraging and positive feedback to keep you motivated

πŸ§‘β€πŸ’» Git Expert

Technical feedback based on Git best practices

πŸš€ Motivational Speaker

Over-the-top enthusiasm for your commits!

Note: Personalities affect post-commit feedback and analysis, but commit message suggestions (via noidea suggest) always use a professional format regardless of the selected personality.

Using personalities
# List available personalities
noidea moai --list-personalities

# Use a specific personality
noidea moai --ai --personality=supportive_mentor

# Set default personality in config
export NOIDEA_PERSONALITY=git_expert
Creating custom personalities

Create a personalities.toml file in your project or in ~/.noidea/ directory:

# Default personality to use
default = "my_custom_personality"

[personalities.my_custom_personality]
name = "My Custom Personality"
description = "A custom personality that fits my workflow"
system_prompt = """
Instructions for the AI on how to respond.
Keep it concise and clear.
"""
user_prompt_format = """
Commit message: "{{.Message}}"
Time of day: {{.TimeOfDay}}
{{if .Diff}}Commit diff summary: {{.Diff}}{{end}}

Provide feedback about this commit:
"""
max_tokens = 150
temperature = 0.7

Reference the example file at personalities.toml.example for more details.

πŸ”§ Configuration

noidea can be configured using environment variables, a .env file, or a TOML configuration file.

Using the config command

noidea provides a config command to help you manage your configuration:

# Show current configuration
noidea config --show

# Create a new configuration file interactively
noidea config --init

# Validate your configuration
noidea config --validate

# Specify a custom config path
noidea config --path /custom/path/config.toml --show
Configuration file

Default location: ~/.noidea/config.toml

Example configuration:

[llm]
enabled = true
provider = "xai"
api_key = "your_api_key_here"
model = "grok-2-1212"
temperature = 0.7

[moai]
use_lint = false
faces_mode = "random"
personality = "snarky_reviewer"
include_history = true
Environment variables

You can override any configuration setting using environment variables:

# LLM settings
export NOIDEA_LLM_ENABLED=true
export NOIDEA_MODEL=grok-2-1212
export NOIDEA_TEMPERATURE=0.5

# Moai settings
export NOIDEA_FACES_MODE=random
export NOIDEA_USE_LINT=false
export NOIDEA_PERSONALITY=snarky_reviewer
export NOIDEA_INCLUDE_HISTORY=true

# Provider API keys
export XAI_API_KEY=your_api_key_here
export OPENAI_API_KEY=your_api_key_here
export DEEPSEEK_API_KEY=your_api_key_here

πŸ“š Documentation

For more detailed information, check out our full documentation site.

We've created a comprehensive documentation site using GitHub Pages that includes:

  • Detailed tutorials
  • Command reference
  • Configuration guide
  • API documentation for integration
  • Troubleshooting tips
  • Advanced usage examples

πŸ’‘ Feature Status

Feature Status
Moai face after commit βœ… Done
AI-based commit feedback βœ… Done
Config file support βœ… Done
Weekly summaries βœ… Done
On-demand commit analysis βœ… Done
Commit message suggestions βœ… Done
Enhanced terminal output βœ… Done
POSIX-compatible hooks βœ… Done
Lint feedback πŸ› οΈ In progress
Commit streak insights πŸ”œ Coming Soon
Cross-platform releases πŸ”œ Coming Soon

🀯 Why tho?

Because Git is too serious. Coding is chaos. Let's embrace it.

πŸ§ͺ Contributing

Got Moai faces? Snarky commit messages? Cursed feedback ideas?

PRs are welcome. Open an issue or just drop a meme.

Check out our test suite in the tests/ directory to ensure your changes work as expected.

Contributing

πŸͺ¦ Disclaimer

This tool will not improve your Git hygiene. It will, however, make it more entertaining.

πŸ“¦ Releases & Versioning

noidea follows semantic versioning (SemVer) for predictable versioning:

  • Major: Incompatible API changes
  • Minor: Backwards-compatible new features
  • Patch: Backwards-compatible bug fixes
Creating a new release

There are two ways to create a new release:

1. Using the version script
# Show current version
./scripts/version.sh show

# Bump patch version (0.0.x)
./scripts/version.sh patch

# Bump minor version (0.x.0)
./scripts/version.sh minor

# Bump major version (x.0.0)
./scripts/version.sh major

The script will:

  1. Update version in source code
  2. Create a git commit and tag
  3. Offer to push changes and tag to GitHub
  4. GitHub Actions will automatically build and publish the release
2. Using GitHub Actions
  1. Go to the "Actions" tab in your GitHub repository
  2. Select the "Version Bump" workflow
  3. Click "Run workflow"
  4. Select the type of version bump (patch, minor, major)
  5. Click "Run workflow"

GitHub Actions will automatically:

  1. Update version in the source code
  2. Create a git commit and tag
  3. Push changes to GitHub
  4. Trigger the release workflow that builds and publishes the release
Docker Images

Each release is also published as a Docker image to GitHub Container Registry:

# Pull the latest version
docker pull ghcr.io/accursedgalaxy/noidea:latest

# Pull a specific version
docker pull ghcr.io/accursedgalaxy/noidea:v1.0.0

# Run noidea using Docker
docker run --rm -it -v $(pwd):/workspace -w /workspace ghcr.io/accursedgalaxy/noidea:latest init

Made with noidea and late-night energy.

GitHub stars GitHub forks GitHub issues

Documentation ΒΆ

The Go Gopher

There is no documentation for this package.

Directories ΒΆ

Path Synopsis
internal
config
Package config provides configuration management for the noidea tool.
Package config provides configuration management for the noidea tool.
git
moai
Package moai provides functions for generating Moai feedback with different personalities and moods.
Package moai provides functions for generating Moai feedback with different personalities and moods.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL