| Crates.io | claude-code-toolkit |
| lib.rs | claude-code-toolkit |
| version | 0.3.1 |
| created_at | 2025-06-21 11:33:04.128704+00 |
| updated_at | 2025-06-24 13:27:11.965156+00 |
| description | Claude Code management tool for credential sync, session monitoring, and GitHub integration |
| homepage | https://github.com/deepbrainspace/goodiebag/tree/main/packages/claude-code-toolkit |
| repository | https://github.com/deepbrainspace/goodiebag |
| max_upload_size | |
| id | 1720735 |
| size | 275,402 |
Part of the GoodieBag collection of tools and libraries
Claude Code management tool for automatic credential synchronization to GitHub, session monitoring, and daemon service management.
# Install from crates.io
cargo install claude-code-toolkit
# Ensure ~/.cargo/bin is in your PATH
echo 'export PATH="$HOME/.cargo/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
# Clone the repository
git clone https://github.com/deepbrainspace/goodiebag
cd goodiebag/packages/claude-code-toolkit
# Build and install
cargo install --path .
Important: The binary must remain in a stable location for the daemon
service to work. If you move the binary after installing the service, run
claude-code-toolkit service install again.
gh) installed and authenticated# Ubuntu/Debian
sudo apt install gh
# macOS
brew install gh
# Or download from https://cli.github.com/
Secrets: Write (required for updating repository secrets)Metadata: Read (required for basic repository access)Organization secrets: Write (required for updating organization
secrets)Members: Read (required for organization access)# Login using your PAT
gh auth login
# Or set token directly
export GITHUB_TOKEN="your_github_pat_here"
gh auth login --with-token <<< "$GITHUB_TOKEN"
# Verify authentication
gh auth status
# Add GitHub organization
claude-code-toolkit org add your-org-name
# Add GitHub repository
claude-code-toolkit repo add owner/repository
# Install and start daemon
claude-code-toolkit service install
claude-code-toolkit status
claude-code-toolkit timer
claude-code-toolkit status - Show comprehensive session and sync statusclaude-code-toolkit timer - Real-time session timer with progress barclaude-code-toolkit org add <name> [--secret-name NAME] - Add GitHub
organizationclaude-code-toolkit org remove <name> - Remove organizationclaude-code-toolkit org list - List configured organizations with
availabilityclaude-code-toolkit repo add <owner/repo> [--secret-name NAME] - Add
repositoryclaude-code-toolkit repo remove <owner/repo> - Remove repositoryclaude-code-toolkit repo list - List configured repositoriesclaude-code-toolkit sync now - Force immediate credential syncclaude-code-toolkit sync status - Show detailed sync status for all targetsclaude-code-toolkit sync logs [--lines N] - View daemon logsclaude-code-toolkit service install - Install and start systemd user daemonclaude-code-toolkit service uninstall [--keep-config] - Uninstall daemonclaude-code-toolkit service start/stop/restart - Control daemonclaude-code-toolkit service enable/disable - Control auto-start on loginclaude-code-toolkit configure - Interactive configuration wizard (coming
soon)You can configure targets using the CLI commands:
# Add organizations
claude-code-toolkit org add my-org --secret-name CLAUDE_TOKEN
claude-code-toolkit org add another-org --secret-name CUSTOM_CLAUDE_TOKEN
# Add repositories
claude-code-toolkit repo add owner/repo --secret-name CLAUDE_CODE_TOKEN
claude-code-toolkit repo add owner/special-repo --secret-name CUSTOM_TOKEN
# List current configuration
claude-code-toolkit org list
claude-code-toolkit repo list
Alternative: You can directly edit the configuration file at
~/.goodiebag/claude-code/config.yml:
daemon:
log_level: info # debug, info, warn, error
sync_delay_after_expiry: 60 # seconds to wait after token expiry
github:
organizations:
- name: deepbrainspace
secret_name: CLAUDE_CODE_TOKEN # Custom secret name (optional)
- name: another-org
secret_name: CLAUDE_ACCESS_TOKEN
- name: simple-org # Uses default secret name
repositories:
- repo: user/special-repo
secret_name: CUSTOM_CLAUDE_TOKEN
- repo: owner/another-repo # Uses default secret name
notifications:
session_warnings: [30, 15, 5] # Warning times (minutes before expiry)
sync_failures: true # Notify on sync failures
Configuration Notes:
secret_name is omitted, defaults to CLAUDE_CODE_TOKENclaude-code-toolkit service restartclaude-code-toolkit statusThe claude-code-toolkit service install command:
~/.config/systemd/user/claude-code-sync.serviceService Location: ~/.config/systemd/user/claude-code-sync.service
Service Command: {binary_path} daemon Service Type: User service
(systemctl --user)
# View service status
systemctl --user status claude-code-sync
# Control service directly
systemctl --user start/stop/restart claude-code-sync
# View logs
journalctl --user -u claude-code-sync -f
# Remove service manually
systemctl --user stop claude-code-sync
systemctl --user disable claude-code-sync
rm ~/.config/systemd/user/claude-code-sync.service
systemctl --user daemon-reload
~/.claude/.credentials.json for
changesβββββββββββββββββββ ββββββββββββββββββββ βββββββββββββββββββ
β Claude Code βββββΆβ claude-code βββββΆβ GitHub Secrets β
β Credentials β β Daemon β β (Orgs & Repos) β
β ~/.claude/ β β (Systemd) β β β
βββββββββββββββββββ ββββββββββββββββββββ βββββββββββββββββββ
β
βΌ
ββββββββββββββββββββ
β Configuration β
β ~/.goodiebag/ β
β claude-code/ β
ββββββββββββββββββββ
# Check code
cargo check
# Run tests
cargo test
# Build optimized binary
cargo build --release
# Run with NX
nx build claude-code-toolkit
nx test claude-code-toolkit
nx lint claude-code-toolkit
The project includes comprehensive test coverage:
# Run all tests
cargo test
# Run tests with coverage
cargo test --all-features
# Run specific test module
cargo test config::tests
# Lint with clippy
cargo clippy -- -D warnings
# Format code
cargo fmt
# Check formatting
cargo fmt --check
claude-code-toolkit status
systemctl --user status claude-code-sync
claude-code-toolkit sync logs --lines 100
journalctl --user -u claude-code-sync -f
claude-code-toolkit sync now
claude-code-toolkit service uninstall
rm -rf ~/.goodiebag/claude-code
claude-code-toolkit service install
gh CLI for all operationsMIT License - see LICENSE for details.