Skip to content

INS-28 docs: update README with npx usage, skills, analytics, OSS linking#56

Merged
jwfing merged 5 commits intomainfrom
docs/readme-update
Apr 9, 2026
Merged

INS-28 docs: update README with npx usage, skills, analytics, OSS linking#56
jwfing merged 5 commits intomainfrom
docs/readme-update

Conversation

@jwfing
Copy link
Copy Markdown
Member

@jwfing jwfing commented Apr 8, 2026

Summary

  • Drop the "Installation" section; recommend running via `npx @insforge/cli` for latest version
  • Replace all `insforge ` examples with `npx @insforge/cli `
  • Document OSS/self-hosted linking via `--api-base-url` + `--api-key` with host URL format
  • Add Agent Skills section explaining auto-installed skills for 14 coding agents + find-skills
  • Add Analytics section documenting default PostHog usage reporting and how to opt out when building from source

Test plan

  • Render README on GitHub and verify formatting
  • Confirm all command examples use `npx @insforge/cli`

🤖 Generated with Claude Code

Note

Update README to use npx @insforge/cli and add development guide with analytics and skills docs

  • Updates all README command examples, auth instructions, and CI snippets to use npx @insforge/cli instead of a globally installed insforge binary.
  • Adds guidance for OSS/self-hosted linking via --api-base-url and --api-key, and expands sections covering Agent Skills and Analytics.
  • Adds DEVELOPMENT.md covering code patterns, PostHog analytics conventions, agent-skills sync, and the tag-triggered npm publish workflow.
  • Mirrors a cli-development skill definition into both .agents/skills/ and .claude/skills/ pointing to DEVELOPMENT.md.

Macroscope summarized d7332f4.

Summary by CodeRabbit

  • Documentation

    • Updated CLI installation guidance to use npx instead of global package installation
    • Updated all command examples throughout documentation to reflect new invocation method
  • New Features

    • Added agent skills support with discovery and installation capabilities
    • Introduced non-interactive project linking for self-hosted and OSS setups using API credentials
    • Added anonymous usage analytics integration

- Drop global install; recommend npx @insforge/cli
- Document OSS/self-hosted link via --api-base-url + --api-key
- Add Agent Skills section explaining auto-installed skills
- Add Analytics section documenting default PostHog reporting

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 8, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 256d5636-bad6-46ba-bcb4-6c907bdf36b2

📥 Commits

Reviewing files that changed from the base of the PR and between 6c2762f and d7332f4.

📒 Files selected for processing (3)
  • .agents/skills/cli-development/SKILL.md
  • .claude/skills/cli-development/SKILL.md
  • DEVELOPMENT.md

Walkthrough

The PR updates CLI documentation to recommend npx-based invocations over global installs, introduces new Agent Skills and Analytics documentation sections, and adds comprehensive development guidelines and skill definitions for CLI development workflows.

Changes

Cohort / File(s) Summary
CLI Installation & Usage Documentation
README.md
Replaced all insforge command invocations with npx @insforge/cli`` throughout documentation; removed global install guidance; extended link command docs with `--api-base-url` and `--api-key` options for non-interactive OSS/self-hosted setups; added new "Agent Skills" and "Analytics" sections describing skill installation and anonymous usage reporting via PostHog.
Development Contribution Guidelines
DEVELOPMENT.md
New comprehensive guide covering CLI command structure and registration, mandatory API client wrapper usage, configuration access patterns, error handling conventions, output formatting, ESM import rules with .js extensions, PostHog analytics requirements, agent-skills synchronization expectations, and automated release workflow details.
Agent & Claude Skill Definitions
.agents/skills/cli-development/SKILL.md, .claude/skills/cli-development/SKILL.md
New skill definition files for AI agents and Claude, specifying when to use the cli-development skill (CLI codebase modifications, telemetry wiring, npm releases) and referencing the repo-root development guide covering CLI patterns, analytics conventions, and release workflows.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • tonychang04
  • Fermionic-Lyu
  • CarmenDou

Poem

🐰 Hop along with npx so fine,
No global installs—just a line!
New skills defined for agents bright,
Development docs shine like starlight,
Analytics blooms, PostHog delight! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main changes: README updates for npx usage, skills documentation, analytics documentation, and OSS linking. The title clearly summarizes the primary documentation updates in the changeset.
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 unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/readme-update

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

Copy link
Copy Markdown

@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: 2

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

602-609: Clarify that global linking is contributor-only.

Earlier sections recommend npx and no global install, but Development uses npm link (valid for local contributor workflows). A one-line clarification would prevent mixed messaging.

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

