Skip to content

update readme#60

Open
yashdev9274 wants to merge 2 commits intomainfrom
supercli-#2
Open

update readme#60
yashdev9274 wants to merge 2 commits intomainfrom
supercli-#2

Conversation

@yashdev9274
Copy link
Owner

@yashdev9274 yashdev9274 commented Feb 28, 2026

Summary by CodeRabbit

  • New Features
    • Added a lightweight local server component with a simple health endpoint to verify it's running.
  • Documentation
    • Added server setup and usage instructions.
    • Added migration/usage guide for the chosen runtime and tooling.
    • Minor README content added.
  • Chores
    • Added project configuration and ignore rules to support server development and tooling.

@vercel
Copy link

vercel bot commented Feb 28, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
supercli Ready Ready Preview, Comment Mar 6, 2026 1:46pm
supercli-docs Ready Ready Preview, Comment Mar 6, 2026 1:46pm

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

@coderabbitai
Copy link

coderabbitai bot commented Feb 28, 2026

Walkthrough

Adds a new Bun/Node-compatible server app under apps/supercode-cli/server/ (config, package.json, TypeScript server entry), new docs (CLAUDE.md, README.md), a .gitignore, and a small README content change at repository root.

Changes

Cohort / File(s) Summary
Root README
README.md
Appends two blank lines and an HTML comment <!-- comment for testing 1 --> at EOF.
Server app - config & tooling
apps/supercode-cli/server/package.json, apps/supercode-cli/server/tsconfig.json, apps/supercode-cli/server/.gitignore
Adds project metadata, scripts (dev/start/build/typecheck), strict TypeScript config tuned for bundler workflows, and a .gitignore covering node_modules, build outputs, env files, caches, IDE files.
Server app - docs
apps/supercode-cli/server/CLAUDE.md, apps/supercode-cli/server/README.md
Adds Bun-focused migration/usage guide (CLAUDE.md) and a server README with install/run instructions referencing Bun.
Server app - source
apps/supercode-cli/server/src/index.ts
Adds a minimal Express TypeScript entrypoint: loads dotenv, reads PORT (default 3004), mounts GET /handle returning "OK", and starts the server with a console log.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 A tiny server sprouts, with Bun in the sun,
New docs and a README — the work's just begun.
A comment at root, and a route that says "OK",
I hop through the changes and nibble some doc clay. 🥕

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'update readme' is too vague and does not accurately reflect the main changes. The PR contains multiple significant additions including a new server setup with Express, TypeScript configuration, package.json, .gitignore, and documentation files—far beyond just updating a readme. Use a more descriptive title that captures the primary change, such as 'Add Express server setup for supercode-cli' or 'Initialize Node.js server with TypeScript and Express configuration'.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch supercli-#2

Tip

Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs).
Share your feedback on Discord.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
README.md (1)

377-377: Remove temporary testing comment from README.

<!-- comment for testing 1 --> looks like a debug/test artifact and should be removed before merge to keep docs clean and professional.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@README.md` at line 377, Remove the temporary HTML comment "<!-- comment for
testing 1 -->" from the README so the file contains no leftover test/debug
artifacts; locate the exact string in the README content and delete that comment
line, then save and commit the cleaned README.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@README.md`:
- Line 377: Remove the temporary HTML comment "<!-- comment for testing 1 -->"
from the README so the file contains no leftover test/debug artifacts; locate
the exact string in the README content and delete that comment line, then save
and commit the cleaned README.

ℹ️ Review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 43bd4ef and d18acb4.

