Quickstart
Initialize an OpenAI Agent and start an interactive Session.
1. Install the CLI
Mitome's CLI requires Bun. Install the CLI globally, then initialize the default Mitome Definition:
npm install -g @mitome/cli
mitome initmitome init asks for a Provider and Model, creates the Definition under the Mitome config directory, installs its dependencies, and runs authentication. Choose OpenAI and enter your API key at the masked prompt. You can repeat authentication later with mitome auth login.
The config directory is $MITOME_HOME when set, otherwise $XDG_CONFIG_HOME/mitome, %APPDATA%/mitome on Windows, or $HOME/.config/mitome.
2. Inspect the generated Definition
The generated index.ts uses the Promise-first SDK and makes persistence explicit:
import { defineAgent, defineMitome, fileTranscripts } from "@mitome/sdk";
import { instructionFiles } from "@mitome/sdk/extensions";
import { openai } from "@mitome/providers/openai";
const agent = defineAgent({
providers: [openai()],
model: "openai/gpt-5.4-mini",
extensions: [instructionFiles({ paths: ["./AGENTS.md"], discover: ["AGENTS.md"] })],
});
export default defineMitome({
agent,
hosts: [],
transcripts: fileTranscripts(),
});transcripts: fileTranscripts() stores committed messages and Turn events under <config-dir>/transcripts. Delete that line to make the Definition write no Transcript data. See Transcript persistence before choosing another adapter.
3. Add the interactive Host
The TUI is explicitly composed; installing it does not activate it:
mitome add @mitome/tuiAdd its import and Host value to index.ts:
import { tui } from "@mitome/tui";
export default defineMitome({
agent,
hosts: [tui()],
transcripts: fileTranscripts(),
});Now open an interactive Session:
mitomeOr pre-submit the first Turn:
mitome "Explain this Agent's instructions"Use -p for one-shot output. Continue with the TUI controls, or learn how to embed the Agent with the SDK.
API-key safety
Never commit .env, paste a real Credential into the Definition, or log it. See OpenAI authentication for the complete precedence and storage contract.