Skip to content

Plugin API Reference

Every Atlas plugin gets access to a global atlas object. This object is your entire interface to Atlas — it’s injected into your plugin’s sandbox when it loads. Calling a method that requires a permission your plugin didn’t request will throw an error.

File and directory operations on the user’s vault.

Read the contents of a vault file.

Permissionread_vault
Parameterspath (string) — Path relative to vault root
ReturnsPromise<string> — File contents
const content = await atlas.vault.read('daily/2026-02-27.md');

Create or overwrite a vault file.

Permissionwrite_vault
Parameterspath (string) — Path relative to vault root
content (string) — File contents to write
ReturnsPromise<void>
await atlas.vault.write('notes/my-note.md', '# Hello\nThis is a note.');

List files and directories at a vault path.

Permissionread_vault
Parameterspath (string) — Directory path relative to vault root. Use empty string '' for vault root.
ReturnsPromise<Array<{name: string, isDirectory: boolean}>> — Array of file/directory objects
// List vault root
const items = await atlas.vault.list('');
// [
// { name: 'daily', isDirectory: true },
// { name: 'notes', isDirectory: true },
// { name: 'readme.md', isDirectory: false }
// ]
// List daily notes folder
const dailyNotes = await atlas.vault.list('daily');
// [
// { name: '2026-02-25.md', isDirectory: false },
// { name: '2026-02-26.md', isDirectory: false },
// { name: '2026-02-27.md', isDirectory: false }
// ]

Check if a file exists in the vault.

Permissionread_vault
Parameterspath (string) — Path relative to vault root
ReturnsPromise<boolean>
if (await atlas.vault.fileExists('notes/todo.md')) {
const content = await atlas.vault.read('notes/todo.md');
}

Delete a file from the vault.

Permissionwrite_vault
Parameterspath (string) — Path relative to vault root
ReturnsPromise<void>
await atlas.vault.deleteFile('notes/old-note.md');

Get metadata about a vault file.

Permissionread_vault
Parameterspath (string) — Path relative to vault root
ReturnsPromise<{ size: number, created: string, modified: string, isDirectory: boolean }>
const meta = await atlas.vault.getFileMetadata('notes/todo.md');
console.log(meta.modified); // ISO timestamp
console.log(meta.size); // bytes

Read a binary file from the vault as a Base64-encoded string.

Permissionread_vault
Parameterspath (string) — Path relative to vault root
ReturnsPromise<string> — Base64-encoded file contents
// Read an image file
const base64Image = await atlas.vault.readBinary('attachments/photo.jpg');
// Convert to data URL for display
const dataUrl = `data:image/jpeg;base64,${base64Image}`;
// Or decode to bytes in JavaScript
const binaryString = atob(base64Image);
const bytes = new Uint8Array(binaryString.length);
for (let i = 0; i < binaryString.length; i++) {
bytes[i] = binaryString.charCodeAt(i);
}

User interface components. All UI elements created by a plugin are automatically removed when the plugin is disabled.

Add a clickable button to the Atlas toolbar.

Permissionui_components
Parametersoptions (object) — see below
Returnsstring — Button ID (for later removal)

Options:

FieldTypeDescription
iconstringEmoji or short text displayed on the button
tooltipstringHover text
onClickfunctionCallback when clicked (can be async)
const buttonId = atlas.ui.addToolbarButton({
icon: '🍅',
tooltip: 'Start Pomodoro',
onClick: () => startTimer()
});

Remove a toolbar button by its ID.

Permissionui_components
ParametersbuttonId (string) — ID returned by addToolbarButton
Returnsvoid

Show a toast notification.

Permissionui_components
Parametersmessage (string) — Notification text
type (string, optional) — 'info', 'success', 'warning', or 'error'. Default: 'info'
Returnsvoid
atlas.ui.showNotification('Work session complete!', 'success');
atlas.ui.showNotification('Something went wrong', 'error');

Show a modal dialog. Returns a Promise that resolves when the user clicks a button or dismisses the modal.

Permissionui_components
Parametersoptions (object) — see below
ReturnsPromise<{ value: string, formData: object }>

Options:

