Appi 1.0.2

There is a newer version of this package available.
See the version list below for details.
dotnet tool install --global Appi --version 1.0.2
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest # if you are setting up this repo
dotnet tool install --local Appi --version 1.0.2
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=Appi&version=1.0.2
nuke :add-package Appi --version 1.0.2

Appi

What is Appi? Appi is short for App information.

The goal is to query multiple sources for information at once. Reachable by using your favorite shell from within your keyboard, without even touching your mouse.
Because your information sources will be different from mine, go start building your first plugin and get started using your command line or try combining it with PowerToys Run.

Installation

  • Install via NuGet: dotnet tool install --global Appi
  • Build from your own

Usage

Help information

USAGE:
    Appi <query> [OPTIONS]

ARGUMENTS:
    <query>                 Search for the given query in all active sources

OPTIONS:
    -h, --help              Prints help information
    -c, --case-sensitive    The query parameter will be case-sensitive

COMMANDS:
    find <query>
    config                  Configure Appi

Examples

  • appi thank
  • appi find thank
  • appi find -c thank
  • appi config open
  • appi config allow-libs true
  • appi config register-lib "my-own-plugin.dll"

Infrastructure

Some infrastructure classes are already provided. You can build up from given classes like:

  • File (see sources.json after running appi config open and change the path of your text file)
  • More to come out of the box (want to collaborate?)

Plugins

This app is highly extensible by adding own plugins. You can fetch data from any source you can imagine, e. g. from your SharePoint Server or any database.

Just follow these simple steps:

  1. Create a .NET 7 class library
  2. Add the Appi.Core NuGet package as a dependency
    (e. g. PM> Install-Package Appi.Core)
  3. Create classes that implement ISource and ResultItemBase
  4. Register the new assembly by calling appi config register-lib "pathToAssembly.dll"

Example for implementing ISource

The class implementing ISource must have a parameterless constructor.
The ReadAsync() method must pass the FindItemsOptions object which contains the query and returns the found data.

using Core.Abstractions;
using Core.Models;

namespace ExternalSourceDemo
{
    public class ExternalDemoSource : ISource
    {
        public string TypeName { get; set; } = typeof(ExternalDemoSource).Name;
        public string Name { get; set; } = "Demo Assembly";
        public string Description { get; set; } = "Returns hard-coded hello world.";
        public bool IsActive { get; set; } = true;
        public int SortOrder { get; set; } = 50;
        public string? Path { get; set; } = null;

        public async Task<IEnumerable<ResultItemBase>> ReadAsync(FindItemsOptions options)
        {
            var output = new List<ExternalDemoResult>()
            {
                new() { Name = "Hello", Description = options?.Query ?? "World" }
            };

            return await Task.FromResult(output);
        }
    }
}

Example for implementing ResultItemBase

This class controls the output of an item by overriding the ToString() method and displays the possible actions with the result of GetActions() method if an item of this source gets selected. You can easily interact with predefined services like using the ClipboardService or ProcessService for most frequent used actions.
By using the Result attribute you can define the displayed properties in the output table.

using Core.Abstractions;
using Core.Attributes;
using Core.Models;

namespace ExternalSourceDemo
{
    public class ExternalDemoResult : ResultItemBase
    {
        [Result]
        public override string Name { get => base.Name; set => base.Name = value; }

        [Result]
        public override string Description { get => base.Description; set => base.Description = value; }

        public override IEnumerable<ActionItem> GetActions()
        {
            return Enumerable.Empty<ActionItem>();
        }

        public override string ToString()
        {
            return $"{Name} {Description}!";
        }
    }
}

Up next

Build more infrastructure classes like

  • Microsoft SQL
  • MySQL / MariaDB
  • SQlite
Product Compatible and additional computed target framework versions.
.NET net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last updated
1.3.0 254 11/12/2023
1.2.2 143 10/28/2023
1.2.1 124 10/22/2023
1.1.0 96 10/10/2023
1.0.5 96 9/18/2023
1.0.4 108 8/28/2023
1.0.2 104 8/9/2023
1.0.1 105 8/7/2023
1.0.0 104 8/7/2023

inital release