Skip to content
Merged
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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ Format based on [Keep a Changelog](https://keepachangelog.com/). Versioning foll

## [Unreleased]

### Changed

- Default API base is now `https://app.voicethere.io/api/v1` (production). Staging/custom hosts via `VOICETHERE_API_BASE` or `login --api-base`.

## [0.10.0] - 2026-08-09

### Added
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ voicethere login --api-key vth_… --user-api-key vthu_…
voicethere login --api-key "$VOICETHERE_API_KEY" --api-base https://app.voicethere.dev/api/v1
```

Default API base: `https://app.voicethere.dev/api/v1`
Default API base: `https://app.voicethere.io/api/v1`

**Credentials & environment precedence** (env wins over the credentials file):

Expand Down
20 changes: 19 additions & 1 deletion src/lib/api.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
DEFAULT_API_BASE,
getCredentialsPath,
readCredentials,
resolveEffectiveCredentials,
writeCredentials,
} from "./config.js";
import { slugifyName } from "../commands/projects/create.js";
Expand All @@ -26,6 +27,7 @@ describe("config", () => {

afterEach(async () => {
delete process.env.VOICETHERE_CREDENTIALS_PATH;
delete process.env.VOICETHERE_API_BASE;
await rm(tempDir, { recursive: true, force: true });
});

Expand All @@ -34,7 +36,23 @@ describe("config", () => {
});

it("defaults api_base to production URL", () => {
expect(DEFAULT_API_BASE).toBe("https://app.voicethere.dev/api/v1");
expect(DEFAULT_API_BASE).toBe("https://app.voicethere.io/api/v1");
});

it("VOICETHERE_API_BASE env overrides file and DEFAULT_API_BASE", async () => {
await writeCredentials({
api_key: "vth_env_override",
api_base: "https://file.example.com/api/v1",
});
process.env.VOICETHERE_API_BASE =
"https://app.voicethere.dev/api/v1";

const effective = await resolveEffectiveCredentials();
expect(effective).toMatchObject({
api_key: "vth_env_override",
api_base: "https://app.voicethere.dev/api/v1",
apiBaseFromEnv: true,
});
});

it("writes and reads credentials with mode 0600", async () => {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
import { homedir } from "node:os";
import { dirname, join } from "node:path";

export const DEFAULT_API_BASE = "https://app.voicethere.dev/api/v1";
export const DEFAULT_API_BASE = "https://app.voicethere.io/api/v1";

export interface Credentials {
/**
Expand Down
Loading