In `@README.md` around lines 602 - 609, The README currently suggests `npm link`
in the Development steps which conflicts with earlier guidance to use `npx` and
avoid global installs; update the Development block (the lines showing `npm
link` / `npm run dev`) to add a single clarifying sentence stating that `npm
link` is intended only for local contributors/maintainers (not for general
users) and that regular users should use `npx insforge` or install via npm/yarn
as described earlier; reference the `npm link` and `npx` commands so the
clarification appears directly beside the `npm link` instruction.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@README.md`:
- Line 556: The README's phrase "build time" is incorrect because the code reads
POSTHOG_API_KEY from the environment at runtime; update the sentence that
currently claims "If you build the CLI from source without setting
`POSTHOG_API_KEY` at build time, analytics become a no-op automatically" to
state that analytics are disabled only when `POSTHOG_API_KEY` is not present in
the runtime environment (or when explicitly unset/disabled at runtime), and
clarify that building without the variable does not guarantee disabled telemetry
unless the runtime env lacks `POSTHOG_API_KEY`; mention the `POSTHOG_API_KEY`
env variable explicitly in the rewording.
- Around line 115-121: Update the README wording around the npx `@insforge/cli`
link example to clarify that --api-base-url accepts any valid URL (not only the
https://{app_key}.{region}.insforge.app pattern); mention that the CLI will skip
OAuth and write credentials to .insforge/project.json when linking with
--api-key, and add examples/notes that custom domains, localhost, or
non-{app_key}.{region} hostnames are supported by the link command
(--api-base-url and --api-key).

---

Nitpick comments:
In `@README.md`:
- Around line 602-609: The README currently suggests `npm link` in the
Development steps which conflicts with earlier guidance to use `npx` and avoid
global installs; update the Development block (the lines showing `npm link` /
`npm run dev`) to add a single clarifying sentence stating that `npm link` is
intended only for local contributors/maintainers (not for general users) and
that regular users should use `npx insforge` or install via npm/yarn as
described earlier; reference the `npm link` and `npx` commands so the
clarification appears directly beside the `npm link` instruction.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 8dc5df53-ee71-49f8-ba07-bf8cbc5390e1

📥 Commits

Reviewing files that changed from the base of the PR and between 062fe8a and 8cff7eb.

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

Comment on lines +115 to +121
# OSS / self-hosted: link via host URL + API key (no platform login required)
npx @insforge/cli link \
--api-base-url https://<app-key>.<region>.insforge.app \
--api-key <your-project-api-key>
```

#### `insforge current`
For OSS or self-hosted deployments, you can link directly using the host URL and API key — the CLI skips the platform OAuth flow and writes the credentials straight into `.insforge/project.json`. The host URL format is `https://{app_key}.{region}.insforge.app` (e.g. `https://uhzx8md3.us-east.insforge.app`).
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Broaden self-hosted URL guidance to match actual CLI behavior.

The docs currently imply self-hosted links must use https://{app_key}.{region}.insforge.app, but link accepts any valid URL for --api-base-url. This can mislead custom-domain/self-hosted users.

Suggested doc tweak
-# OSS / self-hosted: link via host URL + API key (no platform login required)
+# OSS / self-hosted: link via API base URL + API key (no platform login required)
 npx `@insforge/cli` link \
-  --api-base-url https://<app-key>.<region>.insforge.app \
+  --api-base-url https://<your-host> \
   --api-key <your-project-api-key>

