AGENTS.md · nukeop/nuclear
AGENTS.md from nukeop/nuclear: 377 lines covering Project Overview, Commands, Code Style, Testing and more.
Template by nukeop
Install
Works with Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Claude Code. Read the repository before you give any tool access to your data.
curl -fsSL https://raw.githubusercontent.com/nukeop/nuclear/master/AGENTS.md -o AGENTS.md
Read it and adapt it to your project before use.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: code-generation, testing
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
What's in it
An AGENTS.md file: instructions coding agents (Codex, Cursor, Copilot, Gemini CLI and others) read before working in a repo.
- For
- Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Claude Code
- Length
- 377 lines
- File
AGENTS.md
Sections
- Project Overview
- Commands
- Code Style
- Testing
- File Organization
- Rust Backend
- Design Philosophy
- Tooling Notes
- Changelog
- Releasing
First lines (shown under the repo's AGPL-3.0 license)
# AGENTS.md
Guidelines for AI coding agents working on Nuclear.
## Project Overview
Nuclear is a free, open-source music player without ads or tracking. Search for any song or artist, build playlists, and start listening. It's a desktop app built with Tauri (Rust + React), organized as a pnpm monorepo managed with Turborepo.
### Packages
- `@nuclearplayer/player` - Main Tauri app (React + Rust)
- `@nuclearplayer/ui` - Shared UI components
- `@nuclearplayer/plugin-sdk` - Plugin system (published to npm)
- `@nuclearplayer/model` - Data model
- `@nuclearplayer/themes` - Theming system
- `@nuclearplayer/hifi` - Advanced HTML5 audio component
- `@nuclearplayer/tailwind-config` - Shared Tailwind config
- `@nuclearplayer/eslint-config` - Shared linting rules
- `@nuclearplayer/i18n` - Internationalization
- `@nuclearplayer/storybook` - Component demos
- `@nuclearplayer/videos` - Remotion videos rendered from UI components
- `@nuclearplayer/tools` - Build and maintenance utilities
- `@nuclearplayer/docs` - Documentation
- `@nuclearplayer/website` - Project website (Astro)
## Commands
```bash
# Development
pnpm dev # Run player in dev mode
pnpm dev:remote # Same, but binds Vite to 0.0.0.0 so the remote control UI is reachable from other devices
pnpm storybook # Run Storybook
pnpm --filter @nuclearplayer/videos dev # Run the Remotion Studio
pnpm --filter @nuclearplayer/videos render # Render a video to packages/videos/out
# Build
pnpm build # Build all packages
pnpm tauri build # Build Tauri app
# Quality
pnpm lint # Lint all packages
pnpm lint:fix # Lint and auto-fix
pnpm type-check # TypeScript checks
pnpm test # Run all tests
pnpm test:coverage # Run tests with coverage
pnpm clean # Clean build artifacts
# Package-specific testing
pnpm --filter @nuclearplayer/ui test -- src/components/Badge/Badge.test.tsx
pnpm --filter @nuclearplayer/ui test -- --testNamePattern="renders"
# Update snapshots (run at root for all, or filter to a specific package)
# At root
pnpm test -- -u
# Filtering for a specific package
pnpm --filter @nuclearplayer/ui test -- -u
# After cd'ing into a package
pnpm test -u
```
## Code Style
### General Principles
- Prioritize readability over cleverness
- No comments in code - explain reasoning in chat/commits
- Avoid premature abstractions - start concrete, extract later
- Small, focused changes over large dumps
- Never commit unless explicitly asked
### TypeScript
- Use `type` not `interface` (except when merging is required)
- Strict mode with `noUnusedLocals` and `noUnusedParameters`
- Do not use one-letter variable names.
AVOID: `(b) => b.buildIndexEntry()`
PREFER: `(build) => build.buildIndexEntry()`
### React Components
```tsx
import { cva, VariantProps } from 'class-variance-authority';
import { ComponentProps, FC } from 'react';
import { cn } from '../../utils';
const componentVariants = cva('base-classes', {
variants: { /* ... */ },
defaultVariants: { /* ... */ },
});
type ComponentProps = ComponentProps<'div'> &
VariantProps<typeof componentVariants>;
export const Component: FC<ComponentProps> = ({
className,
variant,
...props
}) => (
<div className={cn(componentVariants({ variant, className }))} {...props} />
);
```
- Use `const Component: FC<Props>` not `function Component()`
- Compound components (`Component.Sub`) for complex widgets
- Keep business logic out of UI components
### Adding UI Components
When adding a new component to `@nuclearplayer/ui`:
1. Create component directory: `packages/ui/src/components/MyComponent/`
- `MyComponent.tsx` - implementation
- `MyComponent.test.tsx` - tests (aim for 100% coverage)
- `index.ts` - re-exports
2. Export from `packages/ui/src/components/index.ts`
3. Add Storybook story in `packages/storybook/src/MyComponent.stories.tsx`
4. Include snapshot test(s) covering all variants
### Styling (Tailwind v4)
- CSS-first config in `packages/tailwind-config/global.css`
- Theme colors: `bg-background`, `text-foreground`, `bg-primary`
- Accents: `accent-green`, `accent-yellow`, `accent-purple`, `accent-blue`, `accent-orange`, `accent-cyan`, `accent-red`
- Use `cn()` for conditional classes, `cva()` for variants
### State Management
- **Zustand** - persistent UI state
- **React state** - local, temporary state
- **TanStack Query v5** - HTTP requests/server state
- **TanStack Router** - client-side routing
### Standardized Libraries
- **Icons**: Lucide React (not heroicons, not font-awesome)
- **Toasts**: Sonner
- **Dates**: Luxon
- **Utilities**: lodash-es (use individual imports: `import isEqual from 'lodash-es/isEqual'`)
- **HTTP**: Native fetch via ApiClient base class (no axios)
### Adding New Domains
A "domain" is a feature area exposed to plugins (e.g., settings, queue, favorites). When adding a new domain:
1. **Types** (`packages/plugin-sdk/src/types/myDomain.ts`)
- Define the `MyDomainHost` interface (the contract between player and SDK)
- Export any related types plugins will use
2. **API class** (`packages/plugin-sdk/src/api/myDomain.ts`)
- Create a class that wraps the host and exposes methods to plugins
- Add to `NuclearAPI` constructor in `packages/plugin-sdk/src/api/index.ts`
3. **Store** (`packages/player/src/stores/myDomainStore.ts`)
- Zustand store holding the domain state
- Persists to disk via `@tauri-apps/plugin-store` if neededSignals
- Stars
- 18,770
- Forks
- 1,350
- Open issues
- 1
- Last commit (this folder)
- Oct 5, 2026 (24 days ago)
- Last release
- Oct 23, 2026 (5 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- AGPL-3.0
- Repository
- github.com/nukeop/nuclear
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
Cite this page
AGENTS.md · nukeop/nuclear. Agent Mart. https://agentmart.dev/templates/nukeop-nuclear-agents-md (last updated 2026-10-24)