🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@codehabits/cli

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@codehabits/cli

Team intelligence for AI coding agents. Extract conventions, anti-patterns, and domain knowledge from your codebase and PR history.

Source
npmnpm
Version
0.2.2
Version published
Weekly downloads
161
1912.5%
Maintainers
1
Weekly downloads
 
Created
Source

codehabits

Team intelligence for AI coding agents. Extract conventions, anti-patterns, and domain knowledge from your codebase and PR history - then deliver it to Cursor, Claude Code, and other AI tools.

Quick start

npx @codehabits/cli login
npx @codehabits/cli enable

This scans your repo, analyzes PR history with AI, and generates:

  • .codehabits/conventions.json, .codehabits/anti-patterns.json, .codehabits/knowledge.json, .codehabits/reviewers.json, .codehabits/meta.json: structured team intelligence (split files)
  • .codehabits/config.json: analysis settings (safe to edit)
  • .codehabits/proposals.json: optional; gitignored; MCP record_feedback / approve_proposal only
  • .cursor/skills/codehabits-team-intel/: Agent Skill for Cursor
  • AGENTS.md: entry point for Claude Code and similar tools

Repositories under a GitHub organization must be assigned to a team when you first enable them (interactive flow, or npx @codehabits/cli enable --team <team-id-or-slug>). --personal is only for user-owned repos. In CI, always pass --team for org repos.

Commands

CommandDescription
codehabits loginAuthenticate with GitHub OAuth
codehabits enableScan repo and generate intelligence (--team, --personal, --path, --skip-prs)
codehabits syncIncrementally update with latest PRs (merges with cloud using same rules as local)
codehabits team assignAssign the current repo to a team (--team for non-interactive)
codehabits show <type>Display conventions, anti-patterns, knowledge, or reviewers
codehabits check <file>Validate a file against team conventions
codehabits mcp-installSet up MCP server for Cursor
codehabits setup-actionGenerate GitHub Actions workflow for auto-sync
codehabits token createCreate API token for CI/CD

CI/CD

Sync (after the repo is already enabled, typical GitHub Action on merge):

- name: Sync codehabits intelligence
  run: npx @codehabits/cli@latest sync --ci
  env:
    CODEHABITS_TOKEN: ${{ secrets.CODEHABITS_TOKEN }}
    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

First-time enable in CI for an organization repo requires a team (non-interactive):

npx @codehabits/cli@latest enable --team your-team-slug

Install globally

npm install -g @codehabits/cli
codehabits enable

After global install, the command is just codehabits (not @codehabits/cli).

Documentation

Full docs at codehabits.dev/docs

License

MIT

Keywords

ai

FAQs

Package last updated on 19 Apr 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts