From 3562d063e53780c98c9bc749cbfcaa94f49154a4 Mon Sep 17 00:00:00 2001 From: warren Date: Mon, 6 Apr 2026 17:19:53 -0400 Subject: [PATCH] feat: justfile task runner and updated install/setup documentation justfile with build/install/uninstall/test targets. CLAUDE.md updated with new install path and commands. status-line-setup.md updated for %LOCALAPPDATA%\ctask\bin location. Co-Authored-By: Claude Opus 4.6 (1M context) --- CLAUDE.md | 47 ++++++++++++++++++++++++++++++--------- docs/status-line-setup.md | 23 ++++++++++++++----- justfile | 23 +++++++++++++++++++ 3 files changed, 76 insertions(+), 17 deletions(-) create mode 100644 justfile diff --git a/CLAUDE.md b/CLAUDE.md index 8c11292..f779c6e 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -4,25 +4,49 @@ This project is a local-only Go CLI. It is not published to any package registry or remote repository. -### Local build +### Prerequisites -``` +- Go 1.26+ (`winget install GoLang.Go`) +- just (optional task runner: `winget install Casey.Just`) + +### Install on Windows + +```powershell cd C:\Users\Warren\claude_tasks\ctask_v0.1 -go build -o ctask.exe . +powershell -NoProfile -ExecutionPolicy Bypass -File scripts/install.ps1 ``` -### Local install (copies to GOPATH/bin) +Or with just: `just install` -``` +This builds from the local repo, copies files to `%LOCALAPPDATA%\ctask\bin`, and adds the directory to user PATH. + +| Installed file | Location | +|---|---| +| ctask.exe | %LOCALAPPDATA%\ctask\bin\ctask.exe | +| ctask-statusline.sh | %LOCALAPPDATA%\ctask\bin\ctask-statusline.sh | +| ctask-statusline.ps1 | %LOCALAPPDATA%\ctask\bin\ctask-statusline.ps1 | + +### Uninstall + +```powershell cd C:\Users\Warren\claude_tasks\ctask_v0.1 -go install . +powershell -NoProfile -ExecutionPolicy Bypass -File scripts/uninstall.ps1 ``` -Binary output: `C:\Users\Warren\go\bin\ctask.exe` +Or with just: `just uninstall` + +Removes only ctask files and the PATH entry (if ctask install added it). Does NOT remove workspaces or task data. + +### Dev build (no install) + +``` +just build # or: go build -o ctask.exe . +just test # or: go test ./... -v -count=1 +``` ### Remote install -Not available. There is no git remote configured and the module path in `go.mod` is a local placeholder. Do not provide `go install @latest` commands or any remote install instructions. +Not available. There is no git remote configured. Do not provide `go install @latest` commands. ## Repository and Package Identity @@ -33,13 +57,14 @@ Never invent remote repository, package, or module identities. Do not guess GitH Bad: `go install github.com/someone/ctask@latest` Bad: `git clone https://github.com/someone/ctask.git` -Good: `cd C:\Users\Warren\claude_tasks\ctask_v0.1 && go install .` -Good: "This project is not published remotely. Build locally with `go install .`" +Good: `just install` or `powershell -File scripts/install.ps1` +Good: "This project is not published remotely. Build and install locally." ## Testing ``` -go test ./... -v -count=1 +just test +# or: go test ./... -v -count=1 ``` ## Data Safety diff --git a/docs/status-line-setup.md b/docs/status-line-setup.md index 410ded4..2080e14 100644 --- a/docs/status-line-setup.md +++ b/docs/status-line-setup.md @@ -4,33 +4,44 @@ ctask includes helper scripts that display task context in Claude Code's status line. +### Prerequisites + +Run `scripts/install.ps1` (or `just install`) first. This places the helper scripts at: + +- Windows: `%LOCALAPPDATA%\ctask\bin\ctask-statusline.sh` +- Unix: copy `scripts/ctask-statusline.sh` to `~/.local/bin/` + ### Setup -Add one of the following to your `~/.claude/settings.json`: +Add the following to your `~/.claude/settings.json`: -**Linux / macOS (bash):** +**Windows (after install):** ```json { "statusLine": { "type": "command", - "command": "bash /path/to/ctask-statusline.sh" + "command": "bash /c/Users//AppData/Local/ctask/bin/ctask-statusline.sh" } } ``` -**Windows (PowerShell):** +Replace `` with your Windows username. + +**Linux / macOS:** ```json { "statusLine": { "type": "command", - "command": "powershell -NoProfile -File C:\\path\\to\\ctask-statusline.ps1" + "command": "bash ~/.local/bin/ctask-statusline.sh" } } ``` -Replace `/path/to/` with the actual location of the script. +### Verify + +Run `ctask doctor` to check that the status line is configured correctly. ### Output diff --git a/justfile b/justfile new file mode 100644 index 0000000..fa98d70 --- /dev/null +++ b/justfile @@ -0,0 +1,23 @@ +# ctask developer task runner +# Requires: Go 1.26+, PowerShell 7+ (for install/uninstall) +# Install just: winget install Casey.Just + +# Default: show available targets +default: + @just --list + +# Compile ctask from the local repo +build: + go build -o ctask.exe . + +# Run the full test suite +test: + go test ./... -v -count=1 + +# Install ctask to %LOCALAPPDATA%\ctask\bin (Windows, PowerShell) +install: + powershell -NoProfile -ExecutionPolicy Bypass -File scripts/install.ps1 + +# Uninstall ctask from %LOCALAPPDATA%\ctask\bin (Windows, PowerShell) +uninstall: + powershell -NoProfile -ExecutionPolicy Bypass -File scripts/uninstall.ps1