|

Platform Compatibility

Every Arcana command, file path, environment variable, and shell syntax across Linux, macOS, and Windows. Use this as a quick reference when writing scripts, configuring your environment, or troubleshooting platform-specific issues.

File Paths

Arcana stores configuration and data in your home directory. The base path differs by operating system:

ResourceLinuxmacOSWindows
Arcana home~/.arcana/~/.arcana/%USERPROFILE%\.arcana\
Config file~/.arcana/config.json~/.arcana/config.json%USERPROFILE%\.arcana\config.json
Skills directory~/.arcana/skills/~/.arcana/skills/%USERPROFILE%\.arcana\skills\
Themes directory~/.arcana/themes/~/.arcana/themes/%USERPROFILE%\.arcana\themes\
Plugins directory~/.arcana/plugins/~/.arcana/plugins/%USERPROFILE%\.arcana\plugins\
Memory database~/.arcana/memory.db~/.arcana/memory.db%USERPROFILE%\.arcana\memory.db
Session data~/.arcana/data/sessions/~/.arcana/data/sessions/%USERPROFILE%\.arcana\data\sessions\
Cron jobs~/.arcana/data/cron-jobs.json~/.arcana/data/cron-jobs.json%USERPROFILE%\.arcana\data\cron-jobs.json
Backups~/.arcana/.backups/~/.arcana/.backups/%USERPROFILE%\.arcana\.backups\
Workspace trust~/.arcana/workspace-trust.json~/.arcana/workspace-trust.json%USERPROFILE%\.arcana\workspace-trust.json
Proxy key~/.arcana/proxy_key~/.arcana/proxy_key%USERPROFILE%\.arcana\proxy_key

Environment Variables

Environment variables control Arcana behavior without editing the config file. The syntax differs by shell:

Setting Variables

VariableLinux / macOS (bash/zsh)Windows (cmd)Windows (PowerShell)
ARCANA_HOMEexport ARCANA_HOME="/opt/arcana"set ARCANA_HOME=C:\opt\arcana$env:ARCANA_HOME="C:\opt\arcana"
ARCANA_VOICE_MODELexport ARCANA_VOICE_MODEL=smallset ARCANA_VOICE_MODEL=small$env:ARCANA_VOICE_MODEL="small"
ARCANA_VOICE_CLEANUPexport ARCANA_VOICE_CLEANUP=trueset ARCANA_VOICE_CLEANUP=true$env:ARCANA_VOICE_CLEANUP="true"
ARCANA_VOICE_LANGUAGEexport ARCANA_VOICE_LANGUAGE=enset ARCANA_VOICE_LANGUAGE=en$env:ARCANA_VOICE_LANGUAGE="en"
ARCANA_SKILLS_DIRSexport ARCANA_SKILLS_DIRS="$HOME/.arcana/skills:$HOME/my-skills"set ARCANA_SKILLS_DIRS=%USERPROFILE%\.arcana\skills;%USERPROFILE%\my-skills$env:ARCANA_SKILLS_DIRS="$env:USERPROFILE\.arcana\skills;$env:USERPROFILE\my-skills"

Reading Variables

OperationLinux / macOSWindows (cmd)Windows (PowerShell)
Print a variableecho $ARCANA_HOMEecho %ARCANA_HOME%$env:ARCANA_HOME
Check if set[ -n "$ARCANA_HOME" ] && echo "set"if defined ARCANA_HOME echo setif ($env:ARCANA_HOME) { "set" }
Unset a variableunset ARCANA_HOMEset ARCANA_HOME=Remove-Item env:ARCANA_HOME

Persistent Variables

To make environment variables persist across terminal sessions:

ShellWhere to addExample
bash~/.bashrcexport ARCANA_VOICE_MODEL=small
zsh~/.zshrcexport ARCANA_VOICE_MODEL=small
fish~/.config/fish/config.fishset -gx ARCANA_VOICE_MODEL small
PowerShell$PROFILE$env:ARCANA_VOICE_MODEL="small"
cmdSystem Properties > Environment VariablesAdd via GUI

Shell Completions

Arcana ships completions for bash, zsh, fish (Linux/macOS), and PowerShell (Windows):

ShellInstall commandTarget path
basharcana completion bash > ~/.bash_completion.d/arcana~/.bash_completion.d/arcana
zsharcana completion zsh > ~/.zsh/completions/_arcana~/.zsh/completions/_arcana
fisharcana completion fish > ~/.config/fish/completions/arcana.fish~/.config/fish/completions/arcana.fish
PowerShellarcana completion powershell > "$env:USERPROFILE\Documents\WindowsPowerShell\Modules\Arcana\Arcana.psm1"$env:USERPROFILE\Documents\WindowsPowerShell\Modules\Arcana\

After installing, restart your shell or run the appropriate source command:

  • bash: source ~/.bashrc
  • zsh: source ~/.zshrc
  • fish: source ~/.config/fish/config.fish
  • PowerShell: . $PROFILE

