| name | aweshelf |
| description | Use when working with aweshelf CLI — session bookmarking, categorization, search, and resume for Claude Code and Codex sessions. 中文触发词:书签、收藏会话、恢复会话、aweshelf、session管理、browse。 |
Aweshelf
Use aweshelf CLI directly. Do not add wrapper scripts unless the CLI is missing a needed capability.
Intent Router
Match the user's intent to a task domain, then follow the workflow below.
| User intent | Domain | First command |
|---|
| "Bookmark this session", "save current session" | Bookmark | aweshelf bookmark --current |
| "Bookmark a session", "pick a session to save" | Bookmark | aweshelf bookmark (interactive picker) |
| "List my bookmarks", "show saved sessions" | Browse | aweshelf list |
| "Find bookmarks about X" | Search | aweshelf search QUERY |
| "Resume bookmark X", "continue session X" | Resume | aweshelf resume BOOKMARK_ID |
| "Show details of bookmark X" | Show | aweshelf show BOOKMARK_ID |
| "Edit bookmark X", "rename bookmark", "change category" | Edit | aweshelf edit BOOKMARK_ID |
| "Delete bookmark X", "remove bookmark" | Remove | aweshelf rm BOOKMARK_ID |
| "Open the TUI", "browse interactively" | TUI | aweshelf browse |
| "Recent sessions", "what did I work on recently" | Recent | aweshelf recent |
First-Time Setup
- Install:
pip install aweshelf
- Verify:
aweshelf -v
No config file is needed to start. Bookmarks are stored at ~/.config/aweshelf/bookmarks.json automatically.
For aweswitch profile integration (auto-detecting API endpoint/model), install aweswitch separately.
Core Rules
aweshelf bookmark without arguments opens an interactive session picker in the current project. Use --current to skip the picker and bookmark the most recent session directly.
- Use
--no-interactive to skip all prompts — for agents and scripting. Bookmarks are created with defaults or passed values only.
- If a session is already bookmarked,
bookmark will offer to update it instead of creating a duplicate.
aweshelf resume BOOKMARK_ID restores the session with the aweswitch profile that was active at bookmark time. Use --profile to override, --raw to skip aweswitch entirely.
aweshelf browse opens a TUI. This is a terminal UI — it requires a real terminal, not a piped subprocess. Do not run it inside non-interactive contexts.
aweshelf list and aweshelf search are safe for scripting. They output plain text and can be piped.
- Use
--json with show to get machine-readable output.
Workflows
Bookmark a Session
aweshelf bookmark
aweshelf bookmark --current
aweshelf bookmark --current -t "Fix auth bug" -c backend
aweshelf bookmark 550e8400-... -t "Refactor API" -c backend
aweshelf bookmark --current --profile cc-glm
aweshelf bookmark <SESSION_ID> -t "title" --no-interactive
aweshelf bookmark --current --no-interactive
Decision order:
--current is fastest — one confirmation, done.
- Without arguments — interactive picker shows sessions in the current project directory.
- With
SESSION_ID — bookmark a specific session directly (no picker). Prompts for title/category/profile unless --no-interactive is set.
- Always use
--no-interactive in agent/script context to avoid blocking on prompts.
List and Search
aweshelf list
aweshelf list -c backend
aweshelf list -p claude
aweshelf search "auth middleware"
aweshelf recent
aweshelf recent -n 20
Show and Edit
aweshelf show aweshelf_0001
aweshelf show aweshelf_0001 --json
aweshelf edit aweshelf_0001 -t "New title"
aweshelf edit aweshelf_0001 -c frontend
aweshelf edit aweshelf_0001 --profile cc-deepseek
aweshelf edit aweshelf_0001 -t "New title" -c frontend --profile cc-glm
Resume a Session
aweshelf resume aweshelf_0001
aweshelf resume aweshelf_0001 --profile cc-glm
aweshelf resume aweshelf_0001 --raw
aweshelf resume aweshelf_0001 --dry-run
Decision order:
- Default resume uses the aweswitch profile stored in the bookmark.
--profile overrides the stored profile (useful when switching providers).
--raw skips aweswitch entirely — runs claude or codex directly.
--dry-run shows what would happen without executing.
Remove a Bookmark
aweshelf rm aweshelf_0001
aweshelf rm aweshelf_0001 --force
Browse (TUI)
aweshelf browse
Keyboard shortcuts:
Enter — Resume selected session (with confirmation)
e — Inline-edit current cell (title, category, profile)
r — Remove selected bookmark (with confirmation)
y / n — Confirm / cancel action
c — Toggle between Category-grouped and All view
s — Cycle sort order
/ — Filter bookmarks
Esc — Clear filter / cancel
? — Show all shortcuts
q — Quit
Bookmark Data Reference
{
"id": "aweshelf_0001",
"provider": "claude",
"session_id": "550e8400-...",
"title": "Fix auth middleware bug",
"category": "backend",
"project_path": "/Users/peng/Desktop/Project/my-app",
"first_prompt": "Help me fix the auth middleware...",
"aweswitch_profile": "cc-glm",
"bookmarked_at": "2026-05-20T14:00:00Z"
}
Key fields:
- id: Auto-generated sequential ID (
aweshelf_NNNN).
- provider:
claude or codex.
- session_id: Original session UUID.
- aweswitch_profile: The aweswitch profile active when bookmarked. Used by
resume to restore the same API endpoint/model. null if aweswitch is not configured.
- project_path: The project directory the session was in. Used to filter sessions in the interactive picker.