Skip to content

fix: commit cmd/nock/main.go (gitignored by unanchored 'nock' rule) - #13

Merged
jessn-dev merged 1 commit into
mainfrom
fix/track-cmd-nock
Jun 29, 2026
Merged

fix: commit cmd/nock/main.go (gitignored by unanchored 'nock' rule)#13
jessn-dev merged 1 commit into
mainfrom
fix/track-cmd-nock

Conversation

@jessn-dev

@jessn-dev jessn-dev commented Jun 29, 2026

Copy link
Copy Markdown
Owner

fix: commit cmd/nock/main.go (gitignored by unanchored 'nock' rule)

Summary by CodeRabbit

  • New Features

    • Added a new single-binary command-line experience with support for interactive use, server mode, search, and command resolution.
    • Improved startup behavior so the app can open the main interface by default when no subcommand is provided.
    • Added support for passing variables into command resolution from the command line.
  • Bug Fixes

    • Tightened ignore rules so only the intended top-level nock directory is excluded from version control.

  The .gitignore binary rule 'nock' was unanchored, so it also matched the cmd/nock/
  directory — the program entry point was never committed. CI 'go build ./...' only
  sees tracked packages, so it passed; the release failed (couldn't find cmd/nock).
  Anchor the rule to /nock and add the missing main.go.
@jessn-dev
jessn-dev merged commit a051941 into main Jun 29, 2026
7 of 8 checks passed
@coderabbitai

coderabbitai Bot commented Jun 29, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: bdee2655-e445-4d2d-9130-6f7f7a540719

📥 Commits

Reviewing files that changed from the base of the PR and between baa4240 and 754678b.

📒 Files selected for processing (2)
  • .gitignore
  • cmd/nock/main.go

📝 Walkthrough

Walkthrough

Adds cmd/nock/main.go as the single-binary CLI entrypoint implementing subcommand dispatch (TUI, MCP, search, resolve) with shared engine initialization via loadEngine. Also anchors the .gitignore nock entry to the root directory.

Changes

nock CLI entrypoint

Layer / File(s) Summary
Top-level dispatch and engine loading
.gitignore, cmd/nock/main.go
run routes to TUI by default or dispatches --mcp, version, search, and resolve subcommands; loadEngine reads cheatsheets from $NOCK_CHEATSHEETS (fallback examples/cheatsheets) and constructs the engine; printUsage documents supported modes. .gitignore anchors the nock entry to the root.
Subcommand implementations
cmd/nock/main.go
cmdTUI parses --fire, loads history, and runs the TUI; cmdMCP starts the MCP stdio server; cmdSearch runs engine search and formats results; cmdResolve hand-parses --var flags in any position, validates input, fetches the command by id, resolves variables, and prints output.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/track-cmd-nock

Comment @coderabbitai help to get the list of available commands.

@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 0% with 115 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
cmd/nock/main.go 0.00% 115 Missing ⚠️

📢 Thoughts on this report? Let us know!

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.

3 participants