📒 Files selected for processing (1)
  • README.md

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@apps/supercode-cli/server/.gitignore`:
- Around line 13-16: Replace the incorrect glob entries in the .gitignore:
change the literal '_.log' entry to '*.log' so all .log files are ignored, and
replace the malformed crash-report pattern
'report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json' with a proper wildcard pattern such as
'report.*_*_*_*.json' so generated crash-report files are matched; update these
two entries in apps/supercode-cli/server/.gitignore.

In `@apps/supercode-cli/server/CLAUDE.md`:
- Around line 15-20: The CLAUDE.md guidance conflicts with the scaffolded server
which currently imports and uses dotenv and Express (see the imports in the
server's index.ts: the dotenv import and express usage), so either update
CLAUDE.md to document the current scaffold (mention that this package uses
dotenv and Express and why) or change the scaffold to Bun-native APIs: remove
the dotenv import and use Bun.env/Bun.serve instead of Express app/Server setup
and replace SQLite usage with bun:sqlite if applicable; ensure you update or
remove references to dotenv and express in index.ts and align the README entry
accordingly.

In `@apps/supercode-cli/server/src/index.ts`:
- Around line 6-14: Normalize and validate the PORT before calling app.listen:
replace the current loose use of process.env.PORT by parsing it to a number
(e.g., via Number.parseInt or Number()), check isFinite/isNaN and ensure the
numeric value is within 0–65535, fallback to 3004 if empty, and on invalid
values log a clear error via console.error (or processLogger) and exit
(process.exit(1)). Update the existing port variable and ensure app.listen
receives the validated numeric port (and not the raw string) so the server never
starts with a malformed port.

In `@apps/supercode-cli/server/tsconfig.json`:
- Around line 12-15: The project-wide tsconfig.json sets "noEmit": true which
prevents tsc from producing JavaScript so the "build" script in package.json
only type-checks; fix by either removing "noEmit" from tsconfig.json or override
it in the CLI server's package.json build script (e.g., change the "build"
script to run tsc with emission enabled) so that running the build for the
server actually emits JS; look for the "noEmit" option in tsconfig.json and the
"build" script in apps/supercode-cli/server/package.json to apply the change.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 9d6b4764-c507-4a86-a6f3-b55afed36c7e

📥 Commits

Reviewing files that changed from the base of the PR and between d18acb4 and 2914905.

⛔ Files ignored due to path filters (1)
  • apps/supercode-cli/server/bun.lock is excluded by !**/*.lock
📒 Files selected for processing (6)
  • apps/supercode-cli/server/.gitignore
  • apps/supercode-cli/server/CLAUDE.md
  • apps/supercode-cli/server/README.md
  • apps/supercode-cli/server/package.json
  • apps/supercode-cli/server/src/index.ts
  • apps/supercode-cli/server/tsconfig.json
✅ Files skipped from review due to trivial changes (2)
  • apps/supercode-cli/server/README.md
  • apps/supercode-cli/server/package.json

Comment on lines +13 to +16
# logs
logs
_.log
report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Fix the log-file globs.

_.log only matches a literal underscore filename, and the crash-report pattern is missing *. Most generated logs will still show up as untracked.

🧹 Proposed fix
 # logs
 logs
-_.log
-report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json
+*.log
+report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
# logs
logs
_.log
report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json
# logs
logs
*.log
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/supercode-cli/server/.gitignore` around lines 13 - 16, Replace the
incorrect glob entries in the .gitignore: change the literal '_.log' entry to
'*.log' so all .log files are ignored, and replace the malformed crash-report
pattern 'report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json' with a proper wildcard pattern
such as 'report.*_*_*_*.json' so generated crash-report files are matched;
update these two entries in apps/supercode-cli/server/.gitignore.

Comment on lines +15 to +20
- Bun automatically loads .env, so don't use dotenv.

## APIs

- `Bun.serve()` supports WebSockets, HTTPS, and routes. Don't use `express`.
- `bun:sqlite` for SQLite. Don't use `better-sqlite3`.
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

# First, let's see if the file structure exists and read CLAUDE.md
find . -path "*/apps/supercode-cli/server/CLAUDE.md" -type f

Repository: yashdev9274/supercli

Length of output: 101


🏁 Script executed:

# Also check for index.ts
find . -path "*/apps/supercode-cli/server/src/index.ts" -type f

Repository: yashdev9274/supercli

Length of output: 104


🏁 Script executed:

# List the directory structure to understand the layout
ls -la apps/supercode-cli/server/ 2>/dev/null || echo "Directory not found"

Repository: yashdev9274/supercli

Length of output: 598


🏁 Script executed:

# Read CLAUDE.md to see the Bun guidance at lines 15-20
cat -n apps/supercode-cli/server/CLAUDE.md

Repository: yashdev9274/supercli

Length of output: 3518


🏁 Script executed:

# Read the first 10 lines of index.ts to check imports
head -10 apps/supercode-cli/server/src/index.ts

Repository: yashdev9274/supercli

Length of output: 255


Align the Bun guidance with the scaffolded server.

This file says not to use dotenv or express, but apps/supercode-cli/server/src/index.ts already imports and uses both (lines 1-4). That contradiction will push future changes away from the current implementation. Either update this guide for this package or convert the scaffold to Bun-native APIs.