FieldTypeDescription
titlestringModal title
contentstringHTML content rendered inside the modal body
buttonsarrayArray of button objects

Button objects:

FieldTypeDescription
labelstringButton text
valuestringValue returned when this button is clicked
typestring'primary' or 'secondary'

Return value:

  • value — The value of the button that was clicked, or 'dismiss' if the modal was closed without clicking a button
  • formData — An object containing values from <input> elements in the modal content, keyed by their id attribute
const result = await atlas.ui.showModal({
title: 'Enter Task',
content: `
<div style="padding: 0.5rem;">
<label>Task name:</label>
<input type="text" id="task-name" placeholder="What are you working on?" />
</div>
`,
buttons: [
{ label: 'Cancel', value: 'cancel', type: 'secondary' },
{ label: 'Start', value: 'start', type: 'primary' }
]
});
if (result.value === 'start') {
const taskName = result.formData['task-name'];
// ...
}

Add a text element to the bottom status bar.

Permissionui_components
Parametersoptions (object) — { text: string, tooltip?: string }
Returnsstring — Item ID (for updates and removal)
const itemId = atlas.ui.addStatusBarItem({
text: '🍅 Ready',
tooltip: 'Pomodoro Timer'
});

atlas.ui.updateStatusBarItem(itemId, options)

Section titled “atlas.ui.updateStatusBarItem(itemId, options)”

Update the text and/or tooltip of an existing status bar item.

Permissionui_components
ParametersitemId (string) — ID returned by addStatusBarItem
options (object) — { text?: string, tooltip?: string }
Returnsvoid
atlas.ui.updateStatusBarItem(itemId, {
text: '🍅 24:30',
tooltip: 'Working: Write documentation'
});

Remove a status bar item by its ID.

Permissionui_components
ParametersitemId (string) — ID returned by addStatusBarItem
Returnsvoid

Execute Atlas agent tools programmatically. These are the same tools the AI agent uses.

Search the vault using RAG (hybrid vector + text search).

Permissionexecute_tools
Parametersquery (string) — Search query
ReturnsPromise<array> — Search results
const results = await atlas.tools.search('meeting notes from last week');

Create a new note in the vault.

Permissionexecute_tools
Parameterspath (string) — Note path relative to vault root
content (string) — Note content (markdown)
ReturnsPromise<void>
await atlas.tools.createNote('notes/pomodoro-log.md', '# Pomodoro Log\n');

Get or create the daily note for a given date.

Permissionexecute_tools
Parametersdate (string, optional) — Date in YYYY-MM-DD format. Defaults to today.
ReturnsPromise<string> — Path to the daily note
const path = await atlas.tools.getDailyNote();
// 'daily/2026-02-27.md'

Add a task to a note (defaults to today’s daily note).

Permissionexecute_tools
Parameterstask (string) — Task text
options (object, optional) — see below
ReturnsPromise<void>

Options:

FieldTypeDescription
datestringDate in YYYY-MM-DD format (defaults to today)
filePathstringSpecific file to add the task to
sectionstringSection heading to add the task under
// Add to today's daily note
await atlas.tools.addTask('Completed pomodoro: Write documentation');
// Add to a specific file under a section
await atlas.tools.addTask('Review PR #42', {
filePath: 'projects/atlas.md',
section: 'Tasks'
});

atlas.tools.toggleTask(taskText, options?)

Section titled “atlas.tools.toggleTask(taskText, options?)”

Toggle a task’s completion status.

Permissionexecute_tools
ParameterstaskText (string) — Text of the task to toggle
options (object, optional) — see below
ReturnsPromise<void>

Options:

FieldTypeDescription
filePathstringFile containing the task
datestringDate of the daily note containing the task
completebooleanForce complete (true) or incomplete (false) instead of toggling
await atlas.tools.toggleTask('Review PR #42', { complete: true });

Full-text search across vault content.

Permissionexecute_tools
Parametersquery (string) — Search query
limit (number, optional) — Max results to return
ReturnsPromise<array> — Matching results
const results = await atlas.tools.searchContent('pomodoro', 10);

Plugin-specific settings and global Atlas configuration.

Get your plugin’s saved settings.

