Skip to content

Commit 18a1a11

Browse files
committed
refactor: data directory re-org
1 parent 95ab73d commit 18a1a11

24 files changed

Lines changed: 4888 additions & 238 deletions

File tree

‎.envrc‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
# Ensure hermit is loaded by the editor
44
eval "$("$PWD/bin/hermit" env -)"
55

6+
# Environment: local for development, dev/prd via doppler
7+
export TERO_ENV="local"
8+
69
# Tero CLI configuration - Local control plane (default for development)
710
export TERO_API_ENDPOINT="http://localhost:8081"
811
export TERO_CHAT_ENDPOINT="http://localhost:8083"
@@ -13,7 +16,7 @@ export TERO_CONTROL_PLANE_DATABASE_URL="postgres://postgres:postgres@localhost:5
1316
export POWERSYNC_API_TOKEN="${POWERSYNC_API_TOKEN:-dev-cli-token}"
1417

1518
# WorkOS client ID (same for local dev)
16-
export TERO_WORKOS_CLIENT_ID="client_01JQCC2CJMTB8AY2JRMZXFY9R1"
19+
export WORKOS_CLIENT_ID="client_01JQCC2CJMTB8AY2JRMZXFY9R1"
1720

1821
# Staging environment (uncomment to use instead of local)
1922
# export TERO_API_ENDPOINT="https://api.usetero.dev/graphql"

‎Taskfile.yml‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,11 @@ tasks:
168168
cmds:
169169
- "{{.ENV_PREFIX}} go run ./cmd/tero auth status"
170170

171+
auth:switch:
172+
desc: Switch organization (TERO_ENV=local|dev|prd)
173+
cmds:
174+
- "{{.ENV_PREFIX}} go run ./cmd/tero auth switch {{.CLI_ARGS}}"
175+
171176
# ===========================================================================
172177
# Admin (internal tooling, not shipped)
173178
# ===========================================================================

‎cmd/admin/main.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ func setup(cmd *cobra.Command) (*workosadmin.Client, string, error) {
9696
scope := log.RootScope(logger)
9797

9898
cliConfig := config.LoadCLIConfig()
99-
tokenStore := keyring.New(cliConfig.Namespace())
99+
tokenStore := keyring.New(cliConfig.Environment())
100100
workosClient := workos.NewClient(cliConfig.WorkOSClientID, cliConfig.APIEndpoint, cliConfig.PowerSyncEndpoint)
101101
authService := auth.NewService(workosClient, tokenStore, scope)
102102

0 commit comments

Comments
 (0)