Skip to main content

Development Environment Setup

Prerequisites

  • Node.js v18 or higher
  • npm v9 or higher
  • Google Chrome (or a Chromium-based browser)
  • Git

Installation

git clone https://github.com/bozkurtemre/graytool.git
cd graytool
npm install

Development Commands

CommandDescription
npm run buildDevelopment build (includes source maps)
npm run build:prodProduction build (minified, no source maps)
npm run devWatch mode — auto-rebuild on file changes
npm run typecheckTypeScript type checking (no emit)
npm run formatFormat all files with Prettier
npm run format:checkCheck formatting (for CI)
npm run linttypecheck + format:check
npm run cleanClean build artifacts
npm run releaseCreate release zip package

Loading in Chrome

  1. Run npm run build
  2. Navigate to chrome://extensions/ in Chrome
  3. Enable "Developer mode"
  4. Click "Load unpacked"
  5. Select the src folder in the project

Development Workflow

1. Make code changes
2. npm run build (or automatic in dev mode)
3. chrome://extensions/ → Click Graytool's reload button
4. Refresh the Graylog page
5. Test
tip

The npm run dev command automatically rebuilds on file changes, but you still need to reload the Chrome extension.

Dependencies

Runtime

PackageVersionDescription
react18.2.0UI framework
react-dom18.2.0React DOM renderer
@fortawesome/fontawesome-free7.2.0Icon library

Development

PackageVersionDescription
typescript5.0.0TypeScript compiler
esbuild0.27.3Fast JavaScript bundler
prettier3.8.1Code formatter
@types/chrome0.0.260Chrome API types

TypeScript Configuration

The project is configured with strict mode:

{
"compilerOptions": {
"strict": true,
"target": "ES2020",
"module": "ESNext",
"jsx": "react-jsx"
}
}