This repository was archived by the owner on Feb 14, 2026. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +17
-0
lines changed
Expand file tree Collapse file tree 3 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,14 @@ This will:
3939- ` --claude-env KEY=VALUE ` - Set environment variable for Claude Code
4040- ` --claude-arg ARG ` - Pass additional argument to Claude CLI
4141
42+ ## Environment Variables
43+
44+ - ` HAPPY_SERVER_URL ` - Custom server URL (default: https://api.cluster-fluster.com )
45+ - ` HAPPY_WEBAPP_URL ` - Custom web app URL (default: https://app.happy.engineering )
46+ - ` HAPPY_HOME_DIR ` - Custom home directory for Happy data (default: ~ /.happy)
47+ - ` HAPPY_DISABLE_CAFFEINATE ` - Disable macOS sleep prevention (set to ` true ` , ` 1 ` , or ` yes ` )
48+ - ` HAPPY_EXPERIMENTAL ` - Enable experimental features (set to ` true ` , ` 1 ` , or ` yes ` )
49+
4250## Requirements
4351
4452- Node.js >= 20.0.0
Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ class Configuration {
2525 public readonly currentCliVersion : string
2626
2727 public readonly isExperimentalEnabled : boolean
28+ public readonly disableCaffeinate : boolean
2829
2930 constructor ( ) {
3031 // Server configuration - priority: parameter > environment > default
@@ -51,6 +52,7 @@ class Configuration {
5152 this . daemonLockFile = join ( this . happyHomeDir , 'daemon.state.json.lock' )
5253
5354 this . isExperimentalEnabled = [ 'true' , '1' , 'yes' ] . includes ( process . env . HAPPY_EXPERIMENTAL ?. toLowerCase ( ) || '' ) ;
55+ this . disableCaffeinate = [ 'true' , '1' , 'yes' ] . includes ( process . env . HAPPY_DISABLE_CAFFEINATE ?. toLowerCase ( ) || '' ) ;
5456
5557 this . currentCliVersion = packageJson . version
5658
Original file line number Diff line number Diff line change 55
66import { spawn , ChildProcess } from 'child_process'
77import { logger } from '@/ui/logger'
8+ import { configuration } from '@/configuration'
89
910let caffeinateProcess : ChildProcess | null = null
1011
@@ -15,6 +16,12 @@ let caffeinateProcess: ChildProcess | null = null
1516 * @returns true if caffeinate was started, false otherwise
1617 */
1718export function startCaffeinate ( ) : boolean {
19+ // Check if caffeinate is disabled via configuration
20+ if ( configuration . disableCaffeinate ) {
21+ logger . debug ( '[caffeinate] Caffeinate disabled via HAPPY_DISABLE_CAFFEINATE environment variable' )
22+ return false
23+ }
24+
1825 // Only run on macOS
1926 if ( process . platform !== 'darwin' ) {
2027 logger . debug ( '[caffeinate] Not on macOS, skipping caffeinate' )
You can’t perform that action at this time.
0 commit comments