Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
115 changes: 115 additions & 0 deletions PROFILES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
# Go Note Go Profiles

Profiles allow you to quickly switch between different Go Note Go configurations. Each profile stores a complete snapshot of all settings, plus a name and optional numeric shortcut.

## Quick Start

### Create Your First Profile

Set up your settings the way you want them, then save as a profile with a shortcut:

```
:profile save roam 1
```

This creates a profile named "roam" with shortcut `:1`.

### Switch Between Profiles

Use the numeric shortcuts you've configured:
```
:1 # Switch to profile with shortcut 1
:2 # Switch to profile with shortcut 2
:3 # Switch to profile with shortcut 3
:4 # Switch to profile with shortcut 4
```

Or use the full command:
```
:profile load roam
```

## Commands

### Save a Profile
```
:profile save <name> # Save without shortcut
:profile save <name> <number> # Save with numeric shortcut
```

Examples:
```
:profile save roam 1 # Save as "roam" with shortcut :1
:profile save work 2 # Save as "work" with shortcut :2
:profile save temp # Save as "temp" with no shortcut
```

### Load a Profile
```
:profile load <name> # Load by name
:<number> # Load by shortcut (if configured)
```

Your current settings are automatically backed up to the `backup` profile before loading.

### List Profiles
```
:profile list
```
Shows all saved profiles with their shortcuts (if any).

Example output: `Profiles: backup, roam (:1), temp, work (:2)`

### Current Profile
```
:profile current
```
Shows which profile is currently active.

### Delete a Profile
```
:profile delete <name>
```
Deletes a saved profile and removes its shortcut mapping.

## Example Use Cases

### Personal vs Work
```
:profile save personal 1 # Personal Roam graph
:profile save work 2 # Work note-taking system
```

Then switch with `:1` or `:2`

### Different Assistants
```
:profile save assistant 3 # Connected to personal assistant
:profile save guest 4 # Safe settings for demos
```

### Different Upload Destinations
Switch between Roam, RemNote, Notion, etc. with a single command.

## How It Works

- Each profile stores all settings from `secure_settings.py` as JSON in Redis
- Profile metadata (name, shortcut) is stored with the settings
- Shortcuts are mapped dynamically in Redis (no hardcoded values)
- When you load a profile, current settings are backed up to `backup`
- The `backup` profile always contains your most recent settings

## Safety

- Your current settings are always backed up to `backup` before loading a new profile
- The secure_settings.py file is never modified - profiles only affect Redis settings
- You can always revert: `:profile load backup`
- Deleting a profile also removes its shortcut mapping

## Configuration

Profiles are completely user-configurable:
- Choose your own profile names
- Assign any numeric shortcuts you want
- No hardcoded profile names in the codebase
- Works for any Go Note Go user
1 change: 1 addition & 0 deletions gonotego/command_center/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from gonotego.command_center import assistant_commands # noqa: F401
from gonotego.command_center import custom_commands # noqa: F401
from gonotego.command_center import note_commands # noqa: F401
from gonotego.command_center import profile_commands # noqa: F401
from gonotego.command_center import settings_commands # noqa: F401
from gonotego.command_center import system_commands # noqa: F401
from gonotego.command_center import twitter_commands # noqa: F401
Expand Down
79 changes: 79 additions & 0 deletions gonotego/command_center/profile_commands.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# Profile commands for switching between Go Note Go configurations.

from gonotego.command_center import registry
from gonotego.command_center import system_commands
from gonotego.settings import profiles

register_command = registry.register_command
say = system_commands.say


@register_command(r'p(\d)')
def load_profile_shortcut(shortcut):
"""Load a profile using numeric shortcut (e.g., :p1, :p2, :p3)."""
# Check if this is a numeric shortcut
if not shortcut.isdigit():
return # Not a profile shortcut

profile_name = profiles.get_profile_by_shortcut(shortcut)
if profile_name is None:
say(f'Profile {shortcut} not found')
return # No profile mapped to this shortcut

result = profiles.load_profile(profile_name)

if result is None:
say(f'Profile {profile_name} not found.')
else:
say(f'Loaded profile: {profile_name}')


@register_command('profile save {} {}')
def save_profile_with_shortcut(profile_name, shortcut):
"""Save current settings as a named profile with a shortcut."""
profiles.save_profile(profile_name, shortcut=shortcut)
say(f'Saved profile: {profile_name} with shortcut :{shortcut}')


@register_command('profile save {}')
def save_profile(profile_name):
"""Save current settings as a named profile."""
profiles.save_profile(profile_name)
say(f'Saved profile: {profile_name}')


@register_command('profile load {}')
def load_profile(profile_name):
"""Load a named profile."""
result = profiles.load_profile(profile_name)
if result is None:
say(f'Profile not found: {profile_name}')
else:
say(f'Loaded profile: {profile_name}')


@register_command('profile list')
def list_profiles():
"""List all saved profiles with their shortcuts."""
profile_names = profiles.list_profiles()
if not profile_names:
say('No profiles saved.')
else:
say(f'Profiles: {", ".join(profile_names)}')


@register_command('profile current')
def current_profile():
"""Show the currently active profile."""
current = profiles.get_current_profile()
if current is None:
say('No profile currently active.')
else:
say(f'Current profile: {current}')


@register_command('profile delete {}')
def delete_profile(profile_name):
"""Delete a saved profile."""
profiles.delete_profile(profile_name)
say(f'Deleted profile: {profile_name}')
9 changes: 4 additions & 5 deletions gonotego/settings-server/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading