{"id":"paseo-workspace-snippets","repo":"lefos13/paseo-workspace-snippets","url":"https://github.com/lefos13/paseo-workspace-snippets","package":"paseo-workspace-snippets","npm":{"package":"paseo-workspace-snippets","version":"0.2.3","integrity":"sha512-TtVmQfbVOg6rLiyzT74t/dqKLjbdZxPBY9h4fpL6nDu6xrr/I76mV315OUDMj42GQThrXCrahnbZbpQQVe2xsA==","publishedAt":"2026-10-01T15:06:37.058Z","downloadsLast30Days":0},"name":"paseo-workspace-snippets","description":"Run saved command snippets and package.json scripts in Paseo workspace terminals, from a per-workspace panel, a sidebar screen, or /snippet.","categories":["productivity","automation"],"platforms":[],"caveats":["Requires Paseo 0.10.2 or newer on both the daemon and the app.","Shows whether a snippet's terminal is open, not whether its command is still running or how it exited.","Detects scripts from the root package.json only; monorepo packages are not scanned.","Snippets live in host-wide plugin settings shared by every client of the daemon, so do not put secrets in them.","Running from the sidebar screen reuses or creates the project's Local workspace, never a worktree.","Verified end to end on macOS only."],"images":["https://raw.githubusercontent.com/lefos13/paseo-workspace-snippets/1988aed515fc7c60ac5fcec6867b2cd0b654f6f1/images/01-snippets-screen.png","https://raw.githubusercontent.com/lefos13/paseo-workspace-snippets/1988aed515fc7c60ac5fcec6867b2cd0b654f6f1/images/02-sidebar-entry.png","https://raw.githubusercontent.com/lefos13/paseo-workspace-snippets/1988aed515fc7c60ac5fcec6867b2cd0b654f6f1/images/03-header-button.png","https://raw.githubusercontent.com/lefos13/paseo-workspace-snippets/1988aed515fc7c60ac5fcec6867b2cd0b654f6f1/images/04-command-center.png"],"themes":[],"health":{"manifestValid":true,"hasReadme":true,"hasLicense":true,"hasTests":false,"hasTypecheckScript":true,"updatedRecently":true},"scannedAt":"2026-10-01T18:36:22.456Z","addedAt":"2026-10-01T21:32:08+03:00","npmSecurity":{"status":"passed","blockingFindings":0,"advisoryFindings":0,"scannedAt":"2026-10-01T18:35:35.656Z","version":"0.2.3","integrity":"sha512-TtVmQfbVOg6rLiyzT74t/dqKLjbdZxPBY9h4fpL6nDu6xrr/I76mV315OUDMj42GQThrXCrahnbZbpQQVe2xsA=="},"version":"0.2.3","security":{"status":"passed","blockingFindings":0,"advisoryFindings":0,"scannedAt":"2026-10-01T18:35:35.656Z","commit":"1988aed515fc7c60ac5fcec6867b2cd0b654f6f1"},"author":"lefos13","license":"MIT","paseoVersionRequirement":">=0.10.2","descriptionNodes":[{"type":"text","text":"Run saved command snippets and package.json scripts in Paseo workspace terminals, from a per-workspace panel, a sidebar screen, or /snippet."}],"caveatNodes":[[{"type":"text","text":"Requires Paseo 0.10.2 or newer on both the daemon and the app."}],[{"type":"text","text":"Shows whether a snippet's terminal is open, not whether its command is still running or how it exited."}],[{"type":"text","text":"Detects scripts from the root package.json only; monorepo packages are not scanned."}],[{"type":"text","text":"Snippets live in host-wide plugin settings shared by every client of the daemon, so do not put secrets in them."}],[{"type":"text","text":"Running from the sidebar screen reuses or creates the project's Local workspace, never a worktree."}],[{"type":"text","text":"Verified end to end on macOS only."}]],"manifest":{"id":"paseo-workspace-snippets","description":"Run saved command snippets and package.json scripts in workspace terminals","requirements":{"paseo":">=0.10.2"}},"repoMeta":{"stars":0,"defaultBranch":"main","pushedAt":"2026-10-01T15:04:41Z"},"owner":{"login":"lefos13","avatarUrl":"https://avatars.githubusercontent.com/u/71150524?v=4"},"installNotesHtml":"<p>Requires Paseo 0.10.2 or newer on both the daemon and the app, with <strong>Settings → Plugins → Enable plugins</strong> turned on.</p>\n<pre><code class=\"language-bash\">paseo plugin install npm:paseo-workspace-snippets\n</code></pre>","limitationsNotesHtml":"<ul>\n<li><strong>Process state</strong>: Commands run interactively in the user's default shell. Paseo does not expose process exit codes to plugins; the plugin tracks whether the terminal tab is open or closed, not whether a process inside it has completed.</li>\n<li><strong>Root package.json only</strong>: Only the workspace root <code>package.json</code> is inspected. Monorepo subpackage detection is not supported in v1.</li>\n<li><strong>Terminal tab focus</strong>: Creating a new terminal tab immediately focuses that tab in the Paseo workspace.</li>\n<li><strong>Host-wide settings</strong>: Snippets are stored in plain JSON in host-level daemon plugin settings. Do not store sensitive secrets or credentials in snippets.</li>\n</ul>","readmeText":"# paseo-workspace-snippets\n\nA Paseo plugin for running command snippets and package.json scripts in workspace terminals.\n\n## What it does\n\n- **Package scripts**: Automatically detects scripts in the root `package.json` and runs them using the appropriate package manager (npm, pnpm, yarn, bun).\n- **Saved snippets**: Save custom commands with project or workspace scope.\n- **Terminal orchestration**: Creates and manages interactive workspace terminal tabs with Run, Restart, Stop, Close, and inline output peek.\n- **Quick access**: a **Snippets** sidebar screen (works before any workspace exists), a **Snippets** button on every workspace header, Command Center (⌘K \"Open snippets\"), and the `/snippet <name>` slash command.\n\n## Screenshots\n\n![Snippets screen: reorderable project list on the left, package.json scripts and saved snippets on the right](images/01-snippets-screen.png)\n\n![Snippets entry in the Paseo sidebar](images/02-sidebar-entry.png)\n\n![Snippets button in the workspace header](images/03-header-button.png)\n\n![Open snippets from the Command Center](images/04-command-center.png)\n\n## Install\n\nRequires Paseo 0.10.2 or newer on both the daemon and the app, with **Settings → Plugins → Enable plugins** turned on.\n\n```bash\npaseo plugin install npm:paseo-workspace-snippets\n# or from GitHub\npaseo plugin install github:lefos13/paseo-workspace-snippets\n```\n\nYou can also paste either source into **Settings → Plugins → Plugin source**. Then run `paseo plugin ls`: `paseo-workspace-snippets` should be `running`, and **Snippets** appears in the sidebar.\n\n## Usage\n\n### Sidebar → Snippets (No Workspace Open)\n\nWhen starting a session or viewing the **New workspace** screen before any workspace is open, access snippets via the `Snippets` item in the Paseo application sidebar.\n\n- **Project picker & reordering**: Switch between any registered Paseo project. Click the reorder button in the header to customize project order with move up/down/top controls or reset to A–Z, persisted in plugin settings.\n- **Scripts and project snippets**: Lists auto-detected `package.json` scripts and project-scoped snippets for the selected project. (Workspace-scoped snippets require an active workspace and are not shown).\n- **Local workspace orchestration**: Clicking **Run** opens (or reuses) the project's Local workspace (`directory === projectRootPath`), executes the command in a dedicated terminal tab (`script:<name>` or `snippet:<name>`), and navigates directly to that workspace.\n- **Lifecycle actions**: When a Local workspace is already active for the selected project, entries reflect live open status with **Restart**, **Stop**, **Close**, and terminal output peek.\n\n### Workspace Panel\n\nOpen the Snippets panel through:\n- The `Snippets` button in the workspace header.\n- The `Snippets` tab in the workspace panel bar or explorer sidebar.\n- Command Center (⌘K) search for \"Open snippets\".\n- The `/snippet` slash command with no arguments.\n\nThe panel contains two sections:\n- **Scripts (`<pm>` · `package.json`)**: Auto-detected scripts from the workspace's root `package.json`. Use the `Hide`/`Show` toggle to collapse the section. Click `Refresh` in the panel header to re-detect scripts.\n- **Snippets**: Custom shell commands. Click `Add` to create new snippets, or `Edit`/`Delete` on existing rows.\n\n### Entry Actions\n\n- **Run**: Creates a dedicated terminal tab named `script:<name>` or `snippet:<name>` and executes the command.\n- **Restart**: Sends `C-c` to interrupt any existing process, waits briefly, and executes the command again.\n- **Stop**: Sends `C-c` to interrupt the running command without closing the terminal tab.\n- **Close**: Terminates and closes the terminal tab.\n- **Output preview**: Click the chevron on any row to view the last 40 lines of terminal output in an expandable peek without leaving the panel.\n\n### Slash Command\n\nIn any workspace composer or agent prompt:\n- `/snippet <name>`: Runs the matching snippet or package script. Resolution matches exact snippet names first, then exact script names, then unique case-insensitive prefixes. If ambiguous or not found, candidates are listed.\n- `/snippet`: Opens the Snippets workspace panel.\n\n## Scope: Project vs Workspace\n\nWhen adding or editing a snippet:\n- **This project**: Keyed by `projectRootPath`. Available across every worktree of the project.\n- **This workspace**: Keyed by the workspace `directory`. Scoped strictly to that specific working directory.\n\n## Package Manager Detection\n\nThe package manager for `package.json` scripts is detected in order:\n1. `packageManager` field in `package.json` (for example `\"pnpm@9.1.0\"` or `\"npm@10.0.0\"`).\n2. The first lockfile found in the workspace root directory:\n   - `pnpm-lock.yaml` -> `pnpm`\n   - `yarn.lock` -> `yarn`\n   - `bun.lockb` or `bun.lock` -> `bun`\n   - Otherwise -> `npm`\n\nScripts are invoked as `<pm> run <scriptName>`. Names containing characters outside `[A-Za-z0-9:._/-]` are shell-quoted.\n\n## Relation to paseo.json Scripts and Services\n\n`paseo.json` scripts are committed with the repository and run in supervised processes with ports and proxies. This plugin provides personal, interactive, zero-config terminal shortcuts.\n\n| | `paseo.json` scripts/services | This plugin |\n|---|---|---|\n| Where defined | Committed file, read from the base branch | Host-local settings + live `package.json` |\n| Needs a commit / config | Yes | No |\n| Supervision, ports, proxy, health | Yes (services) | No: a plain interactive shell |\n| Environment | `PASEO_*` variables | The user's login shell (nvm, PATH, direnv) |\n| Who sees it | Everyone who clones the repo | Only this daemon host |\n\nUse `paseo.json` services for team-shared dev servers that require ports or supervision. Use this plugin for personal workflow commands and ad-hoc scripts.\n\n## Limitations\n\n- **Process state**: Commands run interactively in the user's default shell. Paseo does not expose process exit codes to plugins; the plugin tracks whether the terminal tab is open or closed, not whether a process inside it has completed.\n- **Root package.json only**: Only the workspace root `package.json` is inspected. Monorepo subpackage detection is not supported in v1.\n- **Terminal tab focus**: Creating a new terminal tab immediately focuses that tab in the Paseo workspace.\n- **Host-wide settings**: Snippets are stored in plain JSON in host-level daemon plugin settings. Do not store sensitive secrets or credentials in snippets.\n\n## Develop\n\nWhen the Paseo CLI is not on your `PATH`, use the full application binary:\n```bash\nPASEO=/Applications/Paseo.app/Contents/Resources/bin/paseo\n```\n\nCommands:\n```bash\nnpm install\nnpm run typecheck\n$PASEO plugin install \"$PWD\"\n$PASEO plugin reload paseo-workspace-snippets\n$PASEO plugin ls\n$PASEO plugin logs paseo-workspace-snippets\n```\n"}