Skip to content

Latest commit

 

History

History
90 lines (65 loc) · 3.98 KB

File metadata and controls

90 lines (65 loc) · 3.98 KB

Contributing to NetCopilot

First off — thanks for considering a contribution! NetCopilot is built by and for network engineers, and every issue, PR, or vendor playbook makes the tool sharper.

Quick links

Ways to contribute (no code required)

Contribution Impact
⭐ Star the repo Helps discovery
🐛 Open a detailed bug report Most valuable contribution
🔌 Add a vendor playbook (Cisco/Juniper/etc. command list) Makes ARIA smarter for everyone
📖 Improve docs / README Helps new users
🎨 Share a custom terminal theme We'll bundle it
🌍 Translate the UI We'll add i18n
📣 Share NetCopilot on Reddit / Twitter / LinkedIn Real growth

Code contributions

Setup

git clone https://github.com/AnasProgrammer2/netcopilot.git
cd netcopilot
npm install
npm run dev

Note: better-sqlite3-multiple-ciphers is auto-rebuilt for Electron's Node version via the postinstall hook. If you ever see NODE_MODULE_VERSION mismatch, run:

npx @electron/rebuild -f -w better-sqlite3-multiple-ciphers

Before you submit a PR

npm run typecheck    # must pass
npm run lint         # must pass
npm run format       # auto-fix style

There is no test suite — verification is done via typecheck, lint, and manual smoke testing.

Branch & commit conventions

  • Branch off main. Name: fix/<short>, feat/<short>, docs/<short>.
  • Commit messages should be clean and descriptive. No AI tool attribution (Generated by Cursor, Co-authored-by: Claude, etc.) — see CLAUDE.md → Commit Rules.
  • Squash unrelated commits before pushing.

Code style

  • TypeScript everywhere. No any unless interfacing with untyped libraries.
  • React function components with hooks, no class components.
  • Use the existing Zustand store (src/renderer/src/store/index.ts) — don't introduce new state libraries.
  • For settings keys: always use applySettings(patch), never set() directly.
  • For colors: use the CSS custom properties defined in globals.css, not hex literals.
  • Comments should explain why, not what.

Architecture overview

See CLAUDE.md — it's the source of truth for the three-process Electron model, IPC surface, encrypted SQLite schema, and ARIA's agentic loop.

Adding a new vendor to ARIA

This is one of the highest-leverage contributions you can make.

  1. Edit src/main/ai.tsdevicePlaybook map.
  2. Add an entry with the vendor name as key and a multi-line playbook string. Use the existing cisco-ios / junos entries as a template:
    • PLATFORM: one-line description
    • SIGNATURE COMMANDS: 8–15 most-used show/diagnose commands
    • COMMON ROOT CAUSES: 3–5 things that go wrong on this platform
    • DIAGNOSTIC FLOW: the senior-engineer mental order to investigate
  3. Add the device type to DeviceType in src/types/shared.ts and src/renderer/src/types/index.ts.
  4. Add a quick-commands list to QUICK_COMMANDS in src/renderer/src/components/ai/AiPanel.tsx.
  5. (Optional) Add a syntax highlighter function in src/renderer/src/lib/highlighter.ts.
  6. Test by setting a connection to the new device type and asking ARIA: "what's the health of this device?"

Reporting security issues

Please don't open public issues for security vulnerabilities. See SECURITY.md for the responsible disclosure process.

License

By contributing, you agree that your contributions will be licensed under the same BSL-1.1 license that covers the rest of the project.