Configuration

Configuration

GoSuki Configuration

First Run Configuration

On first run, GoSuki will automatically generate a default configuration file at $XDG_CONFIG_DIR/gosuki/config.toml. This file serves as the central configuration for all modules and features.

You can view the default configuration template using the command:

gosuki config gen

This will output a TOML file with all available configuration options, pre-filled with default values. The generated file includes sections for:

  • Browser configurations (Chrome, Firefox)
  • Database settings
  • Module-specific options
  • Global settings

Configuration File Structure

The configuration file uses a simple TOML format with sections for different components. Here’s a breakdown of the key sections:

[global]

[global]
watch-all = true
  • watch-all: Whether to monitor all available browsers (default: true)

[database]

[database]
db-path = "~/.local/share/gosuki/"
sync-interval = 4
  • db-path: Database storage location (supports shell expansions like ~ and $HOME)
  • sync-interval: Sync interval in seconds (default: 4)

[chrome]

[chrome]
[chrome.profile_options]
watch-all-profiles = false
profile = "Default"
  • watch-all-profiles: Whether to monitor all Chrome profiles
  • profile: Specific profile to use (default: “Default”)

[firefox]

[firefox]
[firefox.profile-options]
watch-all-profiles = true
profile = "default"
  • watch-all-profiles: Whether to monitor all Firefox profiles (default: true)
  • profile: Specific profile to use (default: “default”)

[html-autoimport]

[html-autoimport]
paths = ["$HOME/shares/bookmarks", "/tmp/bookmarks"]
  • paths: List of directories to scan for HTML bookmark files

[github-stars]

[github-stars]
github-token = "GITHUB_TOKEN"
sync-interval = 4200
  • github-token: GitHub personal access token
  • sync-interval: Sync interval in seconds (default: 4200)

[reddit-saves]

[reddit-saves]
client-id = ""
client-secret = ""
username = ""
password = ""
sync-interval = 3600
  • client-id/client-secret: Reddit API credentials
  • username/password: Reddit account credentials
  • sync-interval: Sync interval in seconds (default: 3600)

Configuration Notes

  1. Path Expansion: Values like ~/.local/share/gosuki/ and $HOME/shares/bookmarks will be automatically expanded to their absolute paths.
  2. Module Configuration: Each module (browser, importer, etc.) has its own configuration section.
  3. Default Values: Unspecified options will use their built-in defaults.
  4. Editing: You can manually edit the config file after generation. Changes will take effect after restarting the daemon.
💡
The generated config file is a template. Customize it according to your needs and environment. Sensitive information like API tokens should be kept secure.