summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-02-22 20:53:09 +0200
committerPaul Buetow <paul@buetow.org>2026-02-22 20:53:09 +0200
commit9df83b738cd6731c5d7171dc0f4de6bb99871029 (patch)
treefeb1d82ed0b563d9125ea901b7004afd67f18e78
parent7de95e396d729895a7e1e27c1155c9d365fab41c (diff)
Replace all geheim path/name defaults with foostore
- Default data_dir: ~/git/geheimlager → ~/git/foostore-data - Default export_dir: ~/.geheimlagerexport → ~/.foostore-export - Default key_file: ~/.geheimlager.key → ~/.foostore.key - Rename env var GEHEIM_SHELL → FOOSTORE_SHELL - Update package-level comments across cli, shell, store, git, config - Update Magefile and CLAUDE.md docs to reflect new paths Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
-rw-r--r--CLAUDE.md8
-rw-r--r--Magefile.go4
-rw-r--r--internal/cli/cli.go6
-rw-r--r--internal/config/config.go12
-rw-r--r--internal/config/config_test.go8
-rw-r--r--internal/git/git.go2
-rw-r--r--internal/shell/shell.go2
-rw-r--r--internal/store/store.go2
8 files changed, 22 insertions, 22 deletions
diff --git a/CLAUDE.md b/CLAUDE.md
index 7e62888..8304a66 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -32,15 +32,15 @@ Table-driven unit tests exist for all internal packages.
## Fish shell integration
```bash
-./install-fish.sh # installs completions/geheim.fish and completions/ge.fish
+./install-fish.sh # installs completions/foostore.fish and completions/ge.fish
```
## Configuration
Config is read from `~/.config/foostore.json` at startup (merged over defaults). Key fields:
-- `data_dir`: Git repo where encrypted `.index` / `.data` file pairs are stored (default: `~/git/geheimlager`)
-- `key_file`: Path to the raw encryption key file (default: `~/.geheimlager.key`)
-- `export_dir`: Temporary directory for decrypted exports (default: `~/.geheimlagerexport`)
+- `data_dir`: Git repo where encrypted `.index` / `.data` file pairs are stored (default: `~/git/foostore-data`)
+- `key_file`: Path to the raw encryption key file (default: `~/.foostore.key`)
+- `export_dir`: Temporary directory for decrypted exports (default: `~/.foostore-export`)
- `edit_cmd`: Editor used by the `edit` command (default: `$EDITOR`, falling back to `vi`)
- `sync_repos`: List of git remote names to push/pull when syncing
diff --git a/Magefile.go b/Magefile.go
index 571593b..bbfc87a 100644
--- a/Magefile.go
+++ b/Magefile.go
@@ -1,6 +1,6 @@
//go:build mage
-// Magefile provides build targets for the geheim project.
+// Magefile provides build targets for the foostore project.
// Targets: Default (Build), Build, Test, Vet, Install, Uninstall, Clean
// Follows the same style as other projects (e.g. hexai).
package main
@@ -24,7 +24,7 @@ const (
// Default builds the binary so that a bare `mage` invocation is equivalent to `mage build`.
func Default() { mg.Deps(Build) }
-// Build compiles the binary to ./bin/geheim.
+// Build compiles the binary to ./bin/foostore.
func Build() error {
mg.Deps(createBinDir)
fmt.Println("Building", binary)
diff --git a/internal/cli/cli.go b/internal/cli/cli.go
index fb76e90..ef00010 100644
--- a/internal/cli/cli.go
+++ b/internal/cli/cli.go
@@ -1,4 +1,4 @@
-// Package cli implements the command-line interface for geheim.
+// Package cli implements the command-line interface for foostore.
// It mirrors the Ruby CLI class (geheim.rb lines 551-713): parsing argv,
// dispatching commands, and running an optional interactive readline shell.
// Run() is the top-level entry point called by cmd/foostore/main.go.
@@ -138,10 +138,10 @@ func readPIN() (string, error) {
// run dispatches a single command (when argv is non-empty and no shell flag is
// set) or enters the interactive shell loop. Returns an exit code.
func (c *CLI) run(ctx context.Context, argv []string) int {
- // Enter shell mode when: no arguments, $GEHEIM_SHELL is set, or the first
+ // Enter shell mode when: no arguments, $FOOSTORE_SHELL is set, or the first
// argument is "shell". Mirrors the Ruby shell_loop entry conditions.
enterShell := len(argv) == 0 ||
- os.Getenv("GEHEIM_SHELL") != "" ||
+ os.Getenv("FOOSTORE_SHELL") != "" ||
(len(argv) > 0 && argv[0] == "shell")
if enterShell {
diff --git a/internal/config/config.go b/internal/config/config.go
index 04c8302..2f7871e 100644
--- a/internal/config/config.go
+++ b/internal/config/config.go
@@ -1,6 +1,6 @@
-// Package config handles loading and storing geheim configuration.
+// Package config handles loading and storing foostore configuration.
// Defaults mirror the Ruby reference (geheim.rb Config::DEFAULTS).
-// A JSON file at ~/.config/geheim.json overrides individual fields;
+// A JSON file at ~/.config/foostore.json overrides individual fields;
// missing fields keep their default values because Go's json.Unmarshal
// only touches fields that are present in the JSON document.
package config
@@ -17,7 +17,7 @@ import (
const configPath = "~/.config/foostore.json"
// Config holds all application-wide configuration values.
-// JSON field names use snake_case to match geheim.rb Config::DEFAULTS keys.
+// JSON field names use snake_case to match the original geheim.rb Config::DEFAULTS keys.
type Config struct {
DataDir string `json:"data_dir"`
ExportDir string `json:"export_dir"`
@@ -46,9 +46,9 @@ func defaultConfig() Config {
}
return Config{
- DataDir: filepath.Join(home, "git", "geheimlager"),
- ExportDir: filepath.Join(home, ".geheimlagerexport"),
- KeyFile: filepath.Join(home, ".geheimlager.key"),
+ DataDir: filepath.Join(home, "git", "foostore-data"),
+ ExportDir: filepath.Join(home, ".foostore-export"),
+ KeyFile: filepath.Join(home, ".foostore.key"),
KeyLength: 32,
EncAlg: "AES-256-CBC",
AddToIV: "Hello world",
diff --git a/internal/config/config_test.go b/internal/config/config_test.go
index 715a09e..4ad8312 100644
--- a/internal/config/config_test.go
+++ b/internal/config/config_test.go
@@ -78,9 +78,9 @@ func TestLoad_defaults(t *testing.T) {
cfg := Load()
cases := []struct{ name, got, want string }{
- {"DataDir", cfg.DataDir, filepath.Join(dir, "git", "geheimlager")},
- {"ExportDir", cfg.ExportDir, filepath.Join(dir, ".geheimlagerexport")},
- {"KeyFile", cfg.KeyFile, filepath.Join(dir, ".geheimlager.key")},
+ {"DataDir", cfg.DataDir, filepath.Join(dir, "git", "foostore-data")},
+ {"ExportDir", cfg.ExportDir, filepath.Join(dir, ".foostore-export")},
+ {"KeyFile", cfg.KeyFile, filepath.Join(dir, ".foostore.key")},
{"EncAlg", cfg.EncAlg, "AES-256-CBC"},
{"AddToIV", cfg.AddToIV, "Hello world"},
{"EditCmd", cfg.EditCmd, "vi"},
@@ -145,7 +145,7 @@ func TestLoad_override(t *testing.T) {
if cfg.EncAlg != "AES-256-CBC" {
t.Errorf("EncAlg = %q; want AES-256-CBC", cfg.EncAlg)
}
- if cfg.DataDir != filepath.Join(dir, "git", "geheimlager") {
+ if cfg.DataDir != filepath.Join(dir, "git", "foostore-data") {
t.Errorf("DataDir = %q; want default", cfg.DataDir)
}
}
diff --git a/internal/git/git.go b/internal/git/git.go
index af4a394..a1e6d6e 100644
--- a/internal/git/git.go
+++ b/internal/git/git.go
@@ -1,4 +1,4 @@
-// Package git wraps git operations used by geheim to manage the secret store.
+// Package git wraps git operations used by foostore to manage the secret store.
// It mirrors the Git module from the original Ruby implementation (geheim.rb lines 79-123),
// running real git subprocesses rather than using a Go git library.
package git
diff --git a/internal/shell/shell.go b/internal/shell/shell.go
index 1d231b9..16c6366 100644
--- a/internal/shell/shell.go
+++ b/internal/shell/shell.go
@@ -1,4 +1,4 @@
-// Package shell provides interactive readline-based shell integration for geheim.
+// Package shell provides interactive readline-based shell integration for foostore.
// It wraps github.com/ergochat/readline to offer vi mode, tab completion,
// history deduplication (matching the Ruby reference implementation), and
// password reading without echo.
diff --git a/internal/store/store.go b/internal/store/store.go
index 0dfa5e7..3bed381 100644
--- a/internal/store/store.go
+++ b/internal/store/store.go
@@ -1,4 +1,4 @@
-// Package store manages the geheim secret store on disk.
+// Package store manages the foostore secret store on disk.
// It mirrors the Geheim class from the Ruby reference (geheim.rb lines 341-549),
// providing add/import/remove/search/export operations over the encrypted file pairs
// (.index + .data) stored in cfg.DataDir.