-For OSS or self-hosted deployments, you can link directly using the host URL and API key — the CLI skips the platform OAuth flow and writes the credentials straight into `.insforge/project.json`. The host URL format is `https://{app_key}.{region}.insforge.app` (e.g. `https://uhzx8md3.us-east.insforge.app`).
+For OSS or self-hosted deployments, you can link directly using an API base URL and API key — the CLI skips the platform OAuth flow and writes the credentials straight into `.insforge/project.json`.  
+For InsForge-hosted instances, the URL is typically `https://{app_key}.{region}.insforge.app` (e.g. `https://uhzx8md3.us-east.insforge.app`).
📝 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
# OSS / self-hosted: link via host URL + API key (no platform login required)
npx @insforge/cli link \
--api-base-url https://<app-key>.<region>.insforge.app \
--api-key <your-project-api-key>
```
#### `insforge current`
For OSS or self-hosted deployments, you can link directly using the host URL and API key — the CLI skips the platform OAuth flow and writes the credentials straight into `.insforge/project.json`. The host URL format is `https://{app_key}.{region}.insforge.app` (e.g. `https://uhzx8md3.us-east.insforge.app`).
# OSS / self-hosted: link via API base URL + API key (no platform login required)
npx `@insforge/cli` link \
--api-base-url https://<your-host> \
--api-key <your-project-api-key>
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@README.md` around lines 115 - 121, Update the README wording around the npx
`@insforge/cli` link example to clarify that --api-base-url accepts any valid URL
(not only the https://{app_key}.{region}.insforge.app pattern); mention that the
CLI will skip OAuth and write credentials to .insforge/project.json when linking
with --api-key, and add examples/notes that custom domains, localhost, or
non-{app_key}.{region} hostnames are supported by the link command
(--api-base-url and --api-key).


The CLI reports anonymous usage events to [PostHog](https://posthog.com) so we can understand which features are being used and prioritize improvements.

Analytics are enabled by default in the published npm package. If you build the CLI from source without setting `POSTHOG_API_KEY` at build time, analytics become a no-op automatically.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

“Build time” wording for analytics appears inaccurate.

The no-op behavior is described as build-time, but implementation reads POSTHOG_API_KEY from env in runtime code path. Please reword to avoid privacy/telemetry confusion.

Suggested doc tweak
-Analytics are enabled by default in the published npm package. If you build the CLI from source without setting `POSTHOG_API_KEY` at build time, analytics become a no-op automatically.
+Analytics are enabled by default in the published npm package. If `POSTHOG_API_KEY` is not set in the runtime environment, analytics become a no-op automatically.
📝 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
Analytics are enabled by default in the published npm package. If you build the CLI from source without setting `POSTHOG_API_KEY` at build time, analytics become a no-op automatically.
Analytics are enabled by default in the published npm package. If `POSTHOG_API_KEY` is not set in the runtime environment, analytics become a no-op automatically.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@README.md` at line 556, The README's phrase "build time" is incorrect because
the code reads POSTHOG_API_KEY from the environment at runtime; update the
sentence that currently claims "If you build the CLI from source without setting
`POSTHOG_API_KEY` at build time, analytics become a no-op automatically" to
state that analytics are disabled only when `POSTHOG_API_KEY` is not present in
the runtime environment (or when explicitly unset/disabled at runtime), and
clarify that building without the variable does not guarantee disabled telemetry
unless the runtime env lacks `POSTHOG_API_KEY`; mention the `POSTHOG_API_KEY`
env variable explicitly in the rewording.

@tonychang04
Copy link
Copy Markdown
Contributor

this only updates readme instead of skills?

@jwfing
Copy link
Copy Markdown
Member Author

jwfing commented Apr 8, 2026

https://linear.app/insforge/issue/INS-28/update-cli-readme-for-usage-and-skills
Didn't you say in this issue that you wanted to update the README to include this information? @tonychang04

@tonychang04
Copy link
Copy Markdown
Contributor

linear created this.. when i saw add skills i mean having a skill for this repo... so ai can understand we need tracking methods and testing

Covers existing-pattern conventions, PostHog analytics usage,
agent-skills sync, and the tag-triggered npm release workflow.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@jwfing jwfing changed the title docs: update README with npx usage, skills, analytics, OSS linking INS-28 docs: update README with npx usage, skills, analytics, OSS linking Apr 8, 2026
@jwfing jwfing enabled auto-merge April 8, 2026 23:16
Copy link
Copy Markdown

@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: 1

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

Inline comments:
In `@CLAUDE.md`:
- Line 89: The link in CLAUDE.md currently points to a relative path
'../../../.github/workflows/publish.yml' which will break from the repo root;
update the link to a repo-root-relative path (for example
'/.github/workflows/publish.yml') so GitHub resolves it correctly—locate the
string '../../../.github/workflows/publish.yml' in CLAUDE.md and replace it with
'/.github/workflows/publish.yml'.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 34fdc609-575c-41ac-be9d-b775499da25a

📥 Commits

Reviewing files that changed from the base of the PR and between 8cff7eb and 07678a5.

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

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@tonychang04
Copy link
Copy Markdown
Contributor

can we make this to claude and codex skills?
InsForge/InsForge@3ce6298
like this in oss @jwfing

AGENTS.md is the cross-agent convention supported by Claude Code,
Codex, Cursor, Aider, and others.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@jwfing
Copy link
Copy Markdown
Member Author

jwfing commented Apr 9, 2026

@tonychang04 fixed.

Rename AGENTS.md to DEVELOPMENT.md as the canonical dev guide, then
add lightweight cli-development skill stubs under .agents/skills/ (Codex)
and .claude/skills/ (Claude Code) that both reference DEVELOPMENT.md.
Force-added since .agents and .claude are gitignored for installSkills()
artifacts.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@jwfing jwfing merged commit 0bd7132 into main Apr 9, 2026
2 of 3 checks passed
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.

2 participants