Ignis / Plugins
Ignis plugin guide
How to write a plugin for the Ignis launcher in C# with the plugin SDK: answer what the user types, give Ignis a list of items to search, add actions, settings and previews, and publish the result. Ignis is a launcher for Windows 11, and it is on the Microsoft Store.
What you need
Ignis is a launcher for Windows 11: press its hotkey (Win+Alt+Space unless you changed it), type, and choose a result. A plugin adds results of its own. It either answers what the user types after its keyword (a calculator, a translator), or gives Ignis a list of items that Ignis keeps and searches itself (boards, bookmarks, snippets), or both.
A plugin is a program of its own. Ignis starts it and talks to it over stdin and stdout, so a plugin
that crashes, hangs or leaks memory can't take Ignis down with it. Plugins are written in C# with the
Ignis plugin SDK, the NuGet package Ignis.Plugins.Sdk, which does all the talking for you.
To write one you need:
- Ignis, to run your plugin. Ignis is on the Microsoft Store.
- Windows 11 on x64. Ignis runs on Windows 11 only, and a plugin is a 64-bit Windows program.
- The .NET 10 SDK. The template makes a .NET 10 project. (The Ignis SDK library itself works from .NET 8 on.)
- The C++ build tools. A plugin is published with Native AOT, which needs them: the "Desktop development with C++" workload, in Visual Studio or in the Build Tools for Visual Studio. See Publishing the plugin.
Your first plugin
The Ignis.Plugins.Templates package has a template, ignis-plugin, that makes a working plugin:
dotnet new install Ignis.Plugins.Templates
dotnet new ignis-plugin -n Shout
cd Shout
dotnet publish -c Release
dotnet new ignis-plugin -n Shout makes a folder Shout with:
Shout\
├── Shout.csproj Native AOT, win-x64, a reference to Ignis.Plugins.Sdk
├── Program.cs Starts the plugin
├── ShoutQueryHandler.cs Answers the searches
├── plugin.json What Ignis needs to know about the plugin
├── README.md
└── .gitignore
The template takes two options besides the name (-n; without it, the current folder's name):
| Option | Default |
|---|---|
--id |
The plugin's id. By default the project name in lower case, with every character other than a-z, 0-9, ., _ and - replaced by -, and any leading characters that aren't a-z or 0-9 left out (plugin if nothing is left): My.Cool_Plugin gives my.cool_plugin. |
--keyword |
The text that sends a search to the plugin. By default the project name in lower case, letters (of any alphabet) and digits only (plugin if nothing is left): My.Cool_Plugin gives mycoolplugin. |
Both end up in plugin.json, where you can change them later. An id is for good: Ignis treats a plugin
with another id as another plugin, so pick one that is yours, such as com.example.shout.
The code. Program.cs hands your class to the SDK:
using Shout;
// The SDK type by its full name, so that a project named like it (PluginHost) still builds.
await global::Ignis.Plugins.Sdk.PluginHost.RunAsync(new ShoutQueryHandler());
and ShoutQueryHandler.cs answers each search:
namespace Shout;
// Inside the namespace, so that the SDK's types win over a namespace of the same name (a project named PluginResult).
using System.Runtime.CompilerServices;
using Ignis.Plugins.Sdk;
sealed class ShoutQueryHandler : IQueryHandler
{
public async IAsyncEnumerable<PluginResult> QueryAsync(
PluginQuery query, [EnumeratorCancellation] CancellationToken ct)
{
if (string.IsNullOrWhiteSpace(query.Text))
{
yield return new PluginResult("help", "Type some text to shout it")
{
Subtitle = "Shows what you type in upper case, ready to copy",
};
yield break;
}
var shouted = query.Text.ToUpperInvariant();
yield return new PluginResult("shout", shouted)
{
Subtitle = "Enter to copy",
Actions = [PluginAction.Copy(shouted)],
};
}
}
query.Text is what the user typed after the keyword and a space. Each PluginResult is a row in Ignis's
list, and its Copy action is what Enter does.
The manifest. plugin.json tells Ignis what the plugin is and how to start it:
{
"id": "shout",
"name": "Shout",
"description": "Answers searches that start with 'shout'.",
"version": "1.0.0",
"author": "",
"protocolVersion": 1,
"minIgnisVersion": "2.1.0",
"run": { "command": "Shout.exe" },
"keyword": "shout",
"permissions": [],
"logLevel": "Info"
}
Every field is described under plugin.json.
Build it. dotnet publish -c Release compiles the plugin with Native AOT (a minute or so) and writes
the installable package, bin\Release\shout-1.0.0.zip. If it fails, see
Publishing the plugin.
Install it. Open Ignis's Settings (right-click the Ignis icon in the notification area and choose
Settings...). Under Plugins, choose Install plugin, pick the ZIP and answer Yes. Then open
Ignis and type shout hello: one row, HELLO, and Enter copies it.
To change the plugin, edit the code, raise version in plugin.json, publish again and install the new
ZIP over the old one. That is an update: the plugin keeps its settings and secrets.
Answering queries
A class that implements IQueryHandler answers the searches meant for the plugin: those that start
with its keyword, and every search if it is global. QueryAsync returns
IAsyncEnumerable<PluginResult>, so results can come in as they are ready:
public async IAsyncEnumerable<PluginResult> QueryAsync(
PluginQuery query, [EnumeratorCancellation] CancellationToken ct)
{
if (string.IsNullOrWhiteSpace(query.Text))
yield break;
var shouted = query.Text.ToUpperInvariant();
// The first result is shown at once.
yield return new PluginResult("shout", shouted)
{
Subtitle = "Enter to copy",
Score = 100,
Actions = [PluginAction.Copy(shouted)],
};
// A slower one is streamed in when it is ready. Using the same id again would replace the
// row instead.
await Task.Delay(300, ct);
yield return new PluginResult("whisper", query.Text.ToLowerInvariant())
{
Score = 40,
Actions = [PluginAction.Copy(query.Text.ToLowerInvariant())],
};
}
What the SDK does for you:
- It waits up to 250 ms for
QueryAsyncto finish. If it does, every result is sent together. If not, the results so far are sent and the rest are streamed to Ignis as you yield them (batched, at most every 50 ms). Yielding a result whoseIdwas yielded before in the same query replaces it. That is how a result that grows (an answer typed out over several seconds) is shown. ctis cancelled when the search is no longer wanted: the search text changed (the user typed another character) or a newer search started, or the plugin is being stopped. Hiding the window does not cancel a query. Stop and return. See Cancelling a query.query.Keywordis the keyword the search started with (null for a global search or a fallback), andquery.Reasonsays why the plugin was asked:"keyword","global"or"fallback".- An exception from
QueryAsync(other than a cancellation) is logged in the plugin's log and ends the query; the plugin keeps running. - Stdout belongs to the SDK's messages to Ignis.
PluginHost.RunAsyncredirectsConsole.Outto stderr, so a strayConsole.WriteLineends up in the plugin's log instead of corrupting a message.
PluginHost.RunAsync takes one object, which implements whichever of IQueryHandler, IItemSource
(item sources), IFallbackHandler (fallbacks), IActionHandler
(custom actions) and IPluginStartup (below) the plugin needs.
Start-up, shut-down and logging
- If the plugin class implements
IPluginStartup,StartAsync(PluginContext, CancellationToken)runs once before the first query (while Ignis waits for the plugin to start, so keep it short). ThePluginContexthasLogger,DataDirectory,IgnisVersion,Culture,Theme,Items,Settings,SecretsandHost. A plugin withoutIPluginStartupgets no context, so it has no settings, secrets or host services. DataDirectoryis a folder of the plugin's own, for files it keeps:%LOCALAPPDATA%\Ignis\PluginData\<id>\. Don't write into the plugin's own folder: an update replaces it.- If the class implements
IAsyncDisposable(orIDisposable), it is disposed when Ignis shuts the plugin down, or when Ignis goes away. - Log with
context.Logger(IPluginLogger:Debug,Info,Warn,Error;WarnandErroralso take an exception). It is the SDK's own interface, with no logging library behind it. The lines go to the plugin's log,%LOCALAPPDATA%\Ignis\Logs\Plugins\<id>.log, with what the plugin writes to stderr.logLevelinplugin.jsonsets the lowest level that is kept.
Results and actions
PluginResult has Id, Title, Subtitle, IconPath, Score (0-100), Autocomplete,
PreviewMarkdown, PreviewText, PreviewImagePath and Actions. See
Previews and autocomplete.
IconPath (and the manifest's icon) must name an image file inside your plugin folder: .png,
.jpg, .jpeg, .ico, .bmp or .gif, at most 1 MB, given relative to the folder or as a full
path into it. Anything else (a file elsewhere, a network share, a link) is ignored: the result
shows the manifest's icon, else the Ignis icon.
Actions are made with PluginAction:
| Factory | Does | Done by |
|---|---|---|
PluginAction.Copy(text, title) |
Puts text on the clipboard | Ignis |
PluginAction.Open(target, title) |
Opens a web address, file or folder | Ignis |
PluginAction.Launch(command, args, title, workingDirectory) |
Starts a program for the user (args, title and workingDirectory are optional) |
Ignis; needs the launch permission |
PluginAction.SetQuery(text, title) |
Puts text in the search box | Ignis |
PluginAction.Custom(id, title) |
Whatever your IActionHandler does |
Your plugin |
The first four are built-in actions: Ignis does them itself, with no round trip to your plugin, so
Enter never waits for your process and they work even if it has stopped. Use them whenever you can.
Set IsDefault = true on the action Enter should run (otherwise the first one is the default), and
KeepOpen = true to leave the window open afterwards, with with:
PluginAction.Copy(text) with { KeepOpen = true }. The other actions are in the actions menu and run
by their shortcut: see Actions: shortcuts, confirmation and the menu.
What Open may open. Without the launch permission, Open only opens:
http,httpsandmailtoaddresses;- a file or folder that exists, given as a full path, when the file isn't a program or script
(
.exe,.lnk,.ps1,.batand so on).
Anything else needs "launch" in permissions: other URI schemes (ms-settings:, spotify:,
file:), programs and scripts. A relative or missing path is refused either way. Launch is never
run through a shell and refuses .bat and .cmd files. A console program started with Launch
gets no console window (a program with windows of its own shows them as usual). An action that is
refused is logged and the window stays open.
Custom actions. For something only your plugin can do, return PluginAction.Custom("archive", "Archive")
and implement IActionHandler:
sealed class MyPlugin : IQueryHandler, IActionHandler
{
public Task<ActionOutcome> InvokeAsync(PluginActionRequest request, CancellationToken ct)
{
// request.ResultId and request.ActionId say what the user picked.
return Task.FromResult(ActionOutcome.Hide); // or ActionOutcome.KeepWindowOpen,
// or new ActionOutcome(true, "new search text")
}
}
A custom action has 10 seconds, starting your plugin included. If it isn't done by then, it is cancelled and the window stays open. For anything longer, start the work, return at once, and show the outcome some other way.
Action ids. They must be unique within one result. The SDK gives built-in actions ids that start
with $ ($copy, then $copy.1 for a second copy) and throws if a custom id starts with $.
Actions: shortcuts, confirmation and the menu
Enter or a click runs a result's default action. The others are in the actions menu, which opens with Tab, Shift+F10, the Apps key or a right-click on the result. A result with no actions has no menu. An item's actions are read from where Ignis keeps the item, so its menu may take a moment to fill.
Three more things can be set on a PluginAction:
Actions =
[
PluginAction.Copy(board.Url, "Copy link"),
PluginAction.Custom("archive", "Archive board") with { Shortcut = "Ctrl+B", HideAtOnce = true },
PluginAction.Custom("delete", "Delete board") with
{
Shortcut = "Ctrl+D",
Confirm = new ActionConfirmation("Delete board?", "This can't be undone.", "Delete"),
},
]
PluginAction is a record, so these are set with with on what a factory returns.
Shortcutruns the action while its result is selected. A shortcut needs Ctrl or Alt, unless it is F1 to F24. The keys are A to Z, 0 to 9, F1 to F24, Delete, Insert and Space; write it like"Ctrl+Shift+D". Ctrl and Alt together with a letter or digit (Ctrl+Alt+E,Ctrl+Alt+Shift+7) are refused: Windows reports AltGr as Ctrl+Alt, and AltGr with those keys types characters (@, €, {) on many keyboards;Ctrl+Alt+F5is fine. While AltGr (the right Alt key) is held no shortcut runs. Ignis's own keys are refused:Ctrl+A,Ctrl+C,Ctrl+V,Ctrl+X,Ctrl+Z,Ctrl+Y,Ctrl+Delete,Ctrl+Insert,Ctrl+Shift+C,Ctrl+Shift+E,Ctrl+Shift+R,Alt+F4,Alt+Space,F10andShift+F10. An invalid or refused shortcut is dropped from its action (the action stays in the menu) and logged in the plugin's log. When two actions of one result have the same shortcut, the second loses it.Confirmasks first. Ignis shows the question inside the search window, with the title, the message and two buttons: yourButtontext (default "Yes") and No, which has the focus. Escape, a click on No, hiding the window and changing the search text all answer No, and then nothing runs. While the question shows, most other keys are held back, so a stray key can't run something else.HideAtOnce(a custom action only) hides the window as soon as the action is sent, without waiting for your answer. Your answer is then dropped, so itsActionOutcome.SetQueryhas no effect. Use it for an action that takes a while and shows its result some other way. WithoutHideAtOnceandKeepOpen, Ignis waits for your answer (at most 10 seconds) and follows it. If you set both, the window hides. A built-in action never waits for the plugin.
Previews and autocomplete
A result can carry a preview: PreviewMarkdown, PreviewText or PreviewImagePath. While the
selected result has one, Ignis shows it in a pane to the right of the list and widens the window (from
640 to 1,048 px, kept centred on its monitor). A streaming answer updates its preview by sending the
result again with the same id.
- Of the three, the first one present is shown: markdown, then text, then image. Markdown or text longer than 65,536 characters is cut, with "…".
- Markdown shows paragraphs, lists, code, links, bold, italics and headings. Tables and images inside
it show as plain text. Links open only when they are
http,httpsormailto. A preview has at most 500 blocks, 2,000 inline pieces and 16 levels of nesting; past that it ends with "…". Text the Markdown parser refuses is shown as plain text. - Text is shown as it is, up to 500 lines.
- An image must be a
.png,.jpg,.jpeg,.gifor.bmpof at most 10 MB, inside your plugin folder or your data folder (context.DataDirectory). It may have at most 40 million pixels, and is decoded to at most 2,048 pixels on its longest side, off the UI thread. Any other image is left out, and the result has no preview. - Items of an item source have no preview and no autocomplete: Ignis keeps only an item's id, title, subtitle, keywords, score and icon in memory. A source that wants a preview must also answer queries.
Autocomplete. When the selected result has Autocomplete and the caret is at the end of the search
text, Right arrow replaces the text after your keyword with it (the keyword and its space stay) and
searches again. Tab isn't used for this: it opens the actions menu.
Fallbacks
A fallback plugin answers when nothing else found anything, such as "search the web for ...". Mark the
manifest "fallback": true and implement IFallbackHandler:
sealed class WebSearchPlugin : IFallbackHandler
{
public async IAsyncEnumerable<PluginResult> FallbackAsync(
PluginQuery query, [EnumeratorCancellation] CancellationToken ct)
{
await Task.CompletedTask; // nothing to wait for here
yield return new PluginResult("web", $"Search the web for \"{query.Text}\"")
{
Actions = [PluginAction.Open("https://duckduckgo.com/?q=" + Uri.EscapeDataString(query.Text))],
};
}
}
- Ignis asks a fallback only for a plain query: no
@,#or!prefix and no plugin keyword, with some text, and only when the instant sources (apps, commands, documents, history and items) found nothing. The query'sReasonis"fallback". It is asked at the same time as the global plugins, not after them. - A fallback's rows come after every other row, and they show only while there is no other row. If a global plugin answers a moment later, the fallback rows go. A fallback may be asked and then not shown.
- A plugin that is both
globalandfallbackis asked twice for such a query, once for each reason. A plugin with anIFallbackHandlerand anIQueryHandlergets fallback queries inFallbackAsyncand the others inQueryAsync. A plugin with only anIFallbackHandleranswers any other query with nothing. - A fallback sees everything the user types, so the install question and the plugin's card say so.
The "working…" row. A plugin with a keyword that hasn't answered 300 ms after the query gets one row, "{Name} is working…", which can't be run and has no menu. It goes when the plugin's first results arrive or its query ends, or when every plugin for the search is done.
Cancelling a query
Ignis cancels a plugin's previous query on every keystroke. In C# that is the CancellationToken your
QueryAsync (or FallbackAsync) gets: when it is cancelled, stop working on that query and return.
Pass the token on to what you wait for (Task.Delay(300, ct), HttpClient.GetAsync(url, ct)); an
OperationCanceledException that comes out of QueryAsync because of it is fine.
The SDK tells Ignis at once that the query is cancelled and sends nothing more for it, even while your code still runs, so results yielded after the cancel are never shown. Code that ignores the token only wastes the plugin's own time, and holds up the next query if it keeps the plugin busy.
Time limits
- A query must be answered within 1 second of being sent. The SDK answers by 250 ms with what you have yielded so far and streams the rest, so this only bites when your plugin is too busy to answer at all. The clock starts when the query is sent, after the plugin has started.
- While a query streams, each new batch of results must follow the last within 30 seconds, until
QueryAsyncreturns. - Miss a limit and the query is cancelled and your results for it are dropped. Miss three in a row, or leave a cancel unanswered for 2 seconds, and the plugin is restarted. (The SDK answers a cancel at once, so only a plugin too busy to run the SDK's code misses that.)
- A custom action has 10 seconds.
- An item source has 30 seconds to answer a load, and each later page of a load must follow the previous one within 30 seconds (see Item sources). A load that misses either is given up and tried again at the next refresh; the plugin is not restarted for it.
- A plugin that crashes three times within five minutes is marked Failed. Its card in Settings gives the reason and has a Start again button; turning the plugin off and on resets it too.
- Ignis stops a plugin that has had no requests for 10 minutes. It starts again on the next query.
Plugins that come with Ignis, plugins that set
"startup": "eager"and item sources with"watch": trueare kept running. - On shutdown Ignis asks the plugin to stop and kills the process after 2 seconds.
- A call to a host service (
context.Host,context.Secrets.SetAsync) waits at most 10 seconds for Ignis's answer, then throwsTimeoutException(see Host services). - Ignis logs at most 200 of a plugin's stderr and
Loggerlines per 10 seconds. A plugin that writes more has the rest left out of its log, and one line then says how many.
Message size. Each message between Ignis and a plugin is one line of JSON of at most 4 MB. The SDK never sends a bigger one, so a plugin built with it is never killed for this:
- Results and items are sent in pages of at most 1 MB. A single result or item bigger than that is left out and logged as an error.
- A host call that would be over 4 MB (a huge clipboard text, say) sends nothing and throws
PluginHostExceptionwithCodeInvalidParamsand the message "The request is too large to send to Ignis.". - A log line that would be over 4 MB is replaced by a short warning that says how long it was.
- An answer that would be over 4 MB (a custom action's new search text, say) is sent as an
InternalErrorinstead.
A plugin that writes anything else to stdout (a line that isn't a protocol message) is killed and counted as crashed.
Queues. The SDK and Ignis each hold only so much of what the other sends:
- A request from Ignis that your plugin has not answered yet (a query in its first 250 ms, a custom
action, a load, a button) holds one of the plugin's 64 request slots. A handler that waits for an
answer from Ignis (
await context.Host.SetClipboardTextAsync(...)insideInvokeAsync, say) keeps its slot while it waits. When all 64 are taken, the next request from Ignis makes the SDK stop reading until a slot is free, and Ignis's answers to your host calls wait behind it. So a plugin whose 64 handlers all wait on host answers stalls until those calls reach their 10-second limit and throwTimeoutException. Don't keep many handlers waiting on host services. - Ignis answers at most 64 of a plugin's host requests at a time. While 64 are unanswered it stops reading the plugin's output until one is answered, so a 65th request, and anything sent after it, waits. Wait for an answer before sending many more.
- Ignis keeps at most 256 of a plugin's messages that need no answer (streamed results, log lines, pushed items) waiting. While that many wait it stops reading, so the plugin is held back, and its own answers queue behind them. Keep them modest.
Item sources
A plugin that answers a query on every keystroke is right for a calculator. For a list (boards,
bookmarks, snippets, files) it is better to hand Ignis the list: Ignis stores it, searches it itself as
the user types, and still has it at start-up before your plugin has started. Such a plugin is an
item source: it implements IItemSource and its manifest has an items section.
{
"id": "com.example.snippets",
"name": "Snippets",
"version": "1.0.0",
"protocolVersion": 1,
"run": { "command": "Snippets.exe" },
"keyword": "snip",
"items": { "refresh": "PT10M", "watch": false, "global": false }
}
items field |
Meaning |
|---|---|
refresh |
How often Ignis asks for the items again, an ISO 8601 duration of at least one minute ("PT5M", "PT1H"). Left out or null: only at start-up. |
watch |
true keeps your plugin running so it can push changes as they happen. Default false: Ignis stops the plugin when a load is done and starts it again for the next one. |
global |
true searches your items for every query. Default false: only after your keyword. |
A manifest with items needs a keyword or global: true (at the top level or in items); without
one nothing could bring the user to the items, and Ignis refuses the manifest.
What the user sees. Typing the keyword and a space lists your items, best Score first, and text
after it narrows them (the match is against Title and Keywords). With global, items also appear
among the results of ordinary searches. An item's final rank is how well the text matches it plus its
Score (0 to 100, 50 when left out). Choose Enter and the item's default action runs.
The code. Implement IItemSource.LoadAsync; the SDK pages and sends what you return.
using Ignis.Plugins.Sdk;
await PluginHost.RunAsync(new SnippetsPlugin());
sealed class SnippetsPlugin : IItemSource, IPluginStartup
{
private string _file = "";
public Task StartAsync(PluginContext context, CancellationToken ct)
{
_file = Path.Combine(context.DataDirectory, "snippets.txt");
return Task.CompletedTask;
}
public Task<ItemLoad> LoadAsync(ItemLoadRequest request, CancellationToken ct)
{
// The token is whatever tells us where we were: here, when the file last changed.
var token = File.Exists(_file) ? File.GetLastWriteTimeUtc(_file).Ticks.ToString() : "none";
// Nothing changed since the load Ignis has: say so with an empty delta. Ignis keeps its items.
if (request.SyncToken == token)
return Task.FromResult(new ItemLoad(ItemLoadMode.Delta, [], token));
// Otherwise send everything. A reset replaces all the items Ignis has for this plugin.
return Task.FromResult(new ItemLoad(ItemLoadMode.Reset, ReadAll(), token));
}
private List<PluginItem> ReadAll() =>
File.Exists(_file)
? File.ReadLines(_file).Where(l => l.Length > 0).Select(ToItem).ToList()
: [];
// The id is what makes an item "the same item" in the next load, so it must be stable: not a
// string.GetHashCode(), which differs from run to run.
private static PluginItem ToItem(string line) => new(Id: line, Title: line)
{
Subtitle = "Enter to copy",
Keywords = ["snippet"],
Score = 50,
Actions = [PluginAction.Copy(line)],
};
}
Reset and delta. ItemLoad.Mode says what the items are:
ItemLoadMode.Reset: the items are all there is. When the load is complete, Ignis forgets the stored items that were not sent. Use it for a full read.ItemLoadMode.Delta: the items are new or changed (an item with an id Ignis has replaces it), and nothing is removed. Use it whenrequest.SyncTokenlets you send only what changed since the last load. A delta cannot remove an item: send removals withcontext.Items.RemoveAsync, or answer with a reset.
SyncToken is yours to define (a timestamp, a cursor, a version). Ignis stores the token you return
with the items, once the load is complete, and gives it back in the next ItemLoadRequest; it is null
for the first load, and after the items were cleared. A load that is not completed (your plugin
crashed, or ran out of time) changes nothing for a reset; for a delta, the changes received stay and the
token stays what it was.
Pushing changes. An item source that stays running ("watch": true) tells Ignis about changes as
they happen, through PluginContext.Items, which StartAsync receives:
public Task StartAsync(PluginContext context, CancellationToken ct)
{
_items = context.Items;
_watcher = new FileSystemWatcher(Path.GetDirectoryName(_file)!, "snippets.txt");
_watcher.Changed += async (_, _) => await _items.UpsertAsync(ReadAll());
_watcher.EnableRaisingEvents = true;
return Task.CompletedTask;
}
// Elsewhere:
await _items.RemoveAsync(["an old snippet"]); // drop items by id
await _items.NotifyDataChangedAsync(); // "my data changed": Ignis runs the shown search again
UpsertAsync(items)adds items or replaces those with the same id.RemoveAsync(ids)drops items. A long list is sent in several messages. Both take effect at once.NotifyDataChangedAsync()only says the plugin's data changed, so Ignis runs the search that is shown again (at most once a second per plugin). It does not make Ignis start a load: to put new items in front of the user, push them withUpsertAsync, or wait forrefresh.- Items pushed while a load of yours runs are taken into that load. For a reset load a removal has nothing to remove, since a reset sends the whole set.
Limits.
- A plugin keeps at most 100,000 items. Past that, items with new ids are refused and logged in the plugin's log (an id Ignis already has is still updated).
- The SDK splits a load or an
UpsertAsyncinto messages of at most 1 MB of JSON. An item that is bigger than that alone is left out and logged as an error. - Ignis holds an item's id, title, subtitle, keywords, score and icon path in memory. Its actions are
kept on disk and read when the user chooses the item. Keep titles short, and don't put a document's
text in
Keywords.
When your plugin is started. About five seconds after Ignis starts it loads every item source, one
at a time, and then again whenever refresh has passed (the schedule is looked at once a minute, so a
load can be up to a minute late). A load starts your plugin if it is not running. When the load is
complete, Ignis stops a plugin that does not watch; if the load did not complete, it stops the plugin
whatever watch says, and starts it again at the next load. A source whose loads keep failing waits
longer each time: after the n-th load in a row that was not completed, the next try waits 2^(n-1) minutes,
at most 60, so a failing watching source is not restarted every minute. A completed load ends the wait,
and Refresh now on the plugin's card in Settings skips it. A change to one of the source's settings
loads it again at once. The items from the last run are searchable from the moment Ignis starts, before
this. An item's actions that Ignis does itself (Copy, Open, Launch, SetQuery) run without your
plugin; a Custom action starts it if needed.
Turning off and uninstalling. A plugin the user turned off is not loaded and its items are not searched. Uninstalling it, or installing a new version over it, removes its stored items; the new version loads its own. A source that was just installed is loaded at once, not at the next look.
A plugin that is both. A class may implement IQueryHandler as well as IItemSource, to answer
live queries (for a keyword) and give a list. A plugin that only implements IItemSource is never sent a
query.
Settings
A plugin declares the settings it needs in plugin.json; Ignis shows them on the plugin's card in Settings
and keeps the values. The plugin never builds a settings screen.
"settings": [
{ "key": "apiKey", "type": "secret", "label": "API key", "description": "From your account page." },
{ "key": "model", "type": "choice", "label": "Model", "choices": ["small", "large"], "default": "small" },
{ "key": "cliPath", "type": "path", "label": "Command-line tool", "pathKind": "file" },
{ "key": "maxResults", "type": "number", "label": "Results", "min": 1, "max": 50, "default": 10 },
{ "key": "includeArchived", "type": "bool", "label": "Include archived", "default": false },
{ "key": "nickname", "type": "string", "label": "Nickname" },
{ "key": "signIn", "type": "button", "label": "Sign in to OneDrive" }
]
| Type | Shown as | Value | Fields besides key, type, label, description |
|---|---|---|---|
string |
A text box | Text | default |
secret |
A password box | Kept as a secret, never a value | none (no default) |
bool |
A switch | true or false |
default |
number |
A number box | A number | default, min, max |
choice |
A drop-down | One of choices |
choices (needed, not empty), default |
path |
A box and a Browse button | A file or folder path | default, pathKind ("file", the default, or "folder") |
button |
A button | None | none (no default) |
keystarts with a letter, then letters, digits,.,_and-, at most 64 characters, and is not case sensitive within a plugin. A plugin may declare at most 50 settings. A manifest that breaks a rule is listed in Settings with the reason.- A setting type Ignis doesn't know makes the plugin "built for a newer version of Ignis: update Ignis", as an unknown permission does.
- Ignis keeps the user's values with its own settings, under the plugin's id (secrets are kept apart). A
stored value the manifest no longer allows (another type, out of range, a removed choice) counts as
unset, and the default is used and shown. A stored value whose key the manifest no longer declares as a
setting with a value (it was removed, or is now a
secretor abutton) is deleted when Ignis finds the plugin, so an update that turns a text setting into a secret leaves no plain-text copy behind. Settings checks what the user types and says what is wrong ("Enter a number from 1 to 50.") instead of saving it. - A button doesn't store anything. Pressing it calls your
IActionHandler.InvokeAsyncwithActionIdset to the button'skeyand noResultId, so handle that id like a custom action (it has the same 10 seconds, and starts the plugin if it isn't running).
Reading the settings. context.Settings (on the PluginContext that StartAsync gets) holds the
values:
public Task StartAsync(PluginContext context, CancellationToken ct)
{
_settings = context.Settings;
_settings.Changed += OnSettingsChanged;
return Task.CompletedTask;
}
private int MaxResults => (int)(_settings.GetNumber("maxResults") ?? 10);
private string? Cli => _settings.GetString("cliPath"); // GetBool for a bool
Settings.Valuesis every setting that has a value, by key (aJsonElementeach). A setting with no stored value and no default is left out, as are secrets and buttons.- The values are read from Ignis while the plugin starts, before
StartAsync, so they are there from the first line. When the user changes a setting, Ignis tells a running plugin (it never starts one for this); the SDK reads the settings again in the background and then raisesSettings.Changed. A handler that throws is logged and the others still run.Valuesis replaced whole, so read it again in the handler.Changedis raised on a thread-pool thread, possibly while a query runs on another, so make what the handler changes safe to read from your query code. - A change to an item source's setting makes it load again at once.
Secrets
An API key or token belongs in a secret, never in a plain setting or in the plugin's own files.
A
secretsetting is entered in Settings (a password box). The card shows only whether one is set, never the value, and a value can be replaced or cleared. Read it withcontext.Secrets.Get("apiKey").A plugin can keep more secrets of its own, such as an OAuth token, without declaring them:
await context.Secrets.SetAsync("refreshToken", token); // a null value deletes itThe key must look like a setting key, and not be one of the plugin's non-secret settings. After Ignis accepts the request,
Secrets.Getreturns the new value. A refusal throwsPluginHostException. Secrets a plugin stores itself are not listed on its card.A value is at most 64 KB (65,536 characters), a plugin may hold at most 32 secrets, and all of a plugin's secrets together (keys and values) are at most 512 K characters (524,288). Past a limit
SetAsyncis refused (InvalidParams) with a plain message.Ignis encrypts the secrets of each plugin for the current Windows user (DPAPI), in
%LOCALAPPDATA%\Ignis\Secrets\<id>.secrets. They are never written to Ignis's settings or to any log, and they don't move to another Windows account or machine. A file Ignis can't decrypt counts as empty and is logged.Uninstalling a plugin removes its settings values and its secrets. Updating it keeps them. So a plugin that is reinstalled after an uninstall asks for its API key again.
Sign-in is the plugin's job: it opens the browser with
context.Host.OpenAsyncand runs its own loopback redirect. Ignis provides no token broker.
Host services
A plugin asks Ignis to do things for it through context.Host. Each call is a request to Ignis:
| SDK call | Permission | Does |
|---|---|---|
Host.SetClipboardTextAsync(text) |
clipboard |
Puts text on the clipboard |
Host.GetClipboardTextAsync() |
clipboard |
The clipboard's text, or null; text over 1,000,000 characters is refused |
Host.OpenAsync(target) |
none | Opens a URL, file or folder, by the rules of the built-in Open action |
Host.LaunchAsync(command, args, workingDirectory) |
launch |
Starts a program for the user, outside the plugin's job, so it keeps running when the plugin stops |
Host.NotifyAsync(title, message) |
notifications |
Shows a notification from Ignis |
Host.PasteAsync(text) |
paste |
Pastes text into the window the user came from |
Host.SetQueryAsync(text) |
none | Replaces the search text, only while Ignis is shown |
Host.AllowForegroundAsync() |
windows |
Lets the plugin's process bring a window of its own to the front |
context.Secrets.SetAsync(key, value) |
none | Stores or deletes a secret |
context.Settings and context.Secrets.Get are read for you when the plugin starts and when a setting
changes; they don't ask Ignis each time.
Details:
OpenAsyncneeds no permission forhttp,httpsandmailtoaddresses and for existing, fully qualified files and folders that aren't programs or scripts. A program, a script or another URI scheme needslaunch: without it the answer isPermissionDenied. Any other refusal (a missing or relative path) isInvalidParams.LaunchAsyncis never run through a shell and refuses.batand.cmdfiles; a refusal isInvalidParams.NotifyAsyncshows a balloon from Ignis's tray icon. The title is yours, cut to 63 characters. The message is yours, then a new line and the plugin's name, 255 characters in all: the plugin's name is always kept, and it is your message that is cut to make room. Text over a limit ends with "…". With no tray icon nothing is shown, and Ignis logs that.PasteAsyncputs your text on the clipboard, hides Ignis, brings the window that was active when Ignis was shown to the front and presses Ctrl+V. Half a second later the old clipboard text is put back (a clipboard with no text is cleared; a picture on it is lost). Ignis pastes only while it is shown, or within 10 seconds after the user ran one of the plugin's actions (so aHideAtOnceaction can paste); at any other time the answer isNotAvailable("Ignis can only paste while it is open or just after you chose one of this plugin's results."). It also answersNotAvailableand changes nothing when there is no window to paste into: none was active when Ignis was shown, it is gone, or Ignis was shown over one of its own windows (Settings). When Windows doesn't let that window come to the front the answer isNotAvailable("Ignis could not switch to the window to paste into.") and the old clipboard text is put back.SetQueryAsyncanswersNotAvailablewhile Ignis is hidden, and while the user is typing (they changed the search text less than 300 ms ago), so a plugin never types over them. The text goes in the search box, the caret at the end, and Ignis searches again even if the text is the same.AllowForegroundAsynccalls Windows'AllowSetForegroundWindowfor the plugin's process, so a window it opens next can come to the front.- The clipboard is used on a thread of its own, so a plugin that keeps the clipboard busy can't make Ignis
wait. Each clipboard call has 2 seconds; past that the request answers
NotAvailable("The clipboard is busy.").
Rate limits. Ignis counts each plugin's requests in token buckets that refill evenly. Over a limit the
answer is RateLimited:
| Requests | Limit |
|---|---|
| All host requests together | 20 per second |
NotifyAsync |
3 per minute |
SetClipboardTextAsync and PasteAsync, together |
5 per 10 seconds |
GetClipboardTextAsync |
5 per 10 seconds |
SetQueryAsync |
5 per 10 seconds |
OpenAsync, LaunchAsync and AllowForegroundAsync, together |
5 per 10 seconds |
Errors. A refusal throws PluginHostException, with the reason's code in Code (the constants are in
ProtocolInfo, such as ProtocolInfo.PermissionDenied). No answer within 10 seconds throws
TimeoutException.
| Code | Name | Means |
|---|---|---|
| -32002 | PermissionDenied |
The manifest doesn't ask for the permission |
| -32003 | RateLimited |
Too many requests; try again in a moment |
| -32004 | NotAvailable |
Can't be done now (SetQueryAsync while hidden, PasteAsync with no window, a busy clipboard); try again later |
| -32602 | InvalidParams |
A missing field, a refused OpenAsync or LaunchAsync, a bad secret key or value, a request over 4 MB |
| -32603 | InternalError |
It failed on Ignis's side; the message says so in plain words, never more |
| -32601 | MethodNotFound |
This Ignis doesn't offer the service |
Besides RateLimited, which any of them can answer, the codes each call answers:
| Call | Codes |
|---|---|
SetClipboardTextAsync, GetClipboardTextAsync |
PermissionDenied; NotAvailable "The clipboard is busy." when another app holds the clipboard or it doesn't answer within 2 seconds; for GetClipboardTextAsync, NotAvailable "The clipboard text is too large." over 1,000,000 characters |
OpenAsync |
PermissionDenied (needs launch), InvalidParams (refused), InternalError |
LaunchAsync |
PermissionDenied, InvalidParams (refused), InternalError |
NotifyAsync |
PermissionDenied, InternalError |
PasteAsync |
PermissionDenied; NotAvailable when it can't be done now (see PasteAsync above) or "The clipboard is busy." |
SetQueryAsync |
NotAvailable (see SetQueryAsync above), InternalError |
Secrets.SetAsync |
InvalidParams (a bad key or value, or over a limit); InternalError "Ignis could not store the secret." when the secrets file can't be read, written or encrypted |
AllowForegroundAsync |
PermissionDenied, NotAvailable (the plugin's process isn't known), InternalError |
Any other failure on Ignis's side is InternalError "Ignis could not do that.". A permission refusal, a
rate-limit refusal and a failure on Ignis's side are logged in the plugin's log, each kind at most once a
minute per call.
Permissions
A plugin lists what it needs in permissions: clipboard, paste, notifications, launch, network
and windows. Ignis enforces clipboard, paste, notifications, launch and windows for the host
services and built-in actions above. network is declared and shown but not enforced. A permission Ignis
doesn't know makes the plugin "built for a newer version of Ignis".
The user sees the permissions in two places, in plain words:
- The install question says "It can read and change the clipboard and start programs." and, for a plugin that is
globalor a fallback, "It will see everything you type in Ignis.", before the warning that a plugin runs with the user's permissions. - The plugin's card in Settings says "Can read and change the clipboard and start programs." and "Sees everything you type in Ignis.".
Permissions are not a sandbox: a plugin still runs with the user's rights, and can read what the user can.
plugin.json
{
"id": "com.example.shout",
"name": "Shout",
"description": "Upper-case whatever you type",
"version": "1.0.0",
"author": "Your Name",
"protocolVersion": 1,
"minIgnisVersion": "2.1.0",
"run": { "command": "Shout.exe" },
"keyword": "shout",
"startup": "onDemand",
"permissions": [],
"logLevel": "Info"
}
| Field | Required | Description |
|---|---|---|
id |
Yes | A letter or digit (a-z, A-Z, 0-9), then also ., _ and -, at most 128 characters. It names the plugin's folders and log. |
name |
Yes | Shown in Settings |
protocolVersion |
Yes | The protocol version the plugin was built for: 1 |
minIgnisVersion |
No | Oldest Ignis that can run the plugin, as major.minor.build. The template fills in the first Ignis that runs plugins built with this SDK. |
run.command |
Yes | The program to start: the plugin's exe (Shout.exe); run.args is an optional list of arguments |
keyword |
No | The text before a space that sends a search to your plugin |
global |
No | true to receive every search, not only those that start with your keyword |
fallback |
No | true makes the plugin a fallback: asked only when nothing else found anything |
startup |
No | onDemand (default) or eager |
items |
No | Makes the plugin an item source: { "refresh": "PT5M", "watch": false, "global": false } |
settings |
No | The plugin's settings, shown on its card: a list of { key, type, label, ... } (at most 50) |
permissions |
No | clipboard, paste, notifications, launch, windows (enforced) and network (shown, not enforced). See Permissions. |
logLevel |
No | Minimum level for the plugin's log: Trace, Debug, Info, Warn, Error or Fatal |
description, version, author |
No | Shown in Settings; the install question names the author and version. dotnet publish needs version: it names the ZIP. |
icon |
No | An image file in the plugin folder, shown for the plugin's results and on its card in Settings. dotnet publish puts it in the ZIP. |
run.command must be the exe that the project publishes, <project name>.exe: dotnet publish checks it
(see Publishing the plugin). Ignis runs it from the plugin's folder and never
through a shell.
A plugin.json Ignis can't read, or that fails a check above, shows in Settings with the reason. A
folder whose plugin.json has no protocolVersion is listed as "built for an older version of
Ignis: uninstall it, or ask its author for an update".
Compatibility is checked before your plugin runs. If protocolVersion is newer than Ignis
speaks, or minIgnisVersion is higher than the running Ignis, Settings lists the plugin with "built
for a newer version of Ignis: update Ignis" and never starts it. If the protocol version is one this
Ignis has dropped, the reason is "built for a version of Ignis this one no longer supports: ask its
author for an update". Ignis keeps speaking old protocol versions, and new features inside a version
are additions, so a plugin built for protocol 1 keeps working as Ignis is updated.
Publishing the plugin
A user's machine may have no .NET runtime, so a plugin is published with Native AOT: one small exe that needs no runtime and starts in about 10 ms. The SDK uses source-generated JSON and no reflection, so it works with AOT; keep your own code AOT-compatible too (the publish warns about code that isn't).
dotnet publish -c Release
Run it in the project's folder. It checks plugin.json first, before anything is compiled, then
compiles the plugin, and then writes the installable package:
- Where:
bin\Release\<id>-<version>.zip, named afteridandversioninplugin.json(bin\Release\shout-1.0.0.zip). A ZIP of the same name is replaced. The published exe itself is inbin\Release\net10.0\win-x64\publish\. - What: exactly the exe that
run.commandnames andplugin.json, at the ZIP's root, and theiconfile ifplugin.jsonnames one, at the path it gives. - Elsewhere:
dotnet publish -c Release -p:IgnisPluginPackageDir=C:\outwrites the ZIP to another folder (a relative path is taken from the project's folder).-p:IgnisPluginPackage=falseturns the check and the ZIP off.
Use dotnet publish. Visual Studio's Publish command isn't supported: the ZIP step needs the MSBuild
that comes with the .NET SDK.
When the publish refuses. Each problem is a build error with a code, pointing at the file to fix:
| Code | Message | Fix |
|---|---|---|
IGNISPLUGIN001 |
plugin.json is not valid JSON: the reason | Fix the JSON at the line and column given. Comments and trailing commas are allowed. |
IGNISPLUGIN002 |
plugin.json needs "id". (or "version", "protocolVersion", "run.command") | Add the field. |
IGNISPLUGIN003 |
run.command "command" is not the exe this project publishes ("name.exe"). | Set run.command to the exe's name, which is the project's (assembly's) name with .exe. |
IGNISPLUGIN004 |
An Ignis plugin is published with Native AOT: set PublishAot to true. | Add <PublishAot>true</PublishAot> to the project. |
IGNISPLUGIN005 |
plugin.json names the icon "icon", which is not in the project folder. | Put the icon file in the project's folder (or a folder under it), or fix the path in icon. |
IGNISPLUGIN006 |
plugin.json's id "id" is not one Ignis accepts: a letter or digit first, then letters, digits, '.', '_' or '-', at most 128 characters. | Change id to fit that rule, such as yourname.weather. |
IGNISPLUGIN007 |
plugin.json's version "version" can't be used in a file name. | Use a plain version such as 1.0.0, with no /, \, : or other character a file name can't hold. |
A project with a plugin.json that publishes something other than a console exe gets the warning
IGNISPLUGIN100 ("plugin.json is here, but this project's OutputType is "type", so no plugin ZIP is
made; ...") and no ZIP. Set <OutputType>Exe</OutputType>.
The C++ build tools. Native AOT links the exe with the Microsoft C++ tools. Install the "Desktop
development with C++" workload, in Visual Studio or in the Build Tools for Visual Studio. The AOT
compiler finds those tools with vswhere.exe, which it calls by name, and the folder Visual Studio puts
it in isn't on PATH by default. If the publish fails with an error about vswhere, add the folder
first:
$env:PATH = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer;$env:PATH"
dotnet publish -c Release
A project of your own. The template's project is all a plugin needs. To turn another console project
into a plugin, add the package (dotnet add package Ignis.Plugins.Sdk), put a plugin.json next to the
project file, and give the project the template's properties:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net10.0</TargetFramework>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<SelfContained>true</SelfContained>
<PublishAot>true</PublishAot>
<InvariantGlobalization>true</InvariantGlobalization>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Ignis.Plugins.Sdk" Version="1.0.0" />
</ItemGroup>
<ItemGroup>
<None Update="plugin.json" CopyToOutputDirectory="PreserveNewest" />
</ItemGroup>
</Project>
A plugin needs no WPF and no -windows target framework. The package brings the step that checks
plugin.json and writes the ZIP, for any exe project with a plugin.json in its folder.
A plugin with more files. The ZIP from dotnet publish holds only the exe, plugin.json and the
icon. A plugin that needs other files beside it (data files, a second program) can be zipped by hand:
plugin.json and the plugin's program at the ZIP's root, or inside one top-level folder. Ignis unpacks
all of it, up to 100 MB and 2,000 files, and refuses a package that packs a file at a ratio only a zip
bomb has.
Installing and trying a plugin
Install. In Ignis's Settings, under Plugins, choose Install plugin and pick the ZIP. Ignis
reads the package first and refuses one it can't use, with the reason: not a readable ZIP, no usable
plugin.json, built for an older version of Ignis, needing a newer Ignis (protocol, minIgnisVersion
or a permission it doesn't know), a run.command that is not in the package, or the id of a plugin that
comes with Ignis. Then it asks: the plugin's name and version (or "from X to Y" for an update), that the
author is only what the package claims, and that a plugin runs with your permissions. On Yes it stops the
plugin if a copy is running, unpacks the package to %LOCALAPPDATA%\Ignis\Plugins\<id>\, and finds all
the plugins again, so the plugin can be used at once. Installing a version over an older one is an update,
and a failed install leaves the old copy in place.
Uninstall. Settings > Plugins has a trash-can button (tooltip "Uninstall plugin") on every plugin that did not come with Ignis. It stops the plugin, deletes its folder, removes its stored items, its settings values and its secrets, and finds the plugins again. (An update keeps the values and the secrets.) Turn a plugin off instead (the switch on its card) to keep it installed but never started or asked.
The plugin's card. Each plugin in Settings shows its own icon (the manifest's icon, else a puzzle
piece), its state (Off, Stopped, Starting…, Running, or "Failed: the reason" with a Start again button),
what it may do, its settings, and View log, which opens the plugin's log (or its folder, when there is
no log yet). An item source has Refresh now, which loads its items again at once.
Try it. Open Ignis and type the keyword and some text (shout hello). The plugin's log is
%LOCALAPPDATA%\Ignis\Logs\Plugins\<id>.log: it holds what the plugin writes to stderr and its Logger
lines, the loading of its items, and anything Ignis refused it. If the plugin crashes, its exit code and
the last lines of its stderr are in Ignis's main log, %LOCALAPPDATA%\Ignis\Logs\Ignis.log.
During development, copying the published exe and plugin.json straight to
%LOCALAPPDATA%\Ignis\Plugins\<id>\ and restarting Ignis works too.
How a plugin talks to Ignis
You don't need this to write a plugin with the SDK, but it helps when you read a plugin's log or debug one that won't start.
- A process. Ignis starts
run.commandin the plugin's folder, with stdin and stdout redirected, when the plugin is first needed (or at start-up, for"startup": "eager"). The plugin and anything it starts run in a Windows job that ends with Ignis, so a plugin never outlives it. A program the plugin wants to start for the user goes throughLaunch, which Ignis runs outside that job. - JSON-RPC 2.0 over stdin and stdout. Every message is one line of UTF-8 JSON, at most 4 MB. Either side can send requests (which get an answer) and notifications (which don't). Stderr is the plugin's log. Property names are camelCase, and either side ignores fields it doesn't know.
- The handshake. Ignis's first message is
initialize, with the protocol versions it speaks, its own version, the plugin's id and data folder, the theme and the culture. The plugin answers with the version it chose and what it does (queries, items, fallback). A plugin that doesn't answer within 10 seconds, or picks no version Ignis offered, is not used. - The work. Ignis sends
query,invokeActionanditems/loadrequests; the plugin streams more results withresults/update, pushes items withitems/changed, writesloglines, and asks for host services withhost/...requests. - The end. Ignis sends
shutdown; the plugin answers and exits, or is killed after 2 seconds.
To see a plugin's side of it, start the exe in a console and type a message on one line:
{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersions":[1],"ignisVersion":"2.1.0","pluginId":"shout","dataDirectory":"C:\\temp","theme":"dark","culture":"en-US"}}
{"jsonrpc":"2.0","id":2,"method":"query","params":{"queryId":"q1","text":"hello","keyword":"shout","reason":"keyword"}}
Use the C# SDK to write plugins: the protocol's full reference is not published yet.
Troubleshooting
dotnet publish fails. An IGNISPLUGIN error says what is wrong with plugin.json or the project:
see the table under Publishing the plugin. An error about vswhere, a linker
or the C++ tools means the C++ build tools are missing or not found.
The plugin is listed in Settings with a problem. The card says what is wrong: "built for an older
version of Ignis" (no protocolVersion), "built for a newer version of Ignis: update Ignis" (a newer
protocol, minIgnisVersion or permission), "its program was not found", a keyword that is taken or
starts with @, # or !, or what is wrong in plugin.json (an items section without a keyword or
global, a refresh under one minute).
Nothing happens when I type the keyword. Check that the plugin is on in Settings, and read
%LOCALAPPDATA%\Ignis\Logs\Plugins\<id>.log and Ignis.log beside it (the card's View log opens the
first). A plugin that crashed three times in five minutes is Failed: its card says why and has
Start again.
An item source shows no items. The first load starts about five seconds after Ignis starts, and a
load that misses its limits or whose plugin crashed is logged in the plugin's log and tried again at
the next refresh, later each time it fails (up to an hour). A plugin with no refresh is loaded once per
start; use Refresh now on its card to load again. Items past 100,000 are refused (also logged).
Remember a manifest's keyword: without global, items show only after it.
Enter does nothing. An action that is refused, fails or runs out of time keeps the window open and is
logged: Open of a program or a custom URI scheme needs the launch permission, and a custom action
has 10 seconds. A shortcut that does nothing was probably dropped: it needs Ctrl or Alt (unless it is
F1 to F24), and Ignis's own keys are refused. The plugin's log says so.
A host call throws. PluginHostException.Code says why: PermissionDenied (add the permission to
permissions), RateLimited (see the limits under Host services), NotAvailable
(SetQueryAsync while Ignis is hidden, PasteAsync with no window to paste into) or InvalidParams
(a refused target, or a request over 4 MB). TimeoutException means Ignis gave no answer within 10
seconds; see the queues under Time limits.
My settings are empty. Only a plugin that implements IPluginStartup gets context.Settings. A setting
with no stored value and no default has no entry in Values; check with GetString and friends, which
return null.
The plugin writes to stdout and Ignis kills it. Stdout belongs to the messages between the plugin and
Ignis. The SDK redirects Console.Out to stderr after PluginHost.RunAsync starts; anything written
before it, or by a program the plugin starts that inherits stdout, can corrupt a message.