Repository navigation
feat(cli): offer an opt-in sp shorthand for session-peer #242
Copy link
Copy link
Closed
Labels
enhancementNew feature or requestNew feature or request
Milestone
Description
Motivation
Offer an optional short command for frequent interactive use: both session-peer [OPTION] and sp [OPTION] should invoke the same installed Python CLI, including subcommands. Keep session-peer as the canonical, unambiguous command.
This is a convenience feature proposed for v1.1.0, not part of the v1.0.3 maintenance scope.
Alternatives considered
- Users can already define a shell alias manually, but setup and lifecycle handling vary across shells and platforms.
- Shipping an unconditional second console-script entry point would be simple, but
spis a short, collision-prone name and should not be installed over another command automatically. - A separate implementation or parser for
spwould introduce avoidable behavioral drift.
Searched existing issues (all states) for sp/alias titles and short command/shortcut/shorthand references; no matching feature issue was found.
Proposed behaviour
- Keep
session-peeras the canonical command and makespan explicit opt-in alias or thin launcher to the same installed entry point. - Examples:
sp --version,sp list, andsp send ... --dry-run, with the same options, output, exit codes, defaults, and safety/approval behavior as the correspondingsession-peerinvocation. - Preserve arguments exactly, including spaces, Unicode, stdin messages, and option separators. Do not use shell evaluation.
- Installation must not silently replace an existing executable, alias, function, or another installation manager's command. Document any shell-local collisions that an installer cannot automatically inspect.
- Continue using
session-peerin primary documentation, scripts, SSH/internal transport calls, and generated reply instructions; presentspas optional interactive convenience. - Respect pipx/uv/pip/standalone ownership and supported platform constraints. Choose and document a feasible opt-in approach before implementation; do not silently switch installation managers.
- User-confirmed installation contract: Python and TypeScript/npm versions are not installed simultaneously. Both projects should support the identical command names
session-peerandsp;spinvokes the installed implementation, not a cross-runtime selector. Supporting simultaneous Python/TS installations or automatic runtime dispatch is out of scope. Still preserve unrelated tools namedsp, respect manager ownership when switching implementations, and do not assume Python/TS feature parity.
Current source reference: pyproject.toml maps session-peer to session_peer:main; install.sh manages the standalone command. This issue does not prescribe an unconditional additional package entry point.
Acceptance criteria
-
spis opt-in and canonicalsession-peerbehavior remains unchanged. - Both commands use one implementation/parser and preserve options, JSON/text output, errors, and exit codes; no separate feature set.
- Collision checks refuse or clearly warn without overwriting an existing unrelated command, with shell/platform detection limits documented.
- Upgrade/uninstall preserve other tools and remove only an alias/launcher owned by this installation. Repeated setup is safe and idempotent.
- Document opt-in setup/removal for the chosen supported installation methods/platforms, the no-simultaneous-Python/TS-installation prerequisite, safe implementation switching, and use of the original installation manager.
- Tests cover version/help, list and dry-run behavior, malformed arguments, quoting/Unicode/stdin, pre-existing sp, repeated setup, update, removal, and implementation selection. No delivery/approval/retry semantics change.
- No automatic remote-host configuration, production rollout, or release publication is included in this issue.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request
Activity
abruption commentedon Oct 9, 2026
Final acceptance — 2026-10-09: closing as completed for v1.1.0 opt-in
spshorthand, implemented by #283.Passive Bash/zsh and PowerShell activation/removal assets invoke the canonical
session-peercommand without a second parser/console entry point, profile/PATH edits or implicit activation. Taggedtests/distribution/test_shorthand.pycovers argv/Unicode/stdin/output/exit equivalence, canonical CLI behavior, collision refusal, repeated activation/removal, changed alias refusal, manager-aware asset lookup and update/removal behavior, with platform CI for PowerShell.Existing executables/functions/aliases, including default PowerShell
sp, are not silently overwritten. A running shell's alias must be explicitly removed before uninstall/switch; package removal cannot mutate it. Standalone requires separately reviewed assets, automation/SSH/reply commands stay canonical, and simultaneous Python/TypeScript installations or an automatic dispatcher are outside scope. Python closure does not assert full TypeScript parity.Release evidence: v1.1.0, source
8ca77cf31254c8287a2593fe484bb30a7dba2727; exact integrated-main CI and PyPI publication/verification succeeded. Final acceptance rechecked tagged code/tests/docs and merged PR evidence; this final accounting did not rerun tests or perform new live messages, native wake, installations or operations.