Commands
workscribe init
Set up Workscribe and install or update shell hooks.- Creates
~/.workscribe/with owner-only permissions - Initialises the SQLite database
- Installs or updates the shell hook in
~/.zshrcor~/.bashrc - Detects installed AI coding tools (Claude Code, Aider, etc.) and offers to install a session capture hook for each — opt-in, defaults to no
- Prompts you to choose an AI provider and enter your API key
workscribe init detects the change and prompts you to update. Your rc file is backed up before any modification.
workscribe summary
Generate an AI work summary for today or a specific date.
Slack setup:
- Go to api.slack.com/apps → Create New App → From scratch
- Name your app, select your workspace, and click Create App
- In the left sidebar under Features, click Incoming Webhooks
- Toggle Activate Incoming Webhooks to On
- Click Add New Webhook to Workspace, choose a channel, and click Allow
- Copy the webhook URL and configure workscribe:
workscribe summary --slack to post. The summary is automatically formatted for Slack — headings are bolded and bullets are converted to •. Your OS username is prepended to the message so recipients know who sent it in shared channels.
Output format:
- Daily summaries are cached per session in the database
- Cached summaries are preserved when new events arrive — only new or unsummarised sessions call the AI
- Weekly summaries are cached in
~/.workscribe/weekly-cache/<YYYY-WW>.md - Use
--freshto force regeneration of all sessions for the day
workscribe week
Generate an AI weekly digest covering Monday through today.
The natural pre-standup ritual for Monday morning or end-of-week reporting. Output is markdown grouped by day, with each session summarised under its project and branch.
Caching:
Results are cached in
~/.workscribe/weekly-cache/<YYYY-WW>.md. Running workscribe week a second time in the same week returns the cached digest instantly. Use --fresh to force regeneration.
Slack:
Configure your webhook first:
workscribe week --slack to post. See workscribe summary for full Slack setup instructions.
workscribe sessions
List detected work sessions for a date.
Sessions are computed by grouping events with idle gaps greater than
session.idleTimeout (default 30 minutes) and splitting across different repositories.
workscribe events
List raw captured events for a date.
Events are colour-coded by category:
workscribe note
Attach a free-text annotation to the current session.workscribe sessions— displayed indented under the matching sessionworkscribe summaryandworkscribe week— injected into the AI prompt before the event list so the model reads your context first, and uses it to explain the why behind the work
workscribe undo to remove the most recently added note.
workscribe undo
Remove the last N captured events.
Notes:
- Removes events from the database only — does not modify any exported markdown files
- Automatically invalidates sessions for affected dates so they rebuild on next access
- Running undo twice is safe — the second call removes the next N events
workscribe clear
Delete all captured events for a date.
Notes:
- Shows a category summary before asking for confirmation
- Automatically invalidates cached sessions for the date
- Use
--dry-runto see what would be removed before committing
workscribe export
Generate a summary and save it as a markdown file.workscribe context
Surface the last session for the current repo — at the moment you need it, not at end of day.
Without
--file: shows the most recent session for the current git repo — date, duration, branch, event count, and the AI-generated summary if one exists.
With --file: narrows to the most recent session that included a code_edit event for that path. This is what powers the VS Code extension’s status bar “last worked on” indicator — surfacing “3 days ago” when you switch to a file you haven’t touched recently. Neovim and other editor integrations aren’t built yet.
If no summary exists for the session, the default text output includes the command to generate one:
--json output shape, intended for IDE integrations that need to render this themselves rather than parse formatted text:
null (not an object) when no matching session exists.
workscribe status
Show capture status and event counts.- Whether capture is active or paused
- Number of events captured today and total
- Last captured event
- Configured AI provider and model
- Pending security alerts count (if any)
workscribe alerts
Show and manage security alerts raised when Workscribe detects a possible credential in an AI tool prompt.- Stores the alert in the local database.
- Writes a signal file to
~/.workscribe/alerts.pending. - Displays a one-line warning before your next shell prompt.
- Injects a
systemMessageinto Claude’s context for that turn.
clear subcommand marks all alerts as dismissed and removes the signal file.
workscribe pause / resume
Pause and resume capture.workscribe uninstall
Remove shell hooks and optionally delete all Workscribe data.
What it does:
- Detects and removes the Workscribe hook block from
~/.zshrc,~/.bashrc, and~/.bash_profile - Prompts whether to delete
~/.workscribe/(database, config, exports) — defaults to no - Prints the command to remove the CLI itself (
npm uninstall -g @workscribe/cli)
_workscribe_precmd errors, remove the hook block manually:
- Open
~/.zshrc(or~/.bashrc) - Delete everything between
# workscribe:hook:startand# workscribe:hook:end(inclusive) - Run
source ~/.zshrcor restart your terminal
workscribe _capture (IDE integration)
Internal command called by shell hooks and IDE plugins. Not intended for direct use. IDE integrations call this to record a file-save or debug event without going through the shell:
Deduplication:
code_edit events for the same file within 30 seconds are dropped. This absorbs rapid auto-saves without creating duplicate records.
workscribe config
View and update configuration.workscribe config get and workscribe config mask API keys, tokens, and webhook URLs — showing only the first four characters and the total length: