Context
I use two separate Claude Code configurations:
~/.claude for my personal plan
~/.claude-pro for my enterprise plan
I switch between them using aliases like:
alias claude-pro='CLAUDE_CONFIG_DIR=~/.claude-pro claude'
Problem
abtop seams to hardcode the sessions and projects directories to ~/.claude/sessions and ~/.claude/projects.
When I launch Claude from my enterprise configuration (CLAUDE_CONFIG_DIR=~/.claude-pro), abtop does not detect the running sessions because it keeps looking in ~/.claude/ instead of ~/.claude-pro/.
Expected behavior
abtop should respect the CLAUDE_CONFIG_DIR environment variable — which is the official Claude Code mechanism for overriding the config directory — and use it to resolve the sessions and projects paths at startup.
For example, if CLAUDE_CONFIG_DIR=~/.claude-pro is set, abtop should look in ~/.claude-pro/sessions and ~/.claude-pro/projects.
Suggested fix
In src/collector/claude.rs, the ClaudeCollector::new() function currently does:
let home = dirs::home_dir().unwrap_or_default();
Self {
sessions_dir: home.join(".claude").join("sessions"),
projects_dir: home.join(".claude").join("projects"),
...
}
It could be updated to check for CLAUDE_CONFIG_DIR first:
let base = std::env::var("CLAUDE_CONFIG_DIR")
.map(PathBuf::from)
.unwrap_or_else(|_| dirs::home_dir().unwrap_or_default().join(".claude"));
Self {
sessions_dir: base.join("sessions"),
projects_dir: base.join("projects"),
...
}
This would make abtop consistent with how Claude Code itself handles multi-account setups.
Context
I use two separate Claude Code configurations:
~/.claudefor my personal plan~/.claude-profor my enterprise planI switch between them using aliases like:
Problem
abtopseams to hardcode the sessions and projects directories to~/.claude/sessionsand~/.claude/projects.When I launch Claude from my enterprise configuration (
CLAUDE_CONFIG_DIR=~/.claude-pro),abtopdoes not detect the running sessions because it keeps looking in~/.claude/instead of~/.claude-pro/.Expected behavior
abtopshould respect theCLAUDE_CONFIG_DIRenvironment variable — which is the official Claude Code mechanism for overriding the config directory — and use it to resolve the sessions and projects paths at startup.For example, if
CLAUDE_CONFIG_DIR=~/.claude-prois set,abtopshould look in~/.claude-pro/sessionsand~/.claude-pro/projects.Suggested fix
In
src/collector/claude.rs, theClaudeCollector::new()function currently does:It could be updated to check for
CLAUDE_CONFIG_DIRfirst:This would make
abtopconsistent with how Claude Code itself handles multi-account setups.