Skip to content

Installation

📦 Prerequisites

Before installing local-work, ensure you have:

  • Node.js >= 18.18.0
  • npm (included with Node.js)

Check your versions:

node --version  # Should be >= 18.18.0
npm --version

Installing Node.js

If you don't have Node.js installed, download it from nodejs.org or use a version manager like nvm.


🚀 Global Installation

Install local-work globally to use task and note commands from anywhere:

npm install -g local-work

Verify the installation:

task --help
note --help

🔄 Updating

Update to the latest version:

npm update -g local-work

Check your current version:

npm list -g local-work

❌ Uninstallation

Remove local-work from your system:

npm uninstall -g local-work

Data Preservation

Uninstalling local-work does not delete your tasks and notes. Your data remains in:

- **Linux**: `~/.local/share/local-work/`
- **macOS**: `~/Library/Application Support/local-work/`
- **Windows**: `%APPDATA%\local-work\`

Project-local data remains in `.local-work/` directories.

💻 Platform-Specific Notes

Linux

local-work follows the XDG Base Directory Specification:

  • Config: $XDG_CONFIG_HOME/local-work/ (defaults to ~/.config/local-work/)
  • Data: $XDG_DATA_HOME/local-work/ (defaults to ~/.local/share/local-work/)

macOS

Standard macOS application directories:

  • Config: ~/Library/Preferences/local-work/
  • Data: ~/Library/Application Support/local-work/

Windows

Standard Windows application directories:

  • Config: %APPDATA%\local-work\config\
  • Data: %APPDATA%\local-work\

🔧 Post-Installation

After installation, you can:

  1. Initialize a project workspace (recommended):
cd /path/to/your/project
task init
  1. Use global workspace (for personal tasks):
task -g new "Personal task"
note -g daily
  1. Configure preferences:
    task config set editor "code"
    task config set autoOpen true
    

Troubleshooting

Command Not Found

If task or note commands are not found after installation:

  1. Verify installation:
npm list -g local-work
  1. Check npm global bin directory:
npm config get prefix
  1. Add to PATH (if needed):

Linux/macOS:

echo 'export PATH="$(npm config get prefix)/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc

Windows: Add the npm global bin directory to your System Environment Variables.

Permission Errors (Linux/macOS)

If you encounter permission errors:

# Option 1: Use npx (no global installation needed)
npx local-work task new "My task"

# Option 2: Fix npm permissions
# https://docs.npmjs.com/resolving-eacces-permissions-errors-when-installing-packages-globally

Next Steps