📝 One way to soften the guidance
-- Bun automatically loads .env, so don't use dotenv.
+- Prefer Bun's built-in .env loading for new services; only keep `dotenv` where existing code still depends on it.

 ## APIs

-- `Bun.serve()` supports WebSockets, HTTPS, and routes. Don't use `express`.
+- Prefer `Bun.serve()` for new services. Existing Express servers in this repo are allowed unless they are being migrated.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/supercode-cli/server/CLAUDE.md` around lines 15 - 20, The CLAUDE.md
guidance conflicts with the scaffolded server which currently imports and uses
dotenv and Express (see the imports in the server's index.ts: the dotenv import
and express usage), so either update CLAUDE.md to document the current scaffold
(mention that this package uses dotenv and Express and why) or change the
scaffold to Bun-native APIs: remove the dotenv import and use Bun.env/Bun.serve
instead of Express app/Server setup and replace SQLite usage with bun:sqlite if
applicable; ensure you update or remove references to dotenv and express in
index.ts and align the README entry accordingly.

Comment on lines +6 to +14
const port = process.env.PORT || 3004;
const app = express();

app.get("/handle", (req, res)=>{
res.send("OK")
})

app.listen(port, () => {
console.log(`Server is running on port ${port}`);
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

# Check the file exists and read the full context
head -30 apps/supercode-cli/server/src/index.ts

Repository: yashdev9274/supercli

Length of output: 340


🏁 Script executed:

# Search for any existing PORT validation or parsing in the codebase
rg -i "port" apps/supercode-cli/server/src/ -A 2 -B 2

Repository: yashdev9274/supercli

Length of output: 800


🏁 Script executed:

# Check if dotenv is imported and configured
rg "dotenv" apps/supercode-cli/server/src/ -A 2

Repository: yashdev9274/supercli

Length of output: 345


Normalize and validate PORT before startup.

process.env.PORT is a string and flows unchecked into listen(). Malformed values like "abc" or out-of-range ports like "99999" won't fail at parse time. Convert to a number and validate the range (0–65535) once during initialization.

🔧 Proposed fix
 dotenv.config();
 
-const port = process.env.PORT || 3004;
+const rawPort = process.env.PORT;
+const port = rawPort ? Number(rawPort) : 3004;
+if (!Number.isInteger(port) || port < 0 || port > 65535) {
+  throw new Error(`Invalid PORT: ${rawPort}`);
+}
 const app = express();
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/supercode-cli/server/src/index.ts` around lines 6 - 14, Normalize and
validate the PORT before calling app.listen: replace the current loose use of
process.env.PORT by parsing it to a number (e.g., via Number.parseInt or
Number()), check isFinite/isNaN and ensure the numeric value is within 0–65535,
fallback to 3004 if empty, and on invalid values log a clear error via
console.error (or processLogger) and exit (process.exit(1)). Update the existing
port variable and ensure app.listen receives the validated numeric port (and not
the raw string) so the server never starts with a malformed port.

Comment on lines +12 to +15
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"verbatimModuleSyntax": true,
"noEmit": true,
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== Checking package.json build script ==="
cat -n apps/supercode-cli/server/package.json | head -15

echo ""
echo "=== Checking tsconfig.json compiler options ==="
cat -n apps/supercode-cli/server/tsconfig.json | head -20

Repository: yashdev9274/supercli

Length of output: 1215


build script produces no artifacts.

Line 15 sets noEmit: true globally in tsconfig.json, which prevents tsc from emitting JavaScript. The build script at apps/supercode-cli/server/package.json:8 runs tsc and inherits this setting, making it a type-check-only operation. Meanwhile, the typecheck script (line 9) duplicates this behavior.

Either remove noEmit from the base config or override it in the build script (e.g., "build": "tsc --noEmit false"), so npm run build actually produces JavaScript output.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/supercode-cli/server/tsconfig.json` around lines 12 - 15, The
project-wide tsconfig.json sets "noEmit": true which prevents tsc from producing
JavaScript so the "build" script in package.json only type-checks; fix by either
removing "noEmit" from tsconfig.json or override it in the CLI server's
package.json build script (e.g., change the "build" script to run tsc with
emission enabled) so that running the build for the server actually emits JS;
look for the "noEmit" option in tsconfig.json and the "build" script in
apps/supercode-cli/server/package.json to apply the change.

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