CLI Commands

All arcana CLI commands work identically across platforms. The following commands have platform-specific behavior or output:

CommandLinux / macOSWindowsNotes
arcana daemon startSpawns detached process with lock fileSpawns detached process with lock fileLock file location differs
arcana daemon stopSends SIGTERM to daemon processSends termination signal to daemon processGraceful shutdown on both
arcana cron addUses system cron or Arcana schedulerUses Windows Task Scheduler internallyNatural language schedule works on both
arcana theme set --nameReads from ~/.arcana/themes/Reads from %USERPROFILE%\.arcana\themes\Theme file format is identical
arcana history resume --idRestores from ~/.arcana/data/sessions/Restores from %USERPROFILE%\.arcana\data\sessions\Session format is identical
arcana stats --jsonOutputs JSON to stdoutOutputs JSON to stdoutIdentical on all platforms
arcana mcp listLists MCP servers from configLists MCP servers from configConfig path differs by OS
arcana memory statsReads from ~/.arcana/memory.dbReads from %USERPROFILE%\.arcana\memory.dbSQLite DB format is identical

Shell Scripting Patterns

Common patterns that differ between Linux/macOS and Windows:

Error Handling

PatternBash (Linux/macOS)PowerShell (Windows)
Exit on errorset -euo pipefail$ErrorActionPreference = "Stop"
Capture exit codeexit_code=$?$exitCode = $LASTEXITCODE
Switch on exit codecase $exit_code in 0) ... ;; 1) ... ;; esacswitch ($exitCode) { 0 { ... } 1 { ... } }
Print to stderrecho "error" >&2Write-Error "error"
Pipe JSON to jqarcana stats --json | jq '.data'arcana stats --json | ConvertFrom-Json

File Operations

OperationBashPowerShell
Check file exists[ -f ~/.arcana/config.json ]Test-Path "$env:USERPROFILE\.arcana\config.json"
Create directorymkdir -p ~/.arcana/skillsNew-Item -ItemType Directory -Path "$env:USERPROFILE\.arcana\skills" -Force
List filesls ~/.arcana/themes/Get-ChildItem "$env:USERPROFILE\.arcana\themes\"
Copy filecp config.json ~/.arcana/config.jsonCopy-Item config.json "$env:USERPROFILE\.arcana\config.json"

Temp Files

OperationBashPowerShell
Temp directory/tmp/$env:TEMP\
Create temp filemktempNew-TemporaryFile
Screenshot output/tmp/screenshot.png$env:TEMP\screenshot.png

Cron Scheduling

Scheduled tasks differ significantly between Linux/macOS and Windows:

ScheduleCron syntax (Linux/macOS)Natural language (all platforms)
Every weekday at 9am0 9 * * 1-5"every weekday at 9am"
Daily at 5pm0 17 * * *"daily at 5pm"
Weekly on Friday0 17 * * 5"every Friday at 5pm"
First Monday monthly0 9 1 * 1"first Monday of each month"
Every 6 hours0 */6 * * *"every 6 hours"

Windows note: On Windows, Arcana uses the Windows Task Scheduler internally. Cron syntax is translated automatically. For reliable scheduling on Windows, ensure you are logged in or configure the task to run whether or not you are logged in.

Known Differences

Platform-specific behaviors to be aware of:

FeatureLinux / macOSWindows
Path separator/\ (cmd) or / (PowerShell)
Case sensitivityFile paths are case-sensitiveFile paths are case-insensitive
Daemon signalsSIGTERM / SIGINTProcess termination API
Cron backendSystem cron or Arcana schedulerWindows Task Scheduler
Shell completionsbash / zsh / fishPowerShell
Env var persistence.bashrc / .zshrc / config.fish$PROFILE or System Properties GUI

Platform Compatibility Reference

All Arcana commands work cross-platform. This reference documents the platform-specific differences in file paths, environment variables, shell syntax, and scheduling.

File Paths

Base path: Linux/macOS ~/.arcana/, Windows %USERPROFILE%\.arcana\

Key files: config.json, memory.db, workspace-trust.json, proxy_key

Key directories: skills/, themes/, plugins/, .backups/, data/sessions/

Environment Variables

Set on Linux/macOS: export VAR=value. Set on Windows cmd: set VAR=value. Set on PowerShell: $env:VAR="value".

Multi-value vars use : separator on Linux/macOS, ; on Windows.

Shell Completions

Linux/macOS: arcana completion {bash|zsh|fish}. Windows: arcana completion powershell.

Scheduling

Cron syntax is Linux/macOS only. Use natural language schedules for cross-platform compatibility.

Key Commands

All arcana subcommands are platform-agnostic. Platform-specific behavior: voice setup (model binary), daemon start/stop (process management), cron add (scheduler backend).