PermissionNone
ReturnsPromise<object> — Your plugin’s settings object (empty {} if none saved)
const settings = await atlas.config.getPluginSettings();
const workDuration = settings.workMinutes || 25;

Save your plugin’s settings. These persist across app restarts.

PermissionNone
Parameterssettings (object) — Key-value pairs to save
ReturnsPromise<void>
await atlas.config.setPluginSettings({
workMinutes: 25,
breakMinutes: 5,
longBreakMinutes: 15,
notificationsEnabled: true
});

Read a global Atlas configuration value.

Permissionconfig
Parameterskey (string) — Configuration key
ReturnsPromise<any> — Configuration value
const leanMode = await atlas.config.get('lean_context_mode');

Write a global Atlas configuration value.

Permissionconfig
Parameterskey (string) — Configuration key
value (any) — Value to set
ReturnsPromise<void>

Per-plugin persistent file storage. Each plugin gets its own data/ directory inside its plugin folder. No permission required.

Read a file from your plugin’s data directory.

PermissionNone
Parametersfilename (string) — Filename (no paths, no ..)
ReturnsPromise<string> — File contents
const history = await atlas.data.read('pomodoro-history.json');
const data = JSON.parse(history);

Write a file to your plugin’s data directory. Creates the data/ directory automatically if it doesn’t exist.

PermissionNone
Parametersfilename (string) — Filename (no paths, no ..)
content (string) — File contents
ReturnsPromise<void>
const history = { sessions: [], totalPomodoros: 42 };
await atlas.data.write('pomodoro-history.json', JSON.stringify(history, null, 2));

Plugin identity, logging, and command registration. No permission required.

Typestring
DescriptionYour plugin’s ID from the manifest
Typestring
DescriptionYour plugin’s display name from the manifest
Typestring
DescriptionYour plugin’s version from the manifest

Log a message to the browser console, prefixed with [Plugin: {id}].

PermissionNone
Parameters...args — Any values to log (same as console.log)
atlas.plugin.log('Timer started for task:', taskName);
// Console output: [Plugin: pomodoro] Timer started for task: Write docs

Register a command with an optional keyboard shortcut.

PermissionNone
Parameterscommand (object) — see below
Returnsstring — Full command ID ("pluginId:commandId")

Command object:

FieldTypeRequiredDescription
idstringYesUnique command ID within your plugin
namestringNoDisplay name
descriptionstringNoWhat the command does
hotkeystringNoKeyboard shortcut (e.g. 'Ctrl+Shift+P')
callbackfunctionYesFunction to call when triggered (can be async)

Hotkey format: Modifier keys (Ctrl, Shift, Alt, Meta) joined with +, followed by a key. Case-insensitive. Examples: 'Ctrl+Shift+P', 'Alt+T', 'Ctrl+E'.

const cmdId = atlas.plugin.registerCommand({
id: 'toggle',
name: 'Toggle Pomodoro Timer',
hotkey: 'Ctrl+Shift+P',
callback: toggleTimer
});

Remove a previously registered command.

PermissionNone
ParameterscommandId (string) — Full ID returned by registerCommand

Read-only access to your plugin’s manifest data. No permission required.

Typestring
DescriptionPlugin ID
Typestring
DescriptionPlugin display name
Typestring
DescriptionPlugin version

If your plugin calls an API method without the required permission, Atlas throws an error:

Error: Plugin "my-plugin" does not have permission "read_vault"

This error is thrown immediately — the operation is not attempted. Make sure your plugin.json includes all permissions your plugin needs.

HookWhen CalledUse For
onLoad()Plugin first loadedInitialize state, add UI elements, register commands
onEnable()After onLoad, or when user re-enablesStart background work, connect to services
onDisable()User disables pluginStop timers/intervals, save state
onUnload()App shutdown or plugin removalFinal cleanup

Auto-cleanup on disable: Atlas removes all toolbar buttons, status bar items, registered commands, keyboard shortcuts, and plugin tab UI that your plugin created. You don’t need to manually remove these.

You must clean up: setInterval / setTimeout timers, event listeners you added outside the atlas API, any ongoing async operations.