annoty
v1.0.11
Published
Annoty CLI tool for authentication and project initialization
Maintainers
Readme
Annoty CLI
The command line companion for Annoty, a developer tool that lets you select elements on your local website, write styling/functional instructions, and compile them into structured prompts for your AI coding assistant (like Claude Code, Cursor, ChatGPT, etc.).
This CLI handles project initialization (injecting the overlay), checking status, running diagnostic checks, and cleaning up injection tags before commits or production builds.
Installation
You can run the CLI directly using npx, or install it globally on your machine:
Running on the fly:
npx annoty <command>Global Installation:
npm install -g annotyWorkflow Commands
[!NOTE] If you are using the on-demand
npxrunner instead of a global installation, replace theannotycommand prefix withnpx annotyfor all commands below (e.g.,npx annoty initinstead ofannoty init).
Authentication
annoty loginStarts the authentication handshake. It opens a browser tab pointing to the Annoty Cloud dashboard. Once authenticated, the browser redirects back to a temporary local loopback server (http://localhost:9876) to securely save your sync credentials.annoty logoutSafely signs out of your active session and completely clears local credential files.
Setup & Project Integration
annoty initChecks your project for standard asset directories (e.g.public/), copies the compiledoverlay.jsscript there, and automatically injects the script tag into yourindex.html.
Diagnostics & Status
annoty statusScans the current working directory to check if Annoty is injected, verifies the state ofoverlay.jsin public assets, and displays the currently logged-in user email.annoty doctorRuns system checks including Node.js version compatibility (requires >= v18), loopback port checks, and local configuration validations.annoty groupsQueries and lists all your synced cloud annotation groups from the database.
Cleanup & Updates
annoty cleanCrucial codebase hygiene utility. Scans your workspace, removes all injected<script>tags from your HTML entry points, and deletes the localpublic/overlay.jsasset. Run this before staging code in Git or building for production.annoty uninstallPermanently deletes all global Annoty configurations, tokens, and temporary files from your computer.annoty updateChecks npm for the latest version of the CLI and runs a global update.
How It Works Under the Hood
Local Credential Storage
Credentials retrieved during login are written locally to your home directory:
- Path:
~/.annoty/credentials - Security: On POSIX/Unix systems, the file is saved with strict
0600permissions (Owner Read/Write only) to prevent unauthorized token extraction.
Port Selection Range
For the login callback server, the CLI attempts to listen on port 9876. If that port is occupied, it automatically increments and tests ports up to 9885 sequentially.
License
MIT (c) Annoty
