Skip to content

Move runtime data from ~/.shelli to /tmp#10

Merged
schovi merged 1 commit intomainfrom
feat/use-tmp
Feb 25, 2026
Merged

Move runtime data from ~/.shelli to /tmp#10
schovi merged 1 commit intomainfrom
feat/use-tmp

Conversation

@schovi
Copy link
Copy Markdown
Owner

@schovi schovi commented Feb 25, 2026

Summary

  • Move socket and session data from ~/.shelli/ to /tmp/shelli-{uid}/
  • Sessions are ephemeral (PTY processes die on reboot), so /tmp is the natural location
  • UID scoping prevents collisions on shared systems
  • OS handles cleanup automatically

Changes

  • Add RuntimeDir() function returning os.TempDir()/shelli-{uid}
  • Update NewServer and SocketPath() to use RuntimeDir()
  • Update default --data-dir to {RuntimeDir}/data
  • Update documentation (CLAUDE.md, README.md)

Test plan

  • go build . passes
  • go test -race ./... passes
  • make lint passes (0 issues)
  • Manual: shelli create test -- echo hello && ls /tmp/shelli-$(id -u)/

Sessions are ephemeral (PTY processes die on reboot, daemon restart loses
state), so persisting in home directory adds clutter with no benefit. The
OS now handles cleanup naturally via /tmp.

- Add RuntimeDir() returning os.TempDir()/shelli-{uid} with UID scoping
- Update NewServer and SocketPath to use RuntimeDir instead of ~/.shelli
- Update default --data-dir to {RuntimeDir}/data in daemon command
- Update CLAUDE.md and README.md path references
@schovi schovi merged commit 3b720d1 into main Feb 25, 2026
6 checks passed
@schovi schovi deleted the feat/use-tmp branch February 25, 2026 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant